I have a region of my webpage which i am refreshing using AJAX functions.
the region contains a table of rows and a javascript function which changes the background colour of the row when hovering over it.
Initially the region will be empty and then rows displayed as a user enters parameters by replacing the empty div using AJAX and innerHTML. I have found that the row highlighting fails with 'object not found' if i insert the row highlighting function via innerHTML along with the retrieved rows. If i include the function in the empty div in the original page source however everything is fine.
I also found that as long as the function is in the original page source replacing with the same function via AJAX and innerHTML does not cause it to fail.
Is there any way of getting the page to be able to use javascript functions added via innerHTML??
hope the above makes sense and any help is much appreciated...



Reply With Quote


Bookmarks