RHavlick
-
10/10/2006 4:00:58 PM
Re: Form Action
Hello,
I included the full script, and near the bottom commented out the line to highlight the form action property that is getting replaced to the form's address. Any help is greatly appreciated.
Thanks.
Ryan
<!-- initialize the linked to the Lifeline linkID and sPresence to the empty string --> <SCRIPT language=JavaScript type=text/JavaScript> var linkID="alsirjv2m9"; var sPresence=""; </SCRIPT>
<!-- set sPresence (NOTE: The link ID is coded into the URL) --> <SCRIPT src='http://asap2.convoq.com/ASAPLinks/Presence.aspx?l=alsirjv2m9&style=textjsvar'></SCRIPT>
<!-- add 4 functions for calling the Lifeline link request and submitting the form --> <SCRIPT language=JavaScript type=text/JavaScript> /* Optional: validates the email address format */ function isValidEmail(emailad) { var exclude=/[^@\-\.\w]|^[_@\.\-]|[\._\-]{2}|[@\.]{2}|(@)[^@]*\1/; var check=/@[\w\-]+\./; var checkend=/\.[a-zA-Z]{2,4}$/; if(((emailad.search(exclude) != -1) || (emailad.search(check)) == -1) || (emailad.search(checkend) == -1)){ return false; } else { return true; } }
/* Optional: validates that the name and email address fields are filled out */ function validate() { var errorMessage = "Please fix the following errors: \n\n"; var errorFound = 0; if (document.caseform.n.value.length == 0) { errorMessage += "Enter your Name\n"; errorFound = 1; } if (!isValidEmail(document.caseform.e.value)) { errorMessage += "Enter a Valid Email Address\n"; errorFound = 1; } if (errorFound == 1) { alert(errorMessage); return false; } else { //Here was can adjust the meeting parameters: //m is Private Message document.caseform.m.value = "Request" + unescape("%0A") + "Name: " + document.caseform.n.value + unescape("%0A") + "E-Mail: " + document.caseform.e.value + unescape("%0A") + "Issue: " + document.caseform.Issue.value; //S is the Public Message/Subject document.caseform.s.value = "Request:" + unescape("%0A") + document.caseform.Issue.value.substring(0,49) + "..."; return true; } }
</SCRIPT>
<!--Now, only show the form if the resource is available --> <SCRIPT> if (sPresence=='Available') { document.write ('Please complete the below form to begin live technical support:');
<!-- THIS BELOW ACTION IS WHAT IS BEING REPLACED --> document.write ('<FORM target="new" name="caseform" onSubmit="return validate();" ACTION="http://asap2.convoq.com/asaplinks/contacting.aspx" METHOD=GET>'); document.write ('<INPUT TYPE=HIDDEN NAME="l" VALUE="alsirjv2m9">'); document.write ('<INPUT TYPE=HIDDEN NAME="rw" VALUE="0">'); document.write ('<INPUT TYPE=HIDDEN NAME="m" VALUE="">'); document.write ('<INPUT TYPE=HIDDEN NAME="s" VALUE="">'); document.write ('<BLOCKQUOTE><TABLE>'); document.write ('<TR><TD>Your Name:</TD><TD><INPUT TYPE="TEXT" NAME="n" SIZE="30" VALUE=""></TD></TR>'); document.write ('<TR><TD>Email Address:</TD><TD><INPUT TYPE="TEXT" NAME="e" SIZE="30" VALUE=""></TD></TR>'); document.write ('<TR><TD>Question:</TD><TD><TextArea NAME="Issue" ROWS="5" COLS="30"></TEXTAREA></TD></TR>'); document.write ('<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=SUBMIT VALUE="Begin"></TD></TR>'); document.write ('</TABLE></BLOCKQUOTE></FORM>'); document.write (' '); document.write (' '); document.write (' '); } else { document.write('Currently there are no available agents to assist you. Please email us at: <a href="mailto:support@rehabsoftware.com">support@domain.com</a> and will get back to you as soon as possible.'); } </SCRIPT>
|