PDA

View Full Version : Tab Content Script + Ajax Tabs



iced
01-12-2007, 08:15 PM
1) Script Title: Tab Content Script + Ajax Tabs

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm, http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm

3) Describe problem:
Hello,
How to get to work the Tab Content Script inside external page loaded witch Ajax Tabs Script.
Should I put in <a> (in Ajax Tabs links) the rev attribute pointed to .js /.css file of Tab Content Script?
Where i should initialize the Tab Content Script - at the bottom of the externally loaded file?
I have found this topic and suggestion in it about using the Tab Content Script insted of loading another Ajax Tabs in the externally loaded file, but I'dont know how to get it work
http://www.dynamicdrive.com/forums/showthread.php?t=12988&highlight=Ajax+Tabs

jscheuer1
01-13-2007, 05:07 AM
If you read that thread, ddadmin who writes most of the scripts here and vets all of the rest says that it isn't reliable to do that. I think it may be able to be done but, you are going to have to do something as outlined in the first post of this thread:

http://www.dynamicdrive.com/forums/showthread.php?t=13003

Also, search some more. I am pretty sure this has been fairly well worked out in some other threads.

Zlatko.Lakisic
01-13-2007, 09:56 PM
Im not really sure weather you stated this allready but all I need to do is make one link inside the loaded external page go to another page that is thereafter loaded inside the <div></div> content container, here is what i have as the <a> tag code but it just opens up a new page.


<a href="includes/includes.cfm?page=edit&ID=#ID#" rel="ajaxcontentarea" style="display:block; padding:2px 0px 2px 0px;">#name#</a>

the tabs work great using that code (the location and the rel atributie) but when placed inside the externaly loaded page it doesnt work, just goes to a whole new page.

can anyone point out specifically what i should do here?

PS im kinda lost when it comes to javascript

jscheuer1
01-14-2007, 02:51 AM
I'm still not even sure exactly what you folks are trying to do. I have a feeling that each of you want at least a slightly different thing. Have a look at the posts from this search:

http://www.google.com/search?hl=en&lr=&client=opera&rls=en&q=site%3Adynamicdrive.com%2Fforums%2Farchive+linkjax+jscheuer1&btnG=Search

and the posts linked to them and see if any it comes close. And don't forget to study the linked thread from from my previous post in this thread:

http://www.dynamicdrive.com/forums/showthread.php?t=13003

One thing that may help for Zlatko.Lakisic's issue is this, give it a shot:


<ul id="maintab8" class="shadetabs">
<li><a onmousedown="startajaxtabs('maintab8')" href="includes/includes.cfm?page=edit&ID=#ID#" rel="ajaxcontentarea" style="display:block; padding:2px 0px 2px 0px;">#name#</a></li>
</ul>

Zlatko.Lakisic
01-14-2007, 09:07 AM
well those links work fine, its the links inside the loaded page that open up new pages, what im trieing to do is have them navigate to pages but keep the inside the ajax <div></div> tags i know you can do this with a dynamic link setup but i need to pass the url onto those pages in order for it to work correctly.

Zlatko.Lakisic
01-14-2007, 02:21 PM
also how would i achive this same effect with forms??

jscheuer1
01-15-2007, 04:25 AM
well those links work fine, its the links inside the loaded page that open up new pages, what im trieing to do is have them navigate to pages but keep the inside the ajax <div></div> tags i know you can do this with a dynamic link setup but i need to pass the url onto those pages in order for it to work correctly.

You've lost me, can you explain that more clearly?

Zlatko.Lakisic
01-15-2007, 10:13 AM
ok on this script http://www.dynamicdrive.com/forums/showthread.php?t=16473
you see the link "Click here to select 4th tab" well that goes to "javascript: expandtab('maintab', 3)" well i allready know how to link it like that but what im saying is how would i like "Click here to select 4th tab" with a url specific link (ie. "includes/includes.cfm?page=edit&ID=#ID#") and do that from inside the externaly loaded page.

jscheuer1
01-15-2007, 04:33 PM
http://www.dynamicdrive.com/forums/showthread.php?t=13070

Zlatko.Lakisic
01-15-2007, 04:40 PM
ok cool that works but how would i get the same effect with forms? just do a onSubmit="" in the form or???

jscheuer1
01-15-2007, 05:49 PM
That should work:


onsubmit="linkjax('external14.htm', 'ajaxcontentarea', 2);return false;"

The form will not be able to have its values transferred to the Ajax content that it is loading though as, no page refresh can take place without wiping out the Ajax loaded content. With some extra javascript code, it might be able to happen without a refresh. This is not a problem though, unless that is what you are trying to do.

Zlatko.Lakisic
01-15-2007, 06:32 PM
well thats what i was going for but it looks too messy and i have an easy work around for it, thanks alot!