Video lightbox using prettyphoto in an updatepanel
  • I am trying to integrate prettyphoto to have a video lightbox (with a youtube video) inside an asp.net updatepanel that does a postback before the lightbox is loaded. The code is perfectly working if it is put outside the updatepanel.

    Bascically my aspx page is a child page that inherits from a masterpage; inside I have an updatepanel with two panels, one of them is initially not visible and it contains the ligthbox :

    1.
    ...
    8.
    9.
    10.
    11.
    12.
    13.
    14.
    15. ...
    16.
    17.
    18.
    19.
    20.
    21. ...
    22.
    23.
    24.
    25.
    26.
    27.
    28. ....
    29.
    30.
    31.
    32. ....
    33.
    34.
    35.
    36.
    37.
    38. ...
    39.
    40. Youtube video
    41.
    42.
    43.
    44.


    45.
    46.
    47.
    48.
    49.
    50. function pageLoad() {
    51.
    52. $("a[rel^='prettyPhoto']").prettyPhoto();
    53.
    54. }
    55.
    56.
    57.




    I have a button inside the updatepanel that if pressed makes the pnlVideoLightbox visible. Then I just click on the thumbnail that should fire the lightbox but the browser redirects to the youtube website instead of firing the JQuery code.

    How can I fix this?

    Thank you!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter