Can a click on the Save button be imitated using javascript?

Stimulsoft Reports.WEB discussion
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Can a click on the Save button be imitated using javascript?

Post by Andrew »

Hello,

Ok! Let us know about the result.

Thank you.
sergey2
Posts: 9
Joined: Wed Jun 22, 2011 1:05 pm
Location: Russia

Can a click on the Save button be imitated using javascript?

Post by sergey2 »

Hello,

The 'sendCommand' js function works great.
But for now we have a problem with determining the current state of the flash that is if the flash has unsaved changes or not.
The main purpose is to avoid showing the built-in flash confirmation "Save changes in Report?" when you try to exit.
So if we have possibility to get the current state of the flash we can call the sendCommand('Exit') function only when the 'Save' command will be processed entirely.

Is it possible to implement such kind of js function?

Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Can a click on the Save button be imitated using javascript?

Post by Vladimir »

Hello,

We understand your problem and will discuss it. If before the 'Exit' command the 'Save' command is always sent out, it will fix your problem?

Thank you.
sergey2
Posts: 9
Joined: Wed Jun 22, 2011 1:05 pm
Location: Russia

Can a click on the Save button be imitated using javascript?

Post by sergey2 »

If before the 'Exit' command the 'Save' command is always sent out, it will fix your problem?
Yes, it will.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Can a click on the Save button be imitated using javascript?

Post by Vladimir »

Hello,

You could use Javascript to send two commands at once, first 'Save', then 'Exit'.

Thank you.
sergey2
Posts: 9
Joined: Wed Jun 22, 2011 1:05 pm
Location: Russia

Can a click on the Save button be imitated using javascript?

Post by sergey2 »

If we use the following code:

Code: Select all

sendCommand('Save');
sendCommand('Exit');
then the built-in dialog box "Save changes in Report?" is popped up if there are unsaved changes of a report.
But we need to avoid displaying that message.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Can a click on the Save button be imitated using javascript?

Post by Vladimir »

Hello,

We have added a new ExitImmediately command, which closes the report designer without any questions. The update will be available in the next prerelease build on this week.

Thank you.
Post Reply