Reply
browser have javascript enabled or not script
Old 10-04-2005, 02:39 AM browser have javascript enabled or not script
Novice Talker

Posts: 10
i am looking for a javascript. the code will do this.


i want a JS that will see that the browser accessing tha page has javascript enabled or not. if the page has javascript enabled then the page will load fine and if the browser has not enabled javascript then the page will not show up and the rest of the scripts.
usman is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 10-04-2005, 09:44 AM
Minaki's Avatar
Defies a Status

Posts: 1,626
Location: Guildford, UK
Quote:
then the page will not show up and the rest of the scripts.
??
That soesn't make sense.

If you want to have a seperate page for JavaScript enabled browsers, simply put a peice of JavaScript in the page header that will immidetily redirect the user to the page that requires script. Leave the origional page as the one that doesn't require script. That way, if JavaScript is disabled, the page will never be redirected and the user will be left with the non-javascript page.
__________________
Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
Inoxia Pyrotechnics Supplies | Surrey Angels Cheerleading Squad
Minaki is offline
Reply With Quote
View Public Profile Visit Minaki's homepage!
 
Old 10-04-2005, 10:00 AM
Novice Talker

Posts: 10
i am running a phpnuke site and i want all my users to must enable javascript if they want to use my site. If they have enabled javsscript then they r allowed to use my site. now some users disable javscript from their browser and they r still allowed to use my site. But i dont want this to happen. users must have javsscript enabled, if not then the site wont load.

Is there a script for this.??

Hope u understands now.
usman is offline
Reply With Quote
View Public Profile
 
Old 10-04-2005, 01:07 PM
sdcdesign.co.uk's Avatar
Extreme Talker

Posts: 199
Location: High Wycombe, Buckinghamshire, London
Code:
<html>
<head>
<title>enter page</title>
</head>
<body>

<script language="javascript">
window.location = "phpnuke/yourpage";
</script>

<noscript>

You must have javascript enabled in your browser to use this site.

</noscript>

</body>
</html>

Obviously you'll have to edit the layout of the page but this should work...
__________________
[ Insert witty, yet highly intelligent signature here ]
sdcdesign.co.uk is offline
Reply With Quote
View Public Profile Visit sdcdesign.co.uk's homepage!
 
Old 10-04-2005, 08:15 PM
chrishirst's Avatar
Super Moderator

Latest Blog Post:
Am I impressed or what?
Posts: 14,899
Location: Blackpool. UK
Hope you don't expect any results from search engines
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-05-2005, 04:41 AM
Novice Talker

Posts: 10
have u ever test this js. does it really work.
usman is offline
Reply With Quote
View Public Profile
 
Old 10-05-2005, 02:54 PM
sdcdesign.co.uk's Avatar
Extreme Talker

Posts: 199
Location: High Wycombe, Buckinghamshire, London
Works on my comp fine !
__________________
[ Insert witty, yet highly intelligent signature here ]
sdcdesign.co.uk is offline
Reply With Quote
View Public Profile Visit sdcdesign.co.uk's homepage!
 
Reply     « Reply to browser have javascript enabled or not script
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.14920 seconds with 12 queries