iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello,
I have a delete button in my toolbar, i also have a server side and a client side event for the button.
The button is also allowed to do AutoPostBack.
Now, what i want is when the user click the delete button, it will call the client side event and there i will open a javascript confirmation. If user cancels the confirmation, then nothing will happen (no post back will happen/no server side event execution), otherwise the server side event will be executed.
I want to give an Asp.net version of the task that i am trying.
<asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="Delete_Click" OnClientClick="return confirm('Are you sure that you want to delete?');" />
But the problem i face is when i set AutoPostBack = Yes, then clicking the button fires both server side and client side event altogether. without waiting for the confirmation box, the page postbacks. I tried to stop the postback by putting a javascript alert inside the client side event, but still post back happens, ignoirng the alert.
So my question is, is it possible to cancel the serverside event from the clientside event for toolbar.
Please help me on this. Thanks in advance.
My test show that using return false during client side command click, we will not be able to cancel the postback click event handler in the WebToolBar.
A workaround, as posted in this thread, is using a WebDialogBox to handle the confirmation.
Thanks for your reply. I am trying a workaround for this. Though it has become a lot hard to do so for the easy task. I hope in future this feature will be available.
When is intersoft planning to fix this BUG??
I’m afraid that this is not considered as bug. It is the default behavior of the control.Please try to follow the workaround as offered by Glenn Layaar in the following thread.
Though you dont except this as Bug. I think it is a Bug.
Why should i have to introduce a new control and then on the click event of the confirm button i have to write my Delete Logic? You are just catching the ear from the other way round.
I have wrtten all my Logic on Command Click of toolbar, now just for Delete i have to introduce a new control and code behind the new control click. This should have been simple.
This is not what is expected. It should allow to verify from ClientSide code first. If the returned value is true then only server side code should be run.
Thanks,
Huzefa
I apologize for any inconvenience this problem may have caused you.
The WebDesktop development team has agree to fix this minor glitch. A work item, #975, has been submitted regarding this behavior.
I’ll keep the information updated when I heard any news from the team regarding work item #975. Thank you for the valuable feedback.
I have good news regarding work item #975.
The WebDesktop development team has managed to fix the issue. A nightly-build hotfix is ready to be tested. Should anyone would like to test the nightly-build, please kindly let us know so that we can process your request further.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname