Quantcast
Channel: Alert.js - CRM 2013-2016 Custom Alerts and Popup Dialogs JavaScript Lightbox
Viewing all articles
Browse latest Browse all 170

Commented Unassigned: Alert Callback pass result back from HTML [760]

$
0
0
I am using Alert.showWebResource to open HTMl web resource. When i click close button it is calling callback function successfully. But i am not sure how to pass argument to callback method.

I want to return something from HTMl page.
var alertButton = new Alert.Button();
alertButton.label = "Close";
alertButton.callback = callBack;
var array = new Array();
array.push(alertButton);
Alert.showWebResource(url, height, width, "", array, null, true, 10);
Comments: ** Comment from web user: Billikin **

U need to create a response object at html level:
```
<head>
...
<body>
<script>
var dialogPublicVariable = { ParamA : 1, ParamB: 2 };
</script>
</body>
</html>
```

At alert showWebResource level u then need to in successCallback:

```
var dialogVariable = Alert.getIFrameWindow().dialogPublicVariable;
```


Viewing all articles
Browse latest Browse all 170

Trending Articles



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