SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Dec 2008
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    getting active gridid in javascript

    i have 5 gridview controls in a page
    user will select one at at time
    how do i get the id of the active grid view

    i hve used as
    function ActiveGrid(GridName)
    {
    var GdView = document.getElementById(GridName).id;
    }

    i have called it as onclientClick="ActiveGrid(this)";

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,060
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi there,

    Quote Originally Posted by svibuk View Post
    i have 5 gridview controls in a page
    This is an ASP thing, right?

    Quote Originally Posted by svibuk View Post
    how do i get the id of the active grid view
    Probably by using an onclick handler as you are doing.

    However, as I know very little about ASP I am having a hard time imagining what you are trying to do.

    Would it be possible that you provide a little HTML to help me visualize this?

    Basically something along the lines of the template @ralph.m ; showed you yesterday:

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    	
    <style>
    
    your CSS here
    
    </style>
    	
    </head>
    <body>
    
    your HTML here
    
    </body>
    
    <script>
    
    your JS here
    
    </script
    </html>


Bookmarks

Posting Permissions

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