 |
| ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 2nd, 2005, 04:58 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
ASP code for enabling javascript
Hi
I have to write a code enable javascript if it is disabled in the browser, because sometimes this happens that javascript is disabled in some browser like Mozilla,I have to write the code to first detect the enability of javascript and it must give some alert message or atomatically change this to javascript enable.
Thanks
Lily
|
|

March 2nd, 2005, 03:59 PM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Lily,
I don't think there is any ASP script can enable or disable javascript on client browser.
All that we can do is provide some javascript test, and tell users how to enable it if it disabled.
Regards,
Sherief C. Mursyidi
|
|

March 3rd, 2005, 02:51 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can u give the code to test javascript with ASP code.
|
|

March 3rd, 2005, 04:48 AM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
All you have to do, just ask users to click on button or link that given onclick action using simple javascript, like alert.
simple example:
It is possible that JavaScript is disabled on your browser.
Select this <A HREF="javascript:alert('Javascript is enabled. You do not need to do anything.');"> to see if Javascript is enabled.
If nothing happened, you need to enable javascript.
Regards,
Sherief C. Mursyidi
|
|

March 7th, 2005, 12:17 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2004
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How this ll b possible to check in onclick action if javascript will be disabled?
|
|

March 7th, 2005, 07:32 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Something like this is never going to be easy in ASP because it runs at the server not the client. The best I've seen is provide a javascript redirect and test the result, something like this:
http://aspfaq.com/show.asp?id=2058
|
|

March 8th, 2005, 02:13 PM
|
|
Authorized User
|
|
Join Date: Aug 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Lily, that's the point, if the user see nothing happen on the screen, they need to enable their browser.
Regards,
Sherief C. Mursyidi
|
|

March 10th, 2005, 09:28 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
|
|
hii Lily611
Offcourse you can check using asp code
try this example
http://www.w3schools.com/asp/asp_browser.asp
Hope this will help you
Cheers :)
vinod
|
|

March 10th, 2005, 09:38 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
|
|
vinod, the browscap link you suggested only tells whether the user's browser has support for javascript. it doesn't help you find out if javascript has been turned off...
|
|
 |