Jquery with Webtolead
Currently using sugar v.451e
We are updating our web2lead to work via jquery (ajax) being the post.
Some of the code:
Web page that posts:
<head>
<script type="text/script" src="jquery-1.3.2.min.js">
</script>
</head>
<SCRIPT type="text/script">
$(function(){
$.post("http:// x y z website /sugarcrm/WebToLeadCapture.php",
{campaign_id: "3e233cc5-1bf9-3071-a4b9-485b7844ea28",
team_id: "1",
lead_source: "<? echo $productNameShort. " Demo Download" ?>",
last_name: "<? echo $lname ?>"
},
OnSuccess);
});
function OnSuccess(data){
alert("Request Succesful, Data:" + data);
}
</SCRIPT>
Any advice would be appreciated
thanks
Duddy
|