frames and onload function for changing form action

admin

Administrator
Staff member
I'm really stuck....

At <!-- m --><a class="postlink" href="http://folk.uio.no/leikh/nyheter/">http://folk.uio.no/leikh/nyheter/</a><!-- m --> i have an index.html with two frames. The top frame has a link to a 'tell-a-friend' (<!-- m --><a class="postlink" href="http://folk.uio.no/leikh/nyheter/tipsnyhet.html">http://folk.uio.no/leikh/nyheter/tipsnyhet.html</a><!-- m -->) that opens in same frame.
The idea is that when loading this page i want it to read the
url of the content of the second frame, and parse it to the action field in the 'tell-a-friend' form...
This does not happen :(


Here's the HTML:

<html>
<head>
<title>tips en venn</title>
</head>

<body
onload="document.tips.action='http://home.no.net/leik/mailpage/mailpage.cgi?'+parent.nyheter.location.href">
<center>
<form action='' method="post" name="tips">
<input type="hidden" name="action" value=http://www.webdeveloper.com/forum/archive/index.php/"send">
<input type="hidden" name="url" value="">

Avsender <input type="text" name="sendername" value="" size="10">
&nbsp;
epost<input type="text" name="senderemail" value="" size="10">
&nbsp;
Mottaker <input type="text" name="recipient" size="10">
&nbsp;
epost:<input type="text" name="recipientemail" size="10">
&nbsp;
Melding?
<input type="text" name="message" size="10">
<input type="hidden" name="how" value="body">
&nbsp;
<input type="submit">
</table>
</center>
</form>

</body>
</html>
 
Back
Top