Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    contact form different receivers

    I have a 2 contactforms on a published website (www.kinderthuisverplegingkempen.be), now i would have one with a listbox for the contact person with value the emailadres. When selected one person, must the contact form send to this emailadress. Now on my host is no PHP, there is only a script "http://users.skynet.be/cgi-bin/formd.cgi" that i can use. The on explanation of this script is http://support.nl.belgacom.be/app/an...nlijke-website. I also want that the emailadress is hide for spambots in a javascript and the listbox gives the value in javascript to the script on the host. Is that possible ?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    29,422
    Thanks
    85
    Thanked 4,907 Times in 4,868 Posts
    Possible, yes.

    Something like this, perhaps:
    Code:
    <form method="post" action="http://users.skynet.be/cgi-bin/formd.cgi"
          onsubmit="var em=['n.be','mpe',gke','gin','ple','ver','uis','rth','nde','@ki'];
                    var s=document.getElementById('who').value; 
                    for ( var e=em.length-1; e>=0; --e) s += em[e];
                    this.to2.value=s;return true;">
    <input type="hidden" name="to2" value="" />
    <select id="who">
       <option value="Sandra">Sandra</option>
       <option value="Vanessa">Vanessa</option>
    </select>
     ... then the rest of the form ...
    I cut the main email address into short pieces and then put the pieces in REVERSE order.

    Than the JavaScript code, only when the form is submitted, takes the pieces and again reverses the order before putting the email address into the form field. It prefixes the "@kinderthuisverplegingkempen.be" with the name selected from the drop down list.

    *********

    I should point out that you have two other places where you have email addresses:
    Code:
        <meta name="email" content="fb612666@skynet.be">
          <!--form action="fb612666/Sandra@kinderthuisverplegingkempen.be" method="post" ENCTYPE="text/plain"-->
    I would just REMOVE those two lines.
    Last edited by Old Pedant; 07-10-2013 at 12:37 AM.
    Be yourself. No one else is as qualified.

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,600
    Thanks
    11
    Thanked 616 Times in 596 Posts
    Quote Originally Posted by snuffel1309 View Post
    I have a 2 contactforms on a published website (www.kinderthuisverplegingkempen.be)?
    just rolls right off the tongue doesn't it. i hope you don't expect any mobile traffic, that domain won't physically fit in the url bar of my phone. i don't typically make off-topic comments, but man, you really should do something about that; i've heard 10 letters in the home page is too many, you have 30...
    Last edited by rnd me; 07-10-2013 at 04:34 PM.
    Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com


  •  

    Posting Permissions

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