Results 1 to 5 of 5

Thread: [RESOLVED] document.getElementById in Master Page

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    243

    Resolved [RESOLVED] document.getElementById in Master Page

    Hi all,
    I'm using following script in child Page
    <script type="text/javascript" language="javascript">
    function ShowTip(mDiv) {
    if (mDiv.length < 1) { return; }
    var dd = document.getElementById(mDiv);
    dd.style.display = "block";
    dd.visible=true
    }
    </script>

    It works on normal pages but doesn't works on child Pages of Master Page.
    Any Help???

  2. #2
    PowerPoster motil's Avatar
    Join Date
    Apr 2009
    Location
    Tel Aviv, Israel
    Posts
    2,143

    Re: document.getElementById in Master Page

    you need to use the ClientID property...
    * Rate It If you Like it

    __________________________________________________________________________________________

    "Programming is like sex: one mistake and you’re providing support for a lifetime."

    Get last SQL insert ID

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: document.getElementById in Master Page

    Hey,

    Can you show an example of where you are calling ShowTip?

    Gary

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    243

    Re: document.getElementById in Master Page

    Quote Originally Posted by gep13 View Post
    Hey,

    Can you show an example of where you are calling ShowTip?

    Gary
    Thanx 4 reply. But I Solved it now.

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] document.getElementById in Master Page

    Hello,

    For the benefit of the rest of the community, you might want to think about posting the solution that you came up with, in case someone else is having a similar problem.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width