hi,
i can add a message in a scriptcase standard buttons before confirm any actions(update, insert, delete) without having to create new buttons?
Re: message confirm before insert, update, delete
sc_confirm() in code should help?
place it before the code that will perform the action you mention.
Regards,
Scott.
Re: message confirm before insert, update, delete
hi scott
To use sc_confim () must create a new button, you can not use it on those standards scriptcase button
Re: message confirm before insert, update, delete
maybe you can use the onBeforeInsert/update/delete events?
Re: message confirm before insert, update, delete
I agree with Freezer, just use standard PHP call in your code for this and bypass sc macro.
Regards,
Scott.
Re: message confirm before insert, update, delete
You can post the sample code?
thanks
Re: message confirm before insert, update, delete
You will have to actually use JS, as PHP is server side only. sc_confirm is a JS call to the client.
google: javascript confirm
Regards,
Scott.
Re: message confirm before insert, update, delete
I wrote in the tips section on purpose to make this easier
marcov
Re: message confirm before insert, update, delete
Hi,
Finally,
Whats the solution.
Thanks
Regards,
ghulma
Yeah, again, after 3 or more years, anybody has sample code to manage this issue? sc_confim??
can you not just use the built in settings for the form:
It’s under: Application | Settings | Messages
[QUOTE=adz1111;33526]can you not just use the built in settings for the form:
It’s under: Application | Settings | Messages[/QUOTE]
Yeh quite certain that was what he was after. Seems easy just a bit hard to find if you don’t know where to look i guess.
I know that boss, that works in all cases. I want it conditional to show the message if one of the fields has an exact value only. Please hint up if u have an idea in mind.
Oh right, you wanted a condtition check before the confirmation triggered. Well I’m going to go ahead and assume that there’s no easy way to do this at the moment, might want to ask NetMake whether they’d want to implement this. Although we all know how that goes…
Mike,
I was answering the poster’s question which didn’t say anything about conditional checks…
However, the problem for conditional checking is that the dialog is normally JS, i.e. client-side which you want to PHP (server-side) to handle.
Until SC offer something built-in - one way around this is to create a control form to be a generic dialog box - it just has a couple of fields that basically display whatever message / question you set when you call it. It also has buttons that just set a global_var to indicate a choice made, which you pass back to the calling app. If you are building it be used in multiple situations, then the dialog app will need to keep track of the app that called it, so it can redir back to it.
Definitely fiddly, but can be written to be largely re-usable.
hi adz, obviously I’m lost… I revived this post which was from 2011 to understand if anyone could manage to solve this yet
because i noticed this post right after posting my question here
http://www.scriptcase.net/forum/showthread.php?8358-confirmation-message-olny-if-field-value-is-x
so when i answered this post via mobile thought you answered the new one looool
anyway, I understand what you mean defiantly correct, but i have big number of forms, mublple select as well, and need to do this in each one with different condition and redir then it is hell… I guess a single java snapit will dot it, or the correct use of sc_confirm will do but can’t figure it out, tried like 1000 things all days, nothing completely satisfy what is needed yet