screen action parameter

screen action parameter


how can I set the screen-action-parameter on the client?

I have create a button with an ajax-action.
That action has got an input-parameter of type text.
Is there a way to alter that specific data before actually submitting it to the server by javascript?
(alternative is ofcourse the infamous hidden-input and onclick, but why have an input-parameter in screenaction)

is it enough to have it "javascript:return somefoo();" ????

Hi Joost,

Can you explain your problem a little better? Maybe with an eSpace sample.

The input values for those screen actions are filled (decided) when the button is rendered.
So either it is known already at render time, or there are inputs on your screen what will provide the rest of the information the action needs.

I'm not sure I understood what you wanted to do :(

João Rosado
I understand it's filled at rendertime. Is it possible to update those values with the onclick-action for example
(or some other onchange event) ?

Bottomline is I want to sent data to the screenaction without having to use the cumbersome hidden-input.
Hi, Joost,

Sorry, I'm still trying to understand the full use-case.
From where you getting the value for that you want to inject? Calculated by javascript?

Bottom line is that it isn't possible to change ajax (or submit) requests on client side. (Just think about the hacking possibilities it would bring if it was possible)
But If the client side could somehow calculate a value to send, why wouldn't it be possible to do it inside the screen action?

João Rosado
I have a grid with initial data (json in particular)
Now I am able to add, change the values, even add columns and rows.
That data will exist in javascript and when I click a button I need to have that newly grid be available on the server.

I will upload an espace soon with the current workaround of a hidden-input
Still looking at the issue.

What I want to achieve is basically

I have a webscreenX
with a screenaction "SaveData" with inputparameter "newStuff" of type Text
When I click on the button I want to be able to fill in the data at that time, not prefilled at rendertime.
so, in jquery I would prolly do soemthing like this:

$parent.find('button[name=save]').click(function () {
      url: "espace/webscreenX.aspx",
      data: {"newStuff": somejsfunction.getData()}, //here we get our data runtime
      dataType: 'json',
      type: 'POST'

The workaround of an input-box is a bit, well, strange.
Hi Joop,

Try this:

Put a FakeNotifyWidget (from RichWidgets) on your page (give it a name). In the OnNotify place the SaveData screen action.

On your button add a extended property onclick with
"OsNotifyWidget('" + FakeNotifyWidgetName.Id + "', somejsfunction.getData()); return false;"

In your screen action use the NotifyWidgetGetMessage to get your value.

João Rosado