Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6143007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:27:55+00:00 2026-05-23T18:27:55+00:00

I could be mistaken here but I thought that inline html can call an

  • 0

I could be mistaken here but I thought that inline html can call an external javascript file’s function with onmouseover.

For example:

<a href="#" onmouseover="updateParentImage('<?php echo $this->getGalleryUrl($_image) ?>');">

And my EXTERNAL jquery/javascript file function looks like:

     function updateParentImage ($image_url)
     {
        alert($image_url);
        $('.product-img-box .product-image img').attr('src', $image_url);       
     }

The function never runs. Am I completely missing something? Shouldn’t that tag call the appropriate file even thought the javascript is external?

Note: If I include the javascript inline, the alert box shows but the image that I am trying to change in the document does not change, even though I”m using the same referencing as another place in the code where it successfully updates the image.

Any help would be appreciated. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:27:56+00:00Added an answer on May 23, 2026 at 6:27 pm

    How about something like this…

    <a href="#" class="imageChanger" data-imagesrc="<?php echo $this->getGalleryUrl($_image) ?>">
    

    Then use jquery to add a mouseenter event

    $(document).ready(function(){
        $('.imageChanger').mouseenter(function(){
            alert($image_url);
            $('.product-img-box .product-image img').attr('src', $(this).data('imagesrc'));
        });
     });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here http://source.android.com/source/code-style.html#follow-field-naming-conventions it is stated that : Field Names Non-public, non-static field names start
I don't know if I can ask this question here. I usually mistake, but...
Could somebody please do a rundown of how to programmatically encrypt a config-file in
Could somebody please name a few. I could given time, but this is for
Could anyone explain with some examples when it is better to call functions by
I need to open a html help file from within a legacy windows application
Something's wrong with the PUT action here, the form gets processed but the updated
One of the barriers (that as far as I know was never removed, but
I am using a JavaScript script that tells me if specific image URLs are
I know that there are hundreds of pages written on Django v Rails, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.