Page 1 of 1

Question concerning JavaScript, I know its php board

Posted: Tue Feb 25, 2003 9:19 pm
by nigma
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

Posted: Tue Feb 25, 2003 9:41 pm
by hob_goblin
There is a clientside forum.

try

Code: Select all

<form action="main.php" target="framename">
<input type="submit" value="Home" />
</form>

Posted: Tue Feb 25, 2003 10:18 pm
by nigma
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