Results 1 to 2 of 2

Thread: need email form with asp not PHP

  1. #1
    Join Date
    Feb 2007
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default need email form with asp not PHP

    Now to start afresh!

    A........... I want users to fill the enquiry form online in my site where only "name "and "email address" filling is mandatory. Now I want this form to come to my inbox (sales@xyz.com)when the user clicks on the submit button.

    B........... The user shud see a javascript window stating "thank u for your enquiry" and the fields in the enquiry form becomes blank so that user can submit any new enquiry.

    C......... My server Host supports only ASP (which i recently found. I had been working with PHP... how stupid of me)

    D......... My DONT KNOW ASP OR PHP.

    E........ I am using top, bottom, centerframe and leftframe. The enquiry form is in "centerframe"

    NOW MY QS.: Can anyone help me with ASP coding to be able to acheive the above???? Plz!!!! i just need the code.

    F........ My enquiry.htm file code is :

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    <!--
    body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    }
    -->
    </style>
    <link href="style.css" rel="stylesheet" type="text/css">
    </head>

    <body>
    <table width="549" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="2"><img src="images/trans_bar.gif" width="1" height="30"></td>
    </tr>
    <tr>
    <td width="5" align="left" valign="top" bgcolor="#FFFFFF"><img src="images/trans_bar.gif" width="5" height="1"></td>
    </tr>
    <tr>
    <td align="left" valign="top"><table width="545" border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td width="10" rowspan="4"></td>
    <td height="16" align="right" valign="top"><img src="images/enquiry_txt.gif" width="80" height="16" align="top"></td>
    <td width="10" rowspan="4"><img src="images/trans_bar.gif" width="10" height="1"></td>
    </tr>
    <tr>
    <td width="1" valign="top" bgcolor="#5C97D1"><img src="images/trans_bar.gif" width="1" height="1"></td>
    </tr>
    <tr>
    <td height="7" align="left" valign="top"><img src="images/blue_dot.gif" width="5" height="7"></td>
    </tr>
    <tr>
    <td valign="top"><div align="justify">
    <p class="m_text"><br>
    ASDFGHIJODFGHJKL:JJGHJKL:KLFJGLHDKLFDGCVBNK:KGFVHBNp>
    <p class="m_text">Please email us with your requirements mentioning the following details:</p>
    <table width="100%" border="0" cellspacing="2" cellpadding="5">
    <tr>
    <td valign="top"><SCRIPT>
    String.prototype.trim = function()
    {
    // skip leading and trailing whitespace
    // and return everything in between
    return this.replace(/(^\s *)|(\s*$)/g,"")
    }

    function validateEmail(obj)
    {
    //Validates email
    var tempEmail = obj.value.trim();
    var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
    if (filter.test(tempEmail))
    {
    return true;
    }
    else
    {
    alert("Incorrect email address");
    obj.focus();
    return false;
    }
    }


    function validateForm()
    {
    //Email validation
    if(document.mobicon.txtEmail.value.trim() == '')
    {
    alert("Email Id is required");
    document.mobicon.txtEmail.focus();
    return false;
    }
    if(!validateEmail(document.mobicon.txtEmail))
    {
    return false;
    }

    //Name validation
    if(document.mobicon.txtName.value.trim() == '')
    {
    alert("Name is required");
    document.mobicon.txtName.focus();
    return false;
    }
    return true;
    }
    </SCRIPT>
    <FORM name=mobicon onsubmit="return validateForm();" action=co.asp target="centerframe" method=post>
    <p> <span class="m2_text">YourName*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>
    <input name="txtName" type="text" id="txtName" size="30" maxlength="100">
    </p>
    <p> <span class="m2_text">Organisation:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="txtOrg" type="text" id="txtOrg" size="30" maxlength="100">
    </p>
    <p><span class="m2_text">Address:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="textAdd" type="text" id="textAdd" value="" size="30">
    </p>
    <p><span class="m2_text">email ID*:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="txtEmail" type="text" id="txtEmail" size="30" maxlength="100">
    </p>
    <p><span class="m2_text">Commodities:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <textarea name="textcommodities" cols="22" rows="4" id="textcommodities"></textarea>
    </p>
    <p><span class="m2_text">Quantity:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <input name="texquantity" type="text" id="texquantity" size="30" maxlength="150">
    </p>
    <p><span class="m2_text">Destination:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="textdestination" type="text" id="textdestination" size="30" maxlength="100">
    </p>
    <p><span class="m2_text">Timeframe:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="texttimeframe" type="text" id="texttimeframe" size="30" maxlength="100">
    </p>
    <p><span class="m2_text">Payment Methood:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input name="textpayment" type="text" id="textpayment" size="30" maxlength="100">
    <br>
    (DLC / SBLC / BG / <br>
    TT/ DAP)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span> </p>
    <p><span class="m2_text">Comments:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <textarea name="txtcomments" cols="23" rows="4" id="txtcomments"></textarea>
    </p>
    <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <INPUT name="email" type=submit id="email" value="E-mail">
    </p>
    </form></td>
    </tr>
    </table>
    <p></p>
    </div></td>
    </tr>
    </table></td>
    </tr>
    </table>
    </body>
    </html>

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Check out this thread:

    http://www.dynamicdrive.com/forums/s...t=15314&page=2

    Look at the first few posts on that page (page 2).

    Hope this helps.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •