html - Is it possible to remove a radio button group set to its default value from the get parameter list? -
this question getting "nice" short urls input form, "pure" html, when javascript off. form, gives user few choices, each in form of radio buttons, users alter @ 1 value default settings, or none @ all:
<form method=get action="form.html"> setting 1: <input type="radio" name="val1" value="default1" checked> default value <input type="radio" name="val1" value="alt1"> alternative value <input type="radio" name="val1" value="other1"> other alternative value <br> setting 2: <input type="radio" name="val2" value="default2" checked> default value <input type="radio" name="val2" value="alt2"> alternative value ... </form>
so, when user submits form, url this:
form.html?val1=default1&val2=alt2&val3=default3&val4=default4
but want url following:
form.html?val2=alt2
i aware of how achieve desired nice urls client side javascript. , aware how clean url using server side redirect in case, javascript off. there way achieve short , nice url without javascript , without server redirects, plain html? following 2
the problem though, @ least google tends "play around" forms, generating new urls, pushed backlog of google crawler needs crawl. because of number of urls in backlog , frequency, crawler requests urls, great help, if google starting final urls , not requiring 301 redirect.
my attempts remove val1=default1 parameter url without javascript/redirect have failed, though. example:
<input type="radio" name="val1" value="" checked> default value
still puts "val1=" url. and
<input type="radio" name="val1" checked> default value
results in "val1=on" in url. apparently, radio buttons have "on" default value.
any suggestions?
use method post
`<form method="post" action="form.html">`
instead of method get
you nice url form.html instead of
form.html?val1=default1&val2=alt2&val3=default3&val4=default4
but have change coding of page(form.html here) handles form data , it.
Comments
Post a Comment