Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Enabling Javascript - Accessing Portal ASPX PagesEnabling Javascript - Accessing Portal ASPX Pages
Previous
 
Next
New Post
2/3/2008 10:00 AM
 

I have a client that wants us to enable some image rollover effects on their pages using a Fireworks HTML code and image maps.  Does anyone know how to enable the JS I need in the header on different portal pages to "activate" the rollover effects.  I have the image map on the page but the effects are not active because I don't have this code below in the header part of the page...

I have tried unsuccessfully to find the portal page to insert it directly but didn't see it anywhere in the menu trees.  Can someone help point me in the right direction on how to enable image rolloever effects like this one...?

Thanks, David

 

<script type="text/javascript">
<!--
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_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_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];}
}
//-->
</script>

 
New Post
2/3/2008 1:09 PM
 

David,

You can certainly place or reference this JavaScript from your skin file, if you have the ability to update it. Another route would be to include the javascript in a text/html module on your page(s).

Let me know if you have any questions.

Take care,

Ian


Software Engineer
Co-Founder, dnnGallery
Stack Overflow: Ian Robinson
Twitter: @irobinson
Linked In: Ian Robinson
 
New Post
2/3/2008 2:36 PM
 

Thanks Ian,

In attempting to do the JS code tie-in to the module directly I am still stuck. 

I  have tried entering the JS above the image map detail within the existing Text/HTML module that has the image map, but this doesn't enable the rollover functionality.  I am getting the master image (layer 1) to display and the links work, but the rollover effects do not.  Could you help me understand what I am missing to make this work.

Thanks, David

 
New Post
2/4/2008 12:23 AM
 

David,

You're welcome, would you mind sharing the code that you are using in your text/html module? I see the JavaScript methods above, but I can't be sure that you are calling the methods from the onMouseOver and onMouseOut properties of your images/links.

Thanks,

Ian


Software Engineer
Co-Founder, dnnGallery
Stack Overflow: Ian Robinson
Twitter: @irobinson
Linked In: Ian Robinson
 
New Post
2/7/2008 2:33 AM
 

Appreciate the assist Ian.

Here is the complete set of code I placed in the text/html module...

David

 

<script type="text/javascript">
<!--
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_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_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];}
}
//-->
</script>
<table cellspacing="0" cellpadding="0" border="0" style="border: medium none ; border-spacing: 0px;">
    <tbody>
        <tr style="text-align: left; vertical-align: middle;">
            <td width="70" valign="middle" style="width: 70px;">
            <p style="margin: 0px 0px 0px 24px;" class="p_Heading1"><img width="135" height="76" border="0" usemap="#map401" ismap="ismap" alt="" src="http://2cs.salesnavigatorpro.com/manufacturing.zoom35.jpg" /></p>
            </td>
            <td width="67" valign="middle" style="width: 67px;">
            <p>&#160;</p>
            <hr size="1" noshade="noshade" style="color: rgb(192, 192, 192);" />
            <p>&#160;</p>
            </td>
            <td width="70" valign="middle" style="width: 70px;">
            <p style="margin: 0px;"><img width="125" height="86" border="0" alt="" src="http://2cs.salesnavigatorpro.com/distribution%201.zoom72.jpg" /></p>
            </td>
        </tr>
    </tbody>
