ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Learnin Javascript

<< < (3/6) > >>

ljbirns:
<IMG SRC=>  was my original choice.  It does put the image into the program but it puts it
not as background but almost as a separate page.

If A is the IMG  and B is the animated radar sweeps IMG SCR gives me      A
                                                                                                    B 

Background gives me      A/B   ( B is superimposed on A ) which is what I want but A  background is not correctly positioned.  I hope I am making myself clear.  This is not a serious problem.  I would like it to work and figured I could learn something at the same time.  Hence i bought the book.

Lew

fowmow:
@fowmow
You can use JS to code for WSH (Windows Scripting Host).
You can use it directly to do smtg with your files on disk
or use it e.g. in an text editor like PSPad to extend the editor functionality-
-AbteriX (August 17, 2007, 10:10 AM)
--- End quote ---

I'm not sure what gave you the impression I didn't know this already.  Thanks for trying to help though.

fowmow:
The program ( NirSoft > SeqDownload ) downloads the radar sweeps from NOAA to my HD.  At some point I run the  animation  program ( part of SeqDownload)  It  " animates" the radar sweeps one at a time every X milliseconds.
You are correct in that is does open up my browser  ( Firefox )to show the animation and the background file that I  have added.  I have the file but for some reason it splits ( see my earlier post  blue line )  and so the radar scan is not accurately placed.    I ordered Flanagan's Book from Amazon. Should arrive any day.
-ljbirns (August 17, 2007, 08:58 AM)
--- End quote ---

Whilst SeqDownload does provide the option for "JavaScript animation" it may not be the problem.  Or rather, JavaScript may not be the problem.

I don't suppose it is possible for you to post an example of this anomaly online is there?

Or perhaps give me the link to whatever scans you are retrieving, I'll download SeqDownload and try it myself to see if I can reproduce your problem.

AbteriX:
I'm not sure what gave you the impression I didn't know this already.  Thanks for trying to help though.
-fowmow (August 17, 2007, 08:15 PM)
--- End quote ---

 ;D   Sorry, i have understand your question wrong:I just meant what are you using to run your JavaScript then? -fowmow
--- End quote ---

ljbirns:
I have attached two screen shots.  What I GET :down:    and    what I WANT :up:
Here is the URL that I download from .  http://radar.weather.gov/RadarImg/N0R/OKX_N0R_0.gif
Here is the NirSoft SeqDownload   website    http://www.nirsoft.net/utils/seqdownload.html
To be honest everything I read just confuses me more and more.

This is the  JavaScript: from NirSoft  MY ADDITION is   BODY BACKGROUND etc

html>
<head>
<title>Image Map Example</title>
<script LANGUAGE="JavaScript" type="text/javascript">
function update(t) {
   document.form1.text1.value = t;
}


</script>
</head>
<body>

html>
<head>
<title>Image Map Example</title>
<script LANGUAGE="JavaScript" type="text/javascript">
function update(t) {
document.form1.text1.value = t;
}
</script>
</head>
<BODY BACKGROUND ="file://C:/Documents and Settings/Owner/Desktop/mappics/110.png"

</body>
 </SCRIPT>


Created By using <a href="http://www.nirsoft.net/utils/seqdownload.html" target="nirsoft">SeqDownload</a>
<p>

<!--***NIRSOFT_CODE***-->


<script language="javascript">
var imageIndex = 0;
var timeoutID = 0;
var playMode = 1;


function animImageInc()
{
if (imageIndex < numOfImages)
   imageIndex++
else
   imageIndex = 1;
}

function animImageDec()
{
if (imageIndex > 1)
   imageIndex--;
else
   imageIndex = numOfImages;
}

function setCurrImage()
{
   document.MainImage.src = imgarray[imageIndex].src;
}

function updateAnim()
{
   var currTimeoutValue;
   
   currTimeoutValue = timeoutValue;

   if (playMode == 1)
   {
      animImageInc();
      if (imageIndex == numOfImages)
         currTimeoutValue += animDelay;
   }
   else
   {
      animImageDec();
      if (imageIndex == 1)
         currTimeoutValue += animDelay;
   }
   setCurrImage();
   timeoutID = setTimeout("updateAnim()", currTimeoutValue);
}

function clearLastUpdate()
{
   clearTimeout(timeoutID);
   timeoutID = 0;
}

function startPlay()
{
   clearLastUpdate();
   playMode = 1;
   updateAnim();   
}

function startPlayReverse()
{
   clearLastUpdate();
   playMode = 2;
   updateAnim();   
}


updateAnim();

</script>

<form name="PlayForm">
<table>
<tr>
<td><input type="button" onclick="startPlay()" value="Play >>">
<td><input type="button" onclick="startPlayReverse()" value="Play <<">
<td><input type="button" onclick="clearLastUpdate()" value="Stop">
<td><input type="button" onclick="animImageInc();setCurrImage()" value=">>">
<td><input type="button" onclick="animImageDec();setCurrImage()" value="<<">
<td><input type="button" onclick="timeoutValue = parseInt(document.PlayForm.IntervalValue.value)" value="Change Interval >>">

<td><input type="text" name="IntervalValue">
</table>
</form>

<script language="javascript">
document.PlayForm.IntervalValue.value = timeoutValue;
</script>


</body>

</html>

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version