Two different javascript address shows, required

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
olly86
-


Joined: 25 Apr 2003
Posts: 993
Location: Wiltshire, UK

PostPosted: Thu May 13, 2004 10:36 am    Post subject: Two different javascript address shows, required Reply with quote

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 View user's profile Send private message
Moxxnixx
-


Joined: 21 Jun 2003
Posts: 1226
Location: Florida

PostPosted: Thu May 13, 2004 3:11 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Fri May 14, 2004 12:59 am    Post subject: Reply with quote

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 View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group