473,322 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Seek suggestions on making a javascript generating web application

Background ...

I've created a web application that allows a user to create an
HTML application from IE.

The application itself creates an XML representation of a XHTML
form. The XHTML representation can be saved as a string and recreated.

(The application also has a crude workflow aspect - so XMHTML forms
can be created and assigned a workflow. Forget I said anything about
the workflow - this is a java/javascript/design question.)

Once the user has created an XHTML form he must create validating
javascript for the input fields he's created. You know, check that
dates are dates, that some fields are not empty, or numeric, or
valid system login-ids. Same thing with select/drop down boxes.

....

I have a proven library of javascript functions to use for validation.
For example, I have functions IsDate() and IsNull() which would
be used in a typical validation function :

function Validate(aForm) {
if (!IsDate(aForm.elements("start_date"),"Start Date") return false;
if (IsEmpty(aForm.elements("must_have_data"),"Enter Data") return false;
return true;
}

(And then something like this ..)

<form onsubmit="Validate(this);"/>

Note that IsEmpty(), for example puts the focus on the current element
and evokes an alert message about the element.

....
I want the user to make javascript validation contingent.
In other words, the end result might be :

function Validate(aForm) {
if (!IsDate(aForm.elements("start_date1"),"Start Date One") ) {
if (!IsDate(aForm.elements("end_date1","Start Date One") ) return false;
}
if (!IsDate(aForm.elements("start_date2"),"Start Date Two") ) {
if (!IsDate(aForm.elements("end_date2","Start Date Two") ) return false;
}
}
So I need to create a web application (using both JSP(ASP) and javascript)
allowing the user to select a form element, assign it a validation
function, and then to select addtional elements and assign to them
validation functions. As shown in Validate() above.

The thing is. I can't get a grip on how to build the user interface.
I can imagine two multi line select boxes where you click on one select
box, identify an element, and then you populate a multi
select box with names corresponding validation functions for that sort
of element.

But that doesn't take care of the contingency aspect.

Any ideas?
Jul 23 '05 #1
2 1411

"GIMME" <gi*******************@yahoo.com> wrote in message
news:3f**************************@posting.google.c om...
Background ...

I've created a web application that allows a user to create an
HTML application from IE.

The application itself creates an XML representation of a XHTML
form. The XHTML representation can be saved as a string and recreated.

(The application also has a crude workflow aspect - so XMHTML forms
can be created and assigned a workflow. Forget I said anything about
the workflow - this is a java/javascript/design question.)

Once the user has created an XHTML form he must create validating
javascript for the input fields he's created. You know, check that
dates are dates, that some fields are not empty, or numeric, or
valid system login-ids. Same thing with select/drop down boxes.

...

I have a proven library of javascript functions to use for validation.
For example, I have functions IsDate() and IsNull() which would
be used in a typical validation function :

function Validate(aForm) {
if (!IsDate(aForm.elements("start_date"),"Start Date") return false;
if (IsEmpty(aForm.elements("must_have_data"),"Enter Data") return false;
return true;
}

(And then something like this ..)

<form onsubmit="Validate(this);"/>

Note that IsEmpty(), for example puts the focus on the current element
and evokes an alert message about the element.

...
I want the user to make javascript validation contingent.
In other words, the end result might be :

function Validate(aForm) {
if (!IsDate(aForm.elements("start_date1"),"Start Date One") ) {
if (!IsDate(aForm.elements("end_date1","Start Date One") ) return false; }
if (!IsDate(aForm.elements("start_date2"),"Start Date Two") ) {
if (!IsDate(aForm.elements("end_date2","Start Date Two") ) return false; }
}
So I need to create a web application (using both JSP(ASP) and javascript)
allowing the user to select a form element, assign it a validation
function, and then to select addtional elements and assign to them
validation functions. As shown in Validate() above.

The thing is. I can't get a grip on how to build the user interface.
I can imagine two multi line select boxes where you click on one select
box, identify an element, and then you populate a multi
select box with names corresponding validation functions for that sort
of element.

But that doesn't take care of the contingency aspect.
Hmmm, I seem to be bottom posting...

Why is that hard? Just add a start and stop date to your form.You can have
your "validate type" rolldown turn the display style on/off for those
textfields.

Parsing the dates is a much harder problem, but you didn't ask about that.

I'd probably skip the linked select boxes and just list all the form
elements and possible validation routines for each. That way you can set all
of them at .

HTH,
Jeff


Any ideas?

Jul 23 '05 #2
Doing what you suggest is easy, but there is a dependency issue
that has to be built in that you are not getting., For example, you
might want to set things up so that some input is not null
only if a start date has been entered. And the start date might be optional.

I'd probably skip the linked select boxes and just list all the form
elements and possible validation routines for each. That way you can set all
of them at .

HTH,
Jeff


Any ideas?

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Prabhu Ramachandran | last post by:
Hi, I noticed peculiar behavior under Python-2.3.4 under Win32. When I run something like this: f = open('t.txt', 'wb') f.write('1\012'+'2\012'+'3\012') f.close() f = open('t.txt', 'r')...
4
by: Charlie Cosse | last post by:
Asymptopia Crossword Builder is a JavaScript application. A robust GUI allows users to submit arbitrary length lists of key-hint pairs which can be regenerated an unlimited number of times until...
13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
3
by: griffith | last post by:
I need some rather technical spidering advice, and I'm hoping that this is a good place to find it (and my apologies if this isn't). My site contains pages of images, where each image includes a...
1
by: jphelan | last post by:
I ran a MS Access Analyzer program that suggested changing, "rst.FindFirst strcriteria" to using the, "Seek" instead. I tried making the change. I get a Compile error that says, "Argument is not...
5
by: MLH | last post by:
I have a table I can open as table type recordset or a dynaset. Searching for a particular value in the table's main keyfield, which would be faster and less strain on the application......
193
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I...
33
by: Kevin Brammer | last post by:
I'm trying to use seek to check for the existence of a record before saving, so there are no duplicate entries (is there another way?). I have a "groups" table, which has GroupID Island...
59
by: Rico | last post by:
Hello, I have an application that I'm converting to Access 2003 and SQL Server 2005 Express. The application uses extensive use of DAO and the SEEK method on indexes. I'm having an issue when...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.