Print Page | Close Window

Help with java form validator

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=15086
Printed Date: 28 March 2026 at 7:54am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Help with java form validator
Posted By: Ze_KarEl
Subject: Help with java form validator
Date Posted: 14 May 2005 at 3:46pm
Hi,
love your RTE Wink
But have a problem.
Made a form with an form-field checker and after I added your RTE it doesnt work anymore. What can I do to make it work?
 
The form checker looks like this:
 
<body onLoad="initialiseWebWizRTE();">
<script Language="JavaScript">
<!--
function frm_Validator(theForm)
{
  if (theForm.naam.value == "")
  {
    alert("Name");
    theForm.naam.focus();
    return (false);
  }
  if (theForm.titel.value == "")
  {
    alert("Title");
    theForm.titel.focus();
    return (false);
  }

   if (theForm.inhoud.value == "")
  {
    alert("Inhoud");
    theForm.inhoud.focus();
    return (false);
  }
  if (theForm.menu.value == "1")
  {
      if (theForm.menuvolgorde.value == "")
    {
      alert("Menu order");
      theForm.menuvolgorde.focus();
      return (false);
    }
      if (theForm.menutitel.value == "")
     {
      alert("Menu title");
      theForm.menutitel.focus();
      return (false);
  }
}
  return (true);
}
//--></script>
 
and the form:
<form method="POST" action="add.asp" onsubmit="return frm_Validator(this)" name"frm">
 
etc...
 
Best wishes,
Karel



Replies:
Posted By: WebWiz-Bruce
Date Posted: 15 May 2005 at 5:20am
In the file RTE_javascript.asp at lines 169 - 172 you should see:-

for (i in this.originalOnSubmit){
            return this.originalOnSubmit();
        }

Try replacing that with a call to your onsubmit javascript code


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Ze_KarEl
Date Posted: 15 May 2005 at 11:31am
Thanks!
That did the job Smile


Posted By: LuckyLuke
Date Posted: 08 July 2005 at 3:13pm
Hi ZeKarEl
 
Is it possible to see your solution as I'me setting with the same problem. I can't figure out what to change.
 
Thanks in advance!
 
LuckyLuke



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net