jquery ajax tabs question
I am a newbie to jquery ajax tabs and tried to create ajax tabs. The content pages are located on different servers/domains. My question is when i use the code below to implement ajax tabs these pages do not show up. When I create iframe pages on the server where my tabs are housed and use those links as my href link it works.
Do I need to do that every time I want to add a new tab? My requirement is to get away from doing that.
Thanks,
(full code: jquery tabs problem)
<li><a href="ajax/content.htlm">Tab1</a></li> -->
<li><a href="ajax/content.htlm">Tab2</a></li> -->
<li><a href="ajax/content.htlm">Tab3<开发者_运维技巧;/a></li> -->
<li><a href="ajax/content.htlm">Tab4</a></li> -->
The problem is that you can't make cross-domain ajax requests due to security issues.
And, for the second question: Yes you could fix it by using iframes, but then they arent AJAX anymore. You could append a new iframe dynamically and set the src to the url you wanted to fetch the stuff from, or just use a single iframe that switches source when a tab is clicked.
精彩评论