View Full Version : How to use multiple mouseover effects?

08-21-2007, 04:48 AM
1) Script Title: AJAX

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem: multiple mouseover effects needed

I want to change the Link Text with a mouseover and utilize the following script. Any Suggestions?

<a href="index.php" onmouseover="ajaxpage('content/rides.html', 'rides');" onmouseout="ajaxpage('content/rides1.html', 'rides');">View Sample Ad</a>

I want the "VIEW SAMPLE AD" text to change to "Click to View All Ads"

08-21-2007, 05:09 AM
An event handler can carry multiple actions, by separating each action with a semicolon. So in your case, maybe something like:

<a href="index.php" onmouseover="ajaxpage('content/rides.html', 'rides'); this.innerHTML='Click to view all ads'" onmouseout="ajaxpage('content/rides1.html', 'rides'); this.innerHTML='View Sample Ad'">View Sample Ad</a>

08-21-2007, 05:12 AM
Thank you very much for the education. I am very happy to say it is working quite well.