pass textbox frames




JavaScript Source Code 3000: Forms: Pass Textbox (in frames)






























Pass Textbox (in frames)



Copies the text in a box in the left frame into a box in the right frame when the button is clicked. A clever way to pass values in frames.





Click to

[ Simply close the demo window to return to this page. ]






JavaScript Source Code 3000: Forms: Pass Textbox (in frames)
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!





    





<!-- THREE STEPS TO INSTALL PASS TEXTBOX (IN FRAMES):

1. Copy the entire first code section into your FRAMESET document
2. Save the second code into a new page, pass-textbox-framesl.html
2. Paste the second code into a new page, pass-textbox-framesr.html -->

<!-- STEP ONE: Paste this entire code into your FRAMESET page -->

<html>
<head>
<script language="JavaScript">
<!-- Original: Ronnie T. Moore -->
<!-- Web Site: JavaScript Source Code 3000 -->

<! >
<! >

<!-- Begin
function passText(str) {
top.frames['right'].document.yourform.msg.value = str;
}
// End -->
</script>
</head>
<frameset cols="300,*" frameborder=1>
<frame name="left" src="pass-textbox-framesl.html">
<frame name="right" src="pass-textbox-framesr.html">
</frameset>
</form>
</body>
</html>

<!-- STEP TWO: Copy this code into a new page -->
<!-- Save the page as: pass-textbox-framesl.html -->

<html>
<body>
<center>
<form name=myform>
Enter Your Name:<br>
<input type=text name=user size=10 value="">
<input type=button value="Ok!" onClick="parent.passText(this.form.user.value);">
</form>
</center>
</body>
</html>


<!-- STEP THREE: Copy this code into a new page -->
<!-- Save the page as: pass-textbox-framesr.html -->

<html>
<body>
<form name=yourform>
<input type=text name=msg size=10 value="">
</form>
</body>
</html>

<p><center>
<font face="arial, helvetica" SIZE="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">JavaScript Source Code 3000</a></font>
</center><p>

<!-- Script Size: 1.38 KB -->










Wyszukiwarka

Podobne podstrony:
pass menu frames
Busta Rhymes Pass The Courvoisier Part 2
Frames (4)
frames (3)
ED SRS Textbook(20061009)
demo frames
load in frames
preload frameset

więcej podobnych podstron