Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. IFrame with javascript [modified]

IFrame with javascript [modified]

Scheduled Pinned Locked Moved Web Development
javajavascripttoolsquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mugdha_Aditya
    wrote on last edited by
    #1

    I am having Iframe on defaultone.aspx page from tht page i am called defaulttwo.aspx page. on that page their is master page call(defaultmaster.master ). iWant to get that master page object in java script of Defaultone.aspx page. How i will get tht??

    modified on Monday, June 27, 2011 8:43 AM

    N 1 Reply Last reply
    0
    • M Mugdha_Aditya

      I am having Iframe on defaultone.aspx page from tht page i am called defaulttwo.aspx page. on that page their is master page call(defaultmaster.master ). iWant to get that master page object in java script of Defaultone.aspx page. How i will get tht??

      modified on Monday, June 27, 2011 8:43 AM

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      First of all, don't use very urgent in your post. This is a volunteer site and people will answer you on their time, not yours. Once the pages are rendered to the client their is no page or masterpage, just elements. Use the parent object from the iframe.


      I know the language. I've read a book. - _Madmatt

      M 1 Reply Last reply
      0
      • N Not Active

        First of all, don't use very urgent in your post. This is a volunteer site and people will answer you on their time, not yours. Once the pages are rendered to the client their is no page or masterpage, just elements. Use the parent object from the iframe.


        I know the language. I've read a book. - _Madmatt

        M Offline
        M Offline
        Mugdha_Aditya
        wrote on last edited by
        #3

        Hey...thnks for the reply. I tried in different way but no use :( on that master page i have control.. on tht control there is label. i want to disable tht label :( from ifare call page script language="javascript" type="text/javascript"> function setIframeHeight(iframeName) { debugger; var s = document.getElementById(iframeName).contentWindow.document; var t = document.frames("iFrame").document.firstChild.childNodes[1].document.getElementsByTagName("MasterPlaceHolder"); var test = document.frames("iFrame").document.getElementId('MasterPlaceHolder'); var p = s.document.getElementById("ucModel1"); } </script> iFrame.Attributes.Add("onload", "setIframeHeight('iFrame');");

        L 1 Reply Last reply
        0
        • M Mugdha_Aditya

          Hey...thnks for the reply. I tried in different way but no use :( on that master page i have control.. on tht control there is label. i want to disable tht label :( from ifare call page script language="javascript" type="text/javascript"> function setIframeHeight(iframeName) { debugger; var s = document.getElementById(iframeName).contentWindow.document; var t = document.frames("iFrame").document.firstChild.childNodes[1].document.getElementsByTagName("MasterPlaceHolder"); var test = document.frames("iFrame").document.getElementId('MasterPlaceHolder'); var p = s.document.getElementById("ucModel1"); } </script> iFrame.Attributes.Add("onload", "setIframeHeight('iFrame');");

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          First, format your code with the PRE tags. As far as accessing your Label control, you can use something like this:

          var label = document.getElementById('<%Label1.ClientID%>');
          label.disabled = true;

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups