Re: [WebDNA] Variable truncating when using javascript openwindow
This WebDNA talk-list message is from 2011
It keeps the original formatting.
numero = 107474
interpreted = N
texte = This is a multi-part message in MIME format.--------------090100070003000301090208Content-Type: text/plain; charset=ISO-8859-1; format=flowedContent-Transfer-Encoding: 7bitHi Govinda,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.Thanks,SteveGovinda wrote:> Steve,>> that seems odd to me too.> I was about to set up and test here.. but thought I better ask first if you already solved it?> You could escape with the right JS escaping function.. but use of the one [url] wrapper should have solved it, so I thought. (?)>> -Govinda>>> On 2011-10-13, at 12:09 PM, Steve Raslevich -Northern Sound& Light wrote:>> >> Hi,>>>> I am having an issue passing a text variable that includes an ampersand within it when using a javascript openwindow.>>>> Example:>> Text in var2 is: One& Two>>>> This doesn't work:>>
test1>>>> I't seems to be sending the variable as the full text "One& Two" appears in the address bar of the newpage.dna that opened in a new window. However, var2 only displays "One" and truncates the ampersand and "Two" when displaying on the page.>>>>>> This however does works going to same page:>>
test2>>>> I can hack it to work by doing the following:>>>> [text]vartemp=[url][var2][/url][/text]>>
> "javascript:videoPopup('newpage.dna?_var1=[var1]&_var2=[url][vartemp][/url]');">> >>> test3>>> >> Anyone else run into this or have any ideas?>>>> Thanks,>> Steve>>>>>> --------------090100070003000301090208Content-Type: text/html; charset=ISO-8859-1Content-Transfer-Encoding: 7bit
Hi Govinda,
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 whatresults you get. I don't think it is anything in the landing page asusing the text link and the hack both display correctly on the landingpage.
Thanks,
Steve
Govinda wrote:
Steve,that seems odd to me too.I was about to set up and test here.. but thought I better ask first if you already solved it?You could escape with the right JS escaping function.. but use of the one [url] wrapper should have solved it, so I thought. (?)-GovindaOn 2011-10-13, at 12:09 PM, Steve Raslevich -Northern Sound & Light wrote:
Hi,I am having an issue passing a text variable that includes an ampersand within it when using a javascript openwindow.Example:Text in var2 is: One & TwoThis doesn't work:<a href="javascript:WindowPopup('newpage.dna?_var1=[var1]&_var2=[url][var2][/url]')">test1</a>I't seems to be sending the variable as the full text "One & Two" appears in the address bar of the newpage.dna that opened in a new window. However, var2 only displays "One" and truncates the ampersand and "Two" when displaying on the page. This however does works going to same page:<a href="newpage.dna?_var1=[var1]&_var2=[url][var2][/url]">test2</a>I can hack it to work by doing the following:[text]vartemp=[url][var2][/url][/text]<a href="javascript:videoPopup('newpage.dna?_var1=[var1]&_var2=[url][vartemp][/url]');"
test3</a>
Anyone else run into this or have any ideas?Thanks,Steve
--------------090100070003000301090208--
Associated Messages, from the most recent to the oldest:
This is a multi-part message in MIME format.--------------090100070003000301090208Content-Type: text/plain; charset=ISO-8859-1; format=flowedContent-Transfer-Encoding: 7bitHi Govinda,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.Thanks,SteveGovinda wrote:> Steve,>> that seems odd to me too.> I was about to set up and test here.. but thought I better ask first if you already solved it?> You could escape with the right JS escaping function.. but use of the one
[url] wrapper should have solved it, so I thought. (?)>> -Govinda>>> On 2011-10-13, at 12:09 PM, Steve Raslevich -Northern Sound& Light wrote:>> >> Hi,>>>> I am having an issue passing a text variable that includes an ampersand within it when using a javascript openwindow.>>>> Example:>> Text in var2 is: One& Two>>>> This doesn't work:>>
[url][var2][/url]')">test1>>>> I't seems to be sending the variable as the full text "One& Two" appears in the address bar of the newpage.dna that opened in a new window. However, var2 only displays "One" and truncates the ampersand and "Two" when displaying on the page.>>>>>> This however does works going to same page:>>
[url][var2][/url]">test2>>>> I can hack it to work by doing the following:>>>>
[text]vartemp=
[url][var2][/url][/text]>>
> "javascript:videoPopup('newpage.dna?_var1=[var1]&_var2=[url][vartemp][/url]');">> >>> test3>>> >> Anyone else run into this or have any ideas?>>>> Thanks,>> Steve>>>>>> --------------090100070003000301090208Content-Type: text/html; charset=ISO-8859-1Content-Transfer-Encoding: 7bit
Hi Govinda,
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 whatresults you get. I don't think it is anything in the landing page asusing the text link and the hack both display correctly on the landingpage.
Thanks,
Steve
Govinda wrote:
Steve,that seems odd to me too.I was about to set up and test here.. but thought I better ask first if you already solved it?You could escape with the right JS escaping function.. but use of the one [url] wrapper should have solved it, so I thought. (?)-GovindaOn 2011-10-13, at 12:09 PM, Steve Raslevich -Northern Sound & Light wrote:
Hi,I am having an issue passing a text variable that includes an ampersand within it when using a javascript openwindow.Example:Text in var2 is: One & TwoThis doesn't work:<a href=[url][var2][/url]')">"javascript:WindowPopup('newpage.dna?_var1=[var1]&_var2=[url][var2][/url]')">test1</a>I't seems to be sending the variable as the full text "One & Two" appears in the address bar of the newpage.dna that opened in a new window. However, var2 only displays "One" and truncates the ampersand and "Two" when displaying on the page. This however does works going to same page:<a href="newpage.dna?_var1=[var1]&_var2=[url][var2][/url]">test2</a>I can hack it to work by doing the following:[text]vartemp=[url][var2][/url][/text]<a href=[url][vartemp][/url]');">"javascript:videoPopup('newpage.dna?_var1=[var1]&_var2=[url][vartemp][/url]');"
test3</a>
Anyone else run into this or have any ideas?Thanks,Steve
--------------090100070003000301090208--
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:
more ! testing (1997)
[protect] on NT? (1997)
problems with 2 tags (1997)
Hosts who have upgraded to v5.0? (2003)
webcat NT (1998)
emailer error type 103 (1997)
WebCat2 beta 11 - new prefs ... (1997)
Problem displaying search result (1997)
setting taxable to true (1997)
Firesite cache vs webcat cache (1997)
Multiple cart additions (1997)
Setting up WebCatalog with Retail Pro data (1996)
WebCat Hosting - Pricing Question (2002)
Stumpted Again (1997)
Replace Statement (1997)
Checking for blank form fields (sort of...) (1998)
problems with 2 tags (1997)
You can't buy something twice... (1997)
Faxing orders in place of email (1997)
WebMerchant 1.6 and SHTML (1997)