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. ASP.NET
  4. Master Page problem

Master Page problem

Scheduled Pinned Locked Moved ASP.NET
help
3 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.
  • G Offline
    G Offline
    Guvera
    wrote on last edited by
    #1

    Hi friends, I put single master page with multiple content pages. I call the function from master page that "showContent()". MasterPage.Master : ================ function ShowContentOne() { alert("enterInside"); var elemContentOne=document.getElementById('divCheckContent'); alert(elemContentOne); elemContentOne.style.display='block'; elemContentOne.style.visibility='visible'; }

    =========================================== this 'divCheckContent' is in content page two. But i cant get it. i call this function onclick in master page. frmContentOne.aspx : ================

    I cant get the div id. The div id is null while i give in alert. Hope ur's reply Thanks __________________ Failing to plan is Planning to fail :)

    Every Successful Person Have A Painful Story

    T P 2 Replies Last reply
    0
    • G Guvera

      Hi friends, I put single master page with multiple content pages. I call the function from master page that "showContent()". MasterPage.Master : ================ function ShowContentOne() { alert("enterInside"); var elemContentOne=document.getElementById('divCheckContent'); alert(elemContentOne); elemContentOne.style.display='block'; elemContentOne.style.visibility='visible'; }

      =========================================== this 'divCheckContent' is in content page two. But i cant get it. i call this function onclick in master page. frmContentOne.aspx : ================

      I cant get the div id. The div id is null while i give in alert. Hope ur's reply Thanks __________________ Failing to plan is Planning to fail :)

      Every Successful Person Have A Painful Story

      T Offline
      T Offline
      Trishul Tandel
      wrote on last edited by
      #2

      your idv id is divContentOne and it is ruat server than not acces directly .u use the <%= divContentOne.ClientID %> infront of divContentOne in javascript

      Best Regards, Trishul Tandel Software Developer

      1 Reply Last reply
      0
      • G Guvera

        Hi friends, I put single master page with multiple content pages. I call the function from master page that "showContent()". MasterPage.Master : ================ function ShowContentOne() { alert("enterInside"); var elemContentOne=document.getElementById('divCheckContent'); alert(elemContentOne); elemContentOne.style.display='block'; elemContentOne.style.visibility='visible'; }

        =========================================== this 'divCheckContent' is in content page two. But i cant get it. i call this function onclick in master page. frmContentOne.aspx : ================

        I cant get the div id. The div id is null while i give in alert. Hope ur's reply Thanks __________________ Failing to plan is Planning to fail :)

        Every Successful Person Have A Painful Story

        P Offline
        P Offline
        Prasanna Kumar Pete
        wrote on last edited by
        #3

        Put your javascript function call at end of the page. i.e just before closing the body tag. that should work.. :):)

        Thanks & Regards Pete

        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