ExecuteJavaScript problem

ExecuteJavaScript is also available as a global method. If called as a global method, it tries to determine which control in which it is supposed to run. In general, calling the JavaScript from inside the intended control is preferable.

I have

Try it

in a page source control

and

ExecuteJavaScript(“myFunction”) on a button action

Can anyone see why that is not working?

Thanks

Tim

Move:

<script> function myFunction() { alert("Hello World!"); } </script>
To App HTMLHeader (look at the properties for App)

Button1.Action:

ExecuteJavaScript("myFunction()")

But I would just use a simple MsgBox for that :wink:

Great that got my sample to work Yay!

But now on to the real thing. or closer anyways.

My Connect Page

ipp:connectToIntuit</ipp:connectToIntuit>

is the html and script I am trying to execute

I added to below to the header

and
ExecuteJavaScript(“intuit.ipp.anywhere.setup()”) to the button action

What am i missing

Thanks
Tim

The code you’ve added to the header tells the page to go load the script, but it does this asynchronously. The next line tries to run the intuit.ipp.anywhere.setup function, and I’d bet it’s not available yet. Check your browser developer console and I’ll bet there’s an error about that function not being available yet. Typically these libraries will have some sort of event that fires when they are available for use and you’ll need to hook into that.