I have used curl for cross browser scripting and i get html response
var url= 'http://'+$('#host').val() + "user/autolog";
$.ajax({
type: "POST",
data:{username:$('#User_username').val()},
url:url,
dataType: "html",
success:function(data){
alert(data);
$('#User_autolog').val("1");
},
});
i get html response ,,if i alert it it display text..
how can i convert it in to html..
so it would be something like a html form in popup ?
i get response
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html><head><title>Bandeau Agent - CCV</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">function popup_agent(connect_url) {
var option = 'width=500,height=150,resizable=no,scrollbars=no,menubar=no,location=no,toolbar=no,status=no';
var pname = 'popup_agent_';
var winp = window.open(connect_url + '?@secid@=KXpF6GFT7XCh7F-ZmB2VlsYteT8L18qE-aJDKIXt0pCv2QSHdNFN-4ixfasv9_Rc', pname, option );
}
</script></head><body><script language="javascript" type="text/javascript">popup_agent('http://ccv-banner.viatelecom.com/bandeau.php');</script>
<code>Votre popup agent doit s'afficher dans une nouvelle fenetre sur votre ecran. Si ce n'est pas le cas,<a href="#" onclick="popup_agent('http://ccv-banner.viatelecom.com/bandeau.php');">cliquez-ici</a>.</code>
</body></html>
I would advise you have a look there to open a ‘html form in popup’:
jquery ui modal form
On success, just trigger your form, and update it / your fields with the ajax answer.
It would be more helpful if you could give us an overview of your ajax answer 🙂