CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Text field allows only Alphabet and Numbers - any help ?

Print topic Send  topic

Author Message
solesz

Posts: 137
Posted: 08/30/2016, 1:49 AM

Hi,

[CCS4.3]

Symptome:
There is a Record Form, where all text fields accept only letters and numbers (even no space).
It is not intended to be so, so it is an error.

Enviroment:
Created a page, with 2 Record Forms, and a few Grids.
The Record Form 1 has date fields, and the date fields onload event is used for execute Validate Entry action to create input mask.
This binding is placed in the HTML HEAD section using the addEventHandler function. (This function is located in the Function.js common file) It is native CCS functionality so far.

However in some case Record Form 2 is need to be used but then Record Form 1 is switched to invisible, using the Before Show event. This visible property cause not rendering the hidden part into the HTML source located in the BODY part, BUT not in the HEAD so there are still the addEventHandler Javascript which is related to the hidden Record Form 1.

On page loading it tries to bind an event to a not existing element ID (remeber, that element is not rendered into HTML BODY).

And then mess starting up.

The addEventHandler javascript function is located in Function.js.
It somehow handling the non-existing element binding, but at the end of the funciton code there is a code line:
if (event == "load" && loadCalled == false) { handler.apply(window, [window]); }

- the event which we try to bind function to is an onLoad event, so this part of the condition is true.
- loadCalled is a triggered variable, which is set to False starting the function, and set to True only if valid element found. So finally this part of the condition is true

So this line binds the event to the "window" itself, so the whole window now behave as only a date text input should have.

1. this is definitely a bug, so I will report it to support
2. why that referenced code line is there, what can happen if I comment it out
3. any idea or recommendation on the above case?

Thanks for the effort of reading the long text above - if you reach this line :)

solesz
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.