Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 05-16-2012, 01:03 PM
Junior Member
 
Join Date: 05-15-12
Posts: 3
iTrader: 0 / 0%
Wink I wanted example javascript read title site.

I wanted example javascript read title site or get code site.

Thank you.
 
Reply With Quote
  #2 (permalink)  
Old 05-16-2012, 03:56 PM
HTMLBasicTutor's Avatar
Super Moderator
 
Join Date: 10-29-07
Location: British Columbia, Canada
Posts: 18,059
iTrader: 5 / 100%
Can you please try and explain what it is you are trying to do a bit better please.
__________________

HTML Basic Tutor - Learn how to code for better SEO
Basic Computer Information - Computer & internet basics for website owners

SEO troubleshooting and review services available. - Pm me.
 
Reply With Quote
  #3 (permalink)  
Old 05-16-2012, 08:57 PM
webcosmo's Avatar
Contributing Member
 
Join Date: 03-17-07
Location: Boston, MA
Posts: 1,988
iTrader: 5 / 100%
if you mean page title:

<script language="javascript">
var title=document.title;
</script>
 
Reply With Quote
  #4 (permalink)  
Old 05-16-2012, 09:06 PM
Junior Member
 
Join Date: 05-15-12
Posts: 3
iTrader: 0 / 0%
when import url : http://www.youtube.com/watch?v=tQmEd...feature=relmfu

will get value

Avril Lavigne - What The Hell
- YouTube
 
Reply With Quote
  #5 (permalink)  
Old 05-23-2012, 01:24 AM
JohnnyS's Avatar
Contributing Member
 
Join Date: 07-05-11
Location: philippines
Posts: 312
iTrader: 0 / 0%
if you're doing PHP based one you do this..

PHP Code:
<?php

$site_content 
file_get_contents("http://www.google.com/");

preg_match("/\<title\>(.*?)\<\/title\>/",$site_content,$matches);

$title = isset($matches[1])?$matches[1]:'';

echo 
$title;

?>
 
Reply With Quote
  #6 (permalink)  
Old 05-25-2012, 04:53 AM
Junior Member
 
Join Date: 05-15-12
Posts: 3
iTrader: 0 / 0%
Thank you, but i can using php read title site. i want to know how to using javascript to read title site because i want to do work from client no do work in server.

javascript = do work on client
php = do work on server
 
Reply With Quote
  #7 (permalink)  
Old 06-05-2012, 12:41 PM
Junior Member
 
Join Date: 08-19-09
Location: SFO
Posts: 13
iTrader: 0 / 0%
jQeury can be used to read title

Try using jQuery

Code:
<script type="text/javascript"> $(document).ready(function() { alert(document.title); }); </script>
_______________________________________________
I read: [removed]

Last edited by HTMLBasicTutor; 06-05-2012 at 01:06 PM.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


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

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 Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make page title, auto refresh every x seconds (using javascript/jquery/others) basketmen Coding Forum 1 05-07-2012 02:30 AM
WANTED: Help with javascript/flash chrisjchrisj Looking To Hire 0 08-15-2011 06:40 AM
Title Javascript popup window thumbtak Coding Forum 16 03-09-2007 04:44 AM
Google read alt= or title= better or.. Johnathan Google Forum 9 11-10-2004 02:30 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 12:01 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.