Let me see if I can explain this.
OBJECTIVE: I need to write a large about of HTML formatted text to a file stored on a web server. I am using VBS FileObject to do this with no problem. The data being written to the file is entered via a standard form. However....
PROBLEM 1: Posting this data to the next page where it is processed and written to the file can sometimes cause a problem becuase the amount of data being passed via POST or GET is too much for teh URL storage space. The data length WILL be large. How much data (characters) can the URL header hold froma post/get?
IDEA: Instead of posting the data, when someone hits teh submit button, immedaitely write the data to the file (from the same page) WITHOUT the need of posting it and redirect to confirmation page after completion.
SOLUTION: Use JS onClick or onSubmit to fire off a JS procedure since EVENTS cannot be handled by VBS. JS procedure (and here the fun starts) calls a VBS procedue (eek) like so:
<language = "javascript">
function WriteHTML(){
document.write('<% Call WriteHTML_VBS(DATA) %>');
}
</script>
PROBLEM 2: Since all VBS code is interpretted and executed line by line in 1 pass (ok, legally written VBS pages with subs/functions are ok), when it reaches the JS procedure it immedately runs the VBS code thus running the VBS procedure completely ignoring the rest of code on teh page without allowing the user to press the submit button on the form.
So, anybody out there know a soluton to PROBLEM 1 or PROBLEM 2???
- Jay. Jace Hayman
jason.hayman@virgin.net
OBJECTIVE: I need to write a large about of HTML formatted text to a file stored on a web server. I am using VBS FileObject to do this with no problem. The data being written to the file is entered via a standard form. However....
PROBLEM 1: Posting this data to the next page where it is processed and written to the file can sometimes cause a problem becuase the amount of data being passed via POST or GET is too much for teh URL storage space. The data length WILL be large. How much data (characters) can the URL header hold froma post/get?
IDEA: Instead of posting the data, when someone hits teh submit button, immedaitely write the data to the file (from the same page) WITHOUT the need of posting it and redirect to confirmation page after completion.
SOLUTION: Use JS onClick or onSubmit to fire off a JS procedure since EVENTS cannot be handled by VBS. JS procedure (and here the fun starts) calls a VBS procedue (eek) like so:
<language = "javascript">
function WriteHTML(){
document.write('<% Call WriteHTML_VBS(DATA) %>');
}
</script>
PROBLEM 2: Since all VBS code is interpretted and executed line by line in 1 pass (ok, legally written VBS pages with subs/functions are ok), when it reaches the JS procedure it immedately runs the VBS code thus running the VBS procedure completely ignoring the rest of code on teh page without allowing the user to press the submit button on the form.
So, anybody out there know a soluton to PROBLEM 1 or PROBLEM 2???
- Jay. Jace Hayman
jason.hayman@virgin.net