Author |
Message |
09/11/2009 15:05:18
|
Andrea
Beginner
Joined: 02/11/2009 20:08:38
Messages: 7
Location: Germany, Munich
Offline
|
Hi all (and Carbonize),
Me again:
I have used the FAQ and the 'Search' and I could find, how to change the Email-Field into a required field. So far so good. It works almost fine.
But I couldn't find something about this: The Error page is opening up instead of a pop up (like the Name-error).
This I have added in form.php:
function checkForm() {
document.book.gb_email.value=trim(document.book.gb_email.value);
document.book.gb_comment.value=trim(document.book.gb_comment.value);
if(document.book.gb_email.value == "") {
alert("$LANG[ErrorPost12]");
document.book.gb_email.focus();
return false;
}
Could someone explain a Newbie in detail, what I should do?
Thank you so much for your help.
Andrea
|
|
09/11/2009 15:39:07
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
I assume you want to do a complete job? If so we will need to edit both the form.php javascript and the entry checking in add.class.php.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
09/11/2009 16:25:52
|
Andrea
Beginner
Joined: 02/11/2009 20:08:38
Messages: 7
Location: Germany, Munich
Offline
|
Thank you so much for your reply, Carbonize.
I know, I'm too pedantic, but it don't look great having different pages for the specific errors.
I have tried to change in add.class.php, but something goes wrong.
Could you explain me, where and what I need to edit?
Thanks a lot.
|
|
09/11/2009 16:29:49
|
Carbonize
Master
Joined: 12/06/2003 19:26:08
Messages: 4292
Location: Bristol, UK
Offline
|
Well for a start try this instead
function checkForm() {
document.book.gb_email.value=trim(document.book.gb_email.value);
document.book.gb_comment.value=trim(document.book.gb_comment.value)
document.book.gb_email.value=trim(document.book.gb_email.value);
if(document.book.gb_email.value == "") {
alert("You must provide your email address!");
document.book.gb_email.focus();
return false;
}
Try that and see if that works then hit me back to start on the add.class.php
Either that or try Lazarus.
|
Carbonize
I am not the maker of the Advanced Guestbook
get Lazarus |
|
10/11/2009 09:54:08
|
Andrea
Beginner
Joined: 02/11/2009 20:08:38
Messages: 7
Location: Germany, Munich
Offline
|
Thanks for your help.
I have tried, but it doesn't work. Ok, I am a Newbie and it's too complicate for me changing all these things.
Now I think about Lazarus.
|
|
|