PDA

View Full Version : Need help with tabcontent



blastup
01-14-2007, 07:18 AM
1) Script Title:

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

3) Describe problem: i got a script that dynamicly generate images on the spot from a folder..at http://blastup.com/graphics/animals/
i got many tabs.. i think the problem it don't work becuase all the tabs got the same ID..

and since my pictures generate dynamically.. i can't change the id manuelly..

is there anyway to make the ids different and make it work?
I think the best way to do this is having a script that blocks the Id.. from each other... is there a script like that?

or do you have any other ideas that will make this work?

HELP ME THANK YOU



HAHHAHAHHA sweet it works now
http://www.blastup.com/graphics/animals/(12).gif (http://www.blastup.com/)

sweeet eh.. now it got forum.. code.. so get your forum graphics here...isnt that awesome.. heck yeah..............omg .. thanx to all who have helped... really appreaciate it..

jscheuer1
01-14-2007, 07:34 AM
Things I notice - it seems to work but, once the preview is displayed, it loses focus. Unless you close it, it becomes hard to find it the next time. There seems little point to the previews, they are exactly the same images already displayed on the page. Oh and, if you have more than one element with the same id, it can often mess up a script. If the ids are generated when the images are retrieved, why not have an incremental id? Like each time it grabs an image, the id becomes id+1:

pic_id_0

pic_id_1

pic_id_2

and so on.

blastup
01-14-2007, 07:41 AM
thanx i'll try it now..


Things I notice - it seems to work but, once the preview is displayed, it loses focus. Unless you close it, it becomes hard to find it the next time. There seems little point to the previews, they are exactly the same images already displayed on the page. Oh and, if you have more than one element with the same id, it can often mess up a script. If the ids are generated when the images are retrieved, why not have an incremental id? Like each time it grabs an image, the id becomes id+1:

pic_id_0

pic_id_1

pic_id_2

and so on.

blastup
01-14-2007, 07:53 AM
I tried to make the code but i am not sure how to make it..
can you help me?

Here is the code there are two parts to it the (rel=) and the (id=)

with auto increment will the (rel=) and the (id=) be the same?
i am not really sure..
<body><ul id="maintab" class="shadetabs">
<li class="selected"><a href="#" rel="tcontent1">Website</a></li>
<li><a href="#" rel="tcontent2">Comment</a></li>
<li><a href="#" rel="tcontent3">Forum</a></li>
<li><a href="#" rel="tcontent4">Link</a></li>
</ul>

<div class="tabcontentstyle">

<div id="tcontent1" class="tabcontent">
<textarea id="code" onMouseOver="focus();select()" name="code" cols=15 rows=1 readonly>gg<? echo $text ?></textarea>
</div>

<div id="tcontent2" class="tabcontent">
<textarea id="code" onMouseOver="focus();select()" name="code" cols=15 rows=1 readonly>what sup</textarea>
</div>

<div id="tcontent3" class="tabcontent">
<textarea id="code" onMouseOver="focus();select()" name="code" cols=15 rows=1 readonly>gg<? echo $text3 ?></textarea>
</div>

<div id="tcontent4" class="tabcontent">
<textarea id="code" onMouseOver="focus();select()" name="code" cols=15 rows=1 readonly>gg<? echo $text4 ?></textarea>
</div>
</div>


Things I notice - it seems to work but, once the preview is displayed, it loses focus. Unless you close it, it becomes hard to find it the next time. There seems little point to the previews, they are exactly the same images already displayed on the page. Oh and, if you have more than one element with the same id, it can often mess up a script. If the ids are generated when the images are retrieved, why not have an incremental id? Like each time it grabs an image, the id becomes id+1:

pic_id_0

pic_id_1

pic_id_2

and so on.

blastup
01-14-2007, 08:40 AM
hey i did it and seperate the ids ? Thanx for the help... http://blastup.com/graphics/animals/index.php
check the source code ..
but there are still problems though..
only the first image seems to work properly the rest don't work will..
and in firefox the rests just overlaps..

I don't know why?
should i make the id more clear..
like 12 instead of (12).gif...
maby is that the problem?

blastup
01-14-2007, 09:01 AM
Nevermind i fixed it all.. tahnx you are da bomb
keep up the good work..