|
»
»
»
Trouble with tabs url and load methods
|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Trouble with tabs url and load methodsHello, running into two seemingly related issues, and I am not sure if I am doing something wrong or if this is a bug. I'll start with the short synopsis of the problems, then explain what I am trying to do so you can see how I hit them. Problem #1: My links in the tabs need to be updated, but they appear to be altered before I even call the tabs("url",new_href) method (besides the appended #container_id) Problem #2: When clicking one of the tabs that I have altered the link for via the above method locally, the tabs loads (though with a partly wrong url due to the above problem), but when I access the same page from a different machine firebug gives me an 'Access to restricted URI denied' error. Details: Tabs are secondary navigation in my project, so they need to point to different things depending what is selected via the primary nav. So, they start off with default links like 'foo/bar/1? nolayout=true' and all have the same title to have them use the '#content_area' div, which is my main place for content. As expected, the widget appends '#content_area' at the end of the link, but the weird thing is that all the links appear the same, both on mouseover and inspecting with firebug. They all are the same as whatever the first link in the list was. So, say the link listed above. However, when they were generated serverside, the 2nd one would have been, for instance, 'foo/bar_blah/1?nolayout-true', but now it is 'foo/bar/ 1#content_area'. What I want to do is just update the id, and then call load on the active tab to reload its content with the new data. The reload works (locally), but obviously the link is wrong. I can attach some sample code if that would be helpful, but as this is already kind of long, I'll hold off unless it is requested. Thanks for any help! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@... To unsubscribe from this group, send email to jquery-ui-unsubscribe@... For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Trouble with tabs url and load methodsOk, I solved problem #1 - I was not aware that the tabs component was internalizing the href with the .data function, so on looping though, I am able to grab the proper url to adjust with: $("ul.ui-tabs-nav >li >a").each(function(n){ var internal_href = $ (this).data("href.tabs"); }); However, I am still getting problem #2 (access denied), so I'll keep going on that one. On Jul 22, 12:41 pm, jayg <jason.guidi...@...> wrote: > Hello, running into two seemingly related issues, and I am not sure if > I am doing something wrong or if this is a bug. I'll start with the > short synopsis of the problems, then explain what I am trying to do so > you can see how I hit them. > Problem #1: My links in the tabs need to be updated, but they appear > to be altered before I even call the tabs("url",new_href) method > (besides the appended #container_id) > Problem #2: When clicking one of the tabs that I have altered the > link for via the above method locally, the tabs loads (though with a > partly wrong url due to the above problem), but when I access the same > page from a different machine firebug gives me an 'Access to > restricted URI denied' error. > > Details: Tabs are secondary navigation in my project, so they need to > point to different things depending what is selected via the primary > nav. So, they start off with default links like 'foo/bar/1? > nolayout=true' and all have the same title to have them use the > '#content_area' div, which is my main place for content. As expected, > the widget appends '#content_area' at the end of the link, but the > weird thing is that all the links appear the same, both on mouseover > and inspecting with firebug. They all are the same as whatever the > first link in the list was. So, say the link listed above. However, > when they were generated serverside, the 2nd one would have been, for > instance, 'foo/bar_blah/1?nolayout-true', but now it is 'foo/bar/ > 1#content_area'. What I want to do is just update the id, and then > call load on the active tab to reload its content with the new data. > The reload works (locally), but obviously the link is wrong. > > I can attach some sample code if that would be helpful, but as this is > already kind of long, I'll hold off unless it is requested. Thanks > for any help! You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@... To unsubscribe from this group, send email to jquery-ui-unsubscribe@... For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Trouble with tabs url and load methodsOn Jul 23, 2:43 pm, jayg <jason.guidi...@...> wrote: > However, I am still getting problem #2 (access denied), so I'll keep > going on that one. Sounds like you're trying too make cross-domain Ajax calls, which is not allowed. A subdomain is handled as cross-domain... --Klaus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@... To unsubscribe from this group, send email to jquery-ui-unsubscribe@... For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Trouble with tabs url and load methodsWell, it is all on the same domain, just different rails controllers. I looked at it a while longer, but didn't have any luck figuring out the cause. Instead, I just moved some of the logic back to the server side. Results in an extra ajax call to get what I want, but the returned fragment is so small, I think it outweighs the issues of trying to do what I planned to do on the client. Thanks for the response. On Jul 23, 10:24 am, Klaus Hartl <klaus.ha...@...> wrote: > On Jul 23, 2:43 pm, jayg <jason.guidi...@...> wrote: > > > However, I am still getting problem #2 (access denied), so I'll keep > > going on that one. > > Sounds like you're trying too make cross-domain Ajax calls, which is > not allowed. A subdomain is handled as cross-domain... > > --Klaus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery-ui@... To unsubscribe from this group, send email to jquery-ui-unsubscribe@... For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free Forum Powered by Nabble | Forum Help |