UpdatePanel and JavaScript

Last post 02-13-2008 4:46 AM by Jin-Yu Yin - MSFT. 3 replies.

Sort Posts:

  • UpdatePanel and JavaScript

    02-11-2008, 11:13 AM
    • Participant
      1,065 point Participant
    • CurtWRC
    • Member since 01-19-2006, 10:28 AM
    • Nuneaton, England
    • Posts 915

    Hi,

    I have a page with an asp:UpdatePanel. In this UpdatePanel ive got 5 ImageButtons which change the ImageURL of an asp:Image which is also inside the UpdatePanel. My imagebuttons are inside a repeater which scrolls thanks for some javascript code in the page. This all works fine except when the updatepanel is triggered, then the javascript no longer works. Why is this?

    Cheers. 

    Regards, Curt
  • Re: UpdatePanel and JavaScript

    02-11-2008, 11:36 AM
    • Contributor
      2,105 point Contributor
    • aggiekevin
    • Member since 10-21-2006, 3:26 AM
    • Falls Church, VA
    • Posts 418

    Could you post some of your code so we can let you know what your problem might be?


  • Re: UpdatePanel and JavaScript

    02-11-2008, 11:39 AM
    • Participant
      1,065 point Participant
    • CurtWRC
    • Member since 01-19-2006, 10:28 AM
    • Nuneaton, England
    • Posts 915

    Thanks for your reply.

    My code is basically very similar to this telerik radrotator demo here:

    http://www.telerik.com/demos/aspnet/Rotator/Examples/Functionality/Scroller/DefaultVB.aspx

    The main difference however is that I have changed the images from <img> to <asp:imagebutton>. The javascript I'm using can be seen in the 'ASPX' tab of that page.

    Thanks again. 

    Regards, Curt
  • Re: UpdatePanel and JavaScript

    02-13-2008, 4:46 AM
    Answer

    Hi,

    Thank you for your post!

    I think it is because you use in-line javascript in updatepanel.

    This link has the answer:UpdatePanel and Rendered (Inline) Javascript

    If you have further questions,let me know!

    Best Regards,

    Sincerely,
    Jin-Yu Yin
    Microsoft Online Community Support
Page 1 of 1 (4 items)