![]() |
Manipulating ajax data after load
I currently have a script that it uses ajax to search, the results turn up and I have buttons to each result.
Code:
document.getElementById('buttonone').innerHTML = "Search Sent";Code:
document.getElementById('buttontwo').innerHTML = "Added Ty";Is there a way to register the new elements on ajax load? |
You need to put that into the callback of the AJAX function.
|
Nm I found it, I had to reinitialize the whole thing after the first return of the ajax so the doc would find it.
|
Hi Acheron,
Are you open to using jQuery, it would make things a bit simpler. I'll try to show you what VIPStephan means using a jQuery example: Code:
<h1>Search</h1>I just ran into this issue myself the other day, and this is how I resolved it. |
| All times are GMT +1. The time now is 12:08 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.