You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by AjayMundra <aj...@nvish.com> on 2009/01/08 07:00:54 UTC

trinidad tr:document body onload javascript issue

i'm using trinidad 1.0.7

if i use <tr:document  the rendered HTML body onload event is by default set
to "_checkLoad()"
<body onload="_checkLoad()" onunload="_checkUnload(event)"

On submitting page i execute some action on server and then send a
confirmation dialog to user by setting onload property of CoreDocument (i.e.
HTML Body after rendering)

Response generated has got Confirmation dialog code
<body onload="return
_chain('_checkLoad()','showConfirmDialog(\'table1:myBtn\',\'Are you sure you
want delete the item?\');',this,event)" onunload="_checkUnload(event)"

//showConfirmDialog javascript function
function showConfirmDialog(btnid, msg) {
        var answer = confirm(msg);
        if (answer)
                document.getElementById(btnid).click();
        else {
                document.body.onload = "";
        }
}


But my showConfirmDialog method is never being called, where is the problem?
Please help.

Thanks,
Ajay Mundra
-- 
View this message in context: http://www.nabble.com/trinidad-tr%3Adocument-body-onload-javascript-issue-tp21346365p21346365.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.