|
| |
|
|
GMisner
Posts: 50 Joined: 9/2/2005 Status: offline
|
First Script attempt - 10/4/2005 1:07:04
If this is in the wrong place let me know.... I know VBA... I will convert ot Java after I get it working. Never coded in Java to date.... I am trying to add a mini slide show to my website. The Idea is to add featured pictures or Images (all sized the same) to a list that will be displayed on a rotating basis. It works in FP preview and Local browser test but when uploaded it fails. I suspect it is the SRC command syntax. or perhaps I need some kind of URL command. Any help would be appreciated.. Code Below or on the www.troop245.com In the root file called. new_page_4.htm <html> <head> <SCRIPT LANGUAGE=VBScript> dim PicMax dim PicCount Dim filename PicCount=1 PicMax = 2 function startTimer() timerhandle = setInterval("fadethem",5000) end function function stopTimer() clearTimeout(timerhandle) end function function fadethem() myimage.filters.item(0).Apply() select case PicCount case 0 filename="245_pages/featured.jpg" case PicMax + 1 filename="245_pages/featured.jpg" PicCount = 0 case else filename="245_pages/featured"&PicCount&".jpg" end Select PicCount = PicCount+1 myimage.src=filename myimage.filters.item(0).Play() end function </SCRIPT> <link rel="stylesheet" type="text/css" href="text/CSS_245.css"> </head> <body onload="startTimer()" onunload="stopTimer()"> <IMG class=picture ID=myimage src="245_pages/featured.jpg" style="filter:progid:DXImageTransform.Microsoft.fade(Duration=2)"> <IMG src="245_pages/featured.jpg" style="width:1; height:1;visibility:hidden"> <IMG src="245_pages/featured1.jpg" style="width:1; height:1; visibility:hidden"> <IMG src="245_pages/featured2.jpg" style="width:1; height:1; visibility:hidden"> </body> </html>
|
|
|
|
dpf
Posts: 7126 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: First Script attempt - 10/4/2005 10:42:34
quote:
I will convert ot Java after I get it working. Never coded in Java to date.... why would you convert to java? do you mean javascript?
_____________________________
Dan
|
|
|
|
dpf
Posts: 7126 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: First Script attempt - 10/4/2005 12:50:06
quote:
function startTimer() timerhandle = setInterval("fadethem",5000) end function function stopTimer() clearTimeout(timerhandle) end function I dont know about vbscript but that wouldnt work in javascript. timehandle is a local variable - localor inside the function startTimer and can't be called in another function at least in js
_____________________________
Dan
|
|
|
|
GMisner
Posts: 50 Joined: 9/2/2005 Status: offline
|
RE: First Script attempt - 10/4/2005 13:01:15
DPF, Thanks for the heads up. I will watch for that.. 1, Do you think it is related to the file issue I seem to be having now? 2. is there a Java time call that could be used in its place when I convert? Thanks, Gary M
|
|
|
|
dpf
Posts: 7126 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: First Script attempt - 10/4/2005 13:03:52
gary: I am not sure what you gain by writing in vbscript and then "converting". why not tackle it in js? there are tons of js scripts you could adapt to your needs. generally, on the web, you usually see vbscript used in asp. i wasnt even aware that a browser could process vbscript but what do i know?
_____________________________
Dan
|
|
|
|
dpf
Posts: 7126 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: First Script attempt - 10/4/2005 13:26:00
quote:
I'm sooo glad you said that because I didn't think it could either funny how many times i think things like that and dont say them..lol i sit and wait for someone else..lol
_____________________________
Dan
|
|
|
|
dpf
Posts: 7126 Joined: 11/12/2003 From: India-napolis Status: offline
|
RE: First Script attempt - 10/5/2005 15:22:37
glad u worked it out! js is always case sensitive. as I was learning ASP, the instructor said vbscript isnt case sensitive in asp but is in sql statements - and he proceeded to prove it because he always changes case. personally, i learned years ago that i just assume everything is case sensitive - and along with that, I avoid caps except in naming varaibles eg. myVariableLooksLikeThis
_____________________________
Dan
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|