Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Experience Manager Champion Program are open!
SOLVED

Open Web Page Based on Text Field Value

Avatar

Level 1

I would like to open a web page based on the value of a text field.  How do I link the value of the text field to a command that will open the web page?

For example the Text Field value is:  8T-EXT

and the web page I want to open when a button is pressed is:  http://hqms/doc.asp?dn=8T-EXT

As you can see the 8T-EXT is something that a person enters into the form and is what's needed to open the web page.  The other text in the web page link is always the same.

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

In the click event of the button place the following JavaScript:

if (TextField1.rawValue !== null) {

     var vURL = "http://hqms/doc.asp?dn=" + TextField1.rawValue;

     app.launchURL(vURL, true);

}

else {

     app.alert("Dear user, please put a code in the text field. Thank you!");

}

You will need to change the object references to suit your form.

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

In the click event of the button place the following JavaScript:

if (TextField1.rawValue !== null) {

     var vURL = "http://hqms/doc.asp?dn=" + TextField1.rawValue;

     app.launchURL(vURL, true);

}

else {

     app.alert("Dear user, please put a code in the text field. Thank you!");

}

You will need to change the object references to suit your form.

Niall

Avatar

Level 1

Works like a charm!  Thanks for the help