Help needed with 'window.location.href'
I am trying to create a webpage which will automatically pick the url , the domian name and create an email address. For example:
If i put my page on www.mimi.ch
it will say 'Welcome to Mimi'
and create an email address as 'email@example.com'.
I was told that i could use 'window.location.href' and found a script which lets me display 'http://www.mimi.ch' .
var myloc = window.location.href;
var locarray = myloc.split("/");
var arraytext = locarray.join("/");
document . write ('"<tt>' + arraytext + '</tt>."');
Now being new to Java, how do I do the other two.
Can anybody help me.
Thanking in advance,
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL