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>

Re: Moving code into another file by p

p
Sat Sep 03 18:44:13 CDT 2005

Your problem is that JC is looking for the file on www.my-domain.com

If the file is in the same folder,
change this
src="http://www.my-domain.com/search_english.js"
to this
src="search_english.js"

..PC

Doug Stewart wrote:

> 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>
>
>

Re: Moving code into another file by DougStewart

DougStewart
Sun Sep 04 00:59:01 CDT 2005

P C

Tried your suggestion. Unfortunately, still doesn't work.

Maybe I'm making a logical error. I'm not sure if the code I'm using is Java
Script or HTML. Does this approach work with HTML? Do I need to put something
at the beginning or end of the code for this to work (I've shown the start
and end of the code in my original posting)?

Doug

"p c" wrote:

> Your problem is that JC is looking for the file on www.my-domain.com
>
> If the file is in the same folder,
> change this
> src="http://www.my-domain.com/search_english.js"
> to this
> src="search_english.js"
>
> ...PC
>
> Doug Stewart wrote:
>
> > 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>
> >
> >
>

Re: Moving code into another file by Rob

Rob
Sun Sep 04 01:33:36 CDT 2005

ot
are those apartment prices real?


"Doug Stewart" <DougStewart@discussions.microsoft.com> wrote in message
news:D9438248-C4C7-45E6-97E2-702B787BCA69@microsoft.com...
>P C
>
> Tried your suggestion. Unfortunately, still doesn't work.
>
> Maybe I'm making a logical error. I'm not sure if the code I'm using is
> Java
> Script or HTML. Does this approach work with HTML? Do I need to put
> something
> at the beginning or end of the code for this to work (I've shown the start
> and end of the code in my original posting)?
>
> Doug
>
> "p c" wrote:
>
>> Your problem is that JC is looking for the file on www.my-domain.com
>>
>> If the file is in the same folder,
>> change this
>> src="http://www.my-domain.com/search_english.js"
>> to this
>> src="search_english.js"
>>
>> ...PC
>>
>> Doug Stewart wrote:
>>
>> > 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>
>> >
>> >
>>



Re: Moving code into another file by Stefan

Stefan
Sun Sep 04 04:40:14 CDT 2005

The code you posted (starting with <form method=...) is not JavaScript
- its Html
a .js file can not include Html unless you have JavaScript document writes generating it

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________


"Doug Stewart" <DougStewart@discussions.microsoft.com> wrote in message news:ED221607-924E-4560-A72A-9ABA979F16C8@microsoft.com...
|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>
|
|