PDA

View Full Version : different iframe height for ajxtabs



jackavin
02-27-2008, 02:59 PM
1) Script Title:
ajax tabs
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/index.htm
3) Describe problem:
can it be done if i would like each iframe tabs with different height ?

from this post
http://www.dynamicdrive.com/forums/showthread.php?t=27893&highlight=ajax+tabs

ddadmin
02-27-2008, 10:38 PM
So you're basically asking how to duplicate exactly what was discussed in this thread (http://www.dynamicdrive.com/forums/showthread.php?t=27893&highlight=ajax+tabs)? What issue are you having following the instructions in it?

jackavin
02-28-2008, 06:27 AM
i mean each tabs have different height



<ul id="subtab" class="submenu" style="margin: 0px; padding: 0px;">
<li><a href="http://google.com" rel="#iframe" ><span>Customer</span></a></li>
<li><a href="../customer/customer_add.php" rel="#iframe" ><span>add</span></a></li>
</ul>




Customer have 500 px height
Add have 800 px height

can i do that

ddadmin
02-28-2008, 10:16 AM
Sure, try the below modified ajaxtabs.js, which let you do something like the below to alter the IFRAME height for a specific tab dynamically:


<li><a href="external1.htm" rel="countrycontainer">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
<li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
<li><a href="external4.htm" rel="#iframe:300" >Tab 4</a></li>

300 means change the IFRAME height to 300px.

jackavin
03-06-2008, 04:51 PM
DDADMIN I have one question can i control iframe height by link?

if i hvae 1st page with 1200px height and it redirect to 500px height can i do that

jackavin
03-07-2008, 09:44 AM
help please if can't be just tell me thank

ddadmin
03-09-2008, 01:49 AM
Hmm if you mean when users go from one page to the next within the IFRAME, to have it adjust height based on each page, unfortunately there's no easy way that I can think of. It would involve using the technique found in the IFRAME SSI II script (http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm), but adjusted to work with this script instead.

ktsixit
09-03-2008, 10:58 AM
Sure, try the below modified ajaxtabs.js, which let you do something like the below to alter the IFRAME height for a specific tab dynamically:


<li><a href="external1.htm" rel="countrycontainer">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
<li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
<li><a href="external4.htm" rel="#iframe:300" >Tab 4</a></li>

300 means change the IFRAME height to 300px.

Thank you for this solution.
I tried it too but there's another problem coming up now. The javascript or flash code that is loaded inside iframe doesnt work when I use this iframe:300. Is there another way? What can I do?

ddadmin
09-04-2008, 04:21 AM
Are you saying your JavaScript/Flash code works inside the IFRAME of the original Ajax Tabs Content script, before you replaced its .js file with the modified one above? The two shouldn't make any difference in that regard, as the later merely changes the height attribute of the IFRAME dynamically.

hogan24
10-13-2008, 03:57 AM
Hi ddadmin, first post here, great site btw.

I understand how to use the ajax tabs and plug in the iframe:300 to get a iframe height of 300px. But the situation i've come across on my page is a result set that could return 2 rows, it could return 20.

Is there a way the iframe height can be adjusted depending on the contents of the page...instead of having to set it to be a certain height?

Thanks again!

bingo974
02-13-2009, 10:27 PM
Hi !
This thread is very interesting but I'm looking for a way to autoresize automatically the frame.
Is it possible to had a script as http://www.phpmix.org/iframe_height_auto_resize to determine the height of page and put it in #iframe: ?

Thank you :)

izbaviboy
04-15-2009, 08:52 AM
Any useful answer on bingo974 post?!
What is with JQuery, YUI and Iframe auto resize - others solutions?

saurabhgautam
04-08-2014, 11:51 AM
Can someone pls guide on the location of attachment "modified ajaxtabs.js" on ddadmins post.

regards

saurabhgautam
04-08-2014, 11:54 AM
Sure, try the below modified ajaxtabs.js, which let you do something like the below to alter the IFRAME height for a specific tab dynamically:


<li><a href="external1.htm" rel="countrycontainer">Tab 1</a></li>
<li><a href="external2.htm" rel="countrycontainer">Tab 2</a></li>
<li><a href="external3.htm" rel="countrycontainer">Tab 3</a></li>
<li><a href="external4.htm" rel="#iframe:300" >Tab 4</a></li>

300 means change the IFRAME height to 300px.

Was referring to the missing attachment in the above post.