Click to See Complete Forum and Search --> : After they hit the SUBMIT button


Will192
04-28-2003, 11:34 AM
I have an Javascript page that calls an ASP file to do all the backend processing. When the user hits the SUBMIT button, I want the current page locked or another page displayed so that the user cannot hit the SUBMIT button again.

My problem with the new form is that I have a lot of form variables and QueryString variables and will probably be adding more later. I don't want to have to pull all these variables into the new form, just to pass them again. Is there anyway that I can just copy the environment to the next form?

Or maybe is there anyway that I can just clear the screen or lock all the controls when the user hits the SUBMIT button?

Thanks in advance to any responses to this post

Will192

ChrisBrown
04-28-2003, 02:58 PM
Will,

You can use ASP and ASP.NET files to do more than process data - you can use them to display it as well.

What I mean is this - you can at the beginning of the ASP file simply post a basic HTMl page with a processsing message, then collect the information from the variables, then display a completion/success page after that.

Will192
04-28-2003, 04:15 PM
That is basically what I am doing. I was trying to simplify it. My problem is the processing page was not originally put in and now the backend processing has grown and there is a significant delay between screen refreshes.

What I need to do it put the processing page in with the least amount of work. I know that I can put a new page in and pull the variables and simulate the same environment, but I need to know if there is an easy way to do it.

ChrisBrown
04-28-2003, 04:34 PM
I've always just created the page in a layout program like Dreamweaver and then just copy and pasted the code - saves a lot of time.

You are always going to have an ever increasing lag time when the number of variables you are processing increases and your database query gets longer.

You could build a processing page that returns a "progress bar" if you wanted, or split up the database query into smaller chunks and put in several progress pages, but each of these options takes more time and the coding is more involved, so basically there is no real time saver.

david2105
04-29-2003, 08:35 AM
It is possible to disable the button when it has been clicked by using the code below. I think it's in DHTML:


var t=document.forms.myform
DisValue=3
t[DisValue].disabled=true


Change document.forms.myform should reflect the name of your form. To name a form do the following:

<form name="myform" method="POST" action="nextPage.asp">

DisValue should be the number that reflects that item on the form. For example if you had two text boxes, a check box then the button the first text box would be equal to 0 and the button would be equal to three

You need to put the code into a script or function and call it using the onclick event.

Hope this helps,
David2105