Guest Grahamv2.0 Posted May 25, 2006 Share Posted May 25, 2006 OK so I'm new to JavaScript but here is the thing. I have created a page that when you go to it a security pop up box comes up where you can select "allow" or "dont allow". (I didn't create this security box, it is part of the browser) If they select "dont allow" or hit cancel then they wont be able to view the page right. Is there any way I could create a page that says that they must select "allow" or else the page wont be viewed right and have them redirected to that page when they dont allow it? Link to comment Share on other sites More sharing options...
scott100 Posted May 25, 2006 Share Posted May 25, 2006 Like this????? <html> <head> <title></title> <script type="text/javascript"> <!-- function check(){ var answer=confirm("You must agree to continue...\r\rOtherwise it's off to google..."); if(!answer)window.location="http://www.google.com"; else document.getElementById('mydiv').style.display="block";}//--> </script> </head> <body onload="check()"> <div id="mydiv" style="display:none"><h1>This is my content</h1></div></body> </html> (I didn't create this security box, it is part of the browser) ?? what is this security box? Link to comment Share on other sites More sharing options...
malcolm Posted May 31, 2006 Share Posted May 31, 2006 OK so I'm new to JavaScript but here is the thing. I have created a page that when you go to it a security pop up box comes up where you can select "allow" or "dont allow". (I didn't create this security box, it is part of the browser) If they select "dont allow" or hit cancel then they wont be able to view the page right. Is there any way I could create a page that says that they must select "allow" or else the page wont be viewed right and have them redirected to that page when they dont allow it?<{POST_SNAPBACK}> Graham,Do you mean the alert(confirm) box of the browser as the security box? You say that you have not created it. Give more information regarding your query sothat we can help you after a clear understanding. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now