-
1. Re: How to block cursor click after open modalpanel?
ilya_shaikovsky Jun 25, 2010 7:30 AM (in response to eswaramoorthy1985)So, you want the panel became non-modal but the button to be non-clickable in the same time? So disable the button before showing the panel from js.
-
2. Re: How to block cursor click after open modalpanel?
eswaramoorthy1985 Jun 27, 2010 11:33 PM (in response to ilya_shaikovsky)<a4j:commandLink value="Show ModalPanel" onclick="display_modalPanel()"/>
And the java script is :
function display_modalPanel() { Richfaces.showModalPanel('test_ModalPanel'); }
So here how to disable the (button)mouse click from js? Because i don't know how to avoid mouse click after open modalPanel.
Please any one help me.
Thaks in advance.
-
3. Re: How to block cursor click after open modalpanel?
ilya_shaikovsky Jun 28, 2010 4:58 AM (in response to eswaramoorthy1985)<a4j:commandLink value="Show ModalPanel" onclick="this.disabled=true;display_modalPanel()"/>
or if need some bulk links changes use jquery selectors in panel onshow/onhide to disable/enable controls.
-
4. Re: How to block cursor click after open modalpanel?
eswaramoorthy1985 Jun 28, 2010 5:09 AM (in response to ilya_shaikovsky)Hi Ilya Shaikovsky,
I use it.
<a4j:commandLink value="Show ModalPanel" onclick="this.disabled=true;display_modalPanel()"/>
But, after open the modalpanel, i can able to click the button.
-
5. Re: How to block cursor click after open modalpanel?
ilya_shaikovsky Jun 28, 2010 5:17 AM (in response to eswaramoorthy1985)doh.. sorry my fault.. should be this.disabled='disabled'
-
6. Re: How to block cursor click after open modalpanel?
eswaramoorthy1985 Jun 28, 2010 5:35 AM (in response to ilya_shaikovsky)Hi, Welcome your support.
But here not worked.
<f:view> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> .rich-mpnl-mask-div { display:none; } </style> <script language="JavaScript"> function display_modalPanel() { Richfaces.showModalPanel('test_ModalPanel'); } </script> </head> <body> <rich:modalPanel id="test_ModalPanel" style="height:200px;width:200px"> <a4j:commandLink value="Hide Me" onclick="javascript:Richfaces.hideModalPanel('test_ModalPanel');"/> </rich:modalPanel> <a4j:commandLink value="Show Modal Panel" onclick="this.disabled='disabled';display_modalPanel()"/> <a4j:commandButton value="Test Button" onclick="alert('test Buton clicked')"/> </body> </html> </f:view>
Here i use css ,
.rich-mpnl-mask-div{ dispaly:none;}
After open modalPanel, i can able to click 'Test Button' and it show the alert message. -
7. Re: How to block cursor click after open modalpanel?
ilya_shaikovsky Jun 28, 2010 5:44 AM (in response to eswaramoorthy1985)I shown how to disable concrete link whictrh opens the panel. you should do the same for any other conols you need.
-
8. Re: How to block cursor click after open modalpanel?
eswaramoorthy1985 Jun 28, 2010 6:00 AM (in response to ilya_shaikovsky)hi Ilya Shaikovsky,
I have three links like (First, Second, three) and some buttons , some components.
When i click the link First , then open modal Panel.
Now i block(avoid) to click the remaining links and buttons and remaining components.
Help me.
Thanks for your well support.
-
9. Re: How to block cursor click after open modalpanel?
eswaramoorthy1985 Jun 28, 2010 6:18 AM (in response to ilya_shaikovsky)Hi Ilya Shaikovsky,
Thanks for your well support. Sorry for the trouble.
I think i asked the questions wrong way. But i got the solution your existing post.
http://community.jboss.org/message/40882#40882
My original requirement statisfied from this post.
Thanks.
-
10. Re: How to block cursor click after open modalpanel?
eswaramoorthy1985 Aug 13, 2010 12:22 AM (in response to eswaramoorthy1985)Hi,
I use the following style property for rich:modalPanel. Its worked in FireFox.
But Not worked in IE8.
.rich-mpnl-mask-div { background:transparent; opacity:0; }
IE can allow click the back side component after open the modalPanel.
But i want to show modalPanel as transperent, and also prevent mouse click to backside component.
Help me.
Thanks in advance.
-
11. Re: How to block cursor click after open modalpanel?
ilya_shaikovsky Aug 13, 2010 5:57 AM (in response to eswaramoorthy1985)It's known IE limitation. 100% Transparent div can't be used to block ui.