Excecuting Javascript on page loaded by Ajax...

Discussion in 'JavaScript' started by jedo, Mar 14, 2008.

  1. #1
    Dear folks,

    When the client changes the colour of the article, the selectbox with sizes has to be reloaded. I use a ajax script to fill the right div with a selectbox.

    It could happen that the administrator selects any size to be listed at not available. In that case, there should be shown a javascript alert with tells the client that he should choose another colour for that size...

    When I go directly to the generated URL, the alert is shown without any problem. But, as soon as I let ajax generate the content + the script, I don't see any alert at all....

    It seems that javascript could not be runned in ajax created content. Does anyone has a simple solution for this problem, a solution which would not demand to have a complete rebuild of the shopping module?

    Thanks in advance.
     
    jedo, Mar 14, 2008 IP