javascript include?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

javascript include?

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Could you do some funky document.writeln() right there?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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>
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Double Post

Post 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:
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

*grumble* *grumble*

stupid laggy phpdn.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

...what am I looking for?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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.
Last edited by Luke on Wed Jun 13, 2007 10:19 am, edited 1 time in total.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I assume you can't detect the browser server-side?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

hmm... I don't think so, but I'll check.
Post Reply