skip to Main Content

Javascript – onkeypress allowing only allowed domains while writing email address

For my xpages/jsf application I have setup for an xe:input control the following validation: <xp:this.validators> <xp:validateConstraint regex="${application.regex_email}" message="please follow the rules"> </xp:validateConstraint> <xp:validateRequired message="follow the rules"> </xp:validateRequired> </xp:this.validators> The regular expression I use: regex_email=^([w-]+(?:.[w-]+)*)@(acme.org|acme.com) (so I allow only email addresses…

VIEW QUESTION

javascript function arguments apostrophe

The simple code explains my problem best: <html> <head> <script> function showDiv (divId, dat){ document.getElementById(divId).innerHTML = dat ; document.getElementById(divId).style.display = "block" ; } </script> </head> <body> <div onclick="showDiv(1, '<div onclick='showDiv(2, 'test C');'>test B</div>')">test A</div> <div id="1" style="display:none;"></div> <div id="2" style="display:none;"></div>…

VIEW QUESTION

Html – re-use regular expression on clientside for onkeyup event

For my xpages/jsf application I have setup for an xe:input control the following validation: <xp:this.validators> <xp:validateConstraint regex="${application.regex_email}" message="please follow the rules"> </xp:validateConstraint> <xp:validateRequired message="follow the rules"> </xp:validateRequired> </xp:this.validators> The regular expression I use: regex_email=^([w-]+(?:.[w-]+)*)@(acme.org|acme.com) (so I allow only email addresses…

VIEW QUESTION
Back To Top
Search