Print Page | Close Window

Data validation not working

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=21193
Printed Date: 29 March 2026 at 10:24am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Data validation not working
Posted By: rainaldijt
Subject: Data validation not working
Date 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.




Replies:
Posted By: WebWiz-Bruce
Date 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.

-------------
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: rainaldijt
Date 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>
                   
                   


Posted By: WebWiz-Bruce
Date 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.


-------------
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



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