We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › link() with querystring cuts everything after &
Page Index Toggle Pages: 1
link() with querystring cuts everything after & (Read 1591 times)
link() with querystring cuts everything after &
Jun 10th, 2006, 11:17pm
 
i.e
Code:

String url = "http://www.seltar.org/?test=a&test2=b";
link(url);

goes to the site http://www.seltar.org/?test=a

-seltar
Re: link() with querystring cuts everything after
Reply #1 - Jun 12th, 2006, 8:02pm
 
Seltar, this really is more Microsoft's fault since processing is making use of the DOS command promt to open the URL in your webbrowser when running locally (i.e. from the PDE).

You can verify this yourself:
Code:
Start > Run... > cmd /c start http://www.seltar.org/?test=a&test2=b 



There's a simple patch which could be applied to the internal parth of the link() command by replacing all occurances of "&" with "^&" (using the MSDOS escape char)...

In PApplet, line ~2004, replace:

Code:
Runtime.getRuntime().exec("cmd /c start " + url); 


with:

Code:
Runtime.getRuntime().exec("cmd /c start " + url.replaceAll("&","^&")); 



Btw. The link() command should run fine when your applet already is running in a browser...
Re: link() with querystring cuts everything after
Reply #2 - Sep 13th, 2006, 4:12am
 
changed for 0116. toxi, you rock.
Page Index Toggle Pages: 1