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 8257033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:04:06+00:00 2026-06-08T02:04:06+00:00

I am using Visual Studio. My javascript is functioning if I debug it at

  • 0

I am using Visual Studio. My javascript is functioning if I debug it at local host, the function is very simple, photo change at mouseOver.

But after I upload my file to my server, this function is not working. I have tried it on Chrome, Firefox, IE and Safari:

function mouseOver1()
{
    var category1 = document
         .getElementById('ctl00_ContentPlaceHolder1_lblItemID')
         .innerHTML + '_1.jpg';

    document
      .getElementById('<%= iPhotoMain.ClientID.Replace("$","_") %>')
      .src = 'photos/product/' + category1;
}

<img id ="photo1" 
     src ="photos/product/noImage.gif" 
     onmouseover="mouseOver1();"  
     class="thumbpic" 
     runat ="server" />
  • 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-06-08T02:04:08+00:00Added an answer on June 8, 2026 at 2:04 am

    In light of comments made by the OP, my original answer is partially incorrect (although I still don’t think you should be using static ID for the lblItemID – so will leave the answer below).

    My new guess would be that you have a second mouseOver1(); function defined somewhere on your page, or more likely an external JavaScript file that you are linking to. So I would recommend that you check all external JavaScript files on your server that you link to and make sure they’re as you would expect.

    I can recommend firebug for firefox or the developers tools under IE and Chrome (F12 on both). With firebug you can breakpoint on the next Javascript to fire, so you can easily find out where the call is going to


    Original Answer

    My guess is that you have mixed up your object ID’s. You are also using a static string to find one of your objects.

    If I am correct, please try this – if I am incorrect in my guess, I will happily delete my answer.

    (Note, I have changed iPhotoMain into photo1)

    function mouseOver1(){
      var category1 = document
        .getElementById('<%=lblItemID.ClientID%>')
        .innerHTML + '_1.jpg';
    
      document
        .getElementById('<%=photo1.ClientID%>')
        .src = 'photos/product/' + category1;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to debug JavaScript code using Visual Studio 2010, but I can't set
Im keen on learning javascript and ui design. Im using visual studio 2005 but
I know that Visual Studio 2008 support JavaScript intellisense as I am using it
Using Visual Studio 2005, I wrote a simple DLL in C that uses the
I generated classes in JavaScript from a WSDL by using Visual Studio's WSDL utility.
I am using the visual studio JSLint plugin to keep my javascript in order,
Using Visual Studio 2010, MVC project When my form is submitted (currently via javascript,
I'm using Visual Studio 2003. In debug mode, whenever I add a break point
I am using ReportViewer in Visual Studio 2010. It renders fine in IE but
Is it possible to degug JavaScript code in Razor views using Visual Studio 2010

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.