PDA

View Full Version : Ajax beginer question


afridy
09-01-2008, 02:46 PM
Hai boys,

i just doint my first ajax project.
problem is, the returned response text is like this.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> hai</body> </html>

this is my php
<?php
echo "hai";
?>

html
<form id="form1" name="form1"><input type="text" name="phonenum" id="phonenum" /></form>


button that process the ajax.
<input type="submit" name="Submit" value="Search" onclick="ajaxFunction()" />

the entire page content as shown above in the first code is printed in the phonenum text box. i only need "hai" to be printed.

:mad:

Millenia
09-01-2008, 02:59 PM
Can you show us your full code? The whole page.

afridy
09-01-2008, 03:03 PM
sorry to trouble you,
i found the problem.
my php code has rapped with html :D

:thumbsup:

afridy
09-01-2008, 03:04 PM
Can you show us your full code? The whole page.

yes, you got the point :D :thumbsup:

yes, thats da problem :)