Priest, James (NIH/NIEHS) [C] wrote:
Wait, I see what you're saying... the same link would serve both
JS and non-JS users.  How would a link that would work for both
situations be coded?

Seems like you could have two different links:

<div id="js-on">http://mylink/ajax.cfm</div>
<div id="js-off">http://mylink/query.cfm</div>

Then you'd set js-on to 'display: none;' by default and then turn it on
with jQuery (and turn off 'js-off').

I would recommend that you don't do this. Rather, use JS to convert the link from one format to the other. I suggested added "ajax=true" to the query parameter, but there are many other ways it could be done. But if you have two links this way, those browsing with a non-standard device (non-CSS, non-JS) will have one working and one broken link available... not pretty.

  -- Scott

Reply via email to