Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:16:49+00:00 2026-06-10T05:16:49+00:00

this is the code im using…………. i want to get current url(href) from below

  • 0

this is the code im using………….

i want to get current url(href) from below code ……………

<html>
<head>
<script type="text/javascript">
        function load() {
            var url =  document.getElementById("iframeid");  

          //get the ifram onload url of href 
    //(i.e)   http://www.image.com/home.html     

        }
    </script>
</head>
<body>
<iframe onload="load()" name="Google"  id="iframeid"  scrolling="auto" style="width:95%;height:600px" src="http://www.image.com" >

    </iframe>
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:16:50+00:00Added an answer on June 10, 2026 at 5:16 am

    This will work only if they are in the same domain,protocol and port:

    document.getElementById("iframe_id").contentWindow.location.href
    

    else use :

    document.getElementById("iframe_id").src
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I copy-pasted from MSDN this code: using System.Security.Cryptography; byte[] buffer = enc.GetBytes(text); SHA1CryptoServiceProvider cryptoTransformSHA1
I'm trying to write this code using mostly arrays. I'm trying to get Correct
Ok, here's what I'm trying to do... given this razor code @using(Html.WriteLater()) { output
Consider this code: using namespace std; int* get() { unique_ptr<int> p (new int[4]); return
I'm using this type of spline in my code and I'm wondering if the
Consider this code: using Microsoft.Office.Interop.Word; ApplicationClass _application = new ApplicationClass(); Can I get the
At the moment I have this code: @using (Html.BeginForm(Add, Review, Review)) { @Html.ValidationSummary(true) <fieldset>
I get an error when I compile this code: using System; public struct Vector2
With this code using DomDocument: <?php $html = '<pre>one</pre><pre>two</pre><pre>three</pre><pre>four</pre>'; $doc = new DomDocument(); $doc->loadHTML($html);
this code using an OLEDB source will populate the OutputColumnCollection below it, the code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.