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.

Thread Tools Display Modes
Share |
Old 09-26-2014, 08:29 PM
hendryap's Avatar
hendryap hendryap is offline
Junior Member
Join Date: 09-16-11
Location: Indonesia
Posts: 3
iTrader: 0 / 0%
How to capture url inside an iframe ?

Is it possible to capture url inside an iframe with javascript ?

I have an iframe that contain url from an ads network (third party url), I want to capture the url using javascript. Is it possible ?

Any help would be appreciated.
Reply With Quote



Old 09-28-2014, 12:52 AM
arunthomas203 arunthomas203 is offline
Contributing Member
Join Date: 06-24-14
Posts: 68
iTrader: 0 / 0%
Yes, I think it is possible. Make sure the checking is done after the iframe is loaded.
Reply With Quote
Old 09-28-2014, 09:57 AM
georgeweballey13's Avatar
georgeweballey13 georgeweballey13 is offline
Contributing Member
Join Date: 09-26-14
Location: athens,greece
Posts: 162
iTrader: 0 / 0%
Use firebug to if you want to see the url from the code.

With javascript, you can make a script, that will search for the <iframe value, and
capture the attribute href.
Reply With Quote
Old 10-01-2014, 08:07 AM
brealmz's Avatar
brealmz brealmz is offline
Contributing Member
Join Date: 04-10-07
Posts: 90
iTrader: 0 / 0%
for native js try
var url = document.getElementById('id-of-frame').src;
when using jquery
var url = $('#id-of-frame').attr('src');
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum


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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Capture Page? Yes or No? hjgauthier Affiliate Marketing Forum 5 02-18-2008 11:33 AM
Does text inside IFrame elements affect Google page ranking? rjohnson Google Forum 4 11-15-2003 11:04 AM

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

All times are GMT -7. The time now is 01:27 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC