Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Function Not call from External js file

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30936
    srishyla
    Member

    I am using one function in my textbox onkeypress=”ClearLabel();” and i have write the code :

    function ClearLabel() {
    $(“#ctl00_mainContentPlaceHolder_message”).hide();
    $(“#ctl00_mainContentPlaceHolder_valSummary”).hide();
    $(“#ctl00_mainContentPlaceHolder_lbCheckAvailabilityMessage”).css({ ‘display’: ‘none’ });
    }

    This function is not working when call from external js file, but it is working in same aspx page. Why?

    Anybody can tell me the answer. Advance Wishes.

    #70401
    clokey2k
    Participant

    The only two things I can think of would be that the reference to the *.js file points to the wrong place, or that it is NOT loading after the framework (jQuery for example).

    View the source of the broken page and check the ‘head’ for the script links. Check out the order (jQuery first then your script) and check the link URL (Copy paste URL to your browser and see what loads?)

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.