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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

change <base> url in Netscape

Status
Not open for further replies.

peterpann

Programmer
Jun 19, 2007
63
0
0
GB
How can I change the <base> tag url in Netscape ?
<base id="mybase" href="url1">
document.getElementById("mybase").href="url2"
works ok in IE.
 
Netscape? Sorry... you'll have to more specific. Netscape (as a browser) is no more. Maybe Firefox?

Cheers,
Jeff

[tt]Visit my blog [!]@[/!] Visit Code Couch [!]@[/!] [/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
getElementById" does not work in NS 4.7x and earlier. Do not know if it works in NS 4.8x up.

mmerlinn


"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Steven Raymond
 
Add in the closing tag and see if that helps some...

Code:
<html>
<head>
...
<base id="mybase" href="url1"></base>
...
<script type="text/javascript">
document.getElementById("mybase").href="url2";
</script>
...

Just a thought.

Cheers,
Jeff

[tt]Visit my blog [!]@[/!] Visit Code Couch [!]@[/!] [/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top