Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Is this possible?

Avatar

Level 1

I was also wondering if I could create a button that would take infomation typed into a feild, open internet explorer, and perform a google search of the information entered in the field.

Part of my form has the user entering in address information. Part of what they need to do is verify the address by searching it in google. Is it possible to make a button that will do this?

2 Replies

Avatar

Level 10

Hi,

For a button you could try something like this, which you could use in the click event.

var query = encodeURI("what is the capital of Australia");

app.launchURL("https://www.google.com.au/search?q="+query);

If you had a hyperlink in a text control you could update it like this, maybe in the exit event of the address field.

var query = encodeURI("what is the capital of australia");

var href = "https://www.google.com.au/search?q=" + query;

var url = <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">

            <p style="text-decoration:none;letter-spacing:0in">Click there to search for

                <a href={href} style="margin-top:0pt;margin-bottom:0pt;font-family:'Myriad Pro';font-size:10pt">your address</a> in Google

            </p>

          </body>;

Text1.value.exData.loadXML(url.toXMLString(), false, true);

Bruce