-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I'm needing to wear masks in some fields.
I consulted the documentation Applying Masks with JQuery (http://docs.zkoss.org/wiki/Applying_Input_Masks_With_JQuery), which works fine if I access directly the zul file.
But the problem is that I include the zul file in a jsp page, and then the masks don't work more.
Nothing was changed, I include only the zul file in jsp page through an include.
What could I do to solve the problem? What could be causing the problem?
Best regards
Helena
Thanks for the help.
Now it worked. I added the javascript file in jsp page, but the call to the mask kept in zul, like this:
Masks.jsp
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> <script type="text/javascript" src="/inc/jquery.js"></script> <script type="text/javascript" src="/inc/jquery.maskedinput.js"></script> <script type="text/javascript" src="/inc/masks.js"></script> </head> <body> <jsp:include page="masks.zul"/> </body> </html>
masks.zul
<?xml version="1.0" encoding="UTF-8"?> <zk xmlns="http://www.zkoss.org/2005/zul"> <window width="100%" title="Input Mask Example" border="normal"> <attribute name="onCreate"> String command = "applyPhoneMask('"+phoneNumber.getUuid()+"');applyZipCodeMask('"+zipCode.getUuid()+"')"; Clients.evalJavaScript(command); </attribute> <vbox> <hbox>Phone Numer: <textbox id="phoneNumber" /></hbox> <hbox>ZIP Code: <textbox id="zipCode" /></hbox> </vbox> </window> </zk>
Asked: 2010-10-07 09:18:09 +0800
Seen: 299 times
Last updated: Oct 13 '10