Hey, I know this is a PHP board but I figure that you guys all have some exp with JavaScript. Here is my question. On one of my websites there are three frames: One named title, another named nav, and another named main. On the nav frame there is a button that when clicked I want to open up a php page in the main frame.
I tried doing
<input type="button" value="Home" onClick="window.location='main.php'">
But as you probably know that just changes that frames location to main.php but I want it to change the frame main to that page.
Anyone have know how to do this?
Thanks for all help provided.
-Nigma
Question concerning JavaScript, I know its php board
Moderator: General Moderators
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
There is a clientside forum.
try
try
Code: Select all
<form action="main.php" target="framename">
<input type="submit" value="Home" />
</form>Thanks a bunch! I also just found out that you can do:
<input type="button" value="Home" onClick="parent.main.location.href='home.html'">
I would have never thought of doing it the way you said.
Thanks for responding so quikly and answering my question without chewing me out about it being a JavaScript one ; )
-Nigma
<input type="button" value="Home" onClick="parent.main.location.href='home.html'">
I would have never thought of doing it the way you said.
Thanks for responding so quikly and answering my question without chewing me out about it being a JavaScript one ; )
-Nigma