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
I have webDialogBox and it has two buttons (see the code below)
<CommandButtons><ISWebDesktop:WebDialogBoxButton Text="OK" Name="_btnOkValidation" Type="OK"></ISWebDesktop:WebDialogBoxButton><ISWebDesktop:WebDialogBoxButton Text="Cancel" Name="_btnCancelValidation" Type="Cancel"></ISWebDesktop:WebDialogBoxButton></CommandButtons>
<ISWebDesktop:WebDialogBoxButton Text="OK" Name="_btnOkValidation" Type="OK"></ISWebDesktop:WebDialogBoxButton><ISWebDesktop:WebDialogBoxButton Text="Cancel" Name="_btnCancelValidation" Type="Cancel"></ISWebDesktop:WebDialogBoxButton></CommandButtons>
<ISWebDesktop:WebDialogBoxButton Text="Cancel" Name="_btnCancelValidation" Type="Cancel"></ISWebDesktop:WebDialogBoxButton></CommandButtons>
</CommandButtons>
Now, How do I do the following1. How do I change the button text in Client Side?2. Using Client Side, I want to be able to disable or hide the button "OK". If i use document.getElementById to get the correct button and set it style property or disable property I get the following JavaScript error thrown from your code. "Can't move focus to the control because it is invisible or not enabled, or of a type that does not accept focus." 3. How do I make sure the web dialog always open in the center of the window. What is happening is, if the user scrolls down and open the dialog, it appears on very top of the window. How do i make sure it always opens in the middle. Please give us a solution. Thanks
1. How do I change the button text in Client Side?
2. Using Client Side, I want to be able to disable or hide the button "OK". If i use document.getElementById to get the correct button and set it style property or disable property I get the following JavaScript error thrown from your code. "Can't move focus to the control because it is invisible or not enabled, or of a type that does not accept focus." 3. How do I make sure the web dialog always open in the center of the window. What is happening is, if the user scrolls down and open the dialog, it appears on very top of the window. How do i make sure it always opens in the middle. Please give us a solution. Thanks
I get the following JavaScript error thrown from your code.
"Can't move focus to the control because it is invisible or not enabled, or of a type that does not accept focus."
3. How do I make sure the web dialog always open in the center of the window. What is happening is, if the user scrolls down and open the dialog, it appears on very top of the window. How do i make sure it always opens in the middle.
Please give us a solution.
Thanks
2. Using Client Side, I want to be able to disable or hide the button "OK". If i use document.getElementById to get the correct button and set it style property or disable propertyI get the following JavaScript error thrown from your code."Can't move focus to the control because it is invisible or not enabled, or of a type that does not accept focus."3. How do I make sure the web dialog always open in the center of the window. What is happening is, if the user scrolls down and open the dialog, it appears on very top of the window. How do i make sure it always opens in the middle. Please give us a solution. Thanks
Hi,
It would be more easier if you use your own button in WebDialogBox instead of our CommandButton in WebDialogBox.
However, here is the code you will need to use for your scenario if you are using CommandButton:
function Button1_onclick() { var dlg = ISGetObject("WebDialogBox1"); dlg.CommandButtons[0].Text = "Test"; //assume [0] is "OK" button dlg.CommandButtons[0].GetElement().innerText = "Test"; }
2. Using Client Side, I want to be able to disable or hide the button "OK". If i use document.getElementById to get the correct button and set it style property or disable property "Can't move focus to the control because it is invisible or not enabled, or of a type that does not accept focus."
function Button2_onclick() { var dlg = ISGetObject("WebDialogBox1"); if (dlg.CommandButtons[0].Enabled) { dlg.CommandButtons[0].Disable(); } else { dlg.CommandButtons[0].Enable(); } }
function Button3_onclick() { var dlg = ISGetObject("WebDialogBox1"); dlg.Window.MoveTo("300", "300"); }
In fact, we still don't have an event to handle that. When onLoad, the location already at center. But if you resize,move or restore the windows, it would not automatically set into center. You will need to hanlde it manually by using MoveTo method.
Regards,Handy
Hi Mark,
I don't get any error at all when using that code. Here is my simple sample. Hope this can help.
Hi, I am also trying to disable/enable my OK command button on my web dialog box via client side using dlg.CommandButtons[0].Disable(); but I am receiving the following javascript error: Object doesn't support this property or method.
Any suggestions on how this can be done?
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