Has anyone used a Button to trigger ISF Code

Unanswered Question
Nov 17th, 2011
User Badges:

Has anyone used a Button to trigger ISF Code

RequestCenter 2008.3
Oracle 10g
Websphere 6.1
IE6 & IE7


The documentation specifies that a button can trigger a javascript instead of opening a browser window.  Has anyone done this?

Below is the section of the documentation that I am referring to.

Thank you
Safeway Inc.

Designers can specify a caption (text to appear on the button)
and a URL. The URL can point to a JavaScript function or to
an external page accessible elsewhere on the network.

When referring to an external web page, use the fully qualified URL.
The URL may point to a JavaScript function, available in a library,
or embed JavaScript code
. Form data cannot be included in the
parameters, if any, included in a function call. However, the function can include ISF.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Enrico Pagayucan Thu, 11/17/2011 - 18:16
User Badges:

Hi Daniel,

First you'll need a dictionary field to contain the button. Add this dictionary to your Active Form Component.

Then in ServiceDesigner, go to Active Form Components, select your form, go to Display Properties tab, select the field, and check the "Add a Button" checkbox. Also enter the appropriate Button Text. Then In the URL field, enter "javascript:myFunction();" without the quotes, where myFunction is the name of your JavaScript function.

Tylor Hagerman Thu, 11/17/2011 - 18:16
User Badges:

We do this in many services and it works fine.  You just need to reference a function that is defined in a JS library that is already referenced by the service.

Daniel Faust Thu, 11/17/2011 - 18:16
User Badges:

Thanks all for the information - this works now.

I added an onLoad script
if (a==1)

for the active component url I put

This function loads with the service and fires when the button is clicked.

Thanks again for the assistance

David Matta Thu, 11/17/2011 - 18:16
User Badges:

As a follow-up question, I followed this advice and have a form that has a field followed by a button on a new dictionary. I am looking for a way to hide the field, but keep the button (I don't want to show the field, just the button). Any thoughts? Is this possible?

ChrisMMorris Wed, 02/01/2012 - 07:49
User Badges:

Yes, it's possible, David.  You just have to create a javascript function that runs onLoad and hide that field. 


This Discussion

Related Content