View Full Version : Alert tex on web form

01-23-2007, 04:35 PM
Hi this is my first post, I am a total beginner at web design and come from a purely networking background. I have been assigned the task of creating an email form to send data submitted to the user to one of my inboxes. That wasnt too bad and i managed to get that working in a few hours but now i am adding the final touches to it i have came to a stand still. I would like to be able to use CSS to make red text appear next to an input box if the user hasnt entered data into this box and i dont know where to start? can anybody on here offer any tips or advice?

01-23-2007, 08:19 PM
Search: form validation

It highly depends on what you're using to handle your stuff. For example, if using .net, you'd use a Validator. If using PHP, you usually just check each field with regular expressions. If it's an internal application you are often safe with just client-side javascript, but if this is external, javascript is too easily disabled to be relied upon as the sole validation method.

It has little to do with HTML and belongs in the forum of the language you're using to develop your app.
If you're just using pure html with mailto as the form action, there's all sorts of things wrong with that. ;)

01-23-2007, 10:55 PM
As mentioned, you can do this on the client side via JavaScript. I ended up doing what you requested for practice but it came out as something that doesn’t work in Internet Explorer. The styling is a bit messed up in Firefox as well though, since I used something from CSS2.1 that that browser doesn’t support. So, in the end it only displays properly in Opera 9. If you’re interested in trying to learn something from it anyway, it can be found here (http://jsg.byethost4.com/demos/CF%20105765.xhtml).