Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 20th, 2005, 09:27 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default Calling Events.

Hi,

I have written a function on Blur event of a text box, which is readonly, and further I am setting value for that box progratly,
so now the prob is that events such as Blur/Focus etc. are never called, can anyone focus on that???

Thanks in advance.

Rupen Anjaria.
We can't avoid problems, but ofcourse can solve it.
 
Old July 21st, 2005, 02:26 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Events are not normally fired by programmatic invocation of methods. This is because you can fire them yourself if you so wish but it would mean cancelling them or looping for ever in some cases. For example if you wanted to change the value in textbox when the value changed it would be impossible.

--

Joe (Microsoft MVP - XML)
 
Old July 21st, 2005, 04:13 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

Hi Joe,

Thanks for reply, By looking at ur profile, I just get eager and want to ask you a problem which is I think again IMPOSSIBLE to solve, But I hope you can suggest me a better way to come out of it.

Please go through this link..
   http://p2p.wrox.com/topic.asp?TOPIC_ID=31530

Thanks in advance.


Rupen Anjaria.
We CAN'T avoid problems, but of course can solve it.
 
Old August 8th, 2005, 05:15 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii Rupen!!
Try this
<script>
var i=0
function blr()
{
document.myform.bl.value= 'Example'+i++;
}
</script>
<form name="myform">
<input type=text value="original" name="bl" onblur="blr()" readOnly>
</form>
Hope this will help you

Cheers :)

vinod





Similar Threads
Thread Thread Starter Forum Replies Last Post
Events bschleusner C# 2005 2 February 26th, 2007 05:25 AM
Events with StringCollectionEditor, how? jacob Visual Studio 2005 1 April 11th, 2006 06:01 AM
Events Question nhdw Beginning VB 6 2 February 23rd, 2004 04:00 PM
help with Events egiblock JSP Basics 0 October 6th, 2003 11:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.