PDA

View Full Version : Form Fill Using AJAX


wolfe
10-12-2007, 03:58 PM
does anyone know how i can go about this.

I have got a field called url and then under that i have other and what i need it to do is once a web address is typed in the top field a button next to it called "Fill Fields" and once it is pressed it runns a function and returns the contents required and fill the other fields and then the user submits the form with out haveing to type everything.

can anyone tell me how i can go about this.

at the moment i have figured out how to make the results fill the fields just i need to do in in real time without submitting the whole form


print "<script language='JavaScript' type='text/javascript'>testForm.txtTitle.value = '".$title ."';</script>";
print "<script language='JavaScript' type='text/javascript'>testForm.txtImage.value = '".$image ."';</script>";
print "<script language='JavaScript' type='text/javascript'>testForm.txtDesc.value = '" .$description ."';</script>";