Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

can I force a call to onchange?

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have a form that includes a text field. The text field contains some onchange= code. I also have on the form a calendar pop up, which can populate the text field with a date. When I do populate the text field with the calendar date, the onchange function doesn't get called. Does anyone know how to force it to get called?
I have tried it by using form.field.onchange() in the calendar code, but this doesn't seem to work.
Here is the calander code, where f=window.opener.document.forms.frmReport.tDS
and frmReport is my form, and tDS is my text input field. I am seperating the text onclick to be on click just because this page seems to not want me to submit this bit of code, I am geting an error, but in my actual code it is typed as one word.
td class=calDayCell on click="f.value='3/1/2002';f.onChange();window.close()"
Thanks for any tips,
Kim
 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
onChange for a textfield is an extension of onBlur (with an additional requirement that the text inside the field has to be altered)
why don't u call the function that onChange() is calling directly from the child window?
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
It took me a while to realize there was a reply to this post as I was caught up in some other code! Thank you very much for your reply, but I am afraid I don't understand what you mean. Could you possibly give me some more details as I am still struggling with this one.
Thanks!
Kim
 
Kim Kantola
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thought about your reply and did figure this one out, thanks a bunch.
Kim
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic