...Accessing a datagrid across frames...

Discussion in 'ASP .Net' started by dj Bass, Jul 16, 2003.

  1. dj Bass

    dj Bass Guest

    I've got a situaion where there's one frame with a load of buttons, acting
    as a small control panel, with a datagrid object existing in another frame.

    On clicking on one button on the top frame, I want to be able to access the
    instance that is being displayed onscreen of the grid, because it contains,
    among other things, a column of check boxes, who's state is lost if i
    manually refresh it from the other frame via scripting.

    What I want to do is when clicking a button in the top, pick out all items
    in the datagrid in the frame below that have been "selected", that is,
    checked off.

    Any ideas as to an approach for this?
    Is there a way, for example, to access the object in another page as it
    exists, and drive it externally, calling methods on already existing
    instance of that object?

    Thanks for your comments.
    Daniel.
     
    dj Bass, Jul 16, 2003
    #1
    1. Advertising

  2. Hi

    I am not totally sure what you want... Do you simply want to store the
    checked checkboxes in the other frame?

    var myCheckBoxArr = new Array();
    function storeCheckedBoxes(){
    with(parent.FRAMENAME.document.forms[0])
    {
    for(i=0;i<elements.length;i++)
    {
    if(elements.type == "checkbox") if(elements.checked)
    myCheckBoxArr.push(elements.name);
    }
    }
    }

    This will store the checked checkboxes names in the Array

    Or for newer browsers
    document.getElementsByTagName("CHECKBOX");

    More info
    http://msdn.microsoft.com/library/d...ml/reference/methods/getelementsbytagname.asp
    http://msdn.microsoft.com/library/d...thor/dhtml/reference/collections/elements.asp

    --
    Best Regards
    Vidar Petursson
    ==============================
    Microsoft Internet Client & Controls MVP
    ==============================
    "dj Bass" <> wrote in message
    news:...
    > I've got a situaion where there's one frame with a load of buttons, acting
    > as a small control panel, with a datagrid object existing in another

    frame.
    >
    > On clicking on one button on the top frame, I want to be able to access

    the
    > instance that is being displayed onscreen of the grid, because it

    contains,
    > among other things, a column of check boxes, who's state is lost if i
    > manually refresh it from the other frame via scripting.
    >
    > What I want to do is when clicking a button in the top, pick out all items
    > in the datagrid in the frame below that have been "selected", that is,
    > checked off.
    >
    > Any ideas as to an approach for this?
    > Is there a way, for example, to access the object in another page as it
    > exists, and drive it externally, calling methods on already existing
    > instance of that object?
    >
    > Thanks for your comments.
    > Daniel.
    >
    >
     
    Vidar Petursson, Jul 16, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UmFtZXNoIENoYXdsYQ==?=

    Drag n Drop across frames

    =?Utf-8?B?UmFtZXNoIENoYXdsYQ==?=, Nov 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    580
    Jason Kester
    Nov 18, 2004
  2. =?Utf-8?B?UmFtZXNoIENoYXdsYQ==?=

    Drag n Drop across frames

    =?Utf-8?B?UmFtZXNoIENoYXdsYQ==?=, Nov 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    373
    Kevin Spencer
    Nov 18, 2004
  3. some dude somewhere

    Hyperlinks across frames in NS and Opera

    some dude somewhere, Jan 2, 2004, in forum: HTML
    Replies:
    4
    Views:
    344
    some dude somewhere
    Jan 3, 2004
  4. dj Bass

    ...Accessing a datagrid across frames...

    dj Bass, Jul 16, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    131
    Vidar Petursson
    Jul 16, 2003
  5. dot net

    Transfer DataGrid across frames

    dot net, Jul 6, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    131
    Eliyahu Goldin
    Jul 7, 2004
Loading...

Share This Page