JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 26th, 2006, 03:24 AM
proxies proxies is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 3 proxies User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 12 sec
Reputation Power: 0
How do I get url from status bar?

Hi All
How do I get url from status bar?

Assume as I have iframe and then when I click link in iframe

I want the textbox in parent page will show the url from the link.

Can u help me ?

Reply With Quote
  #2  
Old September 26th, 2006, 08:26 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
Here's kind of a sloppy example... I don't see much use in this, but I'm sure you have a reason =)

main.htm
Code:
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>

URL: <input type="text" id="show_here" /><br />

<iframe src="inside.htm"
	id="testiframe"
	name="testiframe" width="80%" height="60%"></iframe>

</BODY>
</HTML>


inside.htm
Code:
<HTML>
<HEAD>
<TITLE>Test</TITLE>

<script type="text/javascript">

function showUrl(url) {
	parentText = parent.document.getElementById('show_here');
	parentText.value = url;
}


</script>

</HEAD>
<BODY>

<a href="http://www.msn.ca" onclick="showUrl(this.href);">MSN</a><br />
<a href="http://www.yahoo.ca" onclick="showUrl(this.href);">Yahoo</a><br />
<a href="http://www.google.ca" onclick="showUrl(this.href);">Google</a><br />


</BODY>
</HTML>
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #3  
Old September 26th, 2006, 10:54 AM
proxies proxies is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 3 proxies User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 51 m 12 sec
Reputation Power: 0
many Thx MadCowDzz for the code but in my case the page

in iframe is external domain (ie google.com) if it possible to

do please help me again.

thx a lot.

Reply With Quote
  #4  
Old October 26th, 2006, 03:39 PM
colton22's Avatar
colton22 colton22 is offline
\ ^_^ / - Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2006
Location: near chicago, Illinois
Posts: 471 colton22 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 1 h 10 m 16 sec
Reputation Power: 3
Send a message via AIM to colton22 Send a message via MSN to colton22 Send a message via Yahoo to colton22
you mean you have a webpage say your domain is freewebs.com and subdomain is coder...

mainfile: http://www.freewebs.com/coder/main.html

iframe: http://www.myspace.com/

?
if it is like that i have no clue how to get the link unless it is displayed in the window.status from the external iframe...

if it is displayed from the external iframe into the window.status, you can check with this...
Code:
// depending on an imported string, this will search for http:// or www. to look for a website.
function isURL(sorze) {if ((sorze.search("http://")!=-1) || (sorze.search("www.")!=-1)) {if (sorze.search("http://")!=-1) { alert("is a http:// website at character: "+sorze.search("http://"));}else if (sorze.search("www.")!=-1) { alert("is a www. website at character: "+sorze.search("www."));}}
}

if you want me to complete this code i could try and have it get the full domain it is displaying...

otherwise, if you are trying to access the link directly, it is a security feture that you do not have permission to access other websites coding, or ajust other websites coding with javascript.

you could get the current text of the window.status by simply
Code:
var stat=window.status;
alert(stat);


hope this helped,

colton22

ps: PM me for my email if you want to contact me by email.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > How do I get url from status bar?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway