PDA

View Full Version : Ajax tab content - issues with Explorer !!



Minty the Dalek
03-05-2009, 06:36 PM
1) Script Title: Ajax Tabs Content Script (v 2.2)

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

3) Describe problem:

I have sucessfully implemented the script on my site

http://www.ayonline.co.uk

I use it to pull in content for the RSS news and also the Leisure tabs further down such as jobs and recipe.

All is OK with that part in all browsers (thanks for a good script)

PROBLEM :

I used the onajaxpageload:function....... to implement a scroller for my RSS information.

On another page which i am still building I use the payment tabs info to update the page with the dynamic information entered by the site visitor.

This all works fine in browsers EXCEPT Internet Explorer.
The onajax load simply does not respond.

I have commented off my code and simply placed an alert box to see if stupid IE would display that but no :confused: it did not. (FF and all the other browsers are OK)


REQUEST : Please can someone suggest a solution for me


the code is below....



onajaxpageload:function(pageurl){ //PUBLIC Event handler that can invoke custom code whenever an Ajax page has been fetched and displayed
//do nothing by default
switch (pageurl){
case 'homeContentTabs/bbcRSS.php':
initializemarquee22();
break;
case 'homeContentTabs/localRSS.php':
initializemarquee();
break;
case 'homeContentTabs/sportRSS.php':
initializemarquee33();
break;

case 'paymentTabs/cash.html':
updatePayCash();
break;
case 'paymentTabs/cheque.html':
updatePayCheque();
break;
case 'paymentTabs/creditDebit.html':
updatePayCredit();
break;
case 'paymentTabs/myPaypal.html':
updatePayPaypal();
break;
}
//initializemarquee();

},



I used the correct call for the ajax I probably did not need to include it but I have (this is from the payment page which I am still building)



<ul>
<li class="listGap"><a href="paymentTabs/cash.html" rel="PaymentTabCont">Cash</a></li>
<li class="listGap"><a href="paymentTabs/cheque.html" rel="PaymentTabCont">Cheque</a></li>
<li class="listGap"><a href="paymentTabs/creditDebit.html" rel="PaymentTabCont" class="selected">Debit credit card</a></li>
<li><a href="paymentTabs/myPaypal.html" rel="PaymentTabCont">Paypal</a></li>
</ul>

<div id="PaymentTabCont" class="textAdjust">&nbsp;</div>





Thank in advance for your help it is so much appreciated

Minty the Dalek
03-17-2009, 08:22 AM
Hi there

This message is directed towards the Dynamic Drive admin

I can see that 111 people have viewed this posting.
Please please Please can one of you in the "guru" camp answer my question about why this custom script box does not work with Internet Explorer.

Developers may hate explorer but so many of our 'audience' uses it we can't build sites with scripts fro here that don't execute properly as you indicate on the pages page they should do.

Therefore either please help me out or amend the page that the script is shown on to indicate that issues with IE are known to warn fellow delevopers that it isn't the excellent solution you presented it to be.

Many thanks

Minty the Dalek
03-19-2009, 01:57 PM
I have a work around and wish to share it with all of you.


SKIP the section in the code that allows you to insert user defined .... as instructed in the download notes.

It won't work in IE which makes it reasonable useless. Works fine in FF but no point if not in IE.

SOLUTION.
Into the code you are going to ajax in, place a one pixel image of a colour that can't be seen when its loaded so I recommend using the same as the page background in that area.

Then simply add an 'onload=runFunction()' to the IMG tag HTML code.
That way as the image loads it'll execute the javascript code you wanted it to when you tried the 'official method and were disappointed'.




DEAR MODS

If you approve this solution why not add it to the page as an IE browser workaround.
I hope this helps someone

regards

Steve