Posting a value back to a form field without reloading the page

Discussion in 'HTML' started by Jacob, Jul 7, 2003.

  1. Jacob

    Jacob Guest

    I have a page Add_data.asp which accepts a number of user-entered variables
    and then inserts them into a database. I have another page, Loc_tree.asp
    which when accessed, returns a tree of locations which is dynamically
    generated by the server. The Loc_tree.asp creates a hyperlink for each
    object in the tree. I need to show the Location Tree in a separate window,
    and then when a location is clicked, I need to have some javascript code in
    the hyperlink which will post a particular value back to the form and insert
    it into the appropriate field. The field is a little ways down the form, so
    linking to the form from the Loc_tree.asp with some type of GET (i.e.
    add_data.asp?LocID=2) is not acceptible. There must be some way of loading
    a seperate window (I'm thinking IFRAME), allowing the user to select a value
    in it, then inserting the value into the appropriate field and rehiding the
    location tree.

    Any help would be greatly appreciated.

    Jacob
     
    Jacob, Jul 7, 2003
    #1
    1. Advertising

  2. Jacob

    spaghetti Guest

    "Jacob" <> wrote in message
    news:...
    > I have a page Add_data.asp which accepts a number of user-entered

    variables
    > and then inserts them into a database. I have another page, Loc_tree.asp
    > which when accessed, returns a tree of locations which is dynamically
    > generated by the server.


    Here's what I would do:

    Remake the tree so it's actually a list of checkboxes/radio buttons and put
    it inside the add_data.asp page. Put all the checkboxes in a standard list,
    and use the Expandable Menu technique from
    http://www.gazingus.org/html/menuExpandable.html to make it tree-like.

    This will make a nice expandable-tree menu that doesn't require iframes or
    Javascript, and does exactly what I think you're looking for.
     
    spaghetti, Jul 7, 2003
    #2
    1. Advertising

  3. Jacob

    Jacob Guest

    Unfortunately, the setup which you have suggested doesnt account for the
    fact that all my data is dynamic and in a random order in the table. Any
    other ideas?

    Jacob

    "spaghetti" <> wrote in message
    news:becgl7$3gunf$...
    >
    > "Jacob" <> wrote in message
    > news:...
    > > I have a page Add_data.asp which accepts a number of user-entered

    > variables
    > > and then inserts them into a database. I have another page,

    Loc_tree.asp
    > > which when accessed, returns a tree of locations which is dynamically
    > > generated by the server.

    >
    > Here's what I would do:
    >
    > Remake the tree so it's actually a list of checkboxes/radio buttons and

    put
    > it inside the add_data.asp page. Put all the checkboxes in a standard

    list,
    > and use the Expandable Menu technique from
    > http://www.gazingus.org/html/menuExpandable.html to make it tree-like.
    >
    > This will make a nice expandable-tree menu that doesn't require iframes or
    > Javascript, and does exactly what I think you're looking for.
    >
    >
     
    Jacob, Jul 7, 2003
    #3
  4. Jacob

    spaghetti Guest

    "Jacob" <> wrote in message
    news:...
    > Unfortunately, the setup which you have suggested doesnt account for the
    > fact that all my data is dynamic and in a random order in the table. Any
    > other ideas?


    Okay, do you mean the data for the tree is client-side dynamic (values are
    loaded with Javascript) or server-side dynamic (ASP generates all the code
    for the tree)? Or are you saying that the whole page is random, not just the
    tree?
     
    spaghetti, Jul 7, 2003
    #4
  5. Jacob

    Jacob Guest

    The data is server-side dynamic out of a table. The setup I have correctly
    processes the records even though they are in a random order coming out of
    the database. However, the method you described requires that the records
    be in a specific order, so the lists are built as the children of the wrong
    parent lists. I'm already using IFRAMEs elsewhere in the site to do
    something along the lines of what I want to do in this case, but I am having
    an immense amount of problems porting the code over to the new page. I know
    very little about JavaScript and the other code I'm using I was able to find
    prepackaged. I just have to make a few modifications.

    Thanks,
    Jacob



    "spaghetti" <> wrote in message
    news:becnt4$3o4a9$...
    >
    > "Jacob" <> wrote in message
    > news:...
    > > Unfortunately, the setup which you have suggested doesnt account for the
    > > fact that all my data is dynamic and in a random order in the table.

    Any
    > > other ideas?

    >
    > Okay, do you mean the data for the tree is client-side dynamic (values are
    > loaded with Javascript) or server-side dynamic (ASP generates all the code
    > for the tree)? Or are you saying that the whole page is random, not just

    the
    > tree?
    >
    >
    >
    >
     
    Jacob, Jul 7, 2003
    #5
    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. Daylor
    Replies:
    1
    Views:
    468
    Saravana
    Nov 22, 2004
  2. HP
    Replies:
    4
    Views:
    617
  3. Rick
    Replies:
    3
    Views:
    8,587
    Alexey Smirnov
    Apr 13, 2010
  4. GavMc
    Replies:
    4
    Views:
    378
    Evertjan.
    Sep 22, 2005
  5. Jacob
    Replies:
    4
    Views:
    116
    Jacob
    Jul 7, 2003
Loading...

Share This Page