NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page location.hostname

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 11-19-2007, 01:22 PM THREAD STARTER               #1 (permalink)
Senior Member
 
TheWatcher's Avatar
Join Date: May 2003
Location: KING.NET
Posts: 3,479
TheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud ofTheWatcher has much to be proud of
 



location.hostname


I'm using location.hostname in javascript to display the domain name for my website.

For example, if you go to domain.com location.hostname will show domain.com. If you go to www.domain.com, the location.hostname will also display www.domain.com.

I want to just display the domain name as formatted like Domain.com capital first letter and no www in front. I saw this script before and I can't find it. I even saw something that it will automatically use letter image to display your location.hostname result. Care to share if you know this script.
__________________
Get your own .CO $28/yr http://NeedName.com
KING.NET Advertise your products and services. Got Facebook, connect with me. http://facebook.com/domainnetwork
WebeW.com - YA.NET Alternative Domain Name!. Use it for your site or blog.
Last edited by TheWatcher; 11-19-2007 at 01:38 PM.
TheWatcher is offline  
Old 11-19-2007, 01:43 PM   #2 (permalink)
Danltn.com
 
Daniel's Avatar
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
Daniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond reputeDaniel has a reputation beyond repute
 


Ethan Allen Fund Ethan Allen Fund
PHP Alternative (Supported on more browsers)

PHP Code:
<?php echo ucwords(str_replace("www.","",$_SERVER['HTTP_HOST')); ?>
Untested.
Daniel is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:38 PM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger