![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Can i put rollover images onto inc files as i cant seem to get it to change on mouseover??? Thanks Bill |
#3
| |||
| |||
|
|
You can have an include file that contains images which will rollover when they are included in the receiving page. But the universe of possible errors you could have made is just too large for me to hazard a guess. Can you show me the code in the include and the code in the receiving page? -- Murray --- ICQ 71997575 Team Macromedia Volunteer for Dreamweaver MX (If you *MUST* email me, don't LAUGH when you do so!) ================== news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET ANSWERS ================== http://www.dreamweavermx-templates.com - Template Triage! http://www.projectseven.com/go - DW FAQs, Tutorials & Resources http://www.dwfaq.com - DW FAQs, Tutorials & Resources http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes ================== "Bill" <BillBluart (AT) hotmail (DOT) com> wrote in message news:bu0cc7$160$1 (AT) forums (DOT) macromedia.com... Can i put rollover images onto inc files as i cant seem to get it to change on mouseover??? Thanks Bill |
#4
| |||
| |||
|
|
OK here is my include, its a search form with a rollover submit button... ----------------------------------------- link href="../CSS/STYLES.CSS" rel="stylesheet" type="text/css" script language="JavaScript" type="text/JavaScript" !-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } //-- /script body onLoad="MM_preloadImages('/images/BUTTONS/Search_Down.gif')"><form action="/shipbroking/vesselweb/search/resultlisting.asp" method="post" name="Search_Vesselweb" id="Search_Vesselweb" table width="100%" border="0" cellspacing="0" cellpadding="2" tr class="BodyHeadingsTXT" td><span class="BodyHeadingsTXT"><strong><em>Search Vessels</em></strong></span></td td width="1%"><a href="javascript:" onmouseover="doTooltip(event,tipSearchEntireSite)" onmouseout="hideTip()"><img src="/images/PICS/roundQ_wbg.gif" width="15" height="15" border="0"></a></td /tr /table p>This form searches vessel names and ex-names or call sign, <a href="#">click here</a> to visit the advanced search pages.</p table width="100%" border="0" cellpadding="2" cellspacing="0" tr td width="1%" nowrap><div align="center"> <span class="LargeBodyTXT"><strong>Vessel Search:</strong> <strong class="LargeBodyTXT"> </strong></span></div></td td width="99%" nowrap><span class="BodyHeadingsTXT"><strong /strong></span input type="text" name="VessSearchfrm" value=""> <a href="javascript:" onmouseover="doTooltip(event,tipSearchKeywords)" onmouseout="hideTip()"><img src="/images/PICS/roundQ_wbg.gif" width="15" height="15" border="0"></a></td /tr tr td width="1%"><div align="center"> </div></td td width="99%"> <a href="javascript:" onClick="MM_callJS('document.Search_Vesselweb.subm it()')" onMouseOver="MM_swapImage('Image3','','/images/BUTTONS/Search_Down.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="/images/BUTTONS/Search_Up.gif" alt="Search" name="Image3" border="0"></a> <input name="VesselwebQuery1" type="hidden" id="VesselwebQuery12" value="VesselwebQuery1"> </td /tr /table /form div align="center" p>[ <a href="#">ADV SEARCH</a> ]</p /div My parent page is too big for here but this is the bit that the include is included tr td width="10" class="ContTablesVertBarLeft"> </td td valign="top" class="LargeBodyTXT"><!--#include file="../../incs/Search_Vesselweb.asp" --></td td width="11" class="ContTablesVertBarRight"> </td /tr All the javascript functions are on the include! The only thing i can see to try next is move the javascript functions onto my parent page????? Many Thanks Bill "Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in message news:bu0opj$i7k$1 (AT) forums (DOT) macromedia.com... You can have an include file that contains images which will rollover when they are included in the receiving page. But the universe of possible errors you could have made is just too large for me to hazard a guess. Can you show me the code in the include and the code in the receiving page? -- Murray --- ICQ 71997575 Team Macromedia Volunteer for Dreamweaver MX (If you *MUST* email me, don't LAUGH when you do so!) ================== news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET ANSWERS ================== http://www.dreamweavermx-templates.com - Template Triage! http://www.projectseven.com/go - DW FAQs, Tutorials & Resources http://www.dwfaq.com - DW FAQs, Tutorials & Resources http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes ================== "Bill" <BillBluart (AT) hotmail (DOT) com> wrote in message news:bu0cc7$160$1 (AT) forums (DOT) macromedia.com... Can i put rollover images onto inc files as i cant seem to get it to change on mouseover??? Thanks Bill |
#5
| |||
| |||
|
|
In addition, the include contains a chunk of javascript. |
|
Also, consider doing this (it will eliminate one function declaration from your page) |
|
Bill: Your include file contains a <body> tag. If the receiving page also contains one, then DW will be pretty jiggy about working with this. In addition, the include contains a chunk of javascript. It is usually much better to work with includes that do not contain 'mixed-region' content, i.e., head and body code. Also, consider doing this (it will eliminate one function declaration from your page) - a href="javascript:" onClick="MM_callJS('document.Search_Vesselweb.subm it()')" instead of this - a href="javascript:this.submit()" -- Murray --- ICQ 71997575 Team Macromedia Volunteer for Dreamweaver MX (If you *MUST* email me, don't LAUGH when you do so!) ================== news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET ANSWERS ================== http://www.dreamweavermx-templates.com - Template Triage! http://www.projectseven.com/go - DW FAQs, Tutorials & Resources http://www.dwfaq.com - DW FAQs, Tutorials & Resources http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes ================== "Bill" <BillBluart (AT) hotmail (DOT) com> wrote in message news:bu3avo$7fq$2 (AT) forums (DOT) macromedia.com... OK here is my include, its a search form with a rollover submit button... ----------------------------------------- link href="../CSS/STYLES.CSS" rel="stylesheet" type="text/css" script language="JavaScript" type="text/JavaScript" !-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function MM_callJS(jsStr) { //v2.0 return eval(jsStr) } //-- /script body onLoad="MM_preloadImages('/images/BUTTONS/Search_Down.gif')"><form action="/shipbroking/vesselweb/search/resultlisting.asp" method="post" name="Search_Vesselweb" id="Search_Vesselweb" table width="100%" border="0" cellspacing="0" cellpadding="2" tr class="BodyHeadingsTXT" td><span class="BodyHeadingsTXT"><strong><em>Search Vessels</em></strong></span></td td width="1%"><a href="javascript:" onmouseover="doTooltip(event,tipSearchEntireSite)" onmouseout="hideTip()"><img src="/images/PICS/roundQ_wbg.gif" width="15" height="15" border="0"></a></td /tr /table p>This form searches vessel names and ex-names or call sign, <a href="#">click here</a> to visit the advanced search pages.</p table width="100%" border="0" cellpadding="2" cellspacing="0" tr td width="1%" nowrap><div align="center"> <span class="LargeBodyTXT"><strong>Vessel Search:</strong> <strong class="LargeBodyTXT"> </strong></span></div></td td width="99%" nowrap><span class="BodyHeadingsTXT"><strong /strong></span input type="text" name="VessSearchfrm" value=""> <a href="javascript:" onmouseover="doTooltip(event,tipSearchKeywords)" onmouseout="hideTip()"><img src="/images/PICS/roundQ_wbg.gif" width="15" height="15" border="0"></a></td /tr tr td width="1%"><div align="center"> </div></td td width="99%"> <a href="javascript:" onClick="MM_callJS('document.Search_Vesselweb.subm it()')" onMouseOver="MM_swapImage('Image3','','/images/BUTTONS/Search_Down.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="/images/BUTTONS/Search_Up.gif" alt="Search" name="Image3" border="0"></a> <input name="VesselwebQuery1" type="hidden" id="VesselwebQuery12" value="VesselwebQuery1"> </td /tr /table /form div align="center" p>[ <a href="#">ADV SEARCH</a> ]</p /div My parent page is too big for here but this is the bit that the include is included tr td width="10" class="ContTablesVertBarLeft"> </td td valign="top" class="LargeBodyTXT"><!--#include file="../../incs/Search_Vesselweb.asp" --></td td width="11" class="ContTablesVertBarRight"> </td /tr All the javascript functions are on the include! The only thing i can see to try next is move the javascript functions onto my parent page????? Many Thanks Bill "Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in message news:bu0opj$i7k$1 (AT) forums (DOT) macromedia.com... You can have an include file that contains images which will rollover when they are included in the receiving page. But the universe of possible errors you could have made is just too large for me to hazard a guess. Can you show me the code in the include and the code in the receiving page? -- Murray --- ICQ 71997575 Team Macromedia Volunteer for Dreamweaver MX (If you *MUST* email me, don't LAUGH when you do so!) ================== news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET ANSWERS ================== http://www.dreamweavermx-templates.com - Template Triage! http://www.projectseven.com/go - DW FAQs, Tutorials & Resources http://www.dwfaq.com - DW FAQs, Tutorials & Resources http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes ================== "Bill" <BillBluart (AT) hotmail (DOT) com> wrote in message news:bu0cc7$160$1 (AT) forums (DOT) macromedia.com... Can i put rollover images onto inc files as i cant seem to get it to change on mouseover??? Thanks Bill |
#6
| ||||
| ||||
|
|
The body tag must have been added when i created the rollovers as i didant put it there |
|
Should i put it all on the parent page?, although i wanted to be able to include it on any page without having to do extra coding??? |
|
Its already like that? isnt it? |
|
Hi Murry, |
![]() |
| Thread Tools | |
| Display Modes | |
| |