Java script virgin - help please

R

Rob

Kevin

I am a newbie also but if the text shows on the page it looks as though your
pasted script should be enclosed by <script> ............. </script>

Probably way off mark but someone cleverer will help you out in this group.

Rob
 
T

Thomas A. Rowe

You are missing the script tags, which the source site didn't include with
the script.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
S

Stefan B Rusynko

In Html/Code View add
<script type="javascript">
before
var images = new Array();
and
</script>
after the last
}

--




| Hello. I attempted to use my first java script but it is not working for
| some reason.
| The script is to rotate pics and I found it here:
| http://www.laughland.biz/javascript.php?scid=3
| I put it within the <head> section in HTML view - like the script writer and
| FP help files said to do. However this is what my sorry page looks like:)
| http://www.yoursourceinjapan.com/testing.htm
| Can someone look at the code and tell me what I am doing wrong?
| Thanks very much
| Kevin
|
|
|
 
K

Kevin

Thanks very much guys. I have proceeded but am still not there yet:) Can you
take a look and see what I am doing wrong now? I have added their script
slightly different 2 ways to show you both methods. 1 I did Insert - Web
Component - pasted the code there and the other I inserted code in html view
(which for some reason automatically changes my< and > to :lt)
Also in the <head> code I took a guess and added .jpg in place of .gif -
because this is what I am using.
I have played with the code for a few hours now and still can't get it to
work. Again I am sure it is something simple:)
Thanks again
and Happy New Year (I am in Japan now and am over an hour into the new
year - and spending my time battling Java - haha)
Kevin

--
Kevin Sirface
www.YourSourceInJapan.com
Japanese Scroll Paintings
Scroll Re-mounting
Custom Calligraphy Scrolls
 
S

Stefan B Rusynko

Change
< script language="javascript">ShowImg(image1.jpg);</script>
to
<script language="javascript">ShowImg(image1.jpg);</script>

and
< script language="javascript">;ShowImg();</script&gt;
to
<script language="javascript">;ShowImg();</script>

And in you head section change
http://yoursourceinjapan.com/images/web9.jpg = "image1.jpg";
http://yoursourceinjapan.com/images/web10.jpg = "image2.jpg";
http://yoursourceinjapan.com/images/web11.jpg = "image3.jpg";
to
images[0] = "images/web9.jpg";
images[1] = "images/web10.jpg";
images[2] = "images/web11.jpg";


--




| Thanks very much guys. I have proceeded but am still not there yet:) Can you
| take a look and see what I am doing wrong now? I have added their script
| slightly different 2 ways to show you both methods. 1 I did Insert - Web
| Component - pasted the code there and the other I inserted code in html view
| (which for some reason automatically changes my< and > to :lt)
| Also in the <head> code I took a guess and added .jpg in place of .gif -
| because this is what I am using.
| I have played with the code for a few hours now and still can't get it to
| work. Again I am sure it is something simple:)
| Thanks again
| and Happy New Year (I am in Japan now and am over an hour into the new
| year - and spending my time battling Java - haha)
| Kevin
|
| --
| Kevin Sirface
| www.YourSourceInJapan.com
| Japanese Scroll Paintings
| Scroll Re-mounting
| Custom Calligraphy Scrolls
|
|
| | > In Html/Code View add
| > <script type="javascript">
| > before
| > var images = new Array();
| > and
| > </script>
| > after the last
| > }
| >
| > --
| >
| > _____________________________________________
| > 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
| > _____________________________________________
| >
| >
| | > | Hello. I attempted to use my first java script but it is not working for
| > | some reason.
| > | The script is to rotate pics and I found it here:
| > | http://www.laughland.biz/javascript.php?scid=3
| > | I put it within the <head> section in HTML view - like the script writer
| and
| > | FP help files said to do. However this is what my sorry page looks
| like:)
| > | http://www.yoursourceinjapan.com/testing.htm
| > | Can someone look at the code and tell me what I am doing wrong?
| > | Thanks very much
| > | Kevin
| > |
| > |
| > |
| >
| >
|
|
 
