PDA

View Full Version : Marquee tag on firefox on Ajax Tabs Content Script(v 2.1)



dogshasha
03-20-2008, 06:04 PM
1) Script Title: Ajax Tabs Content Script (v 2.1)

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

3) Describe problem: Greeting to everyone, I'm trying to include an scrolling message in one tab by using <marquee> tag. So I downloaded the zip file from DD, upzipped it and uploaded to a server and modified the file "external2.htm" to the following:

<marquee>
This is the contents of "external2.htm"<br />
This is the contents of "external2.htm"<br />
This is the contents of "external2.htm"<br />
</marquee>

When I view it on a browser, it functions on IE 6 and IE 7 in all circumstances but not on Firefox. If I make this scrolling tab default, it does work on Firefox. But as soon as I click another tab and click back. The scrolling text is no longer scrolling.

Any suggestions or workaround will be greatly appreciated,

Michael

ddadmin
03-20-2008, 08:10 PM
The marquee tag is only supported in IE actually. There is no equivalent tag in Firefox unfortunately for this. What you can do is for the tab content that you wish to scroll, set it to IFRAME mode, then inside that page, use something like the Scrolling IFRAME script (http://www.dynamicdrive.com/dynamicindex2/iframe-scroller.htm) to get it to scroll.

dogshasha
03-21-2008, 01:47 AM
The marquee tag is only supported in IE actually. There is no equivalent tag in Firefox unfortunately for this. What you can do is for the tab content that you wish to scroll, set it to IFRAME mode, then inside that page, use something like the Scrolling IFRAME script (http://www.dynamicdrive.com/dynamicindex2/iframe-scroller.htm) to get it to scroll.

I understand that. Marquee is like IE invention. But Firefox also supports it now. If I make this tab default, I can see the content scrolling.

Only if I click other tabs, and then click back, the scrolling text is no longer scrolling.

I really hope I don't have to use iFrame.

Thank you again,

Michael

ddadmin
03-21-2008, 07:09 AM
Wow FF2 supports the marquee tag now. That's new to me. Anyhow, I see what you're saying in FF. Apparently when the marquee tag is fetched via Ajax, it no longer scrolls in that browser. You can get over that by manually starting the marquee when the tab containing the marquee tag is fetched, by using the onajaxpageload event of the script.

Lets say external2.htm is the external page containing the marquee tag:


<marquee id="mycontent">
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
<p>sdfsdfd</p>
</marquee>

Give the tag an ID. Then, on your main page, do something like the below to manually start the marquee in FF each time the user selects that tab:


countries.init()

countries.onajaxpageload=function(pageurl){
if (pageurl=='external2.htm')
document.getElementById('mycontent').start()
}