![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have found some menu functions. It works quite well, but how can I replace it with a simple <a href> if javascript is turned off? I reduced my code to: script>IncludeMenuHere()</script |
#3
| |||
| |||
|
|
I have found some menu functions. It works quite well, but how can I replace it with a simple <a href> if javascript is turned off? I reduced my code to: script>IncludeMenuHere()</script script>IncludeMenuHere()</script noscript><a href="http://www.example.com/menu/">Menu</a></noscript |
#4
| |||
| |||
|
|
Overall, probably the most viable strategy is to have the navigation menus defined on the page as, say, nested UL lists, and have the menu script modify those elements into a dynamic menu when possible. Leaving all browsers that lack support for the menu showing full navigation as part of the page contents. |
#5
| |||
| |||
|
|
That sounds nice, but I don't absolutely know how to do this. It's an sophisitcated topic, is it? Here's my menu so far: http://GLBasic.com -Gernot |
just some
The document elements have alot of properties you can change,
#6
| |||
| |||
|
|
document.getElementById('menuItem1').innerHTML = makeMyMenuStringFormMenu(1); |
#7
| |||
| |||
|
|
document.getElementById('menuItem1').innerHTML = makeMyMenuStringFormMenu(1); Ahhh.. Now, <TABLE ID="MyTable"> ...here go the links...</TABLE SCRIPT>document.getElementById('MyTable').innerHTM L = MakeMyMenuReplaceTheOldTable();</SCRIPT will work?? Have to try that. Very cool! BTW. JavaScript looks more and more attractive to me. Is there any Intelli-sense IDE for it? Or at least an reference where I can read about all methods and properties available for all object types? -- -Gernot Post here, don't email. If you feel you have to mail, revert my forename from: tonreG.Frisch.at.Dream-D-Sign.de (AT) invalid (DOT) com ________________________________________ Looking for a good game? Do it yourself! GLBasic - you can do www.GLBasic.com |
#8
| |||
| |||
|
|
document.getElementById('menuItem1').innerHTML = makeMyMenuStringFormMenu(1); Ahhh.. Now, <TABLE ID="MyTable"> ...here go the links...</TABLE SCRIPT>document.getElementById('MyTable').innerHTM L = MakeMyMenuReplaceTheOldTable();</SCRIPT will work?? Have to try that. Very cool! |
|
BTW. JavaScript looks more and more attractive to me. Is there any Intelli-sense IDE for it? |
|
Or at least an reference where I can read about all methods and properties available for all object types? |
#9
| |||
| |||
|
#10
| ||||||
| ||||||
|
|
I just google stuff... but most things in javascript work of two things, A) DOM and B) Java objects. So if you have: var myStr = "some string"; or var myStr = String("some string"); it same thing... |
|
but the cool thing is both are "String Objects" |
|
so straight our of the Java API (and not javascript) someone could... |
|
myStr.substring(start, end); |
|
and DOM is a W3C standard, DOM 0 was Netscape, |
|
but the new DOM 1 is standard, so read up on DOM (the id="something" stuff, and the document.domThingy (stuff under the document variable (or, at least functionally, object) is all DOM as far as i know)... But i'm new to jscript... only been playing with it about a week or so... I'd say read the base object types (ie string, char, boolean, integer) in the java API to get a feel for what your variables can do... and read up on DOM... |
![]() |
| Thread Tools | |
| Display Modes | |
| |