Code:
<p><link rel="stylesheet" type="text/css" media="all" href="?c=1" mce_href="?c=1"><mce:script type="text/javascript" language="Javascript"
mce_src="http://mysite.com/sugar/include/javascript/sugar_grp1.js?">
</mce:script>
<mce:script type="text/javascript" src="http://mysite.com/sugar/jscalendar/lang/calendar-en.js?"
mce_src="http://mysite.com/sugar/jscalendar/lang/calendar-en.js?c=1"></mce:script></p>
<form action="http://sugar.energibolig.dk/index.php?entryPoint=WebToLeadCapture" name="WebToLeadForm" method="POST" id="WebToLeadForm"><table class="mceItemTable" style="border-top: 1px solid; border-bottom: 1px solid; padding: 10px 6px 12px 10px; background-color: rgb(233, 243, 255); font-size: 12px; background-repeat: repeat-x; background-position: center top;" mce_style="border-top: 1px solid;
border-bottom: 1px solid;
padding: 10px 6px 12px 10px;
background-color: #e9f3ff;
font-size: 12px;
background-repeat: repeat-x;
background-position: center top;" width="100%"><tbody><tr style="color: rgb(0, 105, 225); font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 0px; margin-top: 0px;" mce_style="color: #0069e1; font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 0px; margin-top: 0px;" align="center"><td colspan="4"><b><h2>test</h2></b></td></tr><tr style="color: rgb(0, 105, 225); font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 2px; font-weight: normal; margin-bottom: 0px; margin-top: 0px;" mce_style="color: #0069e1; font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 2px; font-weight: normal; margin-bottom: 0px; margin-top: 0px;" align="center"><td colspan="4"> </td></tr><tr style="color: rgb(0, 105, 225); font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; font-weight: normal; margin-bottom: 0px; margin-top: 0px;" mce_style="color: #0069e1; font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 12px; font-weight: normal; margin-bottom: 0px; margin-top: 0px;" align="left"><td colspan="4">tset</td></tr><tr style="color: rgb(0, 105, 225); font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 8px; font-weight: normal; margin-bottom: 0px; margin-top: 0px;" mce_style="color: #0069e1; font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 8px; font-weight: normal; margin-bottom: 0px; margin-top: 0px;" align="center"><td colspan="4"> </td></tr><tr><td style="text-align: left; font-size: 12px; font-weight: normal;" mce_style="text-align: left; font-size: 12px; font-weight: normal;" width="15%"><span sugar="slot">Last Name: </span><span class="required" style="color: rgb(255, 0, 0);" mce_style="color: #ff0000;">*</span></td><td style="font-size: 12px; font-weight: normal;" mce_style="font-size: 12px; font-weight: normal;" width="35%"><span sugar="slot"><input id="last_name" name="last_name" type="text"></span></td><td style="text-align: left; font-size: 12px; font-weight: normal;" mce_style="text-align: left; font-size: 12px; font-weight: normal;" width="15%"><span sugar="slot"> </span></td><td style="font-size: 12px; font-weight: normal;" mce_style="font-size: 12px; font-weight: normal;" width="35%"><span sugar="slot"> </span></td></tr><tr><td style="text-align: left; font-size: 12px; font-weight: normal;" mce_style="text-align: left; font-size: 12px; font-weight: normal;" width="15%"><span sugar="slot">Email Address: </span></td><td style="font-size: 12px; font-weight: normal;" mce_style="font-size: 12px; font-weight: normal;" width="35%"><span sugar="slot"><input id="webtolead_email1" name="webtolead_email1" onchange="validateEmailAdd();" type="text"></span></td><td style="text-align: left; font-size: 12px; font-weight: normal;" mce_style="text-align: left; font-size: 12px; font-weight: normal;" width="15%"><span sugar="slot"> </span></td><td style="font-size: 12px; font-weight: normal;" mce_style="font-size: 12px; font-weight: normal;" width="35%"><span sugar="slot"> </span></td></tr><tr style="color: rgb(0, 105, 225); font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 0px; margin-top: 0px;" mce_style="color: #0069e1; font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 18px; font-weight: bold; margin-bottom: 0px; margin-top: 0px;" align="center"><td colspan="4"> </td></tr><tr align="center"><td colspan="10"><input onclick="submit_form();" class="button" name="Submit" value="Submit" type="button"></td></tr><tr><td style="display: none;" mce_style="display: none"><input id="campaign_id" name="campaign_id" value="aed87ec0-3892-d9ec-b28b-4c3ede2108ea" type="hidden"></td></tr><tr><td style="display: none;" mce_style="display: none"><input id="assigned_user_id" name="assigned_user_id" value="1" type="hidden"></td></tr><tr><td style="display: none;" mce_style="display: none"><input id="req_id" name="req_id" value="last_name;" type="hidden"></td></tr></tbody></table></form>
<p>
<script type="text/javascript">
function submit_form(){
if(typeof(validateCaptchaAndSubmit)!='undefined'){
validateCaptchaAndSubmit();
}else{
check_webtolead_fields();
}
}
function check_webtolead_fields(){
if(document.getElementById('bool_id') != null){
var reqs=document.getElementById('bool_id').value;
bools = reqs.substring(0,reqs.lastIndexOf(';'));
var bool_fields = new Array();
var bool_fields = bools.split(';');
nbr_fields = bool_fields.length;
for(var i=0;i<nbr_fields;i++){
if(document.getElementById(bool_fields[i]).value == 'on'){
document.getElementById(bool_fields[i]).value = 1;
}
else{
document.getElementById(bool_fields[i]).value = 0;
}
}
}
if(document.getElementById('req_id') != null){
var reqs=document.getElementById('req_id').value;
reqs = reqs.substring(0,reqs.lastIndexOf(';'));
var req_fields = new Array();
var req_fields = reqs.split(';');
nbr_fields = req_fields.length;
var req = true;
for(var i=0;i<nbr_fields;i++){
if(document.getElementById(req_fields[i]).value.length <=0 || document.getElementById(req_fields[i]).value==0){
req = false;
break;
}
}
if(req){
document.WebToLeadForm.submit();
return true;
}
else{
alert('Please provide all the required fields');
return false;
}
return false
}
else{
document.WebToLeadForm.submit();
}
}
function validateEmailAdd(){
if(document.getElementById('webtolead_email1').value.length >0) {
if(document.getElementById('webtolead_email1').value.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) == null){
alert('Not a valid email address');
}
}
if(document.getElementById('webtolead_email2').value.length >0) {
if(document.getElementById('webtolead_email2').value.match(/^\w+(['\.\-\+]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,})+$/) == null){
alert('Not a valid email address');
}
}
}
</script></p>
Bookmarks