HighDots Forums  

Javascriot *.js files not working for me. Need help

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss Javascriot *.js files not working for me. Need help in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Newsdemon.com
 
Posts: n/a

Default Javascriot *.js files not working for me. Need help - 11-03-2009 , 03:18 AM






Since I have retired and became disabled, I've started sharpening my
programming skills again in Javascript. To date, I have had no problems
in writing Javascript inline code. The use of external files (*.js) has
bombed. Viewing the Web access_log indicated nothing it accessed from
the .js file.

My .js file is a generated file, containing just a few lines like:
<img src="Embossed-1.png" width=30 height=35 alt="0" />
<img src="Embossed-6.png" width=30 height=35 alt="0" />
<img src="Embossed-5.png" width=30 height=35 alt="0" />
<img src="Embossed-4.png" width=30 height=35 alt="0" />
<img src="Embossed-4.png" width=30 height=35 alt="0" />
<img src="Embossed-7.png" width=30 height=35 alt="0" />
I've also tried writing a function that called "document.write", but no
difference. Here is an excerpt from my Web page calling my .js file:
<br>
<script type="text/javascript" src=./number.js></SCRIPT>
<br>

I think I need a refresher on External JaveScript Files. Can someone help?

Reply With Quote
  #2  
Old   
Paul McF
 
Posts: n/a

Default Re: Javascriot *.js files not working for me. Need help - 11-03-2009 , 04:30 PM






Newsdemon.com wrote:
Quote:
Since I have retired and became disabled, I've started sharpening my
programming skills again in Javascript. To date, I have had no problems
in writing Javascript inline code. The use of external files (*.js) has
bombed. Viewing the Web access_log indicated nothing it accessed from
the .js file.

My .js file is a generated file, containing just a few lines like:
img src="Embossed-1.png" width=30 height=35 alt="0" /
img src="Embossed-6.png" width=30 height=35 alt="0" /
img src="Embossed-5.png" width=30 height=35 alt="0" /
img src="Embossed-4.png" width=30 height=35 alt="0" /
img src="Embossed-4.png" width=30 height=35 alt="0" /
img src="Embossed-7.png" width=30 height=35 alt="0" /
I've also tried writing a function that called "document.write", but no
difference. Here is an excerpt from my Web page calling my .js file:
br
script type="text/javascript" src=./number.js></SCRIPT
br

I think I need a refresher on External JaveScript Files. Can someone help?
Another day ......

I have changed my numbers.js file too be:
<SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript">
function putnums() {
document.write('<img src="Embossed-1.png" width=30 height=35 />');
document.write('<img src="Embossed-6.png" width=30 height=35 />');
document.write('<img src="Embossed-5.png" width=30 height=35 />');
document.write('<img src="Embossed-4.png" width=30 height=35 />');
document.write('<img src="Embossed-4.png" width=30 height=35 />');
document.write('<img src="Embossed-7.png" width=30 height=35 />');
}
putnums();

</SCRIPT>


Can anyone figure what is wrong with this code? Is the name of a file
on the <SCRIPT...SRC=" "> work like an included file in C language.

Reply With Quote
  #3  
Old   
Paul McF
 
Posts: n/a

Default Re: Javascriot *.js files not working for me. Need help - 11-03-2009 , 05:40 PM



Still can't get my .js file to work! Currently:

<SCRIPT type="text/javascript" language="Javascript">
<!--
function putnums() {
document.close()
document.open();
document.write("<img src=\"Embossed-1.png\" width=30 height=35
Quote:
");
document.write("<img src=\"Embossed-6.png\" width=30 height=35
");
document.write("<img src=\"Embossed-5.png\" width=30 height=35
");
document.write("<img src=\"Embossed-4.png\" width=30 height=35
");
document.write("<img src=\"Embossed-4.png\" width=30 height=35
");
document.write("<img src=\"Embossed-7.png\" width=30 height=35
");
document.close()
return()
}
putnums();

// -->
</SCRIPT>

and the following Console Error message:

XML cannot be the whole program
http://pmcferrin.homedns.org/......number.js
</SCRIPT>

WHAT IS WRONG!!



<SCRIPT type="text/javascript" language="Javascript">
<!--
function putnums() {
document.close()
document.open();
document.write("<img src=\"Embossed-1.png\" width=30 height=35
Quote:
");
document.write("<img src=\"Embossed-6.png\" width=30 height=35
");
document.write("<img src=\"Embossed-5.png\" width=30 height=35
");
document.write("<img src=\"Embossed-4.png\" width=30 height=35
");
document.write("<img src=\"Embossed-4.png\" width=30 height=35
");
document.write("<img src=\"Embossed-7.png\" width=30 height=35
");
document.close()
return()
}
putnums();

// -->
</SCRIPT>

<SCRIPT>

Paul McF wrote:
Quote:
Newsdemon.com wrote:
Since I have retired and became disabled, I've started sharpening my
programming skills again in Javascript. To date, I have had no
problems in writing Javascript inline code. The use of external files
(*.js) has bombed. Viewing the Web access_log indicated nothing it
accessed from the .js file.

My .js file is a generated file, containing just a few lines like:
img src="Embossed-1.png" width=30 height=35 alt="0" /
img src="Embossed-6.png" width=30 height=35 alt="0" /
img src="Embossed-5.png" width=30 height=35 alt="0" /
img src="Embossed-4.png" width=30 height=35 alt="0" /
img src="Embossed-4.png" width=30 height=35 alt="0" /
img src="Embossed-7.png" width=30 height=35 alt="0" /
I've also tried writing a function that called "document.write", but
no difference. Here is an excerpt from my Web page calling my .js file:
br
script type="text/javascript" src=./number.js></SCRIPT
br

I think I need a refresher on External JaveScript Files. Can someone
help?

Another day ......

I have changed my numbers.js file too be:
SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript"
function putnums() {
document.write('<img src="Embossed-1.png" width=30 height=35 />');
document.write('<img src="Embossed-6.png" width=30 height=35 />');
document.write('<img src="Embossed-5.png" width=30 height=35 />');
document.write('<img src="Embossed-4.png" width=30 height=35 />');
document.write('<img src="Embossed-4.png" width=30 height=35 />');
document.write('<img src="Embossed-7.png" width=30 height=35 />');
}
putnums();

/SCRIPT


Can anyone figure what is wrong with this code? Is the name of a file
on the <SCRIPT...SRC=" "> work like an included file in C language.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.