trigger onchange

This is a discussion on "trigger onchange" within the JavaScript Forum section. This forum, and the thread "trigger onchange are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jan 10th, 2008, 11:10
Junior Member
Join Date: Jan 2008
Location: Slovenia
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
trigger onchange

Is it possible to trigger the onchange event programmatically? I'm changing the value of input with JS and onchange doesn't trigger.

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jan 10th, 2008, 11:35
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: trigger onchange

You can do it by calling it as an object method..

eg:

Code: Select all
var formInput = document.getElementById('input');

formInput.onchange();
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jan 10th, 2008, 12:46
Junior Member
Join Date: Jan 2008
Location: Slovenia
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: trigger onchange

Ok, I didn't mention that I'm using this event to fire a xajax function that updates some values on my form. The formInput.onchange() is called from another window and now I'm getting an error:

Error: responseReceived: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]

but only in FF, IE works great. Any hints?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Select Menu with Onchange pimpmaster JavaScript Forum 2 Jun 18th, 2007 18:11
How do I trigger an action when one swf is swapped for another? Keeldog Flash & Multimedia Forum 4 Apr 28th, 2007 06:22
IE Active X trigger? Lchad Web Page Design 0 Feb 9th, 2007 11:52
insert image trigger by variable value from a form kyk JavaScript Forum 5 Aug 19th, 2006 09:15
onchange event and tabbing out of text field ARRRGG juan110470 JavaScript Forum 1 Dec 7th, 2005 22:55


All times are GMT. The time now is 15:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42