• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DOM1

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to do something simple in JavaScript. When I hit the submit button on a page I want it to take me to another page and add a query string. Here the code:

location.href = "results1.htm?results=" + correct;

My code works fine with IE and Netscape 7, but doesn't work with Netscape 4.7. I think Netscape 4.7 uses the DOM1. Any ideas on how to fix this?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Man, get away from a 9 year old browser!

window.location.href

Eric
 
Jack Ireland
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually the code: window.location.href is what I originally had, but I took the "window" part off to try and get it to work in DOM1. After taking it off it still worked with DOM2 and DOM3 so I deemed it unnecessary. Anyway my goal is to get the program to work in all DOM's and Netscape 4.7 uses DOM1 (I think).

Any other ideas on how to fix the program?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
did you try location.pathname ?
reply
    Bookmark Topic Watch Topic
  • New Topic