javascript - Best way to post and get back html elements in classic asp for validation without session vars -


i working on pages require post asp validation script, repopulating data (that hasn't been saved db yet) respective elements on form.

i going use session vars since form set have dynamically generated elements think crash site depending on how many of these elements generated. of right now, posting script b script , redirecting script a.

i going grab request.form elements , put them session in script b, validate, redirect script a. in script loop through session vars request.form elements , slap respective elements. thoughts appreciated greatly.

i looking server.execute haven't used unfamiliar it. ahead of time.

to elaborate on comment earlier, jquery (albeit more meaningful code you) -

$("some button have on form").click(function() {    $.ajax({       url: "url of script perform validation?val1=something&val2=something&val3=something",       success: function(data) {         //here, returned 'data' validation script         //this highlighting incorrect data, or filling form fields         //new data of kind...       }    });  }); 

this simplest kind of setup want. more details on how ajax works in jquery, go here.

in classic asp code, need process data sent ajax function , return (via response.write(xxxx)) sent calling function , processed code under function(data), using 'data' variable access returned values.

your code might based on type of ajax request sent above:-

<% if request.querystring("val1") =     'do data end if  'etc  response.write(some kind of response can deal in calling function)  %> 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -