when I press contact, the page refreshes resetting the page to home(in firefox). why? http://mysite.verizon.net/res8szeo/pv/default.htm In ie7 it just does not work. why?
when I press contact, the page refreshes resetting the page to home(in firefox). why? http://mysite.verizon.net/res8szeo/pv/default.htm In ie7 it just does not work. why?
Because you have an href. Return false from the event handler to prevent the default action:The usual thing to do when no non-JS alternative is available is to link to # or javascript:void(0); like so:Code:<a href="" id= "main_menu_item_contact" onclick="SelectMenuItem('contact'); return false;">Contact</a>However, in your case you should link directly to the contact page, or create a seperate contact page to link to here if none exists, and set that as the href so non-JS browsers have somewhere to go.Code:<a href="#" id= "main_menu_item_contact" onclick="SelectMenuItem('contact'); return false;">Contact</a>
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Thankyou so much. This whole javascript thing is much diferent than my native c#...
Ugh... you should go ahead and learn Java, C# is just a bad clone.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
lets not get into that argument, ok?
ps. did you see that Ken Lay just died?
Hm, no, I hadn't. Interesting.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks