Butt This is embarassing!

Results 1 to 6 of 6

Thread: Butt This is embarassing!

  1. #1
    Shamless and Nameless Guest

    Default Butt This is embarassing!

    My boss, not me, wants me, not him, to have a form that puts data in a temp table.<BR><BR>Which would be okay, except twice the form MUST go to two other areas of the site to retrieve some data to populate the form.<BR><BR>Can I leave the page and have any data already on the page inserted into a temp table? Without clicking a submit button?<BR><BR>I was experimenting with tricking the page into treating the buttons which I use to leave the page (to get the data from other areas of the site), to treat those as submit buttons. But so far no success.<BR><BR>The problem is I have already created the entire ASP site, using 3-4 ids to control all input into tables.<BR><BR>So I was submitting the form seciton by section. He wants it all at once -- which would be okay if I didn&#039t have to leave the form twice, etc.

  2. #2
    ASB Guest

    Default RE: Butt This is embarassing!

    I am not sure I understand your question, but you _can_ trick your buttons to treat them as submit buttons like so:<BR><BR>&#060;HTML&#062;<BR>&#060;BODY&#062;<BR >&#060;%<BR>&#039 if the form has been submited then<BR>if Request.Form&#060;&#062;"" then<BR> &#039do your submit work here<BR> if Request.Form("mySubmit")="submit s1" then <BR> Response.Write("s1") &#039redirect here<BR> end if<BR> <BR> if Request.Form("mySubmit")="submit s2" then <BR> Response.Write("s2") &#039redirect here<BR> end if<BR><BR>end if<BR>%&#062;<BR><BR>&#060;form method=post id=form1 name=form1&#062;<BR>&#060;input type=submit name=&#039mySubmit&#039 value="submit s1"&#062;<BR><BR>&#060;input type=submit name=&#039mySubmit&#039 value="submit s2"&#062;<BR>&#060;/form&#062;<BR><BR><BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR><BR>As you can see the name value type can be used to check to see which button was clicked.<BR>enjoy.<BR>Angel Saenz-Badillos<BR><BR>

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA

    Default you can butt....

    well not if it is a #temp table how about a concept like permanent temp tables create the table and then drop it...i really have little knowledge about it but this is something to think about.<BR><BR>As soon as you leave the page the #temp table will get dropped so i cant think about a way UNLESS you have the connection object in a session variable - maybe only for those 3 pages - then the connection MAY not get terminated so the #temp table SHOULD not get dropped

  4. #4
    Join Date
    Dec 1969

    Default is that a donkey's derriere?

    How about using a hidden frame?<BR><BR>When you get to the point in filling out the form where you need to go to another page on the site, send the *HIDDEN* frame to that page and then grab the info from what is posted in that hidden frame? <BR><BR>Or popup another window, if those other pages are interactive ones. And then feed the info from the popup window back into the main window and the form.<BR><BR>It&#039s really easy to make *any* form control do a submit, but I don&#039t see how that helps. It&#039s not like you can "call" one of those other pages and come back to where you left off on the current page. <BR><BR>Maybe you need to describe this thing better. What do those "two other areas of the site" do/look like/consist of/require from you/require from the user/[fill in the blanks] ??? HOW will you (can you?) get the info from those areas into the "current" form page?<BR><BR>

  5. #5
    Join Date
    Dec 1969

    Default RE: is that a donkey's derriere?

    I am going to go out on a limb here and assume that in order to populate the form with other info from the database that maybe you first select some criteria from a dropdown list<BR><BR>then click the submit button and it goes to another page runs a query and populates an identical form with the new information.<BR><BR>If I am on the wrong track stop me here :~)<BR><BR>if that is the case then couldn&#039t you do something like <BR><BR>this would be the second page<BR><BR>and we will assume that you have run the select query to populate the form<BR><BR>&#060;form action="somepage" method="post"&#062;<BR>&#039 Get the current form information<BR>&#060;input type="text" name="somename" value="&#060;%=request.form("somefield")%&#062;"&# 062;<BR>&#039 Get the new form information<BR>&#060;input type="text" name="somename" value="&#060;%=RS("SomeTablefield")%&#062;"&#062;< BR><BR>etc......<BR><BR>Like I said I am assuming alot<BR><BR>regards<BR><BR>Steve Miller

  6. #6
    Total Butthead! Guest

    Default Now I'm blushing! Thanks to all!

    Thanks. I have been applying your comments to this probem and, I have light at the end of the tunnel!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts