How To Retrieve The Component Presentations Using DWT In Page Template Templating?

Can I use JavaScript on a .cgi page if the page's template is .html?

  • I've googled this forever and can't come up with it. The JS code I'm using is to remember form fields for a user in case their page reloads due to an error/omission during submission -- I don't want them to lose their answers. The page I'm using it ON ends in .cgi ... however it's based upon a .html template. (I'm not thinking that latter bit matters, unfortunately, because I can't access the .html page directly. Even more unfortunate.) So ... can I use a JavaScript on a .cgi page? I'm guessing that's why the script isn't remembering form inputs. And if I can't do it ... why not (technologically speaking)?

  • Answer:

    Yes you can. You can use any client side processing on a .cgi file. The .cgi is just there to allow server side processing of the cgi commands. The file is being openned by a web browser which should processes all the Javascript/vbscript and html that you send. If you have a problem then it is likely to be for another reason. It could well be that you have not thought out the processing correctly. When you click on the submit button your form data will be sent to the server for processing. If it is here that you have your validation then you need to return a completed form to the client with the correct highlighting. Validation on the client side may be a better way to proceed. I hope this helps.

Private T at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.