I thought something like getURL("http://domain.com?a=b&c=d";) would work
and convert the & to &. I guess not then.

Ade

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Sascha
Balkau
Sent: 20 January 2006 15:03
To: Flashcoders mailing list
Subject: Re: [Flashcoders] Converting & in a URL?


It's used in getURL. Thanks Adrian! Your small function solved it and helped
me a ton!

Sascha


> Are you outputting these URLs or using them in getURL()?
>
> That should work in getURL(). But if you're outputting them, one way to
> convert them is to use HTML text fields.
>
> Or, if you can't change the text fields, try this:
>
> str = "Sometext with an & in.";
>
> function convert(str, from, to) {
> return str.split(from).join(to);
> }
>
> trace(convert(str, "&", "&"));
>
> Adrian
>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to