• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic