Jump to content

Recommended Posts

Could someone please tell me what code I would need to make a hover over effect on " this.imagefiles[0]", thanks.

 

Code:

 

var dhtmlwindow={
imagefiles:['windowfiles/min.gif', 'windowfiles/cross.gif', 'windowfiles/restore.gif', 'windowfiles/resize.gif'], //Path to 4 images used by script, in that order
ajaxbustcache: true, //Bust caching when fetching a file via Ajax?
ajaxloadinghtml: '<b>Loading Page. Please wait...</b>', //HTML to show while window fetches Ajax Content?

minimizeorder: 0,
zIndexvalue:100,
tobjects: [], //object to contain references to dhtml window divs, for cleanup purposes
lastactivet: {}, //reference to last active DHTML window


init:function(t){
var domwindow=document.createElement("div") //create dhtml window div
domwindow.id=t
domwindow.className="dhtmlwindow"
var domwindowdata=''
domwindowdata=' <div class="drag-handle">'
domwindowdata+='<div class="drag-stripes"><div class="drag-handle2">DHTML Window</div><div class="drag-controls"><img src="'+this.imagefiles[0]+'"  title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div></div>'
domwindowdata+='</div>'
domwindowdata+='<div class="drag-container" ><div id="cell1" class="drag-contentarea"></div>'
domwindowdata+='<div class="drag-statusarea"><div  class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;"> </div></div>'
domwindowdata+='</div></div>'

Link to comment
https://forums.phpfreaks.com/topic/145416-mouseover-image-change/
Share on other sites

You could create a simple function to change the source of the image...

 

function changeImg(obj, url) {
    if (obj.src) {
        obj.src = url;
    }
    return;
}

 

Then call it with onmouseover="changeImg(this, 'rollover3.gif');" ..

 

Adam

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.