D
Doug Stewart
I need help moving code from a web page into an external file. Here is the
background:
- I've taken the code for a software package, modified it, then pasted it
into my web page.
- It works fine, but complicates the HTML on-page, so I would like to move
it into a separate file. I've taken the code as-is and put it into a file
(called search_english.js), then put the following onto my web page:
<script language="JavaScript" type="text/JavaScript"
src="http://www.my-domain.com/search_english.js"></script>
When I upload the page, it doesn't seem to be able to find the code in the
JS file. Any idea what I'm doing wrong?
Not sure if I need to put anything special at the begining or the end of the
JS file. My JS file begins with the following code (which produces a form to
do a search on a database):
<form method=get
action="http://www.france-property-and-information.com/listman/exec/search.cgi">
<font color="#808000">
<input type="hidden" name="search" value="1" style="font-weight: 700">
<input type="hidden" name="perpage" value="10" style="font-weight: 700">
</font><b><font color="#808000">
etc. etc. etc.
and ends with:
</select><b> </b></font>
</td>
</tr>
</table>
<p>
<div align=center>
<font color="#808000">
<input type=submit name="search" value="Find Properties "
style="font-weight: 700"><b>
</b></font>
</div>
</td>
</tr>
</table>
<p> </p>
</body></html>
</form>
background:
- I've taken the code for a software package, modified it, then pasted it
into my web page.
- It works fine, but complicates the HTML on-page, so I would like to move
it into a separate file. I've taken the code as-is and put it into a file
(called search_english.js), then put the following onto my web page:
<script language="JavaScript" type="text/JavaScript"
src="http://www.my-domain.com/search_english.js"></script>
When I upload the page, it doesn't seem to be able to find the code in the
JS file. Any idea what I'm doing wrong?
Not sure if I need to put anything special at the begining or the end of the
JS file. My JS file begins with the following code (which produces a form to
do a search on a database):
<form method=get
action="http://www.france-property-and-information.com/listman/exec/search.cgi">
<font color="#808000">
<input type="hidden" name="search" value="1" style="font-weight: 700">
<input type="hidden" name="perpage" value="10" style="font-weight: 700">
</font><b><font color="#808000">
etc. etc. etc.
and ends with:
</select><b> </b></font>
</td>
</tr>
</table>
<p>
<div align=center>
<font color="#808000">
<input type=submit name="search" value="Find Properties "
style="font-weight: 700"><b>
</b></font>
</div>
</td>
</tr>
</table>
<p> </p>
</body></html>
</form>