Quantcast
Channel: aras PLM community
Viewing all articles
Browse latest Browse all 1103

Close dialog in 10.0 using javascript in both IE & Firefox

$
0
0

 

Hi,

I created a form with HTML field to display as a dialog.

<!DOCTYPE html>

<html>
<head>
<script type="text/javascript">
function getUsers()
{
var inn = new Innovator();
var users = inn.newItem("User","get");
     var relUsers = users.apply();
    var cnt = relUsers.getItemCount();
var select = document.getElementById("users1");
for(var i=0;i<cnt;i++)
{
 var name = relUsers.getItemByIndex(i).getProperty("keyed_name");
//alert(name);
        var option = document.createElement('option');
        option.text = option.value = name;
        select.add(option, 0);
  
}
}
function Okay()
{
//-- some code
close();
}
function Cancel()
{
close();
}
</script>
</head>
<body onload="getUsers();">
<h3>Select User</h3>
<input type="radio" id="login" name="user" value="login" ><label for "login">Login User</label>
<input type="radio" id="all" name="user" value="all" ><label for "all">All Users</label>
<input type="radio" id="other" name="user" value="other" ><label for "other">Other User</label>
<select id="users1" >
<button id="but1" onclick="Okay();">Okay</button>
<button id="but2" onclick="Cancel();">Cancel</button>
</body>
</html>

This is working fine in 9.3. But in 10.0 I am not able to close the dialog using the either 'Cancel' or  'Okay' button.

Google results says for some security reasons dialog(opened using javascript) can't be closed in Firefox. But same thing happening in IE9 also, not able to close the dialog using javascript's close() function.

I checked User's  'Inactive Accounts'  report which opens a dialog, here also not able to close the dialog by clicking OK/Cancel in Firefox.

I need to add this kind of dialog boxes for many Actions and Reports. How to solve this issue. How to over come this in Firefox? Please help me.

Thank you.


Viewing all articles
Browse latest Browse all 1103

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>