on 02-01-2006 12:00 PM
hi
I have to execute the url. when the user enters a url in an inputfield and clicks on the link, the url that is entered in the input field should get executed. initially when the page is loaded a default url will be displayed in the inputfield, now when the user gives a new url and clicks on this link, this new url should get executed.
i am giving the sample code
InputField input = new InputField("url");
form.addComponent(input);
String TestUrl=input.getString().getValueAsString();
Link testApplicationLink = new Link("testurl");
testApplicationLink.setReference(TestUrl);
i am able to execute the url that is set when the page is loaded and not the new url that is modified by the user
thanks in advance
regards
Mani
Hi Mani,
i suppose javascript can solve u r problem, just try this and check if this works
testApplicationLink.setOnClientClick("setUrlForTesting()");
<script language='JavaScript'>
function setUrlForTesting() {
var input = inputfield.getValue(); // JUST GET THE URL IN THE INPUT FILED
opnewwin = window.open(input.toString()); opnewwin.focus();
} </script>
reg
jag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You have to store the new url in some variable in ProcessAfterInput method and set the link to this new variable in ProcessBeforeOutput method.
I guess you are using PDK.
RK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.