W

Wally S

I could be wrong because I am not a javascript expert, but should '< script
language="javascript">' be in the "body" section of the page? It's being
displayed as text.

Wally
 
K

Kevin

I made those changes and it did work to get the code back behind the scenes.
However now I can't get the code to bring up the pictures.
I have tried the following (but nothing works)
<script language="javascript">ShowImg();</script>
<script language="javascript">ShowImg(0,1,2);</script>
<script
language="javascript">ShowImg(images/web9.jpg,images/web10.jpg,images/web11.
jpg);</script>
<script
language="javascript">ShowImg(images[0],images[1],images[2]);</script>
<script
language="javascript">ShowImg(images[images/web9.jpg],images[images/web10.jp
g],images[images/web11.jpg]);</script>

In each case when I hit the "preview" it says I have script error - either
'object expected' or '"images" is undefined'
Also I don't know if it is related but I keep getting these: &nbsp; - I
delete them and then go back to the html and they are back. I have always
has them so I don't think they are the problem.
Getting closer:)
I do appreciate all your help
--
Kevin Sirface
www.YourSourceInJapan.com
Japanese Scroll Paintings
Scroll Re-mounting
Custom Calligraphy Scrolls


Stefan B Rusynko said:
Change
< script language="javascript">ShowImg(image1.jpg);</script>
to
<script language="javascript">ShowImg(image1.jpg);</script>

and
< script language="javascript">;ShowImg();</script&gt;
to
<script language="javascript">;ShowImg();</script>

And in you head section change
http://yoursourceinjapan.com/images/web9.jpg = "image1.jpg";
http://yoursourceinjapan.com/images/web10.jpg = "image2.jpg";
http://yoursourceinjapan.com/images/web11.jpg = "image3.jpg";
to
images[0] = "images/web9.jpg";
images[1] = "images/web10.jpg";
images[2] = "images/web11.jpg";


--




| Thanks very much guys. I have proceeded but am still not there yet:) Can you
| take a look and see what I am doing wrong now? I have added their script
| slightly different 2 ways to show you both methods. 1 I did Insert - Web
| Component - pasted the code there and the other I inserted code in html view
| (which for some reason automatically changes my< and > to :lt)
| Also in the <head> code I took a guess and added .jpg in place of .gif -
| because this is what I am using.
| I have played with the code for a few hours now and still can't get it to
| work. Again I am sure it is something simple:)
| Thanks again
| and Happy New Year (I am in Japan now and am over an hour into the new
| year - and spending my time battling Java - haha)
| Kevin
|
| --
| Kevin Sirface
| www.YourSourceInJapan.com
| Japanese Scroll Paintings
| Scroll Re-mounting
| Custom Calligraphy Scrolls
|
|
| | > In Html/Code View add
| > <script type="javascript">
| > before
| > var images = new Array();
| > and
| > </script>
| > after the last
| > }
| >
| > --
| >
| > _____________________________________________
| > 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
| > _____________________________________________
| >
| >
| | > | Hello. I attempted to use my first java script but it is not working for
| > | some reason.
| > | The script is to rotate pics and I found it here:
| > | http://www.laughland.biz/javascript.php?scid=3
| > | I put it within the <head> section in HTML view - like the script writer
| and
| > | FP help files said to do. However this is what my sorry page looks
| like:)
| > | http://www.yoursourceinjapan.com/testing.htm
| > | Can someone look at the code and tell me what I am doing wrong?
| > | Thanks very much
| > | Kevin
| > |
| > |
| > |
| >
| >
|
|
 
A

Andrew Murray

no these tags can go in either - it is probably the space between '<' and
'script' (< script) rather than <script (no space)
 
S

Stefan B Rusynko

In you page change
<script language="javascript">ShowImg(images[images/web9.jpg],images[images/web10.jpg],images[images/web11.jpg]);</script>
to
<script language="javascript">ShowImg();</script>
--




