Avatar of Altaf Patni
Altaf Patni
Flag for India asked on

Ifram & ASP.net

Hello ,
 I want Ifram texbox and button using ASP.NET....
ASP.NET* iframe

Avatar of undefined
Last Comment
Altaf Patni

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
David Johnson, CD

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Altaf Patni

ASKER
i am using following code for trying to send a value from iframe to webpage and want to submit automatically  using java script, but getting an following error,
"Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://localhost:53182" from accessing a cross-origin frame."

My code is

      function load() {

          alert("hh");
           // get the iframe in my documnet
    var iframe = document.getElementById("myframe");
    // get the window associated with that iframe
    var iWindow = iframe.contentWindow;

    // wait for the window to load before accessing the content
  
        var doc = iframe.contentDocument || iframe.contentWindow.document;

        // find the target in the iframe content
        var target = doc.getElementById("txtLrNo");
        target.innerHTML = "Found It!";
      }

Open in new window

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck