[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 11-19-2007, 12:22 PM   #1 (permalink)
Senior Member
 
TheWatcher's Avatar
 
Join Date: May 2003
Location: HARDWORKING.COM
Posts: 3,306
636.00 NP$ (Donate)

TheWatcher is a splendid one to beholdTheWatcher is a splendid one to beholdTheWatcher is a splendid one to beholdTheWatcher is a splendid one to beholdTheWatcher is a splendid one to beholdTheWatcher is a splendid one to beholdTheWatcher is a splendid one to behold


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.
__________________
Start your own domain business visit http://RESELLER.KING.NET
My Blog KING.NET daily updates. http://www.twitter.com/KingNET
DNCon.com - Domaining for Business!. FREE Service for all.
Moscom.com 24x7 Web Hosting (480) 624-2500. Michigan.TV SM.TV

Last edited by TheWatcher; 11-19-2007 at 12:38 PM.
TheWatcher is offline  
Old 11-19-2007, 12:43 PM   #2 (permalink)
Danltn.com
 
Daniel's Avatar
 
Join Date: May 2007
Location: Danltn.com / Nottingham, UK
Posts: 1,201
13.51 NP$ (Donate)

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 02:22 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85