Page 1 of 1

javascript include?

Posted: Tue Jun 12, 2007 4:05 pm
by Luke
For some reason sifr is causing my layout to break in ie6, so for now (until I figure out why), I'd like to disable sifr for ie6 only. Does anybody know if it's possible to do something like

Code: Select all

if (/* user-agent isn't IE */)
{
    //include sifr.js
}
Or have another solution to my problem?

Posted: Tue Jun 12, 2007 4:08 pm
by pickle
Could you do some funky document.writeln() right there?

Posted: Tue Jun 12, 2007 4:12 pm
by Luke
wouldn't that be a problem? Including a script tag within a script tag?

Code: Select all

<script type="text/javascript">

document.write('<script></script>');

</script>

Posted: Tue Jun 12, 2007 4:17 pm
by pickle

Double Post

Posted: Tue Jun 12, 2007 4:27 pm
by Luke
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:3. Do not make multiple, identical posts. This is viewed as spam and will be deleted.
:lol:

Posted: Tue Jun 12, 2007 4:31 pm
by pickle
*grumble* *grumble*

stupid laggy phpdn.

Posted: Tue Jun 12, 2007 4:42 pm
by Luke
strange, that worked like a charm, but as you can see -- now the text gets replaced with... nothing.

http://www.bagselect.com/c/WM

Posted: Tue Jun 12, 2007 4:52 pm
by pickle
...what am I looking for?

Posted: Tue Jun 12, 2007 5:39 pm
by Luke
you'll notice right when you load the page it says "women's bags" and then a second or two later, boom, it's gone. I'm on FF 2.0 - it may not show up at all on other browsers. Do you see women's bags on the page?

Posted: Wed Jun 13, 2007 9:45 am
by pickle
No I don't see it, and I do understand what the problem is now. What happens if you remove the class for that div?

Do you have any onload JS that affects that div?

Posted: Wed Jun 13, 2007 10:13 am
by Luke
yes, sIFR (see first post) is supposed to fill the <h2> tag up with a flash file with fancy text in it. It worked before I did the javascript include, but now that I include the javascript dynamically it isn't working. I think it must have something to do with the order of javascript calls within sifr. not sure.

EDIT - you won't see any issue now, as I have temporarily disabled sifr because it's causing too much trouble.

Posted: Wed Jun 13, 2007 10:19 am
by pickle
I assume you can't detect the browser server-side?

Posted: Wed Jun 13, 2007 10:23 am
by Luke
hmm... I don't think so, but I'll check.