Thanks newton.dave  , I've spent some time experimenting with <s:a/> tag
attributes.
Now, I have problem with notifyTopics.
Please, see my function:

1.
dojo.event.topic.subscribe("/afterDeleteLaw", function(data, request,
widget){
    //data : text returned from request(the html) It is my json
    //request: XMLHttpRequest object
    //widget: widget that published the topic
        var _mydata = eval("(" + data +")");
        alert('_mydata.resultOfAction.resultType [' +
_mydata.resultOfAction.resultType +']');//I want it!
        //data = _mydata.resultOfAction.resultType; doesn't help
        for(var i=0; i< _mydata.resultOfAction.resultType.length; i++){ 
//doesn't
help
            data[i] = _mydata.resultOfAction.resultType.getChatAt(i);
        }       
        alert('data new value =' + data);//good value, but <s:a/> outputs 
previous
value - plain json
});

I've parsed income JSON, got object field value and changed value of data
parameter,
but output is the same: plain json. Seems like data value hasn't been
changed.
Can you tell me please, what's wrong?

2. On this forum I found JS api to work with autocompleter
(<s:autocompleter/>):
        var auto = dojo.widget.byId("autoForumThreads");
        //selected key
        var key = auto.comboBoxSelectionValue.value;
        //selected value
        var value = auto.comboBoxValue.value;
        //text entered by user
        var text = auto.textInputNode.value

Where can I find the same api, but for <s:a/> widget? I've googled alot, but
I didn't find anything.

-- 
View this message in context: 
http://www.nabble.com/%3Cs%3Aa-dojo-anchor%2C-parse-result%2C-output-it-and-then-execute-JS-tp18688029p18710460.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to