By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,382 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,382 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a

"Jacob" <ya*****@comcast.net> wrote in message
news:H6********************@comcast.com...
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.
Jul 20 '05 #2

P: n/a
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" <sp*******@aspyre.net> wrote in message
news:be************@ID-159842.news.dfncis.de...

"Jacob" <ya*****@comcast.net> wrote in message
news:H6********************@comcast.com...
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.

Jul 20 '05 #3

P: n/a

"Jacob" <ya*****@comcast.net> wrote in message
news:n9********************@comcast.com...
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?


Jul 20 '05 #4

P: n/a
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" <sp*******@aspyre.net> wrote in message
news:be************@ID-159842.news.dfncis.de...

"Jacob" <ya*****@comcast.net> wrote in message
news:n9********************@comcast.com...
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?

Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.