I have a form that has specific field layouts that does not use <p <a formats so i need a javascrip function. the href work just great it pops up a client side email form and prefills the "to" and "subject". this is a scheduling form and the user may want to contact the supplier with a email so there are two email fields setup on the form. i tried a button, radio button and used the onsubmit and onradiochanged both give errors function not part of form then I used textbox onchange. that calls the function smail()
i've tried several ways. last one is here. but it come up with two messages first is a form is being submited to email, second is an application is try to send a email. i answer ok to first and yes to second. but system does nothing. I just want it to pop up a new email message window and prefill To: and subject field from e1 or e2 or e1 & e2 textboxes.
here is function sofar.
function smail() {
alert ("mailto:" + document.forms[0].EmailTextbox.value +"?subject=Hi");
var eminfo = "mailto:" + document.forms[0].EmailTextbox.value +"?subject=Hi" ;
document.forms[0].action = eminfo;
document.forms[0].submit();
return ;
}
function smaila() {
alert ("mailto:" + document.forms[0].AltEmailTextbox.value +"?subject=Hi");
var eminfo1 = "mailto:" + document.forms[0].AltEmailTextbox.value +"?subject=Hi" ;
document.forms[0].action = eminfo1;
//document.forms[0].submit();
return false;
}
function smailb() {
alert ("mailto:" + document.forms[0].EmailTextbox.value + "; " + document.forms[0].AltEmailTextbox.value +";?subject=Hi");
var eminfoall = "mailto:" + document.forms[0].EmailTextbox.value + "; " + document.forms[0].AltEmailTextbox.value +";?subject=Hi" ;
document.forms[0].action = eminfoall;
//document.forms[0].submit();
return false;
}
TIA sqlchopper as you may see this is my second script I've tried to write.