First of all , don't put a dollar sign before your variable's name. It's not necessary in JS.
In it you can use the launchURL method, to which you can specify a URL string. In this string you can include the value of your text field, like so:
app.launchURL("http://www.xxx.yy/" + this.getField("ID").value);
recapturing this old forum question. The launchURL-method works nice using the setAction-Method. The problem is, that on mobile devices, the link is not followed when the setAction-Method is used. However if you use "Open a web link" in the action-panel for the button, the web-link is followed also on mobile devices.
I am currently working on setting field-actions using VBA for MS Excel to set up a pdf-form and ran into that problem. Using VBA I can use the setAction-method for fields. But the resulting pdf is mainly used on mobile devices. By using the launchURL the links are not followed.
My question is: What is different between these two methods? Is it possible to program the "Open a web link" in VBA?
1 person found this helpful
One possible solution is to use a separate tool to convert those actions from executing a JS code to opening a web-page directly.
Thanks for the information. I'll have a look into your tool.