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

RE: [ydn-javascript] Re: Solution: Yahoo! AJAX Map in a Dialog

Expand Messages
  • Steven Peterson
    Michael - You can also create the Dialog dynamically (which will allow you to avoid having to have preexisting markup). Just make sure when you call render
    Message 1 of 7 , Dec 12, 2006
    • 0 Attachment

      Michael –

       

      You can also create the Dialog dynamically (which will allow you to avoid having to have preexisting markup). Just make sure when you call render that you pass document.body as an argument so that it knows where to go. This will allow you to avoid having the extra markup. Another thing you can try that worked for me is to make the Dialog body the container element for the map, instead of nesting it further. Just give your Dialog body an ID, and use that as the ID that you pass to the Map constructor. The key is to make sure that whatever you need is in the DOM before rendering the Map. This is a great example of the synergy of two of our developer APIs! I really appreciate the feedback! J

       

      Steven Peterson

      Web Developer, Platform Engineering

      Yahoo!

       

      From: ydn-javascript@yahoogroups.com [mailto:ydn-javascript@yahoogroups.com] On Behalf Of Michael Newton
      Sent: Tuesday, December 12, 2006 4:42 PM
      To: ydn-javascript@yahoogroups.com
      Subject: [ydn-javascript] Re: Solution: Yahoo! AJAX Map in a Dialog

       

      That did the trick, thank you. You need to give the Dialog a body
      before rendering, or it throws an error, but an empty string worked
      fine for that.

      It's an unusual problem, but the solution makes sense -- normally when
      doing this manually I would have created the container for the map and
      then added it to the DOM with appendChild() before instantiating the map.

      I was trying to figure out subscribing to the hide and show events to
      fix the map display just as your message came in, but was having a bit
      of trouble with it, thanks for all your help.

      --- In ydn-javascript@yahoogroups.com, "Steven Peterson"
      <y_stevenp@...> wrote:

      >
      > Michael,
      >
      > I couldn't find anything that was specifically Panel or
      Dialog-related, but
      > I am guessing that the issue in creating the map is that you are
      trying to
      > put it into an element that's not yet in the DOM. I reworked your
      > implementation a little bit, and it's working for me now.
      >
      > ...
      > Please let me know how this works out for you, and if you have any
      further
      > questions, don't hesitate to let me know! J
      >
      > Steven Peterson
      > Web Developer, Platform Engineering
      > Yahoo!
      >

    Your message has been successfully submitted and would be delivered to recipients shortly.