Click here to Skip to main content
15,849,829 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have phone number field which it already contains some value like (###)###-####. I use onclick function to display message and onblur I am using to turn off messgae but onclick is working not onblur. Do I need any idea to force onblur action.

Thanks for help.
Posted
Comments
fjdiewornncalwe 8-Jul-11 14:20pm    
Show us some code so that we can help you. We can't read your mind to know what syntax you are using.

May be your code has any issue. Look at this
onblur Event[^]
 
Share this answer
 
Comments
Member 8046452 8-Jul-11 14:14pm    
I have some more fields which is empty there are working good.
thatraja 8-Jul-11 14:17pm    
Share the code
Member 8046452 8-Jul-11 14:20pm    
<script type="text/javascript">
function onFocusInfo(id) {
onFocusInfo(id);
}
function onFocusOut(id) {
onFocusOut(id);
}
</script>
<form>
<div class="Required">
<label for="datepicker" title="Date of Birth">Date of Birth</label>
<input type="text" name="datepicker" id="datepicker" maxlength="10" value="" style="width: 125px;" class="TCMask[##/##/####,MM/DD/YYYY]" data-bvalidator="date[mm/dd/yyyy],required" onclick="onFocusInfo(this.id);" onFocus="this.className='Focus';" önBlur="this.className='FocusOff'; onFocusOut(this.id);" />
</div>
</form>
Member 8046452 8-Jul-11 14:22pm    
My messages in other page and i am calling from here
thatraja 8-Jul-11 14:36pm    
what error you are getting? check in firefox error console & reply.
Use Javascript debugger. Don't ask a question with the statement "not working" unless you cannot show exception preventing you from running your event handler to the end. Another way (less productive): catch all exception in handlers body and present exception message on screen.

—SA
 
Share this answer
 
Comments
thatraja 9-Jul-11 23:16pm    
Also Nice suggestion. But I asked him the same but OP couldn't produce that.
Sergey Alexandrovich Kryukov 9-Jul-11 23:18pm    
Thank you, Raja?

What would you mean "could not"? Is Javascript debugger broken? It could happen; but OP could ask about it -- I would give some advice.
--SA
thatraja 9-Jul-11 23:24pm    
No, he said he didn't get any error message. Probably your 2nd suggestion(exceptions) is the right way to produce the things.
Sergey Alexandrovich Kryukov 13-Jul-11 0:28am    
You know, debugger is not just for exception; it's useful to detect many other kind of problems, certainly can help in this case, too. :-)
Only problems based on race condition may not be detectable as debugging can have them vanish. This is not the case, so the debugger will do the trick. :-)
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900