Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input Text

Status
Not open for further replies.

GeoDM

Technical User
Dec 16, 2003
66
US
I have an Input Text box and a button. I want a user to type in the input text box and be able to use it when the button is clicked. Here is the ActionScript I have attached to the button. What gives?

on(click){
var search:String = searchTXT.text; //input text box
var link:String = " //the site
var url:String = link + search; // The site + the input text box

getURL(url, "_blank", "GET");
}
 
2.0 in flash 8. Just want to click on the button, concatenate a search string with what’s typed in the box, and go find it.
 
are you getting any errors or such like?

have you tried:
Code:
trace(url);
within the handler to see if the url is constructed properly?

Usually in AS2 I do my events this way:
Code:
btnName.onPress = function(){
    var search:String = searchTXT.text; //input text box
    var link:String = "[URL unfurl="true"]http://www.mysite.com?q=";[/URL] //the site
    var url:String = link + search; // The site + the input text box

    trace(url);
    
    getURL(url, "_blank", "GET");
}

Regards,

Martin

Computing Design And Services:
 
yeah and i keep getting undefined for the value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top