mouseover why does image have to be linked to work?

Options

can't figure out why this won't work, the image has to be linked to work, is there away to do this w/o linking the image?

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

loadImage1 = new Image();

loadImage1.src="
http://www.stjo.org/images/content/pagebuilder/14847.png";

staticImage1 = new Image();

staticImage1.src="
http://www.stjo.org/images/content/pagebuilder/14846.png";

// End -->

</script>



<table border="0">

<tbody>

<tr>

<td>

<p>Receive the following items FREE!</p>

<ul>

<li>77 Native American themed address labels </li>

<li>Convenient notepad </li>

<li>Decorative envelope seals</li>

<li>Email updates on St. Joseph's children</li>

</ul>

<p>Please fill out and submit the form below to receive your free gift.</p>

<p style="color: red;"><em>Gift package can be sent to valid U.S. addresses only. Please one entry per household mailing address. Thank you!</em><br /><br /></p>

</td>

<td valign="top"><onmouseover="image1.src=loadImage1.src;"onmouseout="image1.src=staticImage1.src;">

<img name="image1" src="
http://www.stjo.org/images/content/pagebuilder/14846.png" border="0;" img style="float: right;" border="0" alt="All of these FREE when you join eClub!" />

</td>

</tr>

<tr>

</tr>

</tbody>

</table>

This is what worked, the image linked?

<a href="http://www.stjo.org/help_cpf_b" target="_blank" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;">

<img name="image1" src="
http://www.stjo.org/images/content/pagebuilder/14825.jpg" border="0;" img style="float: left;" border="0" alt="Give the gift culture" /></></a>

Tagged:

