For Programmers: Free Programming Magazines  


Home > Archive > ASP > July 2006 > Javascript Runat = Server









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Javascript Runat = Server
wildthing4ever

2006-07-15, 5:15 am

Hi,

I wanted to validate a form before submission, so I added client-side js. At the server, I used ASP to store the data into a DB. This was working great, until I realized that if somebody disabled js, they could store gibberish (or worse) into the DB. I could, of course re-validate ALL the data (it's a big form) at the server, but isn't there a better way?

I was wondering if I could just add the runat=server tag to my js, but the problem is, then it will not execute with the page's onchange, onclick, etc., events, right?

What is the best solution?

Thanks a lot in advance.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com