Sunday, 15 August 2010

php - How to output through ajax response? -



php - How to output <br> through ajax response? -

ajax.php

foreach ($errors $e) echo "<br>".$e; // doesn't work echo $e."<br>"; // doesn't work echo "\n\n".$e; // doesn't work echo $e."\n\n"; // doesn't work

my javascript :

... $.ajax( { type: "post", url: form.attr( 'action' ), data: form.serialize(), success: function( response ) { $("b#signuperr").html(response); $("b#signuperr").fadein(); } } ); ...

everything work expected except < br > doesn't jump new line

my html looks first image want sec image (see text in red):

![preview][1]

add datatype: 'html' $.ajax function declaration. says jquery parse returned info in html.

php jquery html ajax

No comments:

Post a Comment