</table>
<p>&#160;</p>
<p style="margin: 0px;"><span style="font-size: 10pt;">&#160;</span></p>
<div style="margin: 0px; padding: 0px; text-align: left; text-indent: 0px;">
<table cellspacing="0" cellpadding="0" border="0" style="border: medium none ; border-spacing: 0px;">
    <tbody>
        <tr style="text-align: left; vertical-align: middle;">
            <td width="82" valign="middle" style="width: 82px;">
            <p style="margin: 0px; text-align: center;"><a href="/LinkClick.aspx?link=266&amp;tabid=266"><img width="94" height="30" border="0" alt="" src="http://2cs.salesnavigatorpro.com/industry%20profile%20select.jpg" /></a></p>
            </td>
            <td width="112" valign="middle" style="width: 112px;">
            <p style="margin: 0px; text-align: center;"><a href="/LinkClick.aspx?link=283&amp;tabid=266"><img width="94" height="30" border="0" alt="" src="http://2cs.salesnavigatorpro.com/industry%20companies.jpg" /></a></p>
            </td>
            <td width="117" valign="middle" style="width: 117px;">
            <p style="margin: 0px; text-align: center;"><a href="/LinkClick.aspx?link=266&amp;tabid=266"><img width="94" height="30" border="0" alt="" src="http://2cs.salesnavigatorpro.com/industry%20associations%20select.jpg" /></a></p>
            </td>
            <td width="110" valign="middle" style="width: 110px;">
            <p style="margin: 0px; text-align: center;"><a href="/LinkClick.aspx?link=266&amp;tabid=266"><img width="94" height="30" border="0" alt="" src="http://2cs.salesnavigatorpro.com/industry%20publications%20select.jpg" /></a></p>
            </td>
            <td width="109" valign="middle" style="width: 109px;">
            <p style="margin: 0px; text-align: center;"><a href="/LinkClick.aspx?link=266&amp;tabid=266"><img width="94" height="30" border="0" alt="" src="http://2cs.salesnavigatorpro.com/industry%20terms%20select.jpg" /></a></p>
            </td>
        </tr>
        <tr style="text-align: left; vertical-align: top;">
            <td width="82" valign="top" style="width: 82px;">
            <p style="margin: 0px; text-align: center;"><span style="font-size: 10pt; font-weight: bold; color: rgb(51, 102, 255);">&#160;</span></p>
            </td>
            <td width="112" valign="top" style="width: 112px;">
            <p style="margin: 0px; text-align: center;"><span style="font-size: 8pt; color: rgb(51, 102, 255); text-decoration: underline;"><a style="font-size: 8pt; font-family: 'Arial'; font-style: normal; font-weight: normal; color: rgb(51, 102, 255); background-color: transparent; text-decoration: underline;" class="weblink" href="mailto:IndustryCompanies@SalesNavigatorPro.com">Add Company</a></span></p>
            </td>
            <td width="117" valign="top" style="width: 117px;">
            <p style="margin: 0px; text-align: center;"><span style="font-size: 10pt; font-weight: bold; color: rgb(51, 102, 255);">&#160;</span></p>
            </td>
            <td width="110" valign="top" style="width: 110px;">
            <p style="margin: 0px; text-align: center;"><span style="font-size: 10pt; font-weight: bold; color: rgb(51, 102, 255);">&#160;</span></p>
            </td>
            <td width="109" valign="top" style="width: 109px;">
            <p style="margin: 0px; text-align: center;"><span style="font-size: 10pt; font-weight: bold; color: rgb(51, 102, 255);">&#160;</span></p>
            </td>
        </tr>
    </tbody>
</table>
</div>
<p>&#160;</p>
<p><img width="675" height="35" border="0" name="Associations" src="Images/Image_Maps/IP-Header-Images/Associations.jpg" id="Associations" usemap="#m_Associations" alt="" /> <map name="m_Associations" id="m_Associations">
<area shape="rect" coords="541,5,600,20" href="/Industry_Profiles/Distribution/tabid/308/Default.aspx" alt="" onmouseout="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations.jpg',1);" onmouseover="MM_swapImage('Associations','','Images/Image_Maps/IP-Header-Images/Associations_f6.jpg',1);" />
<area shape="rect" coords="417,5,515,20" href=" ;" alt="" onmouseout="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations.jpg',1);" onmouseover="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations_f5.jpg',1);" />
<area shape="rect" coords="293,5,396,20" href=" ;" alt="" onmouseout="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations.jpg',1);" onmouseover="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations_f4.jpg',1);" />
<area shape="rect" coords="180,5,274,20" href=" ;" alt="" onmouseout="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations.jpg',1);" onmouseover="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations_f3.jpg',1);" />
<area shape="rect" coords="75,5,157,20" href="/Industry_Profiles/Distribution/tabid/266/Default.aspx" alt="" onmouseout="MM_swapImage('Associations',''Images/Image_Maps/IP-Header-Images/Associations.jpg',1);" onmouseover="MM_swapImage('Associations',''Images/Image_MapsProfiles/IP-Header-Images/Associations_f2.jpg',1);" /> </map></p>

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Enabling Javascript - Accessing Portal ASPX PagesEnabling Javascript - Accessing Portal ASPX Pages


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out