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
Related Q & A:
- How can I make a page my home page?Best solution by Yahoo! Answers
- What can I use to clean a DVD?Best solution by Yahoo! Answers
- Can I use silverdine for a scar?Best solution by Yahoo! Answers
- How can I use recipient in a sentence?Best solution by sentence.yourdictionary.com
- Can you use ADSENSE on a livejournal PAGE?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
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.