|
|
|
Various searchengines index your entire site, thus allowing users to go directly to an subpage
in your website. This is nice for the surfer, but when using frames they probably won't be able
to get anywhere else unless you provide a link.
This gives an option to let the user go to the proper url:
Insert below the line all into the html-page to check.
<script language="javascript">
function CheckUrl(page){
if (window.location.pathname.slice(1) == page)
{Alert("You have arrived on a subpage, please click OK below to go to the proper website
address.");location.replace="http://yourwebsiteadress.xx/pagename.xxxx"
}
}
</script>
Now you call this function from the fololowing html tag.
<body onload="Javascript:CheckUrl('pagename.ext')" >
That's all.
You could also make the script available in a .js file on your site.
The you would add it on loading the page like this:
<script language="javascript" src="/path/scriptname.js"></script>
Should work okay.
If you ever find out how to reload the menupage and still keep the requested page in the
proper frame send me an email. I tried it and locally it works, but once online, it crashes..
|
|
| Builds JavaScript that updates the contents of one selector based on another. Categories : HTML, Java Script, PHP, Complete Programs, General | | | Javascript Background Scroller Categories : Java Script, CSS, HTML | | | How to create <SELECT> menues that change on the fly according to other <SELECT> menues on the page? Categories : Java Script, HTML | | | Prevent Right Mouse steal your graphics Categories : HTML, Java Script, Security | | | Cool tool tip Categories : Java Script, HTML, Web Design | | | Conditional Check - a script that allows a user to submit a form only if the user check a checkbox. Categories : HTML, Java Script, Form Processing, Beginner Guides | | | Javascript linked dropdowns Categories : Java Script, HTML, Classes and Objects | | | Javascript animated menu items Categories : DHTML, CSS, Java Script, HTML | | | Page Loading Message shown during the time your site's page is being loaded. Categories : HTML, CSS, Java Script | | | complete simply working javascript password generator file. Use letter, vowels, consonants (uppercase and lowercase) arrays to create a really random and secure password.
improved security using time functions to initialize random number generator. Categories : Java Script, HTML, Security, Authentication, Strings | | | Bookmarklets are simple tools that extend the surf and
search capabilities of Netscape and Explorer web browsers. Categories : Java Script, HTML, General | | | How to get the Focus (Cursor) into a Form-Element. Categories : HTML, Java Script | | | Show or Hide your Content using Javascript Categories : Java Script, HTML, CSS, Beginner Guides | | | Higly Customizable Javascript Calendar Script Categories : Java Script, Calendar, Date Time, HTML, CSS | | | Bouncing Marquee at Status Bar Categories : Java Script, HTML, Browsers | |
|
|
|