Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exchange TWO frame contents on one click 5

Status
Not open for further replies.

zefir

Technical User
Sep 21, 2000
344
EU
Let´s assume a left frame with a list of items
and a right frame with the actual content.
Then click item 1 . The content is shown in the
right frame, but the left should be loaded with a
new item list, where item 1 is LOCKED (not clickable).
This should be programmed by basic HTML, no Java, no Styles.
With tables its easy - the whole page is exchanged.
Who can help? ----G.Hoffmann
 
so, you want to find out which browser they have and the use the right code?...

Code:
if (navigator.appName.indexOf("Microsoft") != -1 && navigator.appVersion > 4.0 || navigator.appName.indexOf("Netscape") != -1 && navigator.appVersion > 3.0 ) {

//function for IE 4 and above goes here

} elseif (navigator.appName.indexOf(&quot;Microsoft&quot;) != -1 && navigator.appVersion < 4.0 || navigator.appName.indexOf(&quot;Netscape&quot;) != -1 && navigator.appVersion < 3.0 ) {

//function for IE 3 and less goes here

} else {
     alert(&quot;please switch to an Internet Explorer or Netscape browser&quot;)

}
-Greg :-Q
 
oops...I posted that twice by accident, I think I changed something one the second one so use that... -Greg :-Q
 
Greg: many thanks ! Will try it later.
---Gernot
 
Greg: not yet tested, but somewhere it should be written
&quot;<=&quot; instead of &quot;<&quot; . Is this allowed in Java ?
----Gernot
 
oh..yea I forgot that (oops)...

Code:
<script language=&quot;javascript&quot;>
if (navigator.appName.indexOf(&quot;Microsoft&quot;) != -1 && navigator.appVersion >= 4.0 || navigator.appName.indexOf(&quot;Netscape&quot;) != -1 && navigator.appVersion >= 3.0 ) {

//function for IE 4 and above goes here

} elseif (navigator.appName.indexOf(&quot;Microsoft&quot;) != -1 && navigator.appVersion < 4.0 || navigator.appName.indexOf(&quot;Netscape&quot;) != -1 && navigator.appVersion < 3.0 ) {

//function for IE 3 and less goes here

} else {
     alert(&quot;please switch to an Internet Explorer or Netscape browser&quot;)

}
</script>

sorry about that... -Greg :-Q
 
Greg: thanks for the complete code.
Will test it later. The basic problem is
also that some people may have switched
JavaScript=Off.
I read in Chuck Musciano, HTML ....
Put Java code in HTML comment tags, then
it is at least not shown by the browser if
JavaScript=Off. ---Gernot
 
I dont' think you should worry about JS being turned off. Very few people actually do it. For example, on one of my sites I had 12,000 unique visitors this year and 98.9% had JavaScript turned on. ---
---
 
Thanks, Rydel. I show a warning on the first page
(which works without JavaScript). ----Gernot
 
Rydel: your Web image is interesting. Not as usual.
---Gernot
 
just use the comments like this:

Code:
<script language=&quot;javascript&quot;>
<!-- Begin

code goes here

//End-->
</script>

you should also have a warning, if you want to give a message to people with javascript turned off you can put that in <noscript></noscript> tags... -Greg :-Q
 
Greg: according to &quot;Musciano, HTML..&quot;
&quot;noscript&quot; is not safe. ---Gernot
 
noscript is fine, I cant believe you lot went to all that trouble!!!

its a simple case of getting a nav script that works well!!! i think is good, I heavily modified it so it worked better in IE, gimme a shout and ill email it to you

--BB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top