0

Links with relative URIs broken in YML ajax responses

Normally in my app, I can write <a href="foo/bar">go</a> and the link will resolve relative to my app's root URL.

In a <yml:form> or <yml:a> AJAX response, however, that same link gets added to the page as <a>go</a>. Note the missing href attribute. It's a broken link.

As a workaround, I see that I can use either of:
  <a href="http://apps.yahoo.com/.../YahooFullView/foo/bar">go</a>
  <yml:a params="foo/bar">go</yml:a>

It's really annoying to have to use fully qualified URLs everywhere though -- especially since I have to specify either production mode or dev-preview mode in the path, instead of just keeping the viewer in whichever mode he's already in.

And I'm trying to avoid <yml:a> because it doesn't work when returned in a gadgets.io.makeRequest response and then inserted via .innerHTML.

by
2 Replies
  • Hi Jared - I'll check this out this morning and see what might be going on.

    Thanks,
    Jon

    QUOTE (Jared @ Jun 13 2009, 11:55 PM) <{POST_SNAPBACK}>
    Normally in my app, I can write <a href="foo/bar">go</a> and the link will resolve relative to my app's root URL.

    In a <yml:form> or <yml:a> AJAX response, however, that same link gets added to the page as <a>go</a>. Note the missing href attribute. It's a broken link.

    As a workaround, I see that I can use either of:
      <a href="http://apps.yahoo.com/.../YahooFullView/foo/bar">go</a>
      <yml:a params="foo/bar">go</yml:a>

    It's really annoying to have to use fully qualified URLs everywhere though -- especially since I have to specify either production mode or dev-preview mode in the path, instead of just keeping the viewer in whichever mode he's already in.

    And I'm trying to avoid <yml:a> because it doesn't work when returned in a gadgets.io.makeRequest response and then inserted via .innerHTML.
    0
  • Issue confirmed and bug filed (#2831134). I had to lower the priority of the bug because there is a fairly easy workaround to the problem, so it will probably not be prioritized as a bug fix for the next push.

    Thanks for reporting this.

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network
    Twitter: jcleblanc

    QUOTE (Jared @ Jun 13 2009, 11:55 PM) <{POST_SNAPBACK}>
    Normally in my app, I can write <a href="foo/bar">go</a> and the link will resolve relative to my app's root URL.

    In a <yml:form> or <yml:a> AJAX response, however, that same link gets added to the page as <a>go</a>. Note the missing href attribute. It's a broken link.

    As a workaround, I see that I can use either of:
      <a href="http://apps.yahoo.com/.../YahooFullView/foo/bar">go</a>
      <yml:a params="foo/bar">go</yml:a>

    It's really annoying to have to use fully qualified URLs everywhere though -- especially since I have to specify either production mode or dev-preview mode in the path, instead of just keeping the viewer in whichever mode he's already in.

    And I'm trying to avoid <yml:a> because it doesn't work when returned in a gadgets.io.makeRequest response and then inserted via .innerHTML.
    0

Recent Posts

in YAP