473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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
4 2887

"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
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

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Arnaldo Martinez | last post by:
Hi, friends: I have an ASP page where an user enter a value and click the submit button. I want this value to be transfer to a session("temp") within the same page where I want to call it back...
6
by: charlie_M | last post by:
I figured out via various help from this forum... EXAMPLE: onClick="document.forms.MYBUTTON.value='SIMPLE';document.forms.submit()" In my CGI I see "MYBUTTON" = "SIMPLE" and this works...
5
by: JollyK | last post by:
Hello all, I have always been having this issue and wondering what the solution is. When I set the enableviewstate property to false for a textbox, the textbox always retains its value after a...
9
by: Denise | last post by:
I have posted a similar message in 2 other forums but got no response. I have spent more hours than I can count researching this. Can anyone provide some insight...? Our ASP.Net application...
2
by: IkBenHet | last post by:
Hello, I am uploading a file using this form in ASP.NET. I have also added a simpel textfield: <form runat="server" enctype="multipart/form-data"> <input type="file" id="oFile" Name="oFile"...
1
by: Chris Lieb | last post by:
In a form, I have two select lists. One holds the available options. I have some buttons between them for moving items from one list to the other. When the form first loads, all of the items are...
1
by: Badass Scotsman | last post by:
Hello, I have an application which should never allow the back button to be pushed without refreshing the previous page. For example: Step 1: User fills in form.html and presses submit ...
11
by: bill | last post by:
I dynamically create buttons and associate them with an event using AddHandler. I want all the button events to fire at one time, when the page is posted, instead of when each button is clicked....
1
by: gnawz | last post by:
Hi guys, I have a couple of php files that perform various tasks. I will use fields in my system and provide code as well I need help as follows: My database contains the fields Category...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.