The title should read: Populate form vars on return from ajax call to server
1) Script Title: DHTML Window Widget
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...htmlwindow.zip
3) Describe problem: I am trying to use the ajaxwindow to retrieve values from a php script and populate various FORM elements.
Here's what I have done. I have a js function
Then I call it with this:Code:function ajaxWindowCreate(w,h,controller,title) { var winl=(window.innerWidth-w)/2; var wint=(window.innerHeight-h)/2; var controller = "controllers/"+controller; ajaxwin=dhtmlwindow.open("ajaxbox", "ajax", controller, title, "width="+w+"px,height="+h+"px,left="+winl+",top="+wint+",resize=0,scrolling=1"); return false; }
As it stands right now it all works - great script! What I need to do is update various <form> elements and not the ajax window. How do I communicate the return values from the PHP script to update the corresponding <form> elements?Code:<input type="button" name="db_type" class="inputbox" value="Check DB Connection" onclick="ajaxWindowCreate(650,500,'validateServerPermissions.cntl.php','Test');" />
Thanks!



Reply With Quote

Bookmarks