OK this might be slightly tricky, I am stuck, so time for another forum post, yay!
I have a ButtonList
followed by two regular Buttons, let's call these Button1 and Button2
What I am trying to achieve is...
in the ButtonList.OnClick event
first I run some javascript
then I want to trigger in turn, the Click event for Button1 and Button2
Button1 runs Server-side Xbasic which outputs Javascript to the client via Ajax callback
Button2 opens a linked grid using Action Javascript.
I can trigger Button2.Click from my ButtonList.OnClick easily enough
because in the builder for the Button2 Edit Click Event
I just press "view javascript" and see it is just this line of javascript
{grid.componentName}_2A635A2E777D4D1D88E88F6E919FAD1F(this);
But my problem is Button1
The Button1.Click event is Xbasic
Can I trigger it's click event using Javascript?
I tried putting the following line into my ButtonList.OnClick but it did nothing
I got that long string from the Button1.Click Xbasic event window
(see picture below)
HowToTriggerThisEventFromButtonListOnClick.png
and I thought I would try and trigger via that long name, by using
{dialog.object}.runAction
Is what I want to do even possible?
i.e. Use ButtonList.OnClick event to in turn
trigger the Button1.Click that uses Ajax callback to run XBasic on the server and return Javascript to the browser
I have a ButtonList
followed by two regular Buttons, let's call these Button1 and Button2
What I am trying to achieve is...
in the ButtonList.OnClick event
first I run some javascript
then I want to trigger in turn, the Click event for Button1 and Button2
Button1 runs Server-side Xbasic which outputs Javascript to the client via Ajax callback
Button2 opens a linked grid using Action Javascript.
I can trigger Button2.Click from my ButtonList.OnClick easily enough
because in the builder for the Button2 Edit Click Event
I just press "view javascript" and see it is just this line of javascript
{grid.componentName}_2A635A2E777D4D1D88E88F6E919FAD1F(this);
But my problem is Button1
The Button1.Click event is Xbasic
Can I trigger it's click event using Javascript?
I tried putting the following line into my ButtonList.OnClick but it did nothing
Code:
{dialog.object}.runAction('serverside_25e008027bbc4499a84542214401afb2');
I got that long string from the Button1.Click Xbasic event window
(see picture below)
HowToTriggerThisEventFromButtonListOnClick.png
and I thought I would try and trigger via that long name, by using
{dialog.object}.runAction
Is what I want to do even possible?
i.e. Use ButtonList.OnClick event to in turn
trigger the Button1.Click that uses Ajax callback to run XBasic on the server and return Javascript to the browser
Comment