Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Need some help, I'm pretty new.
Closed Thread
Old 06-14-2008, 03:33 PM   #1 (permalink)
Drizzt's Avatar
 
Wizard Techie

Join Date: Oct 2007

Location: Somewhere inbetween FL and NY

Posts: 3,025

Drizzt is on a distinguished road

Send a message via AIM to Drizzt Send a message via Skype™ to Drizzt
Default Need some help, I'm pretty new.

I'm making a website for my brother and his lawn company for a little extra dough and some practice. I wanted to make a javascript picture slideshow of some of the lawns he has done. I tried experimenting with some stuff and i tried to use this.

<script type="text.javascript">
var image1=new image();
image1.src="s11.jpg";
var image2=new image();
image2.src="s12.jpg";
var image3=new image();
image3.src="s13.jpg";
</script>


<img src="s11.jpg" name="slide">
<script type="text/javascript">

//variable that will increment through the images

var step=1;
function slideit(){


//if browser does not support the image object, exit.
if (!document.images);


return;
document.images.slide.src=eval("image"+step+".src" );
if (step<3)
step++;
else;
step=1;


//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500);
}
slideit();

</script>



It does show the first image, but it doesnt change to the next 2. If anyone could help me out I would appreciate it .
__________________
CPU:Q6600 G0 @ 3.825
Motherboard:Asus P5E X38
Memory:2x2GB OCZ Reapers DDR2 1066
Graphics Card:Asus 4850
Hard Drive:2xSegate 500gb 32MB Cache raid0
Power Supply:Xion 800W
Case:3DAurora
CPU cooling: D-tek Fuzion V2 (Quad insert removed)
GPU cooling: mcw60
Monitor:24" LG
Drizzt is offline  
Old 06-14-2008, 05:34 PM   #2 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,684

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Need some help, I'm pretty new.

Code:
<script type="text/javascript">
var image1=new Image();
image1.src="s11.jpg";
var image2=new Image();
image2.src="s12.jpg";
var image3=new Image();
image3.src="s13.jpg";
</script>


<img src="s11.jpg" name="slide">
<script type="text/javascript">

//variable that will increment through the images

var step=1;
function slideit(){


//if browser does not support the image object, exit.
if (!document.images)


return;
document.images.slide.src=eval("image"+step+".src" );
if (step<3)
step++;
else
step=1;


//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500);
}
slideit();

</script>

__________________

Need website help? PM me!
CrazeD is online now  
Old 06-14-2008, 06:33 PM   #3 (permalink)
Drizzt's Avatar
 
Wizard Techie

Join Date: Oct 2007

Location: Somewhere inbetween FL and NY

Posts: 3,025

Drizzt is on a distinguished road

Send a message via AIM to Drizzt Send a message via Skype™ to Drizzt
Default Re: Need some help, I'm pretty new.

THX!

What did you change other this thing?

<script type="text/avascript">

It works now, thx a bunch.
__________________
CPU:Q6600 G0 @ 3.825
Motherboard:Asus P5E X38
Memory:2x2GB OCZ Reapers DDR2 1066
Graphics Card:Asus 4850
Hard Drive:2xSegate 500gb 32MB Cache raid0
Power Supply:Xion 800W
Case:3DAurora
CPU cooling: D-tek Fuzion V2 (Quad insert removed)
GPU cooling: mcw60
Monitor:24" LG
Drizzt is offline  
Old 06-14-2008, 07:47 PM   #4 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,684

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: Need some help, I'm pretty new.

You put a period instead of a forward-slash in text/javascript

You didn't capitalize Image()

You put semicolons after if/else statements

I think that's it.
__________________

Need website help? PM me!
CrazeD is online now  
Old 06-14-2008, 08:26 PM   #5 (permalink)
Drizzt's Avatar
 
Wizard Techie

Join Date: Oct 2007

Location: Somewhere inbetween FL and NY

Posts: 3,025

Drizzt is on a distinguished road

Send a message via AIM to Drizzt Send a message via Skype™ to Drizzt
Default Re: Need some help, I'm pretty new.

thx... lol
__________________
CPU:Q6600 G0 @ 3.825
Motherboard:Asus P5E X38
Memory:2x2GB OCZ Reapers DDR2 1066
Graphics Card:Asus 4850
Hard Drive:2xSegate 500gb 32MB Cache raid0
Power Supply:Xion 800W
Case:3DAurora
CPU cooling: D-tek Fuzion V2 (Quad insert removed)
GPU cooling: mcw60
Monitor:24" LG
Drizzt is offline  
 
Closed Thread

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Got me a pretty new toy. aspire Overclocking, Case Mod, Tweaking PC Performance 16 05-27-2008 10:46 PM
Pretty sure my ram is giving up on me. ThirdLeft152 Building, Buying, or Upgrading High Performance PC Systems 14 03-14-2008 04:46 PM
is this video card pretty good? pianoplayer Building, Buying, or Upgrading High Performance PC Systems 33 12-29-2007 01:56 AM
Just built a pretty nice comp, and my new game runs like crap. Help! c1v1c98 Building, Buying, or Upgrading High Performance PC Systems 5 10-13-2007 11:36 PM
Router is pretty hot.....should it be worried? b1gapl Other Computer HW Topics 15 06-05-2007 08:49 PM