| I made those changes and it did work to get the code back behind the scenes.
| However now I can't get the code to bring up the pictures.
| I have tried the following (but nothing works)
| <script language="javascript">ShowImg();</script>
| <script language="javascript">ShowImg(0,1,2);</script>
| <script
| language="javascript">ShowImg(images/web9.jpg,images/web10.jpg,images/web11.
| jpg);</script>
| <script
| language="javascript">ShowImg(images[0],images[1],images[2]);</script>
| <script
| language="javascript">ShowImg(images[images/web9.jpg],images[images/web10.jp
| g],images[images/web11.jpg]);</script>
|
| In each case when I hit the "preview" it says I have script error - either
| 'object expected' or '"images" is undefined'
| Also I don't know if it is related but I keep getting these: &nbsp; - I
| delete them and then go back to the html and they are back. I have always
| has them so I don't think they are the problem.
| Getting closer:)
| I do appreciate all your help
| --
| Kevin Sirface
| www.YourSourceInJapan.com
| Japanese Scroll Paintings
| Scroll Re-mounting
| Custom Calligraphy Scrolls
|
|
| | > Change
| > < script language="javascript">ShowImg(image1.jpg);</script>
| > to
| > <script language="javascript">ShowImg(image1.jpg);</script>
| >
| > and
| > < script language="javascript">;ShowImg();</script&gt;
| > to
| > <script language="javascript">;ShowImg();</script>
| >
| > And in you head section change
| > http://yoursourceinjapan.com/images/web9.jpg = "image1.jpg";
| > http://yoursourceinjapan.com/images/web10.jpg = "image2.jpg";
| > http://yoursourceinjapan.com/images/web11.jpg = "image3.jpg";
| > to
| > images[0] = "images/web9.jpg";
| > images[1] = "images/web10.jpg";
| > images[2] = "images/web11.jpg";
| >
| >
| > --
| >
| > _____________________________________________
| > 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
| > _____________________________________________
| >
| >
| | > | Thanks very much guys. I have proceeded but am still not there yet:) Can
| you
| > | take a look and see what I am doing wrong now? I have added their script
| > | slightly different 2 ways to show you both methods. 1 I did Insert - Web
| > | Component - pasted the code there and the other I inserted code in html
| view
| > | (which for some reason automatically changes my< and > to :lt)
| > | Also in the <head> code I took a guess and added .jpg in place of .gif -
| > | because this is what I am using.
| > | I have played with the code for a few hours now and still can't get it
| to
| > | work. Again I am sure it is something simple:)
| > | Thanks again
| > | and Happy New Year (I am in Japan now and am over an hour into the new
| > | year - and spending my time battling Java - haha)
| > | Kevin
| > |
| > | --
| > | Kevin Sirface
| > | www.YourSourceInJapan.com
| > | Japanese Scroll Paintings
| > | Scroll Re-mounting
| > | Custom Calligraphy Scrolls
| > |
| > |
| > | | > | > In Html/Code View add
| > | > <script type="javascript">
| > | > before
| > | > var images = new Array();
| > | > and
| > | > </script>
| > | > after the last
| > | > }
| > | >
| > | > --
| > | >
| > | > _____________________________________________
| > | > 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
| > | > _____________________________________________
| > | >
| > | >
| > | | > | > | Hello. I attempted to use my first java script but it is not working
| for
| > | > | some reason.
| > | > | The script is to rotate pics and I found it here:
| > | > | http://www.laughland.biz/javascript.php?scid=3
| > | > | I put it within the <head> section in HTML view - like the script
| writer
| > | and
| > | > | FP help files said to do. However this is what my sorry page looks
| > | like:)
| > | > | http://www.yoursourceinjapan.com/testing.htm
| > | > | Can someone look at the code and tell me what I am doing wrong?
| > | > | Thanks very much
| > | > | Kevin
| > | > |
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top