View previous topic :: View next topic |
Author |
Message |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Thu May 13, 2004 10:36 am Post subject: Two different javascript address shows, required |
|
|
The first one I need to simply show the address that’s in the address bar. So for example if http://192.168.123.143/phpmyadmin is shown i need the script to show http://192.168.123.143/phpmyadmin.
-----
The second one needs to do something similar however it needs to strip the address back to the first part of the domain only, and show “Home Network” as the link name.
So for example if the browsers address is http://192.168.123.143/phpmyadmin it needs to be striped back to http://192.168.123.143 and show the link as “Home Network” (without the quotes).
-----
Both these scripts must be cross browser compatible, and work for multiple top level domains:
127.0.0.1, 192.168.123.143, etc...
-----
thanks in advance _________________ Olly |
|
Back to top |
|
 |
Moxxnixx -
Joined: 21 Jun 2003 Posts: 1226 Location: Florida
|
Posted: Thu May 13, 2004 3:11 pm Post subject: |
|
|
The first one is simple:
Code: | <script language="JavaScript" type="text/javascript">
<!--
window.status=location
// -->
</script> |
The second one eludes me. I'm trying to figure it out.
Maybe, instead of location, add "http://blahblah/HOME NETWORK"?? |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Fri May 14, 2004 12:59 am Post subject: |
|
|
Here's your script:
Code: | <script>
function hide(){
window.status="hello"
return true
}
</script>
<script>
function show(){
window.status=""
return true
}
</script>
<a href="file.html">text</a>
<a href="file2.html" onMouseOver="return hide()" onMouseOff="return show()">text2</a> |
Still working on "show()," if I get anything, I'll tell you. _________________ Bienvenidos! |
|
Back to top |
 |
 |
|