Forum Moderators: mack

Message Too Old, No Replies

Update 2 other frames.

Using a input button to update other frames with Javascript

         

TecWizz

8:59 am on Sep 16, 2003 (gmt 0)

10+ Year Member



I tried to get this to work, but it don't.

<html>
<head>
<link rel='stylesheet' type='text/css' href='css/style.css'>
<script type='text/javascript'>function changeurl(){parant.banner.location.href='menu.php'}</script>
</head>
<body [body]>
<form method='POST' action='login.php'>
Write username:<input type text='text' name='login_name'><br>
Write password:<input type text='text' name='password'><br>
<input type='submit' value='submit' onclick='changeurl()'>
</form>
</body>
</html>

This Javascript should update the iframe "banner" with the file "menu.php", but it don't work. Nothing happens. I looked at www.w3schools.com for help, but with out any luck.

If you need more information, please post it.

Please help. I need this to my project at school. :-)

Sinner_G

4:34 pm on Sep 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Shouldn't it be parent instead of parant?

AWildman

4:43 pm on Sep 16, 2003 (gmt 0)

10+ Year Member



If the misspelling isn't your only problem, try parent.getElementById("bannerid").location.href = "menu.php";

TecWizz

8:19 pm on Sep 16, 2003 (gmt 0)

10+ Year Member



Thanks guys :)

Typing error...

But another question:

How do i delay a function 1000 ms(1 second)?

Best regards TecWizz

RonPK

9:12 pm on Sep 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> How do i delay a function 1000 ms(1 second)?

Try using something like setTimeout("function", 1000);