If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Pop-up when code is not filled in  XML
Forum Index » Advanced Guestbook Forum
Author Message
Niels
Student

Joined: 21/08/2005 17:06:50
Messages: 97
Offline

Hello,

When you want to post a message in the guestbook, you have to fill in the code (CAPTCHA).

If you don't, it says that one thing in the fields is wrong. Is it possible to make a pop-up that says "You forgot to fill in the code".

Just like when you forgot your name, it says: "You didn't fill in your name. Go back en change!".
[MSN]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

No as then you would have to put the code in the Javascript which would make it readable by spammers.

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
Carbonize
Master
[Avatar]

Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline

Sorry ignore that I misread your question.

Off the top of my head open form.php in templates and find

document.book.gb_comment.value=trim(document.book.gb_comment.value);
if(document.book.gb_name.value == "") {
alert("You forgot to fill in the Name field. Please correct it and re-submit.");
document.book.gb_name.focus();
return false;
}

Replace with

document.book.gb_captcha.value=trim(document.book.gb_captcha.value);
document.book.gb_comment.value=trim(document.book.gb_comment.value);
if(document.book.gb_name.value == "") {
alert("You forgot to fill in the Name field. Please correct it and re-submit.");
document.book.gb_name.focus();
return false;
}
if(document.book.gb_captcha.value == "") {
alert("You forgot to fill in the Name field. Please correct it and re-submit.");
document.book.gb_captcha.focus();
return false;
}

Carbonize
I am not the maker of the Advanced Guestbook

get Lazarus
[Email] [WWW] [Yahoo!] aim icon [MSN] [ICQ]
 
Forum Index » Advanced Guestbook Forum
Go to:   
Based on the open source JForum