Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 8
There are 1 users currently browsing forums.
JavaScript Coding JavaScript allows rich, browser-based web-applications with interactivity and complex visual effects. For discussion on JavaScript, use this forum.

Reply
  #1  
Old 09-26-2008
cancer10's Avatar
A "Mature" Pre-Teenager!
 
Join Date: Jun 2005
Location: India
Age: 28
Posts: 517
Rep Power: 6
cancer10 is on a distinguished road
Question Javascript Scoller with Mouseover

Hey

Attached is a javascript Scrolling demo which I got from dynamicdrive.com (http://www.dynamicdrive.com/dynamici...rightslide.htm)

Its working fine.

However, I was not able to add a mouseover effect on the scrolling images.

For example.
If I mouseover on tn_scroller_bw_01.jpg image, then that image should be replaced by tn_scroller_01.jpg and once the mouseout event occurs, the old image tn_scroller_bw_01.jpg should be loaded back.

Plz guide.

Thanx
Attached Files
File Type: zip MARQUEE.zip (37.4 KB, 2 views)
Reply With Quote
  #2  
Old 09-27-2008
Banned
 
Join Date: Sep 2005
Location: UK
Age: 25
Posts: 832
Rep Power: 0
bfsog is on a distinguished road
Re: Javascript Scoller with Mouseover

As far as I can see you have not attempted to try this yourself, am I right?

What you have to do is edit these lines (I assume you want the mouseover/mouse out for both images).

Code:
leftrightslide[0]='<img src="images/tn_scroller_bw_00.jpg" border=0>'
leftrightslide[1]='<img src="images/tn_scroller_bw_01.jpg" border=0>'
You will want to add the onmouseout and onmouseover hooks to both of them. Either call a function or do it right there.
Reply With Quote
  #3  
Old 09-27-2008
cancer10's Avatar
A "Mature" Pre-Teenager!
 
Join Date: Jun 2005
Location: India
Age: 28
Posts: 517
Rep Power: 6
cancer10 is on a distinguished road
Re: Javascript Scoller with Mouseover

The attached code is what I have tried from my end.

The following two lines are being added.

But no luck

Code:
onmouseover="this.src=\'images/tn_scroller_00.jpg\'" onmouseout="this.src=\'images/tn_scroller_bw_00.jpg\'"
Attached Files
File Type: zip MARQUEE.zip (37.6 KB, 1 views)
Reply With Quote
  #4  
Old 09-27-2008
Banned
 
Join Date: Sep 2005
Location: UK
Age: 25
Posts: 832
Rep Power: 0
bfsog is on a distinguished road
Re: Javascript Scoller with Mouseover

Code:
leftrightslide[0]="<img src=\"images/tn_scroller_bw_00.jpg\" border=\"0\" onmouseover=\"this.src='images/tn_scroller_00.jpg'\" onmouseout=\"this.src='images/tn_scroller_bw_00.jpg'\" />";
Reply With Quote
  #5  
Old 09-27-2008
cancer10's Avatar
A "Mature" Pre-Teenager!
 
Join Date: Jun 2005
Location: India
Age: 28
Posts: 517
Rep Power: 6
cancer10 is on a distinguished road
Re: Javascript Scoller with Mouseover

Now this is strange.

If I directly open the HTML file with my browser it works like a charm.

But when I access it thru localhost then I get a dancing and shaking image.

What can be the reason for this?
Reply With Quote
  #6  
Old 09-27-2008
Banned
 
Join Date: Sep 2005
Location: UK
Age: 25
Posts: 832
Rep Power: 0
bfsog is on a distinguished road
Re: Javascript Scoller with Mouseover

A dancing and shaking image? How do you mean? Is the image the one you specify or is the image an image of something dancing and shaking?
Reply With Quote
  #7  
Old 09-29-2008
cancer10's Avatar
A "Mature" Pre-Teenager!
 
Join Date: Jun 2005
Location: India
Age: 28
Posts: 517
Rep Power: 6
cancer10 is on a distinguished road
Re: Javascript Scoller with Mouseover

Hi,

Hard to explain. If you can try to run that on a server/or localhost then you will know what I meant.


Thanx
Reply With Quote
  #8  
Old 09-29-2008
callumjones's Avatar
Powered by an API.
 
Join Date: Mar 2005
Location: Perth, Australia
Age: 20
Posts: 3,610
Rep Power: 10
callumjones has a spectacular aura aboutcallumjones has a spectacular aura about
Re: Javascript Scoller with Mouseover

Can't you take a screenshot of it?
Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Javascript YoungCoder JavaScript Coding 5 09-25-2004 04:16 AM
javascript part 9 hayabusa Javascript Articles 0 09-05-2004 09:16 AM
How to Start Javascript Vio-Bear Javascript Articles 0 09-05-2004 09:14 AM
javascript part 2 hayabusa Javascript Articles 0 09-05-2004 09:02 AM
Javascript part 1 hayabusa Javascript Articles 0 09-05-2004 09:01 AM