Re: [WebDNA] Variable truncating when using javascript openwindow

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107481
interpreted = N
texte = This is a multi-part message in MIME format. --------------020303070806030002070707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks for everyone's post. Greatly appreciated. Steve Govinda wrote: > Then I would think that the proper thing to do would be to escape the second time *with javascript*. > encodeURIComponent() > AFAIK. > -G > > On 2011-10-14, at 1:54 PM, aaronmichaelmusic@gmail.com wrote: > > >> Javascript (acting on behalf of the browser) will interpret a URL encoded string on its own before passing onto the landing page. If you're using popups or redirects with JS, you have to think of it as sending a parameter twice (unlike a standard link). Thus, wrapping the variable with [url] twice >> >> On Oct 14, 2011, at 1:17 PM, Govinda wrote: >> >> >>> But in that example he is [url]'ing the var's value *twice* just to get it to work (to not break the URL)... rather than the need for just once, as we would expect it to work. >>> (?) >>> >>> I popup javascript windows all the time and just wrap the var's vals. once... (without looking again to be sure I tried with an amp char in there ;-) >>> >>> >>>> I'm not sure that your test3 example *is* a hack: that's how it's supposed to work. When you put text into a URL, it needs to be URL-encoded for exactly this reason. >>>> >>>> test3 is what I would consider "best practice" rather than "hack" >>>> >>>> On Oct 14, 2011, at 9:31 AM, Steve Raslevich wrote: >>>> >>>> >>>>> Thanks for your reply. No, I haven't solved it. For now, I am using the 'test3' example/hack I listed below. Let me know if you test and what results you get. I don't think it is anything in the landing page as using the text link and the hack both display correctly on the landing page. >>>>> --------------020303070806030002070707 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks for everyone's post. Greatly appreciated.

Steve



Govinda wrote:
Then I would think that the proper thing to do would be to escape the second time *with javascript*.encodeURIComponent()AFAIK.-GOn 2011-10-14, at 1:54 PM, aaronmichaelmusic@gmail.com wrote:  
Javascript (acting on behalf of the browser) will interpret a URL encoded string on its own before passing onto the landing page.  If you're using popups or redirects with JS, you have to think of it as sending a parameter twice (unlike a standard link).  Thus, wrapping the variable with [url] twiceOn Oct 14, 2011, at 1:17 PM, Govinda wrote:    
But in that example he is [url]'ing the var's value *twice* just to get it to work (to not break the URL)... rather than the need for just once, as we would expect it to work.(?)I popup javascript windows all the time and just wrap the var's vals. once... (without looking again to be sure I tried with an amp char in there ;-)      
I'm not sure that your test3 example *is* a hack: that's how it's supposed to work. When you put text into a URL, it needs to be URL-encoded for exactly this reason.test3 is what I would consider "best practice" rather than "hack"On Oct 14, 2011, at 9:31 AM, Steve Raslevich wrote:        
Thanks for your reply. No, I haven't solved it. For now, I am using the 'test3' example/hack I listed below. Let me know if you test and what results you get. I don't think it is anything in the landing page as using the text link and the hack both display correctly on the landing page.          

--------------020303070806030002070707-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Variable truncating when using javascript openwindow (Steve Raslevich 2011)
  2. Re: [WebDNA] Variable truncating when using javascript openwindow (Govinda 2011)
  3. Re: [WebDNA] Variable truncating when using javascript openwindow (aaronmichaelmusic@gmail.com 2011)
  4. Re: [WebDNA] Variable truncating when using javascript openwindow (Grant Hulbert 2011)
  5. Re: [WebDNA] Variable truncating when using javascript openwindow (Govinda 2011)
  6. Re: [WebDNA] Variable truncating when using javascript openwindow (Grant Hulbert 2011)
  7. Re: [WebDNA] Variable truncating when using javascript openwindow (Steve Raslevich 2011)
  8. Re: [WebDNA] Variable truncating when using javascript openwindow (Govinda 2011)
  9. [WebDNA] Variable truncating when using javascript openwindow (Steve Raslevich -Northern Sound 2011)
