This XMLHttpRequest stuff looks interesting from what I've read on it so far. I think 
this is the solution I will try out.

Thanks again.
Karl

-----Original Message-----
From: Ross, Douglas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 11, 2004 2:16 PM
To: Tag Libraries Users List
Subject: RE: When are tags executed?


You could also use the XMLHttpRequest or the DOMDocument object to load
xml requests without refreshing the page. We use these for loading
trees.

-----Original Message-----
From: Helios Alonso [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 11, 2004 2:13 PM
To: Tag Libraries Users List
Subject: Re: When are tags executed?

Weird idea (but it tries to Keep It Simple):

replace the Java Applet with a HTTP request, it is:

when your Javascript wants to validate something, create a window
(small, 
invisible, 0 pixel frame, or something) with a URL requesting validation
like:

www.server.com/validating/data?value1=xxx&value2=xxx&value3=xxx

(or simple with all the form data, something like submiting the form to 
another page:

form1.action = "validator";
form1.target = "validationWindow";
form1.submit();

// don't take this code very seriously, I don't know if I can change the

"action" of a form but it would be a good try
)

Well, you have to program a servlet that validates the params and writes
a 
result.

The JavaScript can validate the result evaluating 
validationWindow.document.body.

It's a pretty good change but it has two advantages:

1) eliminates the need for applet execution in the client side
2) only make changes from validation javascript code, not the rest of
the 
page and the system

Tell me how does it sounds to you...

At 10:41 11/08/2004 -0400, you wrote:
>Can someone explain when tags are executed? Namely, custom tags and the

><sql> tag.
>
>The problem is we currently have a web app that has a jsp's JavaScript 
>communicating with an applet that can query a database. It allows us to
do 
>real-time validation against database values. We know it is bad design.

>It's an older system and already have vowed not to use it in future 
>projects. However, testing with XP service pack 2 is freezing the
applet. 
>So we are trying to come up with some alternatives without having to 
>redesign and rewrite portions of existing apps. Someone came up with
the 
>idea of using the <sql> tag, but I thought that ran on the server
before 
>the response was sent to the browser, thus it wouldn't work for
real-time 
>validation. Would a custom tag work? Or are those run on the server as
well?
>
>Thanks,
>Karl
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to