I FOUND IT. Apparently it's not possible to modify the DOM during the
request. But when it's over we can do it:
Here's the code:
dojo.event.topic.subscribe("/disableAll" , function(data , type, request) {
if (type == 'load') {
disableInputs(true);
}
});
---
I am still having this problem. Did any one went through some thing
similar when using ajax to submit a form from a link or a submit Button
and when used notifyTopic ?
The problem is that the form fields are never populated in the action !
Any help ?
Mansour wrote:
No, I can not see any thi
No, I can not see any thing logged. Here' the whole JSP. it should give
you an idea about what I am doing. I am trying to save/update an account
and run a JS to disable the inputs.
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ ta
If you add and use the ajax theme, is any error
logged?
musahcy
On 5/21/07, Mansour <[EMAIL PROTECTED]> wrote:
Yes they are submitted provided that the submit button is inside the
form. Here's my code :
dojo.event.to
Yes they are submitted provided that the submit button is inside the
form. Here's my code :
value="Save from inside the form w/o ajax">
dojo.event.topic.subscribe("/disableAll" , function(data, type,
Use a regular submit (no ajax) and see if you values are submitted.
musachy
On 5/21/07, Mansour <[EMAIL PROTECTED]> wrote:
I still don't what wrong with this. I fixed few problems but still can
not get the javascript function to execute when the request is being
made. It send the request but t
I still don't what wrong with this. I fixed few problems but still can
not get the javascript function to execute when the request is being
made. It send the request but the values for the form are not populated.
Hopefully someone can find out what's wrong with my code.
dojo.event.topic.su
NotifyTopics is not working. I don't know why, but I tried every
possible thing. I can not understand what's wrong with this. The
function showMessage() is called only once, when the page loads !! and
nothing after that causes it to execute. It's just a smiple message for
testing:
function
Depending on what your js function does, you may also be able to use the
notifyTopics/listenTopics event mechanisms.
Look at the example in "Preventing a Request" at
http://struts.apache.org/2.x/docs/ajax-tags.html#AjaxTags-preventingRequest
Otherwise try the handler="" attribute to call yo
OK I found my problem. I shouldn't add onClick event to the anchor, but
what do I do to execute a js function when this anchor is clicked. I
tried using onMouseDown, but the same results.
Mansour wrote:
Thank you. That helped but still can not submit a form using an anchor
out side that form.
Thank you. That helped but still can not submit a form using an anchor
out side that form. The fields are not populated in the action.
The code on the Site :
Using the anchor tag to submit a form:
Submit form
My code:
edit
Ensure you've included to include the required
javascript and try turning on ajax debugging (debug="true">). Ensure the javascript exists in your html.
See the top of http://struts.apache.org/2.x/docs/ajax-tags.html
Mansour wrote:
I am populating some fields that can be edited and saved. Tryin
I am populating some fields that can be edited and saved. Trying to do
this using ajax. The action is getting called but the form is never
submitted, and the updated data is lost.
value="${acc.fir
13 matches
Mail list logo