This is a multi-part message in MIME format. --------------020303070806030002070707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks for everyone's post. Greatly appreciated. Steve Govinda wrote: > Then I would think that the proper thing to do would be to escape the second time *with javascript*. > encodeURIComponent() > AFAIK. > -G > > On 2011-10-14, at 1:54 PM, aaronmichaelmusic@gmail.com wrote: > > >> Javascript (acting on behalf of the browser) will interpret a URL encoded string on its own before passing onto the landing page. If you're using popups or redirects with JS, you have to think of it as sending a parameter twice (unlike a standard link). Thus, wrapping the variable with [url] twice >> >> On Oct 14, 2011, at 1:17 PM, Govinda wrote: >> >> >>> But in that example he is [url]'ing the var's value *twice* just to get it to work (to not break the URL)... rather than the need for just once, as we would expect it to work. >>> (?) >>> >>> I popup javascript windows all the time and just wrap the var's vals. once... (without looking again to be sure I tried with an amp char in there ;-) >>> >>> >>>> I'm not sure that your test3 example *is* a hack: that's how it's supposed to work. When you put text into a URL, it needs to be URL-encoded for exactly this reason. >>>> >>>> test3 is what I would consider "best practice" rather than "hack" >>>> >>>> On Oct 14, 2011, at 9:31 AM, Steve Raslevich wrote: >>>> >>>> >>>>> Thanks for your reply. No, I haven't solved it. For now, I am using the 'test3' example/hack I listed below. Let me know if you test and what results you get. I don't think it is anything in the landing page as using the text link and the hack both display correctly on the landing page. >>>>> --------------020303070806030002070707 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks for everyone's post. Greatly appreciated.

Steve



Govinda wrote:
Then I would think that the proper thing to do would be to escape the second time *with javascript*.encodeURIComponent()AFAIK.-GOn 2011-10-14, at 1:54 PM, aaronmichaelmusic@gmail.com wrote:  
Javascript (acting on behalf of the browser) will interpret a URL encoded string on its own before passing onto the landing page.  If you're using popups or redirects with JS, you have to think of it as sending a parameter twice (unlike a standard link).  Thus, wrapping the variable with [url] twiceOn Oct 14, 2011, at 1:17 PM, Govinda wrote:    
But in that example he is [url]'ing the var's value *twice* just to get it to work (to not break the URL)... rather than the need for just once, as we would expect it to work.(?)I popup javascript windows all the time and just wrap the var's vals. once... (without looking again to be sure I tried with an amp char in there ;-)      
I'm not sure that your test3 example *is* a hack: that's how it's supposed to work. When you put text into a URL, it needs to be URL-encoded for exactly this reason.test3 is what I would consider "best practice" rather than "hack"On Oct 14, 2011, at 9:31 AM, Steve Raslevich wrote:        
Thanks for your reply. No, I haven't solved it. For now, I am using the 'test3' example/hack I listed below. Let me know if you test and what results you get. I don't think it is anything in the landing page as using the text link and the hack both display correctly on the landing page.          

--------------020303070806030002070707-- Steve Raslevich

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Check Boxes (2000) PGP encrypted email (1998) [WebDNA] Problem with Sendmail (2012) Pull down menu for categories (2000) More on the email templates (1997) checking for [ and ] in form fields ... (1997) Not really WebCat (1997) shipCost (1998) checksum for credit cards? (1997) OT: P3P (was Shop from PDF) (2004) [WebDNA] Calculate Cube root (2012) [WebDNA] Version 7.x: webdna.ini and EmailerPrefs (2012) WebCat2 - Getting to the browser's username/password data (1997) WC2b15 File Corruption (1997) [WebDNA] feature suggestion (2011) WebCat2: Formulas.db question (1997) A question on sub-categories (1997) Loosing Quantity (2000) Shipping Calculation Problem (1997) WebCat2 - many [carts] on one template page? (1997)