SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    can i call other elements from another document?

    hi

    i have a form 1 which includes form 2 by a div tag which is triggered by ajax, form 2 has some div elements and i want it to be called by form 1,i tried using document.getElementById(BUTTON.value = 'TEST'); which i put in form 1 but the BUTTON element is in form 2,is it possible?

  2. #2
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes it is possible, what application?

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm just testing it if its possible because when i try to make it, it show an error that "Member Not Found" or it shows that "document is not a function".. i tried using something like this:

    This is page 1:
    <input type="button" id="TEST" value="CLICK ME" onclick="document.getElementById('BUTTON').value = 'TEST VALUE';">

    This is in page 2:
    <input type="button" id="BUTTON" value="NO VALUE">

    the main page is 1 and it calls page 2 within page 1 when it is triggered by an ajax, do you an example about this?

  4. #4
    SitePoint Addict ArunB's Avatar
    Join Date
    Jun 2008
    Location
    Hyderabad
    Posts
    252
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are they in two different frames?

    If they are in different documents, you cannot use document.getElementByID. document refers to current document.

    Post your code if possible.


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
  •