Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Help with java form validator
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedHelp with java form validator

 Post Reply Post Reply
Author
Ze_KarEl View Drop Down
Newbie
Newbie
Avatar

Joined: 14 May 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ze_KarEl Quote  Post ReplyReply Direct Link To This Post Topic: Help with java form validator
    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
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Ze_KarEl View Drop Down
Newbie
Newbie
Avatar

Joined: 14 May 2005
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ze_KarEl Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2005 at 11:31am
Thanks!
That did the job Smile
Back to Top
LuckyLuke View Drop Down
Newbie
Newbie


Joined: 08 July 2005
Location: Denmark
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote LuckyLuke Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.