Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Data validation not working
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedData validation not working

 Post Reply Post Reply
Author
rainaldijt View Drop Down
Newbie
Newbie


Joined: 01 September 2006
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote rainaldijt Quote  Post ReplyReply Direct Link To This Post Topic: Data validation not working
    Posted: 01 September 2006 at 9:10pm
When I load the RTE (<!--#include file="RTE_editor_inc.asp" -->)

I can no longer read in any values that I pass to the onSubmit Javascript function.  When that piece of code above is commented out the values are read in.  But when the above code is added the form values are not passed in.

Please help.

Thank you.

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: 02 September 2006 at 9:10am
Try placing your onSubmit event handler in a different location, eg, if on the form tag move to the submit button of vise versa.
Back to Top
rainaldijt View Drop Down
Newbie
Newbie


Joined: 01 September 2006
Location: United States
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote rainaldijt Quote  Post ReplyReply Direct Link To This Post Posted: 05 September 2006 at 2:03pm
I moved the onSubmit to the submit button tag and it still does not work.

            <form method="post" action="../eventResults.asp" name="eventForm">       
             <fieldset class="createEvents">
                 <legend>Create Event</legend>
                <p class="required">* Required Fields</p>

                    <p>
                        <label for="fName"><em class="required">*&nbsp;&nbsp;</em>First Name:</label>
                        <!-- <span class="feedback">Please enter your first name.</span> -->
                        <input name="fName" id="fName" type="text" />
                    </p>
                    <p>
                        <label for="lName"><em class="required">*&nbsp;&nbsp;</em>Last Name:</label>
                        <!-- <span class="feedback">Please enter your last name.</span> -->
                        <input name="lName" id="lName" type="text" />
                    </p>
               
                    <p>
                        <label for="email"><em class="required">*&nbsp;&nbsp;</em>E-mail:</label>
                        <!-- <span class="feedback">Please enter an email address.</span> -->
                        <input name="email" id="email" type="text" />
                    </p>
                    <p>
                        <label for="dept"><em class="required">*&nbsp;&nbsp;</em>Department: </label>
                        <!-- <span class="feedback">Please select a department.</span> -->
                        <select name="dept" id="dept">
                            <option value="default" selected="selected">-- Select --</option>
                            <option value="District">District</option>
                            <option value="Building Operations and Maintenance">Maintenance</option>
                            <option value="Elementary Education">Elementary Education</option>
                            <option value="Secondary Education">Secondary Education</option>
                            <option value="Special Education">Special Education</option>
                            <option value="Enrollment">Enrollment</option>
                            <option value="Finance and Purchasing">Finance / Purchasing</option>
                            <option value="Food Service">Food Service</option>
                            <option value="Human Resources">Human Resources</option>
                            <option value="Insurance">Insurance</option>
                            <option value="Print Shop">Print Shop</option>
                            <option value="Technology">Technology</option>
                            <option value="Transportation">Transportation</option>
                        </select>
                    </p>

                    <p>
                        <label for="headline"><em class="required">*&nbsp;&nbsp;</em>Event Headline:</label>
                        <!-- <span class="feedback">Please enter an event headline.</span> -->
                        <input name="headline" id="headline" type="text" />&nbsp;65 Character Limit
                    </p>
                   
                   
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: 06 September 2006 at 1:51pm
In the file RTE_javascript.asp there is some code around line 165 which is meant to capture any onSubmit event you already have and run it after the RTE's own onSubmit event to re-populate your original textarea with the RTE input.

This is the code that does this:-


//get textrea value from RTE and run any original onSubmit events
    textArea.form.onsubmit = function(){
        textArea.value = editor.body.innerHTML;
        for (i in this.originalOnSubmit){
            return this.originalOnSubmit[i]();
        }
    }


After the line:-

textArea.value = editor.body.innerHTML;

Try adding in a call to your own onSubmit event and see if that solves the problem.
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.