Announcement

Collapse
No announcement yet.

Hiding Email on Newsletter Signup box

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hiding Email on Newsletter Signup box

    Hi there people, i see a lot of people having signup to our newsletter on there websites now and i want to do the same, i have groupmail setup and working fine for the newsletter idea, even the form mail page working fine, but it only currently works if i put the email address in plain text which i dont want to do because of spambots and stuff.

    I have used a bit of java script to hide break down the email address and then add the bits up into one variable, but what i dont seem to be able to get right is the bit of code to put in the form box.

    <script language="JavaScript">
    function readText (form) {
    Var_a ="newsletter";
    Var_b ="modelpower";
    Var_c ="co";
    Var_d ="uk";
    Var_e = Var_a + "@" + Var_b + "." + Var_c + "." + Var_d
    }
    </script> <!-- start form code -->
    <form action="http://www.modelpower.co.uk/cgi-sys/FormMail.cgi" method="post">
    <input type="hidden" name="recipient" value="document.write (Var_e);">
    <input type="hidden" value="Subscribe Me" name="subject">
    <input type="hidden" value="http://www.modelpower.co.uk/" name="redirect">
    <input type="text" name="email">
    <input type="submit" value="Subscribe Me"></form> <!-- end form code -->

    the result i get is from the form mail page
    " Email addresses may not contain (,),>,< or other control chars. "

    have browsed a lot of the threads on here but they talk about the script part but not about hpw to build it into form mail.

    hope someone can solve my little problem.
    James
    ------------------
    ModelPower.co.uk - Quality Batteries - Affordable Prices

    #2
    Hi,

    The following code will look the same to customers, but will protect your email address:
    <script type=text/javascript>
    var _u = "sales";
    var _d = "domain.co.uk";
    var _l = _u + "@" + _d;
    var _m = "click to email us";
    document.write("<a href='mailto:"+_l+"'>"+_m+"</a>");
    </script>
    Change the 'sales' and 'domain.co.uk' to your own email address.

    Kind regards,
    Bruce King
    SellerDeck

    Comment


      #3
      If this stops spam getting your address, can you please tell me where and how to enter it.
      Gary

      Comment


        #4
        You can use it anywhere you waant you email address to appear on your sites. Just go to design view find the code and replace it with the above.

        Comment


          #5
          James,

          We use Groupmail and Groupmetrics in conjuction.

          It accepts signups, removals and using the schedular will automatically update your group list... it really is good.

          1 credit per signup or remove. 5000 credits are abount £6

          It's been a godsend.

          Paul
          www.papermilldirect.com
          For Inkjet Photo Paper and Fine Art Inkjet Papers direct from the papermill

          Comment


            #6
            Hiya bruce i kinda get how the script part works but how do i get the form part to refer to script part, if you look in my original post i had kinda done it but how do i set the recipient address for where i want the mail to go to, thats the problem i was having, i currently have a php form working and doing the job in test at the moment but a simple html one would be good for me. Hope some one can help because i dont really want to use peoples email clients to start with to send the subscribe message.

            thanks
            James
            ------------------
            ModelPower.co.uk - Quality Batteries - Affordable Prices

            Comment


              #7
              <script type=text/javascript>
              var _u = "newsletter";
              var _d = "modelpower.co.uk";
              var _l = _u + "@" + _d;
              </script>

              <!-- start form code -->
              <form action="http://www.modelpower.co.uk/cgi-sys/FormMail.cgi" method="post">
              <input type="hidden" name="recipient" value="document.write ("+_l+");">
              <input type="hidden" value="Subscribe Me" name="subject">
              <input type="hidden" value="http://www.modelpower.co.uk/" name="redirect">
              <input type="text" name="email">
              <input type="submit" value="Subscribe Me">
              </form>
              <!-- end form code -->

              I am not sure if the above would work but that is how you should do it.

              Kind regards,
              Bruce King
              SellerDeck

              Comment


                #8
                Hiya bruce, i have just tried that and the form displays ok, but when i click on the submit button to send the information to formail script it get this message come up "Email addresses may not contain (,),>,< or other control chars." So i guess this means that the email address isnt being written correctly to the by the script i guess.

                Any ideas guys ?

                Thanks
                James
                ------------------
                ModelPower.co.uk - Quality Batteries - Affordable Prices

                Comment


                  #9
                  Hi James,

                  Apologies for the delay in getting back to you on this one. Can you mail me a link to the site so that I could test it too.

                  Kind regards,
                  Bruce King
                  SellerDeck

                  Comment


                    #10
                    hiya bruce, no worries about the delay aslong as what i thought was a simple problem can be solved, the link for the script you want is here
                    http://www.modelpower.co.uk/testing/emailtest.html
                    that in itself links to formMail which is working because i tested it with out the hiding the email address bit.


                    I have copied everything out of the test file and pasted it here also
                    " Start "
                    <html>
                    <head>
                    <title></title>
                    </head>

                    <script type=text/javascript>
                    var _u = "newsletter";
                    var _d = "modelpower.co.uk";
                    var _l = _u + "@" + _d;
                    </script>


                    <body bgcolor="#FFFFFF">

                    <!-- start form code -->
                    <form action="http://www.modelpower.co.uk/cgi-sys/FormMail.cgi" method="post">
                    <input type="hidden" name="recipient" value="document.write ("_l");">
                    <input type="hidden" value="Subscribe Me" name="subject">
                    <input type="hidden" value="http://www.modelpower.co.uk/" name="redirect">
                    <input type="text" name="email">
                    <input type="submit" value="Subscribe Me">
                    </form>
                    <!-- end form code -->


                    </body>


                    </html>

                    " Finish "
                    there you go bruce every things there now
                    James
                    ------------------
                    ModelPower.co.uk - Quality Batteries - Affordable Prices

                    Comment


                      #11
                      Hi,

                      The code needs to be just before the closing head tag ...

                      <title></title>

                      <script type=text/javascript>
                      var _u = "newsletter";
                      var _d = "modelpower.co.uk";
                      var _l = _u + "@" + _d;
                      </script>
                      </head>

                      Instead of how you have it at the moment.

                      Kind regards,
                      Bruce King
                      SellerDeck

                      Comment


                        #12
                        hiya bruce, do you want bad news or the bad news
                        sadly that doesnt work
                        just tried it and i get the same error.
                        "Email addresses may not contain (,),>,< or other control chars."

                        heres the code as it stands

                        <html>
                        <head>
                        <title></title>
                        <script type=text/javascript>
                        var _u = "newsletter";
                        var _d = "modelpower.co.uk";
                        var _l = _u + "@" + _d;
                        </script>
                        </head>
                        <body bgcolor="#FFFFFF">
                        <!-- start form code -->
                        <form action="http://www.modelpower.co.uk/cgi-sys/FormMail.cgi" method="post">
                        <input type="hidden" name="recipient" value="document.write ("_l");">
                        <input type="hidden" value="Subscribe Me" name="subject">
                        <input type="hidden" value="http://www.modelpower.co.uk/" name="redirect">
                        <input type="text" name="email">
                        <input type="submit" value="Subscribe Me">
                        </form>
                        <!-- end form code -->
                        </body>
                        </html>
                        James
                        ------------------
                        ModelPower.co.uk - Quality Batteries - Affordable Prices

                        Comment


                          #13
                          I don't think you need the quotes around _l
                          Have you tried:
                          value="document.write (_l);">

                          Comment


                            #14
                            hiya drounding, i would love to say you win the prize and go to the top of the class, i have tried your variations but to no avail
                            thanks for your help though
                            James
                            ------------------
                            ModelPower.co.uk - Quality Batteries - Affordable Prices

                            Comment


                              #15
                              I think there may be more than one fault then.
                              This won't work for starters:
                              value="document.write ("_l");">
                              you will definitely need to remove the quotes around the _l
                              I just tested the script in a test page and the address is formed correctly but the document.write is wrong.

                              Perhaps therefore it's also related to the form input and the script running inside the form.

                              Comment

                              Working...
                              X