Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Dynamic name changing
08-24-2009, 10:57 AM #1
- Join Date
- Aug 2009
- Thanked 0 Times in 0 Posts
Dynamic name changing
Hi I have a piece of code which calls upon AJAX and an external file to display something from the database, now the code below works fine but because it is within a loop it always echo's to the top div on the page. Take a look
<?php $ajax = new Ajax('displayArea'); ?> <form> <input type="button" value="Click me" name="name_button" onclick="sendReq('serverfile.php', 'id', '<?=$yt_id?>')" /> </form> <br/> <div id="displayArea"> Hello </div>
Or I thought I might also have to dynamically change the object name but how do I do this?
Any thoughts? Thanks