SitePoint Sponsor

User Tag List

Results 1 to 20 of 20
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question on mailto:

    Is there a way to get mailto: to accept a value on the webpage it is being submitted from? for example, i have a dropdown list of names with email addresses as their values. Can i use the value of that email address selected to as the mailto: address?

  2. #2
    SitePoint Zealot Tiggy's Avatar
    Join Date
    Mar 2002
    Location
    Lancashire, UK
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like something that is very possible with JavaScript, unfortunately I'm not able to tell you how since it is not my language of choice. I'm sure someone else reading this will be able to help with the specifics... about all I can tell you is that it will involve a document.write and a selectedIndex of sorts...

  3. #3
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:

    method A
    . (without emails in array)

    <
    script>
            function 
    getSelectedValue(selectObject)
            {
                return 
    selectObject.options[selectObject.selectedIndex].value
            
    }

            function 
    openIT(opt)
            {

                
    document.location.href opt;
            }
    </script>

        <form name="form1">

            <select name="opts" style="font: 8pt verdana;">
        
              <option value="mailto:1@hotmail.com">1@hotmail.com</option>
              <option value="mailto:2@hotmail.com">2@hotmail.com</option>
              <option value="mailto:3@hotmail.com">3@hotmail.com</option>
              <option value="mailto:4@hotmail.com">4@hotmail.com</option>
              <option value="mailto:5@hotmail.com">5@hotmail.com</option>
            </select>
            
            <input type="button" value="open" name="open" id="open" onclick="openIT(getSelectedValue(this.form.opts))">

        </form> 
    method 2 (with array)

    PHP Code:

    <script>
            var 
    people = new Array();
            
    people[0]  = '1@hotmail.com';
            
    people[1]  = '2@hotmail.com';
            
    people[2]  = '3@hotmail.com';
            
    people[3]  = '4@hotmail.com';
            
    people[4]  = '5@hotmail.com';

            function 
    getSelectedValue(selectObject)
            {
                return 
    selectObject.options[selectObject.selectedIndex].value
            
    }

            function 
    openIT(opt)
            {

                
    document.location.href opt;
            }
    </script>

        <form name="form1">

            <select name="opts" style="font: 8pt verdana;">
              <script>
                for (a=0;a<=people.length;a++)
                {
                    document.write ('<option value="mailto:' + people[a] + '">' + people[a] + '</option>')
                }
              </script>
            </select>
            
            <input type="button" value="open" name="open" id="open" onclick="openIT(getSelectedValue(this.form.opts))">

        </form> 

  4. #4
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there any way to incoprprate this with a submit button on a different form? form1 has users enter data, below that is form2 with processed data which populates a textarea. i have it configured to send to an email address specified in a drop down list, but now I want to send that populated textarea to the email and have it sent automatically.

  5. #5
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would give you a demo but the exact thing your asking for is here

    http://members.aol.com/grassblad/

  6. #6
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which one of the opics is this listed under? I am also cocnerned about the security implications of having everything run client side. Is there a way to encrypt this email so that it cannot fall into the wrong hands and be understandable?

  7. #7
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://members.aol.com/grassblad/html/selCascade1.html

    well the only way to influence the way the emails sent is by making your own email as this method simply uses the clients default email system, ie outlook express or hotmail.com in mycase.

    if you want to create a dynamic method use php/asp or any server side language.

    however this http://www.webmasterbase.com/article/679 php method will allow you to sort your own email system. Or http://www.webmasterbase.com/article/596 use this asp method

  8. #8
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I've gotten failt far with it so far. right now I'm kind of stuck though. If I have the form set with the action to mail it to my email address, the form is sent over with all of the data from the form. However if it's set up to send out in the manner coded above, no data is enclosed in the body of the email. Is there a way to incorporate that into the function as otherwise it just sends an empty email? Sorry I know VB but have had absolutely no exposure to java.

  9. #9
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    post your form or give a link or what you have so far. And vbscript will only work in microsft internet explorer, so try to stick to java

  10. #10
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hate to do this to you but i don't have anywhere to to ftp this up to at the moment. Corporate has to approve of the site before any part of it can go online. but anyway here is the code as it stands. I've commented out the field checking logic so you should be able to run it much quicker. Also do you know how to get rid of the conversion of < and > into &;gt &;lt or whatever it is when you cut and paste code betweeen programs? Thanks for all your help by the way

  11. #11
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wheres the code?

    and use notepad to do that

  12. #12
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm convinced the problem is that there is a lack of an action command in the form description. but here is the code as i have it, minus working code that would only take up space and slow you down.

    <HTML>
    <HEAD>
    <TITLE></TITLE>
    </HEAD>
    <script>

    <!--
    function processForm(doc) {
    newline = "\r\n";
    result_str = "" + newline + newline;
    result_str += "Were you referred by one of our agents? " + doc.quickForm.opts.value + newline;
    doc.processedForm.results.value = result_str;
    return;
    }

    function*getSelectedValue(selectObject)
    {
    return*selectObject.options[selectObject.selectedIndex].value;
    }

    function*openIT(opt)
    {
    if (document.processedForm.results.value=="")
    {
    alert("You have not processed the data yet!");
    return false;
    }
    else
    {
    document.location.href =*opt;
    return true;
    }
    }

    //-->
    </script>
    <form name="quickForm">
    <pre>
    Were you referred to the website by an agent? <SELECT id=Select1 name=opts> <OPTION value=mailto:jrb5289@rit.edu selected>No</OPTION> <OPTION value=mailto:jamesber50@adelphia.net>James Bertram</OPTION> <OPTION value=mailto:sdfsdf@hotmail.com>Todd Taylor</OPTION> <OPTION value=mailto:asadsad@hotmail.com>Steve Jones</OPTION></SELECT>

    </pre>
    <pre> <INPUT id=Reset1 type=reset value=Reset name=Reset1> <input onclick="processForm (document)" type=button value="Process Data">
    </pre>
    </form>
    <form id="Form1" name="processedForm" method="post" encType="text/plain">
    <pre><TEXTAREA name=results rows=10 wrap=soft cols=60></TEXTAREA>

    <input id=submit type=submit value=Submit name=Submit1 onclick= return(openIT(getSelectedValue(document.quickForm.opts)))>

    </pre>
    </form>
    </HTML>

  13. #13
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think this is what you meant

    PHP Code:

    <html>
      <
    head>
        <
    title>Comments</title>
    <
    style type="text/css">
    <!-- 
    body {
        
    background sn#FFFAFA;
        
    text-align center;
    }
    input {
        
    background Black;
        
    border-bottom none;
        
    border-left none;
        
    border-right none;
        
    border-top none;
        
    font oblique;
        
    font "Times New Roman"Timesserif;
        
    font-size 10px;
        
    text-align center;
        
    text-transform capitalize;
        
    vertical-align middle;
        
    color #FFFAFA;

    select {
        
    background Black;
        
    border-bottom none;
        
    border-left none;
        
    border-right none;
        
    border-top none;
        
    font oblique;
        
    font "Times New Roman"Timesserif;
        
    font-size 10px;
        
    text-align center;
        
    text-transform capitalize;
        
    vertical-align middle;
        
    color #FFFAFA;
    }
    span {
        
    font italic normal lighter 12px Times New Roman;
    }
    -->
    </
    style>

    <
    script language="JavaScript" type="text/javascript">
    <!--

    var 
    emails = new Array; //stores persons email
    var names  = new Array; //stores persons name of each email - each number matches ie. emails[0],names[0] ie 


    /*---------------------------------------------Modify-Here---------------------------------------------*/

    var form_name                 'form1';
    var 
    form_option                'mail_option';

    var 
    destination_url            'jkdk';
    var 
    sending_method            'get';
    var 
    sending_enctype            'text';
    var 
    sending_target            '_self';

    emails[0] = 'jrb5289@rit.edu';        // no
    emails[1] = 'jamesber50@adelphia.net';    //James Bertram
    emails[2] = 'sdfsdf@hotmail.com';    //Todd Taylor
    emails[3] = 'asadsad@hotmail.com';    //Steve Jones

     
    names[0] = 'no';
     
    names[1] = 'James Bertram';
     
    names[2] = 'Todd Taylor';
     
    names[3] = 'Steve Jones';

    /*---------------------------------------------End-of-Modify---------------------------------------------*/

    /* was going to be a two dimmensional array
    var arURL  = new Array;

    for (a=0; a<arURL.length; i++) {
        emails[i]    = new Array();
        emails[i][0] = prefix + arURL[i];
        emails[i][1] = arTXT[i];
    }
    */

    var nl '\r\n'//new line
    var result ''+nl+nl;


             function 
    process() //checks the form
            
    {
            
             
    = eval('document.' form_name '.' form_option '.options[document.'  form_name '.' form_option '.selectedIndex].innerHTML;');
             
             if (
    document.form1.result.value=='')
             {
              
    result 'please fill the textbox out for ' nl;
              
    alert(result);//"You have not processed the data yet!"
             
    }
             else
             {
              
    send()
             }
            }
             function 
    send() //sends the form
            
    {
             
    document.form1;
            

             
    y.action    destination_url//url to post to
             
    y.method    sending_method;  //post or get
             
    y.enctype   sending_enctype//encoding
             
    y.target    sending_target;  //_self,_parent,_top,_blank
            
            
    }

    //--> 
    </script>
      </head>
      <body>

        <form id="form1" name="processedForm">

                    <span>Were you referred to the website by an agent?</span>
                    <select id="mail_option" name="mail_option" onchange="defaultStatus = this.options[this.selectedIndex].value + ' = ' + this.options[this.selectedIndex].innerHTML">
                    <script language="JavaScript" type="text/javascript">
                    <!--
                        document.write ('<option value=\"mailto:' + emails[0] + '\">' + names[0] + '</option>');
                        
                        for (i=1,k=emails.length;i<k;i++) //writes each email address and name in the options box
                        {
                            document.write ('<option value=\"mailto:' + emails[i] + '\">' + names[i] + '</option>');
                        }
                    / -->
                    </script>
                </selected><br>
     
                    <textarea name="result" rows="10" wrap="soft" cols="60"></textarea><br>

                      <input id="Reset1" type="reset" value="Reset" name="Reset1"> 
                      <input id="submit" type="button" value="Submit" name="Submit" onclick="process()">
               <q></q> 
        </form>

    <script>defaultStatus = document.form1.mail_option.options[document.form1.mail_option.selectedIndex].value + ' =  ' + document.form1.mail_option.options[document.form1.mail_option.selectedIndex].innerHTML;?/*statusbar*/</script>
            
      </body>
    </html> 
    This ones for Maelstrom hopefully easy t read with a few comments in it

    ps i did get a bit lazy

    var form_name = 'form1';
    var form_option = 'mail_option';
    so you may have to change a few from1 and mail_options

    theres most likely a better way to do this rather than using eval
    Last edited by Andrew-J2000; Apr 26, 2002 at 20:14.

  14. #14
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That looks great and thank for putting in the style sheet, but the form still does not get put in an email. I can't even get a mail to send, but the status bar shows. i did a lot of playing around with it, but could not get the form to post.

  15. #15
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it working. thanks for all the help!!!!

    Now I just have to find out a way to get it encrypted. the full version will have the client's social security number in there and I'm concerned over that.

  16. #16
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Lol i forgott to put the submit function in lol, hehe i do all that and i miss the whole point of making it in the first place lol

    PHP Code:
    <html>
      <
    head>
        <
    title>Comments</title>
    <
    style type="text/css">
    <!-- 
    body {
        
    background sn#FFFAFA;
        
    text-align center;
    }
    input {
        
    background Black;
        
    border-bottom none;
        
    border-left none;
        
    border-right none;
        
    border-top none;
        
    font oblique;
        
    font "Times New Roman"Timesserif;
        
    font-size 10px;
        
    text-align center;
        
    text-transform capitalize;
        
    vertical-align middle;
        
    color #FFFAFA;

    select {
        
    background Black;
        
    border-bottom none;
        
    border-left none;
        
    border-right none;
        
    border-top none;
        
    font oblique;
        
    font "Times New Roman"Timesserif;
        
    font-size 10px;
        
    text-align center;
        
    text-transform capitalize;
        
    vertical-align middle;
        
    color #FFFAFA;
    }
    span {
        
    font italic normal lighter 12px Times New Roman;
    }
    -->
    </
    style>

    <
    script language="JavaScript" type="text/javascript">
    <!--

    var 
    emails = new Array; //stores persons email
    var names  = new Array; //stores persons name of each email - each number matches ie. emails[0],names[0] ie 


    /*---------------------------------------------Modify-Here---------------------------------------------*/

    var form_name                 'form1';
    var 
    form_option                'mail_option';

    var 
    destination_url            '';
    var 
    sending_method            'get';
    var 
    sending_enctype            'text';
    var 
    sending_target            '_self';

    emails[0] = 'jrb5289@rit.edu';        // no
    emails[1] = 'jamesber50@adelphia.net';    //James Bertram
    emails[2] = 'sdfsdf@hotmail.com';    //Todd Taylor
    emails[3] = 'asadsad@hotmail.com';    //Steve Jones

     
    names[0] = 'no';
     
    names[1] = 'James Bertram';
     
    names[2] = 'Todd Taylor';
     
    names[3] = 'Steve Jones';

    /*---------------------------------------------End-of-Modify---------------------------------------------*/

    /* was going to be a two dimmensional array
    var arURL  = new Array;

    for (a=0; a<arURL.length; i++) {
        emails[i]    = new Array();
        emails[i][0] = prefix + arURL[i];
        emails[i][1] = arTXT[i];
    }
    */

    var nl '\r\n'//new line
    var result ''+nl+nl;


             function 
    process() //checks the form
            
    {
            
             
    = eval('document.' form_name '.' form_option '.options[document.'  form_name '.' form_option '.selectedIndex].innerHTML;');
             
             if (
    document.form1.result.value=='')
             {
              
    result 'please fill the textbox out for ' nl;
              
    alert(result);//"You have not processed the data yet!"
             
    }
             else
             {
          
    sendIT();
             }
            }
             function 
    sendIT() //sends the form
            
    {
             
    document.form1;
            

             
    y.action    'mailto://' emails[document.form1.mail_option.selectedIndex];     //url to post to
             
    y.method    sending_method;  //post or get
             
    y.enctype   sending_enctype//encoding
             
    y.target    sending_target;  //_self,_parent,_top,_blank
         
    y.submit();
            
            }

    //--> 
    </script>
      </head>
      <body>

        <form id="form1" name="form1">

                    <span>Were you referred to the website by an agent?</span>
                    <p>
            <select id="mail_option" name="mail_option" onchange="defaultStatus = this.options[this.selectedIndex].value + ' = ' + this.options[this.selectedIndex].innerHTML">
            <script language="JavaScript" type="text/javascript">
                    <!--
                        document.write ('<option value=\"mailto:' + emails[0] + '\">' + names[0] + '</option>');
                        
                        for (i=1,k=emails.length;i<k;i++) //writes each email address and name in the options box
                        {
                            document.write ('<option value=\"mailto:' + emails[i] + '\">' + names[i] + '</option>');
                        }
                    / -->
                    </script>
                </selected></p>
     
                    <textarea name="result" rows="10" wrap="soft" cols="60"></textarea><br>

                      <input id="Reset1" type="reset" value="Reset" name="Reset1"> 
                      <input id="sub" type="button" value="Submit"  name="Sub" onclick="process();">
        </form>

    <script>defaultStatus = document.form1.mail_option.options[document.form1.mail_option.selectedIndex].value + ' =  ' + document.form1.mail_option.options[document.form1.mail_option.selectedIndex].innerHTML;?/*statusbar*/</script>
            
      </body>
    </html> 

  17. #17
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this will stop people seeing your javascript as easily, as most people probably ont know what this is lol. encrypt it server side tho.

    check out this as well http://docs.iplanet.com/docs/manuals...ow.htm#1201548

    this will encode to ascii for you

    http://d21c.com/sookietex/ASCII2HEX.html

    <Script Language='Javascript'>
    <!--
    eval(unescape('%76%61%72%20%65%6D%61%69%6C%73%20%3D%20%6E%65%77%20%41%72%72%61%79%3B%20%2F%2F%73%74%6F%72%65%73%20%70%65%72%73%6F%6E%73%20%65%6D%61%69%6C%0D%0A%76%61%72%20%6E%61%6D%65%73%20%20%3D%20%6E%65%77%20%41%72%72%61%79%3B%20%2F%2F%73%74%6F%72%65%73%20%70%65%72%73%6F%6E%73%20%6E%61%6D%65%20%6F%66%20%65%61%63%68%20%65%6D%61%69%6C%20%2D%20%65%61%63%68%20%6E%75%6D%62%65%72%20%6D%61%74%63%68%65%73%20%69%65%2E%20%65%6D%61%69%6C%73%5B%30%5D%2C%6E%61%6D%65%73%5B%30%5D%20%69%65%20%0D%0A%0D%0A%0D%0A%2F%2A%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%4D%6F%64%69%66%79%2D%48%65%72%65%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2A%2F%0D%0A%0D%0A%76%61%72%20%66%6F%72%6D%5F%6E%61%6D%65%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%27%66%6F%72%6D%31%27%3B%0D%0A%76%61%72%20%66%6F%72%6D%5F%6F%70%74%69%6F%6E%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%27%6D%61%69%6C%5F%6F%70%74%69%6F%6E%27%3B%0D%0A%0D%0A%76%61%72%20%64%65%73%74%69%6E%61%74%69%6F%6E%5F%75%72%6C%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%27%27%3B%0D%0A%76%61%72%20%73%65%6E%64%69%6E%67%5F%6D%65%74%68%6F%64%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%27%67%65%74%27%3B%0D%0A%76%61%72%20%73%65%6E%64%69%6E%67%5F%65%6E%63%74%79%70%65%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%27%74%65%78%74%27%3B%0D%0A%76%61%72%20%73%65%6E%64%69%6E%67%5F%74%61%72%67%65%74%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%27%5F%73%65%6C%66%27%3B%0D%0A%0D%0A%65%6D%61%69%6C%73%5B%30%5D%20%3D%20%27%6A%72%62%35%32%38%39%40%72%69%74%2E%65%64%75%27%3B%20%20%20%20%20%20%20%20%2F%2F%20%6E%6F%0D%0A%65%6D%61%69%6C%73%5B%31%5D%20%3D%20%27%6A%61%6D%65%73%62%65%72%35%30%40%61%64%65%6C%70%68%69%61%2E%6E%65%74%27%3B%20%20%20%20%2F%2F%4A%61%6D%65%73%20%42%65%72%74%72%61%6D%0D%0A%65%6D%61%69%6C%73%5B%32%5D%20%3D%20%27%73%64%66%73%64%66%40%68%6F%74%6D%61%69%6C%2E%63%6F%6D%27%3B%20%20%20%20%2F%2F%54%6F%64%64%20%54%61%79%6C%6F%72%0D%0A%65%6D%61%69%6C%73%5B%33%5D%20%3D%20%27%61%73%61%64%73%61%64%40%68%6F%74%6D%61%69%6C%2E%63%6F%6D%27%3B%20%20%20%20%2F%2F%53%74%65%76%65%20%4A%6F%6E%65%73%0D%0A%0D%0A%20%6E%61%6D%65%73%5B%30%5D%20%3D%20%27%6E%6F%27%3B%0D%0A%20%6E%61%6D%65%73%5B%31%5D%20%3D%20%27%4A%61%6D%65%73%20%42%65%72%74%72%61%6D%27%3B%0D%0A%20%6E%61%6D%65%73%5B%32%5D%20%3D%20%27%54%6F%64%64%20%54%61%79%6C%6F%72%27%3B%0D%0A%20%6E%61%6D%65%73%5B%33%5D%20%3D%20%27%53%74%65%76%65%20%4A%6F%6E%65%73%27%3B%0D%0A%0D%0A%2F%2A%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%45%6E%64%2D%6F%66%2D%4D%6F%64%69%66%79%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2D%2A%2F%0D%0A%0D%0A%2F%2A%20%77%61%73%20%67%6F%69%6E%67%20%74%6F%20%62%65%20%61%20%74%77%6F%20%64%69%6D%6D%65%6E%73%69%6F%6E%61%6C%20%61%72%72%61%79%0D%0A%76%61%72%20%61%72%55%52%4C%20%20%3D%20%6E%65%77%20%41%72%72%61%79%3B%0D%0A%0D%0A%66%6F%72%20%28%61%3D%30%3B%20%61%3C%61%72%55%52%4C%2E%6C%65%6E%67%74%68%3B%20%69%2B%2B%29%20%7B%0D%0A%20%20%20%20%65%6D%61%69%6C%73%5B%69%5D%20%20%20%20%3D%20%6E%65%77%20%41%72%72%61%79%28%29%3B%0D%0A%20%20%20%20%65%6D%61%69%6C%73%5B%69%5D%5B%30%5D%20%3D%20%70%72%65%66%69%78%20%2B%20%61%72%55%52%4C%5B%69%5D%3B%0D%0A%20%20%20%20%65%6D%61%69%6C%73%5B%69%5D%5B%31%5D%20%3D%20%61%72%54%58%54%5B%69%5D%3B%0D%0A%7D%0D%0A%2A%2F%0D%0A%0D%0A%76%61%72%20%6E%6C%20%3D%20%27%5C%72%5C%6E%27%3B%20%2F%2F%6E%65%77%20%6C%69%6E%65%0D%0A%76%61%72%20%72%65%73%75%6C%74%20%3D%20%27%27%2B%6E%6C%2B%6E%6C%3B%0D%0A%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%66%75%6E%63%74%69%6F%6E%20%70%72%6F%63%65%73%73%28%29%20%2F%2F%63%68%65%63%6B%73%20%74%68%65%20%66%6F%72%6D%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%78%20%3D%20%65%76%61%6C%28%27%64%6F%63%75%6D%65%6E%74%2E%27%20%2B%20%66%6F%72%6D%5F%6E%61%6D%65%20%2B%20%27%2E%27%20%2B%20%66%6F%72%6D%5F%6F%70%74%69%6F%6E%20%2B%20%27%2E%6F%70%74%69%6F%6E%73%5B%64%6F%63%75%6D%65%6E%74%2E%27%20%20%2B%20%66%6F%72%6D%5F%6E%61%6D%65%20%2B%20%27%2E%27%20%2B%20%66%6F%72%6D%5F%6F%70%74%69%6F%6E%20%2B%20%27%2E%73%65%6C%65%63%74%65%64%49%6E%64%65%78%5D%2E%69%6E%6E%65%72%48%54%4D%4C%3B%27%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%69%66%20%28%64%6F%63%75%6D%65%6E%74%2E%66%6F%72%6D%31%2E%72%65%73%75%6C%74%2E%76%61%6C%75%65%3D%3D%27%27%29%0D%0A%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%72%65%73%75%6C%74%20%3D%20%27%70%6C%65%61%73%65%20%66%69%6C%6C%20%74%68%65%20%74%65%78%74%62%6F%78%20%6F%75%74%20%66%6F%72%20%27%20%2B%20%78%20%2B%20%6E%6C%3B%0D%0A%20%20%20%20%20%20%20%20%20%20%61%6C%65%72%74%28%72%65%73%75%6C%74%29%3B%2F%2F%22%59%6F%75%20%68%61%76%65%20%6E%6F%74%20%70%72%6F%63%65%73%73%65%64%20%74%68%65%20%64%61%74%61%20%79%65%74%21%22%0D%0A%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%65%6C%73%65%0D%0A%20%20%20%20%20%20%20%20%20%7B%0D%0A%09%20%20%73%65%6E%64%49%54%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%20%20%20%20%20%20%20%20%20%66%75%6E%63%74%69%6F%6E%20%73%65%6E%64%49%54%28%29%20%2F%2F%73%65%6E%64%73%20%74%68%65%20%66%6F%72%6D%0D%0A%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%79%20%3D%20%64%6F%63%75%6D%65%6E%74%2E%66%6F%72%6D%31%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%0D%0A%20%20%20%20%20%20%20%20%20%79%2E%61%63%74%69%6F%6E%20%20%20%20%3D%20%27%6D%61%69%6C%74%6F%3A%2F%2F%27%20%2B%20%65%6D%61%69%6C%73%5B%64%6F%63%75%6D%65%6E%74%2E%66%6F%72%6D%31%2E%6D%61%69%6C%5F%6F%70%74%69%6F%6E%2E%73%65%6C%65%63%74%65%64%49%6E%64%65%78%5D%3B%20%09%2F%2F%75%72%6C%20%74%6F%20%70%6F%73%74%20%74%6F%0D%0A%20%20%20%20%20%20%20%20%20%79%2E%6D%65%74%68%6F%64%20%20%20%20%3D%20%73%65%6E%64%69%6E%67%5F%6D%65%74%68%6F%64%3B%20%20%2F%2F%70%6F%73%74%20%6F%72%20%67%65%74%0D%0A%20%20%20%20%20%20%20%20%20%79%2E%65%6E%63%74%79%70%65%20%20%20%3D%20%73%65%6E%64%69%6E%67%5F%65%6E%63%74%79%70%65%3B%20%2F%2F%65%6E%63%6F%64%69%6E%67%0D%0A%20%20%20%20%20%20%20%20%20%79%2E%74%61%72%67%65%74%20%20%20%20%3D%20%73%65%6E%64%69%6E%67%5F%74%61%72%67%65%74%3B%20%20%2F%2F%5F%73%65%6C%66%2C%5F%70%61%72%65%6E%74%2C%5F%74%6F%70%2C%5F%62%6C%61%6E%6B%0D%0A%09%20%79%2E%73%75%62%6D%69%74%28%29%3B%0D%0A%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%7D%0D%0A%0D%0A'));
    //-->
    </Script>

  18. #18
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Forgive me, I spoke incorrectly. I meant all i have to do is find a way to encrypt the email for it's transit over the net. I'm having all other functions handled client-side so encrpyting the server isn't a big concern, the submitted emails are what has me worried.
    Thanks for all of your help on this! You've helped me out tremendously.

  19. #19
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Converting your email addresses to ascii will help stop robots getting your email address and spamming you

  20. #20
    SitePoint Enthusiast
    Join Date
    Apr 2002
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm assuming my inability to get btoa to work is that I don't have any window methods declared. How would I implement one for my needs? Also, is there a reason why this won't work on netscape?


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
  •