PDA

View Full Version : Tab Content Script issue in Internet Explorer



Rohit Malik
08-16-2007, 05:37 AM
1) Script Title: Tab Content Script

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

3) Describe problem: I have implemented the Tabs & it's working fine in firefox but i checked it in Internet Explorer 7 recently & noticed that many of the tabs are not working.
You can check it here ( in IE ) : www.delhievents.com ( central / middle content area )

Regards, Rohit

ddadmin
08-16-2007, 06:56 AM
If I had to guess the problem is due to some of your Tab Content DIVs not being closed properly. IE is very picky about these things. For example, looking at your source:


<div id="tcontent1" class="tabcontent">
<p></p>
<span style="font-weight: bold;">Featured Alerts - Registration, Ticket Booking, Submission, Invitation</span>
<p></p>
<div id="alerts1" class="tabcontent">
<p></p>
<a href="http://www.delhievents.com/2007/08/theatre-workshop-short-course-on.html">THEATRE WORKSHOP - Short Course on Theatre by Chicago based Pegasus Players at American Center - 17th &amp; 18th August, 2007</a>
<p></p>
<a href="http://www.delhievents.com/2007/08/theatre-hungry-heart-festival-presents.html">THEATRE : Hungry Heart Festival presents "Laugh Affaire" Two Plays at Hotel Ashok - 17th &amp; 18th August, 2007</a>
<p></p>
<a href="http://www.delhievents.com/2007/08/mobile-monday-delhi-momo-delhi-4th.html">Mobile Monday Delhi ( Momo Delhi ) 4th Episode at Management Development Institute, Mehrauli Road - 18th August, 2007</a>
<p></p>
<a href="http://www.delhievents.com/2007/08/children-workshops-says-history-is.html">Children Workshops "Who says History is Boring?" by Devika Rangachari at British Council - 18th August, 2007</a>
<p></p>
</div>

In the above there's two tab contents, but I only see one closing </div> tag. Check your page to make sure every tab content is closed properly.

Rohit Malik
08-16-2007, 08:26 AM
It's closing tag was below i think but anyway, i've checked tags a couple of time & tried my best to solve this issue but i'm not able to find the right solution. Can anyone check the code & tell me what can be done?

Regards, Rohit

ddadmin
08-17-2007, 02:11 AM
Ok, after trying many things, I'm fairly certain the problem is due to your use of:


<p></p>

throughout your Tab Contents HTML that's throwing off IE. The Paragraphs are overriding the DIV tags used to contain each Tab Content somehow. You can verify this by doing a search and replace of all occurences of "<p></p>" on your page to "" instead. From what I can tell this fixed the problem. You'll have to find another tag other than "p" to act as line separators then.