|
Post by cddude229 on Feb 25, 2006 16:10:59 GMT -5
<script type="text/Javascript"> // Check Form before Submission by CD
if(document.forms[0] && document.forms[0].shout){ document.forms[0].onsubmit = function(){ error = ""; if(document.forms[0].shout.value.length == 0) error += "You must insert a message.\n\n"; if(document.forms[0].name.value.length == 0) error += "You must insert a name.\n\n";
if(error == "") return true; alert("The following errors were found with your submission:\n\n"+error+"Please fix them and then resubmit."); return false; } } </script>
Footers.
|
|
|
Post by Admin on Feb 25, 2006 16:12:57 GMT -5
Another good code. There is an error that removes the shoutbox and part of the admin area.
|
|
|
Post by cddude229 on Feb 25, 2006 16:16:45 GMT -5
Browser and what page of the admin area?
|
|
|
Post by Admin on Feb 25, 2006 16:17:06 GMT -5
Settings page and FireFox.
|
|
|
Post by cddude229 on Feb 25, 2006 16:20:28 GMT -5
Code doesn't even load on the settings page besides in the headers/footers portion.
And that's because you didn't escape it. =/ You need to replace < with < and > with > and then quotes. Actually, just use htmlspecialchars() on it.
|
|
|
Post by Admin on Feb 25, 2006 16:22:45 GMT -5
So, I need to add htmlspecialchars() to my php?
|
|
|
Post by cddude229 on Feb 25, 2006 16:24:27 GMT -5
|
|
|
Post by Admin on Feb 25, 2006 16:35:51 GMT -5
I added it to my $settings_header and $settings_footer but HTML still appears on the main page, and it still deletes the shoutbox. At least it doesn't ruin the admin panel. I can probably take it from here.
|
|
|
Post by ebuywow on Jun 28, 2008 23:19:32 GMT -5
|
|
|
Post by ebuywow on Jun 28, 2008 23:22:55 GMT -5
|
|
|
Post by ebuywow on Jun 28, 2008 23:25:23 GMT -5
|
|