Re: Struts, AJAX, JSP, and JavaScript question

2006-12-04 Thread Adam Gordon
Martin- I could, but it's really nasty. I've pasted the function where I use execScripts() below. See my response to Frank prior to this response. Basically the JSP page we're requesting via the AJAX call is dynamically building an HTML table with options retrieved from the database and pr

Re: Struts, AJAX, JSP, and JavaScript question

2006-12-04 Thread Adam Gordon
Frank- Yikes, I had no idea this thread would take on a life of its own...regardless, the execScripts function was exactly what I was looking forhad to tweak it to accomodate for the "type='text/javascript'" attribute on an opening

RE: Struts, AJAX, JSP, and JavaScript question

2006-12-01 Thread Levan Dvalishvili
t those two errors below. Levan Dvalishvili Support Lead  US Verticali,Inc (646) 736 - 6075 -Original Message- From: Chris Pratt [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 9:08 PM To: Struts Users Mailing List Subject: Re: Struts, AJAX, JSP, and JavaScript question (

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-30 Thread Martin Gainty
Hi Adam- Could you post your JSP? in particular could we see XMLHttpRequest.OnReadyStateChange AND the javascript function which is the receptor for the Asynchronous call Thanks, M This e-mail communication and any attachments may contain confidential and privileged information for the use of t

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-30 Thread Dave Newton
From: Chris Pratt [mailto:[EMAIL PROTECTED] > eval() evaluates JavaScript, not XML or HTML. Well, in FF, apparently it evaluates XML to some degree, huh? Dave > On 11/29/06, Dave Newton <[EMAIL PROTECTED]> wrote: > > From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > > > (interestingly, in IE I

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Chris Pratt
eval() evaluates JavaScript, not XML or HTML. (*Chris*) On 11/29/06, Dave Newton <[EMAIL PROTECTED]> wrote: From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > (interestingly, in IE I get a syntax error, because it's trying to > interpret the markup as script, but in FF it just quietly doesn't

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Frank W. Zammetti
Yeah, can't say I knew it either :) One would assume then that what you ge back from eval()'ing valid XML is a Document object that you can then use DOM methods on, just as you do in IE if you get responseXML from XMLHttpRequest (assuming it was in fact an XML response)... that'd be pretty close t

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Frank W. Zammetti
s > - Original Message - > From: "Frank W. Zammetti" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Wednesday, November 29, 2006 12:49 AM > Subject: Re: Struts, AJAX, JSP, and JavaScript question > > >> That will only work i

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Dave Newton
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > I guess maybe it examines the contents your eval'ing > and differentiates between pure markup and script? Interesting! It must be; I didn't know it would do that. My first thought (here, by "thought" I mean "hope") was that FF had made XML into

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Frank W. Zammetti
Yeah, those messages make sense I think... I guess FF realizes that your trying to eval something that's purely markup and tries to parse it as XML... incorrect nesting of the tags in the first case makes sense for that message, as no closing tag makes sense for the second, if it were trying to par

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Musachy Barroso
You will save a lot of time if you use something that is done already, and tested, like the links provided by Frank. If you still want to try it yourself you can check "Bind.js" : http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/static/dojo/struts/wid

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Dave Newton
From: Dave Newton [mailto:[EMAIL PROTECTED] > From: Chris Loschen [mailto:[EMAIL PROTECTED] > > Perhaps I'm missing something > > Yes; that eval evaluates *javascript*. ...generally. In FireBug if you eval("baz") in the console it will print a bold "baz". Dave

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Dave Newton
From: Chris Loschen [mailto:[EMAIL PROTECTED] > Perhaps I'm missing something Yes; that eval evaluates *javascript*. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Chris Loschen
sure if that makes sense -- still waking up this morning. Hope it helps. Chris -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 29, 2006 7:49 AM To: Struts Users Mailing List Subject: RE: Struts, AJAX, JSP, and JavaScript question From: Frank W. Zammetti

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Martin Gainty
or copying of it or its contents - Original Message - From: "Frank W. Zammetti" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Wednesday, November 29, 2006 12:49 AM Subject: Re: Struts, AJAX, JSP, and JavaScript question > That will only work if

RE: Struts, AJAX, JSP, and JavaScript question

2006-11-29 Thread Dave Newton
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] > (interestingly, in IE I get a syntax error, because it's trying to > interpret the markup as script, but in FF it just quietly doesn't > work, not even a notice in Firebug). Something else interesting in FF: eval("") "XML tag name mismatch"

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-28 Thread Frank W. Zammetti
That will only work if the response is nothing but JavaScript, in which case your 100% correct (although many people say that eval() should be renamed evil() and should be avoided like the plague... I'm not *quite* that extreme in my avoidance of it). As a quick proof: var

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-28 Thread Chris Pratt
Or you could just call eval(ajax.responseText). (*Chris*) On 11/28/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: Hi Adam, If your doing straight AJAX yourself, i.e., directly interacting with the XMLHttpRequest object, this won't execute script for you automatically. In fact, it won't do m

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-28 Thread Frank W. Zammetti
Hi Adam, If your doing straight AJAX yourself, i.e., directly interacting with the XMLHttpRequest object, this won't execute script for you automatically. In fact, it won't do much of anything for you automatially, aside from parsing XML if that's your return type. Otherwise, it's just text to t

Re: Struts, AJAX, JSP, and JavaScript question

2006-11-28 Thread Musachy Barroso
In struts 2 we already do that for you(link tag and button tag in the ajax theme), this is the code to extract the javascript sections(from Dojo): parse : function(s) { this.log("Parsing: " + s); var match = []; var tmp = []; var scripts = []; while(match){ match = s.match(/]