-
Problem
Hi i need to do a form composed by a text field and a button.
on the press of the button i should output a string that is composed by a default part (ie: http://www.example.com) and by the text inserted in the text form (ie: hello) in order to obtain a string like this one (http://www.example.com#hello) how can i do this?
Thanks for ur help.
Ciao
-
FK'n_dog
PHP Code:
// button, input textfield and code all on main timeline
defaultString = "http://www.example.com#";
myButton.onRelease = function(){ // instance name of buttton
addString = myText.text; // instance name of input textfield
fullString = defaultString + addString;
trace(fullString); // open output window with result
};
-
how can i make it open a browser window with the address composed above?
-
FK'n_dog
defaultString = "http://www.example.com#";
myButton.onRelease = function(){
addString = myText.text;
fullString = defaultString + addString;
trace(fullString);
getURL(fullString, "_blank"); // open a new browser window
};
note: to open a url, either post the files to your server to test, or include your
development folder to your safe locations in the Settings Manager
-
ok, it works but it strangely make the new url like this
http://www.example.com/#text adding a / that i do not want.
thank you for your help, u are grt!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|