Jump to content

Recommended Posts

I am working on the same contact me script for my website. I now want my script to do 2 things. I am pretty sure they can be done, and if you know how, please make it very simple.

The first one, I will try by myself but I'd say it will be something like using some varibles and the if and then statements.
What it is, To prevent spam, I want to make it so, if the " Name " and " Comments " section are not filled in, It will display a small pop saying that the following was not filled in.


The second, (I forgot my actually second idea ! [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]) But I want to make it display beside the textbox is a thing in green letters saying how many Charcters you have left.

Thanks
Link to comment
https://forums.phpfreaks.com/topic/11702-text-box-and-make-it-display-an-error/
Share on other sites

I dont know if it should be in here, but... Whatever helps I guess. I was thinkin the countdown part code be done in PHP.

Like make it so, It was take the part out of the code ... maxchar="20" or whatever, then subtract that from the amount you have typed in, which will display the number of letters left, once it reachs 20, it should display 0, and wont allow anymore typing

I think you should understand what I'm saying, but if you dont, Thats ok.
Both of these can be done with javascript. Have a look over at [a href=\"http://dynamicdrive.com/\" target=\"_blank\"]dynamicdrive.com[/a] for some scripts.

Heres a [a href=\"http://dynamicdrive.com/dynamicindex16/requiredcheck.htm\" target=\"_blank\"]form validator[/a] and a [a href=\"http://dynamicdrive.com/dynamicindex16/maxlength.htm\" target=\"_blank\"]Maxlength script[/a] and [a href=\"http://dynamicdrive.com/dynamicindex16/limitinput.htm\" target=\"_blank\"]here is another[/a] - includes countdown
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.