Comments

  • Nikki,

    onmouseover and onmouseout should be attributes of the <img> tag:



    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    loadImage1 = new Image();
    loadImage1.src="http://www.stjo.org/images/content/pagebuilder/14847.png";
    staticImage1 = new Image();
    staticImage1.src="http://www.stjo.org/images/content/pagebuilder/14846.png";

    // End -->
    </script>


    <table border="0">
    <tbody>
    <tr>
    <td>
    <p>Receive the following items FREE!</p>
    <ul>
    <li>77 Native American themed address labels </li>
    <li>Convenient notepad </li>
    <li>Decorative envelope seals</li>
    <li>Email updates on St. Joseph's children</li>
    </ul>
    <p>Please fill out and submit the form below to receive your free gift.</p>
    <p style="color: red;"><em>Gift package can be sent to valid U.S. addresses only. Please one entry per household mailing address. Thank you!</em><br /><br /></p>
    </td>
    <td valign="top">
    <img name="image1" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;" src="http://www.stjo.org/images/content/pagebuilder/14846.png" border="0;" img style="float: right;" border="0" alt="All of these FREE when you join eClub!" />
    </td>
    </tr>
    <tr>
    </tr>
    </tbody>
    </table>
  • Noah Cooper:

    Nikki,

    onmouseover and onmouseout should be attributes of the <img> tag:



    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    loadImage1 = new Image();
    loadImage1.src="http://www.stjo.org/images/content/pagebuilder/14847.png";
    staticImage1 = new Image();
    staticImage1.src="http://www.stjo.org/images/content/pagebuilder/14846.png";

    // End -->
    </script>


    <table border="0">
    <tbody>
    <tr>
    <td>
    <p>Receive the following items FREE!</p>
    <ul>
    <li>77 Native American themed address labels </li>
    <li>Convenient notepad </li>
    <li>Decorative envelope seals</li>
    <li>Email updates on St. Joseph's children</li>
    </ul>
    <p>Please fill out and submit the form below to receive your free gift.</p>
    <p style="color: red;"><em>Gift package can be sent to valid U.S. addresses only. Please one entry per household mailing address. Thank you!</em><br /><br /></p>
    </td>
    <td valign="top">
    <img name="image1" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;" src="http://www.stjo.org/images/content/pagebuilder/14846.png" border="0;" img style="float: right;" border="0" alt="All of these FREE when you join eClub!" />
    </td>
    </tr>
    <tr>
    </tr>
    </tbody>
    </table>

    Ok, I did what you told me to and it's not working in our survey, works in pagebuilder.

    <SCRIPT LANGUAGE="JavaScript"><!-- BeginloadImage1 = new Image();loadImage1.src="http://www.stjo.org/images/content/pagebuilder/14847.png";staticImage1 = new Image();staticImage1.src="http://www.stjo.org/images/content/pagebuilder/14846.png";// End --></script><table border="0"><tbody><tr><td><p>Receive the following items FREE!</p><ul><li>77 Native American themed address labels </li><li>Convenient notepad </li><li>Decorative envelope seals</li><li>Email updates on St. Joseph's children</li></ul><p>Please fill out and submit the form below to receive your free gift.</p><p style="color: red;"><em>Gift package can be sent to valid U.S. addresses only. Please one entry per household mailing address. Thank you!</em><br /><br /></p></td><td valign="top"><img name="image1" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;" src="http://www.stjo.org/images/content/pagebuilder/14846.png" border="0;" img style="float: right;" border="0" alt="All of these FREE when you join eClub!" /></td></tr><tr></tr></tbody></table>

  • Nikki Valentine Odens:

    Ok, I did what you told me to and it's not working in our survey, works in pagebuilder.

    <SCRIPT LANGUAGE="JavaScript"><!-- BeginloadImage1 = new Image();loadImage1.src="http://www.stjo.org/images/content/pagebuilder/14847.png";staticImage1 = new Image();staticImage1.src="http://www.stjo.org/images/content/pagebuilder/14846.png";// End --></script><table border="0"><tbody><tr><td><p>Receive the following items FREE!</p><ul><li>77 Native American themed address labels </li><li>Convenient notepad </li><li>Decorative envelope seals</li><li>Email updates on St. Joseph's children</li></ul><p>Please fill out and submit the form below to receive your free gift.</p><p style="color: red;"><em>Gift package can be sent to valid U.S. addresses only. Please one entry per household mailing address. Thank you!</em><br /><br /></p></td><td valign="top"><img name="image1" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;" src="http://www.stjo.org/images/content/pagebuilder/14846.png" border="0;" img style="float: right;" border="0" alt="All of these FREE when you join eClub!" /></td></tr><tr></tr></tbody></table>

    Could you share a link to your Survey?

  • Noah Cooper:

    Could you share a link to your Survey?

    https://secure3.convio.net/stjo/admin/SurveyAdmin?ACTION_REQUIRED=URI_ACTION_PREVIEW_SURVEY&SURVEY_ID=1560&pps=true

    It's unpublished, I am just using this one to test in.

  • Nikki Valentine Odens:

    https://secure3.convio.net/stjo/admin/SurveyAdmin?ACTION_REQUIRED=URI_ACTION_PREVIEW_SURVEY&SURVEY_ID=1560&pps=true

    It's unpublished, I am just using this one to test in.

    You still have the following in your code:



    <onmouseover="image1.src=loadImage1.src;"onmouseout="image1.src=staticImage1.src;">


    onmouseover and onmouseout should be attributes of the <img> tag:



    <img name="image1" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;" src="http://www.stjo.org/images/content/pagebuilder/14846.png" border="0;" img style="float: right;" border="0" alt="All of these FREE when you join eClub!" />


  • Noah Cooper:

    You still have the following in your code:



    <onmouseover="image1.src=loadImage1.src;"onmouseout="image1.src=staticImage1.src;">


    onmouseover and onmouseout should be attributes of the <img> tag:



    <img name="image1" onmouseover="image1.src=loadImage1.src;" onmouseout="image1.src=staticImage1.src;" src="http://www.stjo.org/images/content/pagebuilder/14846.png" border="0;" img style="float: right;" border="0" alt="All of these FREE when you join eClub!" />


    Oops, I didn't save previous code. I think I need to make that other image smaller though, a bit big and it drops the whole survey down on mouse out.

  • Nikki Valentine Odens:

    Oops, I didn't save previous code. I think I need to make that other image smaller though, a bit big and it drops the whole survey down on mouse out.

    https://secure3.convio.net/stjo/admin/SurveyAdmin?ACTION_REQUIRED=URI_ACTION_PREVIEW_SURVEY&SURVEY_ID=1560&pps=true

    So I made the image a lot smaller. Even though I don't have my mouse over it the survey is dropped way down near footer. Any idea how to change that?

    Thanks.

Categories