Hi All,
Greetings.
I am working on a custom dialog box to display a TODO Notes. Currently I am working on fetching the todo notes from the database and display on the custom dialog box in a table.
I am retrieving notes as objects from the database. Now I need to pass this to a DOM and display them in the dialog box. And I am unable to proceed further as I am new to DOM programming...Would appreciate if some of you can help with some directions.
JSP code:
---------
....
Code:<script language="javascript"> function getData(){ if (location.search.length < 1){ document.sample.userId.value='<%=strMenuId2%>'; document.sample.action.value="../../pages/Layouts/layoutCtrl.jsp"; document.sample.actionCode.value='RETRIEVE_MODE'; document.header.submit(); } } function popUp() { var proId= '<%= (request.getAttribute("TODO_LIST")!=null)?(ArrayList)request.getAttribute("TODO_LIST"):"n/a" %>'; if(proId != null){ alert('Hi hi 2',0,callbackDeleteRequest,proId); }else{ confirm('Hi'); } }
In the above code the getData() would be called on form load.
The Popup() is a function called when a user clicks the REMINDER button. Here the variable PROID shows 2 bean objects fetched correctly from the database.
My question is how to pass this to the DOM function, ie.,
alert('Hi hi 2',0,callbackDeleteRequest,proId);
fyi the alert() in customModalDialog.js looks like this...:
-----------------------------------------------------
ThanksCode:if(document.getElementById) { window.alert = function(txt,nButtons,callback,reminderNotes) { alertRequest = createModalDialog(txt,nButtons,callback,reminderNotes); return alertRequest; } } function createModalDialog(txt,nButtons,callback,reminderNotes) { ... .. ... }
Yuva



Reply With Quote
Bookmarks