• Post Reply Bookmark Topic Watch Topic
  • New Topic

Browser javascript enabled  RSS feed

 
Felix Erendi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know if it is possible from a jsp-page to check if a browser is javascript enabled?

Br Felix K
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not directly on the first page of JSP. But any link/submit that takes you from the first page away can include a parameter that is pre-set to 0, and which gets set to 1 by JavaScript. Thus after you process that first link/submit, you can set a boolean session variable with the result.
 
Felix Erendi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf,

That would do the trick!
Do you have any example code to submit?

/Felix
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basic idea:

<a href="test?q=0" onclick="window.location.href='test?q=1';return false;"></a>

Eric
 
Felix Erendi
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers Eric!

/Felix
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ALSO You could also set it up to redirect automatically:


Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the HTML/Javascript forum.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!