Articles
Html
Remote Scripting with Javascript, IFrames and PHP - Page 3
by: David Vance
|
May 10, 2004
The Specifics
You can read Costello's article to get the basics of the technique, but what follows are the
specifics from my case.
First, I created my small HTML form:
<form method="POST" id="searchForm" name="searchForm" action="<?=$_SERVER['PHP_SELF']?>">
Search by Last Name: <input type="text" id="nameSearch" name="nameSearch" onkeyup="doSearch(this.form);"
size="20" value="<?=$nameSearch?>">
<span id="spanSelect">
<select name="id" id="searchSelect">
<option value="-1">Select</option><?=$searchOptions;?></select></span>
<input id="searchButton" type="submit" value="Go" onclick="return submitSearchCheck('searchSelect');" disabled>
<input type="hidden" id="listAsStrng" name="listAsStrng" value="<?=$listAsString;?>">
</form>
I added the reference to the external Javascript file holding the IFrame (and other) code.
<script language="javascript" src="./js/searchForm.js"></script>