Announcement

Collapse
No announcement yet.

Exraxting an e-mail address

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

    Exraxting an e-mail address

    I am using some html on my receipt page to extract e-mail address, but I have a slight problem.

    I am collecting the term NETQUOTEVAR_INVOICEMAIL but instead of taking the pure e-mail address (i.e. joe@bloggs.com) it is collecting 'Email: joe@bloggs.com'

    Is there a different NETQUOTEVAR or a way to make it only gather the email address and not the description?

    James
    www.butterflies-healthcare.co.uk
    www.viteyes.co.uk - vitamins for macular degeneration
    www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
    www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
    www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

    #2
    I think you will need some php or javascript to check the string and strip 'Email: ' from it.
    PHP or javascript fundis might be able to do this...

    Comment


      #3
      It V8 - so what woudl I use instead?

      James
      www.butterflies-healthcare.co.uk
      www.viteyes.co.uk - vitamins for macular degeneration
      www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
      www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
      www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

      Comment


        #4
        I'm a bit confused - are you referring to the receipt page or the email receipt?
        And what do you mean by extracting - what do you want to do with it?

        Comment


          #5
          It is the receipt page, not the receipt email.

          The email address will be added automatically to our data base once someone has completed the checkout process.

          James
          www.butterflies-healthcare.co.uk
          www.viteyes.co.uk - vitamins for macular degeneration
          www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
          www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
          www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

          Comment


            #6
            The email address will be added automatically to our data base once someone has completed the checkout process.
            It would help if you said how.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              I am trying ot use a product called Campaign Commander and am adding this to the reciept page:

              <img src="http://as1.emv2.com/D?emv_pageok=http://www.butterflies-healthcare.co.uk/&emv_pageerror=http://www.butterflies-healthcare.co.uk/&emv_webformtype=3&emv_bounceback=0&emv_clientid=36055& &TITLE_FIELD=NETQUOTEVAR:INVOICESALUTATION&NAME_FIELD=NETQUOTEVAR:INVOICENAME&EMAIL_FIELD=NETQUOTEVAR:INVOICEEMAIL&BOUGHT_OCUSAN_FIELD=Yes" width="1" height="1">

              The idea being that this will collect the customers name, email address and from which site the bought and then populated into our dataabse so that we can e-mail people.

              As I said before, although this is V8 of actinic, NETQUOTEVAR:INVOICEEMAIL does add the email address but with 'Email:' as well infornt.

              What I want is the e-mail address only, so didn't know if there was a different field I could use here instead.

              James
              www.butterflies-healthcare.co.uk
              www.viteyes.co.uk - vitamins for macular degeneration
              www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
              www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
              www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

              Comment


                #8
                Then I think you are perhaps going to need to some javascript to remove the preceeding unwanted text and to 'write' the result back as html.

                Something like this will get rid of "Email: "
                Code:
                <script type="text/javascript">
                
                oldString = 'Email: fred@bloggs.com';
                
                newString = oldString.split("Email: ")[1];
                
                alert (newString);
                
                </script>
                Couple that with document.write to complete your img tag.

                Comment


                  #9
                  Thanks for taking the time to do that, but I am not sure how to construct the whole line.

                  If, I could be cheeking, could you complete the whole line.

                  James
                  www.butterflies-healthcare.co.uk
                  www.viteyes.co.uk - vitamins for macular degeneration
                  www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
                  www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
                  www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

                  Comment


                    #10
                    I'm no fundi with js but it will be along the lines of:
                    Code:
                    <script type="text/javascript">
                    
                    var oldString = 'NETQUOTEVAR:INVOICEEMAIL';
                    newString = oldString.split("Email: ")[1];
                    document.write('<img src="http://as1.emv2.com/D?emv_pageok=http://www.butterflies-healthcare.co.uk/&emv_pageerror=http://www.butterflies-healthcare.co.uk/&emv_webformtype=3&emv_bounceback=0&emv_clientid=36055& &TITLE_FIELD=NETQUOTEVAR:INVOICESALUTATION&NAME_FIELD=NETQUOTEVAR:INVOICENAME&EMAIL_FIELD=');
                    document.write(newString);
                    document.write('&BOUGHT_OCUSAN_FIELD=Yes" width="1" height="1">');
                    
                    </script>
                    However I think there will be a problem in getting the NQV value into the var oldString, at the moment I think 'NETQUOTEVAR:INVOICEEMAIL' will be treated literally. Give it a try.

                    Others who know js better than me and how it can be used with the NQV variables may be able to finish this off.

                    Comment


                      #11
                      I think that Duncan is spot on.

                      You can always temporarily leave off the leading "<" on the first document.write and the code will then be displayed so you can eyeball check it.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        I have tried the above and it generates the following on the page:

                        <script type="text/javascript">
                        var oldString = 'Email:&nbsp;james@thesuttons.me.uk<BR>';
                        newString = oldString.split("Email: ")[1];
                        document.write('<img src="http://as1.emv2.com/D?emv_pageok=http://www.butterflies-healthcare.co.uk/&emv_pageerror=http://www.butterflies-healthcare.co.uk/&emv_webformtype=3&emv_bounceback=0&emv_clientid=36055& &TITLE_FIELD=NETQUOTEVAR:INVOICESALUTATION&NAME_FIELD=Mr James A Sutton<BR>
                        &EMAIL_FIELD=');
                        document.write(newString);
                        document.write('&BOUGHT_OCUSAN_FIELD=Yes" width="1" height="1">');
                        </script>

                        So it doesn't appear to actually be writing the newString? Also I not that Actinic is passing through a <BR> tag at the end of the e-mail.

                        James
                        www.butterflies-healthcare.co.uk
                        www.viteyes.co.uk - vitamins for macular degeneration
                        www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
                        www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
                        www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

                        Comment


                          #13
                          Try replacing (untested)

                          newString = oldString.split("Email: ")[1];

                          with

                          newString = oldString.replace(/Email:&nbsp;(.*)<BR>/,"$1");
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            Thank so far guys.

                            I am using this code now:
                            <script type="text/javascript">
                            var oldString = 'NETQUOTEVAR:INVOICEEMAIL';
                            newString = oldString.replace(/email:&nbsp;(.*)<br>/,"$1");
                            document.write('<img
                            src="http://as1.emv2.com/D?emv_pageok=http://www.butterflies-healthcare.
                            co.uk/&emv_pageerror=http://www.butterflies-healthcare.co.uk/&emv_webfor
                            mtype=3&emv_bounceback=0&emv_clientid=36055&NAME_FIELD=NETQUOTEVAR:INVOI
                            CENAME&EMAIL_FIELD=');
                            document.write(newString);
                            document.write('&BOUGHT_OCUSAN_FIELD=Yes" width="1" height="1">');
                            </script>

                            but I get an error message saying 'Unterminated string constant'

                            James
                            www.butterflies-healthcare.co.uk
                            www.viteyes.co.uk - vitamins for macular degeneration
                            www.natorigin.co.uk - natural/organic cosmetics and skin care for sensitive skin & eyes
                            www.butterflies-eyecare.co.uk - eye drops, vitamins and other eye care products
                            www.prescription-swimming-goggles.co.uk - optical and prescription swimming goggles

                            Comment


                              #15
                              We can't read posted code properly unless you place it within [ C O D E ] and [ / C O D E ] (without the spaces) tags.

                              Also I see an implementation error in that you've failed to capitalise Email.

                              Best view you pages using Firefox and use its Tools / Error Console for decent JavaScript diagnostics.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X