[RESOLVED] Javascript to change CSS style on window.load
Hello -
I have a dynamic page that loads different content depending on the url parameter "id". What I would like to do is simply have javascript load the url parameter "id" via php then run through an if, else if statement and depending on which url parameter (which content the page is displaying) highlight the link text (in a ul li) as a way of reassuring the visitor that they are on the page the intended to be on. I want to do this by simply adding a backgroundColor style to the element by its id.
In this code my page loads and properly displays the document.write text. That text is only there for debugging...... The script does not, however, alter the backgroundColor of the element.
Does anyone see the error in this code that is preventing this from working?
<script type="text/javascript">
function currentGallery() {
var gallery = "<?php echo $_GET['id'] ?>";
Bookmarks