开发者

Javascript Disabled

开发者 https://www.devze.com 2023-01-29 13:43 出处:网络
i have a select dropdown list which has 4-5 fields. As soon as a user selects a value in the dropdown i have to assign a value to a hidden parameter on the page. (Using javascript function Onchange).

i have a select dropdown list which has 4-5 fields. As soon as a user selects a value in the dropdown i have to assign a value to a hidden parameter on the page. (Using javascript function Onchange). The same hidden parameter is passed on to a hyper开发者_如何学Golink url whenever a user clicks on to it on a same page.

This works fine when javascript is enabled, but what to do when javascript is disabled ? i know there is noscript tag but how can i achieve above functionality ? can you give me some example code ?

Many Thanks,


There is nothing that will assign it to a hidden field if you have javascript disabled.

If javascript is disabled you will have to be able to handle the form posting to the server and figuring out on the serverside from the selected item in the form.


When javascript is disabled, then, javascript is disabled. Javascript is not there. So any solutions relying on javascript being there will not work.

If you want to support javascript disabled users also, then you must design the page sconsidering that.

In your case, you might want to use the value of the <option> in the <select> that is submitted when the form is submitted (no matter whether javascript is enabled or not)


The solution to my problem is that i created a url and then overwrite it using noscript tag. on click i was calling a javascript function which was again overwriting the same .

thus when javascript was enabled, onclick function was sending it to popup and when javascript was disabled the noscript tag was overwriting it and redirecting to a another page.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号