Groups | Blog | Home
all groups > flash actionscript > march 2005 >

flash actionscript : how to dynamically create a getURL ( );


gmain53
3/25/2005 9:31:24 PM
Hello,

I'm trying to have a URL created by adding various var text fields to the url

getURL ("www.sitename.com/ (text feild 1) + / + (text feild 2) " ,
blank);

is this possible, when I try different ways, everything in the "" marks gets
viewed as my URL, but I just need to dynamically add things so that I go to
the correct directory.

thanks so much for any thelp
kyle:confused;
NSurveyor
3/25/2005 9:50:30 PM
Think about it this way, when you use getURL you are passing a string to the
getURL function. So, all you need to do is "add" the strings together, like so:

"www.sitename.com/"+textfield1.text+"/"+texfield2.text; //if textfield1 and
textfield2 are the instance names of your textfields

or

"www.sitename.com/"+textfield1+"/"+texfield2; //if textfield1 and textfield2
are the vars associated with the textfields.

So, to put it all together, just write getURL(put one of the above,
here,"_blank");
AddThis Social Bookmark Button