WordPress.org

Forums

Onmouseover at template page? (6 posts)

  1. anhtuan020588
    Member
    Posted 3 years ago #

    Hi everybody,

    At present, I am designing a HTML page by using tags <div> to create page that has content about pictures, in that I used onmouseover.

    But onmouseover only presents when it runs on local, when I copy and paste it in WordPress Page, it doesn’t run.

    Could you tell me if the code is false?

    Thank you very much!

    Code:
    <div class="picture"><img src="http://static.mailchimp.com/www/images/resources/guides/thumbs/email-marketing-field-guide.png" id="Image1" onMouseOver="MM_swapImage('Image1','','http://cs.export2global.net/xk/wp-content/uploads/2011/11/email-marketing-field-guide-fix.jpg',1)" onMouseOut="MM_swapImgRestore()"></div>

  2. Brad Markle
    Member
    Posted 3 years ago #

    Hi anhtuan020588. The onMouseOver you have shown us appears correct to me. The onMouseOver is attempting to call a function named MM_swapImage. It appears your site is including 14 javascript files. If it is not working for you, I would ensure that you have included the correct javascript file that includes that function defined. Do you know which .js files defines that function?

  3. anhtuan020588
    Member
    Posted 3 years ago #

    Hi Brad Makle,

    Thank you for your reply!!!

    Actually, I don't use JavaScript files, I only use HTML code to design that function from DreamWeaver. This code run at local host, but when I copy that HTML code into a WordPress's New Page that function didn't appear on WordPress's New Page.

    Kindly copy that code to the WP page and help me check this issue.

    Thanks again.

  4. Brad Markle
    Member
    Posted 3 years ago #

    Hi anhtuan020588.

    Actually, I don't use JavaScript files, I only use HTML code to design that function from DreamWeaver.

    The problem appears to be that you're using a custom Dreamweaver function. When you're developing locally, it works because locally it can find the Dreamweaver function (javascript). When you copy the code however to WordPress, it is not working because it is not finding the Dreamweaver function MM_swapImage.

    I found a link that may shed some more light on this for you:

    Help with a "MM_swapImage"

    I don't use JavaScript files

    When you test locally, if you view the page source, do you see any javascript? You'll want to look for the MM_swapImage function on your localhost and incorporate it into your WordPress blog.

  5. Brad Markle
    Member
    Posted 3 years ago #

    Hi anhtuan020588, have you been able to make any progress on the onMouseOver issue?

  6. anhtuan020588
    Member
    Posted 3 years ago #

    yeah,

    I can do it, thanks you very much.
    See you again !

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.