Hi,
I tried to use a pop-up window to add a new record into the database and at the
same time refresh the parent window's drop down list (reflecting the added new
record). However, although the refresh works in IE (correct sequence, add to
database then refresh browser drop down list) but the same is not happening in
Firefox. The sequence is reverse in Firefox (refresh drop down list then add to
database). This is the code that insert new record and refreshes.
| <h:commandButton id="confirm" value="Confirm"
action="#{addTypeCtrl.confirm}"
| onclick="updateDropDownList();"/>
|
The javascript function for refreshing is below:
| function updateDropDownList(){
| try{
|
window.opener.document.forms[0].elements[window.opener.document.forms[0].elements.length-2].onclick();
| } catch (e) {
| alert("An exception occurred in the script. Error name: " +
e.name
| + ". Error message: " + e.message);
| }
| self.close();
| }
|
I don't know if I am using the right approach or if there's a better way. Any
advice appreciated. Thanks a plenty!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104722#4104722
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104722
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user