Loading ...
Sorry, an error occurred while loading the content.

Re: Select bleeds through calendar element.

Expand Messages
  • capitan
    Hey Steven, Brilliant!! Thanks for helping me out on this. That was exactly what I needed. My callback function declaration only had one parameter not two
    Message 1 of 13 , Apr 27 11:11 PM
    • 0 Attachment
      Hey Steven,

      Brilliant!! Thanks for helping me out on this. That was exactly what
      I needed. My callback function declaration only had one parameter not
      two so I wasn't getting the calendar object.

      var myFunction = function(e){}

      As soon as I went to a declaration with two parameters I got the event
      object and the calendar object so I could do this:

      var myFunction = function(e, obj){
      var iFrameID = obj.id + "iFrame";
      var iFrame = document.getElementById(iFrameID);
      iFrame.style.display = 'none';
      }

      Thanks again,
      Tyler

      --- In ydn-javascript@yahoogroups.com, "Steven Peterson"
      <peterson@...> wrote:
      >
      > Tyler,
      >
      >
      >
      > In this case: YAHOO.util.Event.addListener(linkClose, "click",
      myFunction,
      > this);
      >
      >
      >
      > Your argument is "this", and there is no scope correction happening.
      This
      > means that in "myFunction" you can get the id of the calendar like this:
      >
      >
      >
      > var myFunction = function(e, obj) {
      >
      > // e is the event, obj is the calendar
      >
      > var id = obj.id;
      >
      > }
      >
      >
      >
      > That should allow you to get the ID. Please let me know how that
      works out
      > for you.
      >
      >
      >
      > Thanks!
      >
      >
      >
      > Steven Peterson
      >
      > Web Developer, Platform Engineering
      >
      > Yahoo!
      >
      > _____
      >
      > From: ydn-javascript@yahoogroups.com
      [mailto:ydn-javascript@yahoogroups.com]
      > On Behalf Of capitan
      > Sent: Wednesday, April 26, 2006 10:45 PM
      > To: ydn-javascript@yahoogroups.com
      > Subject: [ydn-javascript] Re: Select bleeds through calendar element.
      >
      >
      >
      > Adding a listener to the source code almost solves my problem. The
      > problem I still have is deciding which calendar on the page called the
      > close. I added this as a listener:
      >
      > YAHOO.util.Event.addListener(linkClose, "click", myFunction, this);
      >
      > But I expected the Calendar object to come in as the parameter. I was
      > hoping to call:
      >
      > param.id
      >
      > to get the calendar id that called the close. However I noticed that
      > the object that is passed in is an event parameter object. In fact
      > when I added this as my listener I got the same object:
      >
      > YAHOO.util.Event.addListener(linkClose, "click", myFunction, null);
      >
      > Anyways I need some way of getting at the calendar id so I can hide
      > the correct iFrame. This is why I was hoping that I could set a call
      > back in my Init JavaScript that I build on the fly for each Calendar
      > object on the page.
      >
      > Your help is much appreciated.
      > Tyler
      >
      >
      >
      > --- In ydn-javascript@yahoogroups.com, "Steven Peterson"
      > <peterson@> wrote:
      > >
      > > Tyler,
      > >
      > >
      > >
      > > Look in the Calendar2up js code for this line:
      > >
      > >
      > >
      > > YAHOO.util.Event.addListener(linkClose, "click", this.hide, this);
      > >
      > >
      > >
      > > You can add your listener right after that one, and you should be
      > all set.
      > > Please let me know if that takes care of your issue.
      > >
      > >
      > >
      > > Thanks!!
      > >
      > >
      > >
      > > Steven Peterson
      > >
      > > Web Developer, Platform Engineering
      > >
      > > Yahoo!
      > >
      > > _____
      > >
      > > From: ydn-javascript@yahoogroups.com
      > [mailto:ydn-javascript@yahoogroups.com]
      > > On Behalf Of capitan
      > > Sent: Wednesday, April 26, 2006 8:49 AM
      > > To: ydn-javascript@yahoogroups.com
      > > Subject: [ydn-javascript] Re: Select bleeds through calendar element.
      > >
      > >
      > >
      > > I'm kind of a newb to the Yahoo API. I'm not sure where to put this
      > > line of code. I have an init function that creates the control like
      > this:
      > >
      > > calendarID = new YAHOO.widget.Calendar2up(params);
      > > calendarID.setChildFunction("onSelect", keySetDate);
      > > calendarID.render();
      > >
      > > I'm guessing that I need to add this event listener here. Something
      > > like this:
      > >
      > > YAHOO.util.Event.addListener(yourCloseLinkElement, "click",
      > > yourCallbackFunction);
      > >
      > >
      > > However, the yourCloseLinkElement isn't my element it is the Yahoo
      > > Calendar's linkClose for the X on the Calendar. It is found in
      > > Yahoo's Javascript:
      > >
      > > YAHOO.util.Event.addListener(linkClose,"click",this.hide,this);
      > >
      > > And it doesn't have an ID on it. I'm surprised that Yahoo didn't wire
      > > up an event for this, they did the onSelect and onPageChange but not
      > > onClose.
      > >
      > > Any ideas on how I would get the linkClose element?
      > >
      > > Thanks,
      > > Tyler
      > >
      > >
      > >
      > > --- In ydn-javascript@yahoogroups.com, "Steven Peterson"
      > > <peterson@> wrote:
      > > >
      > > > Tyler,
      > > >
      > > >
      > > >
      > > > You should use the Event utility to wire up an additional handler
      > > for the
      > > > close link using your callback function. Something like this should
      > > work:
      > > >
      > > >
      > > >
      > > > YAHOO.util.Event.addListener(yourCloseLinkElement, "click",
      > > > yourCallbackFunction);
      > > >
      > > >
      > > >
      > > > Steven Peterson
      > > >
      > > > Web Developer, Platform Engineering
      > > >
      > > > Yahoo!
      > > >
      > > > _____
      > > >
      > > > From: ydn-javascript@yahoogroups.com
      > > [mailto:ydn-javascript@yahoogroups.com]
      > > > On Behalf Of capitan
      > > > Sent: Tuesday, April 25, 2006 10:22 AM
      > > > To: ydn-javascript@yahoogroups.com
      > > > Subject: [ydn-javascript] Re: Select bleeds through calendar
      element.
      > > >
      > > >
      > > >
      > > > I've implemented the iFrame solution for the IE form SELECT
      problem.
      > > > I need to hide the iFrame however when the user closes the
      Calendar by
      > > > not selecting a date but by hitting the close button.
      > > >
      > > > How might I go about setting up a function callback for the Close
      > > > button on the Calendar? Is there an event for this? I didn't
      see one
      > > > in the docs.
      > > >
      > > > Thanks for any help,
      > > > Tyler
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > > > _____
      > > >
      > > > YAHOO! GROUPS LINKS
      > > >
      > > >
      > > >
      > > > * Visit your group "ydn-javascript
      > > > <http://groups.yahoo.com/group/ydn-javascript> " on the web.
      > > >
      > > > * To unsubscribe from this group, send an email to:
      > > > ydn-javascript-unsubscribe@yahoogroups.com
      > > >
      > <mailto:ydn-javascript-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      > > >
      > > > * Your use of Yahoo! Groups is subject to the Yahoo!
      > > > <http://docs.yahoo.com/info/terms/> Terms of Service.
      > > >
      > > >
      > > >
      > > > _____
      > > >
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > SPONSORED LINKS
      > >
      > >
      > > C
      > >
      > <http://groups.yahoo.com/gads?t=ms
      >
      <http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=C+programming
      > > &k=C+programming+language&w1=C+programming
      > >
      >
      +language&w2=Computer+programming+languages&w3=Java+programming+language&w4=
      > >
      >
      The+c+programming+language&w5=C+++programming+language&w6=Concept+of+program
      > > ming+language&c=6&s=194&.sig=lC1PxfzvANy_Br-nPkXYTA> programming
      > language
      > >
      > > Computer
      > >
      > <http://groups.yahoo.com/gads?t=ms
      >
      <http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=C+pro
      > > &k=Computer+programming+languages&w1=C+pro
      > >
      >
      gramming+language&w2=Computer+programming+languages&w3=Java+programming+lang
      > >
      >
      uage&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of
      > > +programming+language&c=6&s=194&.sig=7XFXh-0Mon1IfLuOVlwvdg>
      > programming
      > > languages
      > >
      > > Java
      > >
      > <http://groups.yahoo.com/gads?t=ms
      >
      <http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=C+programm
      > > &k=Java+programming+language&w1=C+programm
      > >
      >
      ing+language&w2=Computer+programming+languages&w3=Java+programming+language&
      > >
      >
      w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+prog
      > > ramming+language&c=6&s=194&.sig=UITodqn0qTCUcae_mpRQog> programming
      > > language
      > >
      > >
      > > The
      > >
      > <http://groups.yahoo.com/gads?t=ms
      >
      <http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=C+program
      > > &k=The+c+programming+language&w1=C+program
      > >
      >
      ming+language&w2=Computer+programming+languages&w3=Java+programming+language
      > >
      >
      &w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+pro
      > > gramming+language&c=6&s=194&.sig=xnZC2-BzDSLhhir3MLtssg> c
      programming
      > > language
      > >
      > > C
      > >
      > <http://groups.yahoo.com/gads?t=ms
      >
      <http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=C+programmi
      > > &k=C+++programming+language&w1=C+programmi
      > >
      >
      ng+language&w2=Computer+programming+languages&w3=Java+programming+language&w
      > >
      >
      4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+progr
      > > amming+language&c=6&s=194&.sig=RTzTl3BOJWbWK14CdUrO0w> programming
      > language
      > >
      > >
      > > Concept
      > >
      > <http://groups.yahoo.com/gads?t=ms
      >
      <http://groups.yahoo.com/gads?t=ms&k=Concept+of+programming+language&w1=C+pr
      > > &k=Concept+of+programming+language&w1=C+pr
      > >
      >
      ogramming+language&w2=Computer+programming+languages&w3=Java+programming+lan
      > >
      >
      guage&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+o
      > > f+programming+language&c=6&s=194&.sig=x4ueM0tA417JDq3ckdJ9CQ> of
      > > programming language
      > >
      > >
      > >
      > > _____
      > >
      > > YAHOO! GROUPS LINKS
      > >
      > >
      > >
      > > * Visit your group "ydn-javascript
      > > <http://groups.yahoo.com/group/ydn-javascript> " on the web.
      > >
      > > * To unsubscribe from this group, send an email to:
      > > ydn-javascript-unsubscribe@yahoogroups.com
      > >
      <mailto:ydn-javascript-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      > >
      > > * Your use of Yahoo! Groups is subject to the Yahoo!
      > > <http://docs.yahoo.com/info/terms/> Terms of Service.
      > >
      > >
      > >
      > > _____
      > >
      >
      >
      >
      >
      >
      >
      >
      > SPONSORED LINKS
      >
      >
      > C
      >
      <http://groups.yahoo.com/gads?t=ms&k=C+programming+language&w1=C+programming
      >
      +language&w2=Computer+programming+languages&w3=Java+programming+language&w4=
      >
      The+c+programming+language&w5=C+++programming+language&w6=Concept+of+program
      > ming+language&c=6&s=194&.sig=lC1PxfzvANy_Br-nPkXYTA> programming
      language
      >
      > Computer
      >
      <http://groups.yahoo.com/gads?t=ms&k=Computer+programming+languages&w1=C+pro
      >
      gramming+language&w2=Computer+programming+languages&w3=Java+programming+lang
      >
      uage&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of
      > +programming+language&c=6&s=194&.sig=7XFXh-0Mon1IfLuOVlwvdg>
      programming
      > languages
      >
      > Java
      >
      <http://groups.yahoo.com/gads?t=ms&k=Java+programming+language&w1=C+programm
      >
      ing+language&w2=Computer+programming+languages&w3=Java+programming+language&
      >
      w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+prog
      > ramming+language&c=6&s=194&.sig=UITodqn0qTCUcae_mpRQog> programming
      > language
      >
      >
      > The
      >
      <http://groups.yahoo.com/gads?t=ms&k=The+c+programming+language&w1=C+program
      >
      ming+language&w2=Computer+programming+languages&w3=Java+programming+language
      >
      &w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+pro
      > gramming+language&c=6&s=194&.sig=xnZC2-BzDSLhhir3MLtssg> c programming
      > language
      >
      > C
      >
      <http://groups.yahoo.com/gads?t=ms&k=C+++programming+language&w1=C+programmi
      >
      ng+language&w2=Computer+programming+languages&w3=Java+programming+language&w
      >
      4=The+c+programming+language&w5=C+++programming+language&w6=Concept+of+progr
      > amming+language&c=6&s=194&.sig=RTzTl3BOJWbWK14CdUrO0w> programming
      language
      >
      >
      > Concept
      >
      <http://groups.yahoo.com/gads?t=ms&k=Concept+of+programming+language&w1=C+pr
      >
      ogramming+language&w2=Computer+programming+languages&w3=Java+programming+lan
      >
      guage&w4=The+c+programming+language&w5=C+++programming+language&w6=Concept+o
      > f+programming+language&c=6&s=194&.sig=x4ueM0tA417JDq3ckdJ9CQ> of
      > programming language
      >
      >
      >
      > _____
      >
      > YAHOO! GROUPS LINKS
      >
      >
      >
      > * Visit your group "ydn-javascript
      > <http://groups.yahoo.com/group/ydn-javascript> " on the web.
      >
      > * To unsubscribe from this group, send an email to:
      > ydn-javascript-unsubscribe@yahoogroups.com
      > <mailto:ydn-javascript-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo!
      > <http://docs.yahoo.com/info/terms/> Terms of Service.
      >
      >
      >
      > _____
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.