I hope somebody can help me I have been at this for hours. I am new to JavaScript.
I need a script to show a layer of hidden content only when on a certain URL. I have searched and found nothing, is this possible to do ?
Example:
http://mydomain.com/index.php?1 = content = hidden
http://mydomain.com/index.php?2 = content = show
(The content is basically a table of text)
I did find the following script (below) which pulls the current URL from the browser. but have no clue how to do this
<script language="JavaScript">
Expand|Select|Wrap|Line Numbers
- var URL = unescape(location.href) // get current URL in plain ASCII
- var xstart = URL.lastIndexOf("") + 1
- var xend = URL.length
- var hereName = URL.substring(xstart,xend)
- var herePath = URL.substring(0,xstart)
- document.write("The name of the current file is: " + hereName)
- document.write("The path of the current file is: " + herePath)
Any help would be great!