Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Has anyone used a Button to trigger ISF Code

Has anyone used a Button to trigger ISF Code

RequestCenter 2008.3
Oracle 10g
Websphere 6.1
IE6 & IE7

Hello:

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
Daniel
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.

Everyone's tags (1)
5 REPLIES
New Member

Has anyone used a Button to trigger ISF Code

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.

New Member

Has anyone used a Button to trigger ISF Code

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.

New Member

Has anyone used a Button to trigger ISF Code

Thanks all for the information - this works now.

I added an onLoad script
myfunction(a)
{
if (a==1)
{...}
}

for the active component url I put
javascript:myfunction(1);

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

Thanks again for the assistance
Daniel

New Member

Has anyone used a Button to trigger ISF Code

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?

New Member

Has anyone used a Button to trigger ISF Code

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

901
Views
0
Helpful
5
Replies