Bruce Gust
asked on
Javascript homepage button acting wierd
Here's my code:
<INPUT TYPE="image" SRC="images/homepage_butto n.jpg" width="200" height="17" border="0" onClick="this.style.behavi or='url(#d efault#hom epage)';
this.setHomePage('http://www.countryshowdown.com/Texaco/contestant.php?id=<?php echo $contestant_id; ?>');">
</FORM>
It works. My homepage becomes the page I've got referenced. The only snag is that as soon as youc click the button, the page gets an error because the URL has some random code as the id number, consequently you get all kinds of errors.
Again, the page is made the homepage, but in the process the page refreshes with the same URL, but you've got a different set of characters for the id number. In this case, instead of the URL being http://www.countryshowdown.com/Texaco/contestant.php?id=19022, instead the page you get after you click the button is http://www.countshowdown.com/Chevron/contestant.php?x=80&y=10
What am I missing?
<INPUT TYPE="image" SRC="images/homepage_butto
this.setHomePage('http://www.countryshowdown.com/Texaco/contestant.php?id=<?php echo $contestant_id; ?>');">
</FORM>
It works. My homepage becomes the page I've got referenced. The only snag is that as soon as youc click the button, the page gets an error because the URL has some random code as the id number, consequently you get all kinds of errors.
Again, the page is made the homepage, but in the process the page refreshes with the same URL, but you've got a different set of characters for the id number. In this case, instead of the URL being http://www.countryshowdown.com/Texaco/contestant.php?id=19022, instead the page you get after you click the button is http://www.countshowdown.com/Chevron/contestant.php?x=80&y=10
What am I missing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What are you trying to get to happen here. Please just tell us in plain language, thanks. ~Ray
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dave's suggestions explained where I was getting the bizarred URL (the x and y coordinates). I found another script that accommodated the button that I wanted to use as well as different browser types. That "direction" came about as an indirect result of Ray's suggestion which had sound code, but didn't accommodate anything other than IE. Taken together, we got it done!
Good, glad you got it done. Thanks.