Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-20 Thread MyAshok
Hi all, Thanks for all your response. Finally i isolated the problem and found that the problem is with the ajax submit of the same div. (i.e) my form and the submit targets to the same div. This scenerio creates the problem that the values in the jsp is not populated to the action by

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-20 Thread Jeromy Evans
MyAshok wrote: Hi all, Thanks for all your response. Finally i isolated the problem and found that the problem is with the ajax submit of the same div. (i.e) my form and the submit targets to the same div. This scenerio creates the problem that the values in the jsp is not populated to the

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-20 Thread MyAshok
Hi Jeromy, We got it. Its working fine. Thank you very much for the quick reply. Can you tell me whats might be the problem with my IE. Regards, Ashok. Jeromy Evans - Blue Sky Minds wrote: MyAshok wrote: Hi all, Thanks for all your response. Finally i isolated the problem and

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-20 Thread Dave Newton
- On Wed, 8/20/08, MyAshok wrote: Can you tell me whats might be the problem with my IE. It's IE. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-20 Thread Jeromy Evans
Dave Newton wrote: - On Wed, 8/20/08, MyAshok wrote: Can you tell me whats might be the problem with my IE. It's IE. Dave He he he. I don't know for certain, but I think it's due to IE's non-standard event-handling (event ordering) and Dojo's/widget's failure to accommodate

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-20 Thread Musachy Barroso
Indeed, can't wait for 2.1 to come out, at least this setting will be set to false by default. On Wed, Aug 20, 2008 at 8:07 PM, Jeromy Evans [EMAIL PROTECTED] wrote: Dave Newton wrote: - On Wed, 8/20/08, MyAshok wrote: Can you tell me whats might be the problem with my IE. It's IE.

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-18 Thread Jeromy Evans
MyAshok wrote: I do have the same issue. on click of submit, the loadingtext is displaying but the result in a new page as i am redirect to a action. Any solutions? please asap. action name=activateSubscriber class=subscriberAction method=activateSubscriber

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-18 Thread MyAshok
Thanks Evans, In IE, instead of loading text it shows [object error]. But it redirects to a new page. In Firefox, neither showing loading text nor object error. It redirects to a new page. s:submit theme=ajax value=Activate id=activate showLoadingText=false targets=targetid

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-18 Thread Dave Newton
I'd be immediately suspicious of your manual form submission; as a guess I'd say that bypasses the normal form submission process, making it a non-XHR request. Off-the-cuff guess, though. Dave --- On Mon, 8/18/08, MyAshok [EMAIL PROTECTED] wrote: From: MyAshok [EMAIL PROTECTED] Subject:

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-18 Thread Jeromy Evans
Dave Newton wrote: I'd be immediately suspicious of your manual form submission; as a guess I'd say that bypasses the normal form submission process, making it a non-XHR request. Off-the-cuff guess, though. Dave Absolutely positive that's it. This line:

RE: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-18 Thread Martin Gainty
you can send your action to javascript function and use dojo to talk to the XMLHttpRequest object parse the XML response and then set innerHtml of the div tag to the parsed_response script language=JavaScript !-- Begin function doit() { var xmlhttp=dojo.hostenv.getXmlhttpObject() var

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-18 Thread Jeromy Evans
Martin Gainty wrote: var xmlhttp=dojo.hostenv.getXmlhttpObject() var response= xmlhttp.responseXML; var parsed_response=SomeXMLParser(response); document.getElementByTagId(div).innerHtml = parsed_response; -- /script yes/no? Martin That would work, but dojo already includes code to

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-08-17 Thread MyAshok
I do have the same issue. on click of submit, the loadingtext is displaying but the result in a new page as i am redirect to a action. Any solutions? please asap. action name=activateSubscriber class=subscriberAction method=activateSubscriber

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-20 Thread xianwinwin
:-( I think I have an issue with the ajax configuration (I'm not sure). How can I verify that my theme=ajax is configured properly? thank you! Jeromy Evans - Blue Sky Minds wrote: No, it seems fine now. Turn on debugging: s:head theme=ajax debug=true/ Also use FireBug to see if

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-20 Thread bhaarat Sharma
you can try the following. change: div id=\'two\' style=\border: 1px solid yellow;\initial content/div to s:div id=\two\ theme=\ajax\ (close this tag after your /s:form tag, so that the whole form will be inside the div tag. ) also change: s:submit value=\GO2\ theme=\ajax\ targets=\theForm2\/ to

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-20 Thread xianwinwin
thank you for your reply. I made the changes - still no good. I took one step backwards and I suspect that my theme=ajax doesn't work properly. I tried to use a simple TABS and the result on the screen was text (the names of the tabs). Do you think that what causing the problem? How can I

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-20 Thread Jeromy Evans
Use the FireBug plugin for FF. Check that dojo is setup in the head of your page (view the html) and that all of the resources it requires are loaded (using the net tab). Ensure that struts filter is receiving requests for the /struts/* resources. xianwinwin wrote: :-( I think I have an

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-20 Thread xianwinwin
Check that dojo is setup in the head of your page (view the html) how do I do that? Thank you! Jeromy Evans - Blue Sky Minds wrote: Use the FireBug plugin for FF. Check that dojo is setup in the head of your page (view the html) and that all of the resources it requires are loaded

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-20 Thread Jeromy Evans
View the html source in the browser. The head should contain a script like this one from the struts2-showcase: script type=text/javascript // Dojo configuration djConfig = { baseRelativePath: /struts2-showcase/struts/dojo, isDebug: false, bindEncoding: UTF-8,

struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread xianwinwin
Hi all, I'm trying to return a result to DIV in a form (in the example id='two') this is my form: div id='two' style=border: 1px solid yellow;initial content/div s:form id='theForm2' cssStyle=border: 1px solid green; action='testing_AjaxRemoteForm' method='post'

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread Jeromy Evans
Your code looks valid, but have you included the s:head theme=ajax/ tag in your head section? It looks like the default event is executing (submit form for new page) rather than Dojo using ajax to post it. Also, as your target is theForm2, add showLoadingText=false to your submit button.

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread xianwinwin
thanks you for the reply. I added the code: s:head theme=ajax/ on top, plus s:submit value=GO2 showLoadingText=false theme=ajax targets=two / but I get the same result - it goes to an empty page with the result and not to the DIV? :-( any idea? xianwinwin wrote: Hi all, I'm

Re: struts2: simple ajax form - returns value to a new page (not to a DIV)

2008-02-19 Thread Jeromy Evans
No, it seems fine now. Turn on debugging: s:head theme=ajax debug=true/ Also use FireBug to see if there's any javascript errors reported. xianwinwin wrote: thanks you for the reply. I added the code: s:head theme=ajax/ on top, plus s:submit value=GO2 showLoadingText=false