What happens when no javascript is enabled

  • pompei
  • Graduate
  • Graduate
  • pompei
  • Posts: 117

Post 3+ Months Ago

Me again, slightly related to my previous post.

What happens to the following when the user doesn't have javascript enabled?

Code: [ Select ]
<tr onclick="window.location.href='newpage.html'"><td>click here


I suppose then nothing would happen, so is there an alternative using the <noscript> option? Is it worth using the alternative since it seems most people have javascript enabled?

I'm aware that you could use an href but I don't want the text inside the row to conform to any link text style.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • CazpianXI
  • Proficient
  • Proficient
  • User avatar
  • Posts: 285

Post 3+ Months Ago

If JavaScript is not enabled, the text between the <noscript> tags will be displayed when the page loads.

But REMEMBER: This will only happen if the user's browser supports JS but has disabled it. If the user is just using an old browser that dosen't support JS, then neither the JS or the <noscript> will work.

To make matters worse, some browsers that support JS will display the <noscript> text. >:(
  • CazpianXI
  • Proficient
  • Proficient
  • User avatar
  • Posts: 285

Post 3+ Months Ago

Hmmm....

You may want to use this code:

Code: [ Select ]
<tr onclick="window.location.href='newpage.html'"><td><a href="newpage.html">click here</a>


That way, JS and Non-JS browsers will be happy with it.

Hope this helps.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: Liamw411 and 48 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.