469,292 Members | 1,310 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,292 developers. It's quick & easy.

Passing text to a frame in a window

Hello
Im trying to make this application that does this.
The user enters text in a window clicks GO and then a new window opens
with the text in a frame.

I assume I put the text in the URL.
But how do I get the frame on the next window to take the text
and put it in its textbox.

Aug 6 '06 #1
2 1374
Br**************@gmail.com wrote:
Im trying to make this application that does this.
The user enters text in a window clicks GO and then a new window opens
with the text in a frame.

I assume I put the text in the URL.
But how do I get the frame on the next window to take the text
and put it in its textbox.
form.htm =

<html>
<body>
<form target="_blank" method="get" action="frameset.htm">
<input type="text" name="T">
<input type="submit" value="Go">
</form>
</body>
</html>

frameset.htm =

<html>
<head>
<script type="text/javascript">
document.write('<frameset rows="350,*">')
document.write('<frame src="http://www.google.com">')
document.write('<frame src="myframe.htm?'
+location.search.substring(1)+'">')
document.write('</frameset>')
</script>
</head>
<body></body>
</html>

myframe.htm =

<html>
<head>
<script type="text/javascript">
pVal = location.search.substring(1)
pVal = pVal.replace(/^T=/,'')
document.write( pVal )
</script>
</head>
<body></body>
</html>

Hope this helps,

--
Bart

Aug 7 '06 #2
Bart Van der Donck wrote:
[...]
myframe.htm =

<html>
<head>
<script type="text/javascript">
pVal = location.search.substring(1)
pVal = pVal.replace(/^T=/,'')
document.write( pVal )
</script>
</head>
<body></body>
</html>
Ah yes I forgot, just before the document.write command, there should
be something like:

pVal = unescape( pVal )

--
Bart

Aug 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by cirillo_curiosone | last post: by
29 posts views Thread by wayne | last post: by
1 post views Thread by | last post: by
14 posts views Thread by BrendanMcPherson | last post: by
2 posts views Thread by Geoff Cox | last post: by
1 post views Thread by CARIGAR | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.