Jump to content

Field required javascrip not working


Perry Mason

Recommended Posts

I don't know much about javascript. I've used three free source scripts for Field Required alert that I found on the web and neither of them works. I have other javascript on my pages (for submitting the url to digg/stumbleupon etc) and it works fine.

 

I figure the chance of all three scripts (obtained from different sources)  being broken is slim, so I guess the problem lies somewhere else. Are there any settings that I have to change server-side? Just need a push in the right direction, the rest I'll figure out myself.

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/195735-field-required-javascrip-not-working/
Share on other sites

Well, always do server side validation.  Always.

 

If your javascript validation isn't working (ie, it lets you submit with a blank field) then it's not php related. It's javascript related.

 

Check what conventions you need to have in place to use the script (IE, does it need ID tags in your input elements?)

 

Best idea is just learn jQuery, and use the validation plugin.  It rocks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.