navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

First Script attempt

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> First Script attempt
Page: [1]
 
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>


jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: First Script attempt - 10/4/2005 9:09:29   
quote:

The requested URL /245_pages/featured.jpg was not found on this server.


It's saying the pictures aren't there. It's looking for featured.jpg in the folder 245_pages.

I did a quick check and the folder doesn't seem to be there either. It will work on your machine as the folder is there.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to GMisner)
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

(in reply to GMisner)
GMisner

 

Posts: 50
Joined: 9/2/2005
Status: offline

 
RE: First Script attempt - 10/4/2005 12:38:35   
Jaybee,

I see both the folder and the files when I check.
My web page uses many of the other files in the folder and seem to work fine...

something in my reference I suppose but I don't see the issue...

:)

(in reply to jaybee)
GMisner

 

Posts: 50
Joined: 9/2/2005
Status: offline

 
RE: First Script attempt - 10/4/2005 12:40:31   
I do mean script.

I hack around in VBA so for the moment Java and java script are synonymous for me....
:)

(in reply to dpf)
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

(in reply to GMisner)
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



(in reply to dpf)
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

(in reply to GMisner)
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: First Script attempt - 10/4/2005 13:08:49   
quote:

i wasnt even aware that a browser could process vbscript but what do i know?


I'm sooo glad you said that because I didn't think it could either. It actually turns out that (guess what?) IE 4 and 5 can but nothing else. Now there's a surprise. :)

Why don't you go look for a Javascript freebie?

Try www.hotscripts.com

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to dpf)
GMisner

 

Posts: 50
Joined: 9/2/2005
Status: offline

 
RE: First Script attempt - 10/4/2005 13:08:54   
Dpf,

Nothing really to gain. I just have some experience with VB, None in Java. VBscript support may be an IE only feature. I am playing round adapting some scripts from a book I have on CSS web design. those were in VBscript so.. that is where I started...

I do expect to move totaly to Java going forward.

My hope is to solve this "simple" :) problem first....

I do appreciate all the help everyone is offering.

Gary M.

(in reply to dpf)
GMisner

 

Posts: 50
Joined: 9/2/2005
Status: offline

 
RE: First Script attempt - 10/4/2005 13:12:41   
jaybee,

I am seeing a trend here...

Move to Java now..... :)

I am still confused with the files not being found though....
is there a more specific "reference" I can use in place of the SRC command.

Thanks!

(in reply to jaybee)
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: First Script attempt - 10/4/2005 13:14:41   
Gary you must differentiate between Java and Javascript (JS). They are two completely different things. You'll confuse the heck out of people on here otherwise.

Yes, IE is the only browser to support VB and only the latest versions of it.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to GMisner)
GMisner

 

Posts: 50
Joined: 9/2/2005
Status: offline

 
RE: First Script attempt - 10/4/2005 13:16:21   
Jaybee,

Will do.. JS is is.... :)

(in reply to jaybee)
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: First Script attempt - 10/4/2005 13:17:00   
quote:

<IMG src="245_pages/featured.jpg" style="width:1; height:1;visibility:hidden">


Just looked at that properly, if the 245_pages folder is in the root then you need an extra / in there

<IMG src="/245_pages/featured.jpg" style="width:1; height:1;visibility:hidden">

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
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

(in reply to jaybee)
GMisner

 

Posts: 50
Joined: 9/2/2005
Status: offline

 
RE: First Script attempt - 10/5/2005 15:21:15   
Jaybe, dpf

Figured it out... The issue was the case sensitivity in the script. Apparently both VBS and JS are case sensitive when used remotely. "It may be my linux server too."
By the way everything else works fine...

I also found a JavaScript that does exactly what I need.

I appreciate the patience... :)

(in reply to jaybee)
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

(in reply to GMisner)
Giomanach

 

Posts: 6128
Joined: 11/19/2003
From: England
Status: offline

 
RE: First Script attempt - 10/5/2005 15:33:10   
VB = Microsoft
IE = Microsoft
JS = Netscape
Java = Sun Microsystems

:)

_____________________________




(in reply to dpf)
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: First Script attempt - 10/5/2005 16:24:52   
Unix is case sensitive as well.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to Giomanach)
Page:   [1]

All Forums >> Web Development >> General Web Development >> First Script attempt
Page: [1]
Jump to: 1





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