I have the included page. I'd like to be able reuse the input text in multiple iframes on the same page. To do this I need to make the form into an onsubmit type of event (I think) and dont know where to start! Any help would be greatly apreciated!
[!]The AutoSavers![/!]
Code:
<head>
<script type="text/javascript">
function show(which) {
var hide = new Array();
hide = document.getElementsByName(which);
for (i=0; i<hide.length; i++) {
hide[i].style.display = 'inline';
}
}
function hide(which) {
var hide = new Array();
hide = document.getElementsByName(which);
for (i=0; i<hide.length; i++) {
hide[i].style.display = 'none';
}
}
</script>
</head>
<body>
<div class="style1">
<style type="text/css">
iframe { display: none; }
.style1 {
text-align: center;
}
</style></div>
<B>Enter text to find</B>:<BR>
<FORM method=GET action="[URL unfurl="true"]http://search.yahoo.com/bin/search?"[/URL] target="a">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<TABLE bgcolor="#FFFFFF"><tr><td>
<INPUT TYPE=text name=q size=25 maxlength=255 value="">
<INPUT type=submit name=btnG VALUE="Search">
</td></tr></TABLE>
</FORM>
<table cellpadding='0' cellspacing='0' style='padding:0px;margin:0px;' id='std-table-buttons' width='100%'><tr>
<tr>
<td style="padding:0px;margin:0px;" align="center" width="200px" valign='top' nowrap="nowrap"><b>Yahoo</b>
<input type="button" value="Show" onclick="show('a');">
<input type="button" value="Hide" onclick="hide('a');"></td></tr></table>
<iframe src="" id='a' width='100%' height='400' name='a'></iframe><hr />
[!]The AutoSavers![/!]