|
-
May 3rd, 2001, 11:01 AM
#1
Thread Starter
Frenzied Member
If Include
I'm using the Sun/Netscape ClientSniffer Script, which provides a series of boolean variables such as is_ie4up. If anyone knows of a better sniffer script, that would be nice. I was trying to use the OO one, but its object name is the same as a DynAPI object. Again, if anyone has had better luck with other cross-platform scripts such as DynAPI, please let me know.
My question is... is there a way to do the following:
Code:
<script language='JavaScript'>
if (is_nav) {
<!--- #include virtual="nav.inc"-->
}
else if (is_ie) {
<!--- #include virtual="ie.inc"-->
}
</script>
The tricky part is... the inc files have no scripting in them, just HTML, and I do not feel like adding document.writeln to each line of the inc files. Basicly, the question is, is there a way to load a block of HTML file into a script to be shown to the browser. When the client-side script executes, it won't see the includes, that is done server-side. So how do I wrap the includes so I don't have to dcument.writeln each line of the inc?
Does that make any sense?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|