web forms popup
Posted: Fri Oct 12, 2018 4:36 pm
Hi, I'm running VERSION: 2.14-687a
BUILD: 180908-1618
© 2018 ViciDial Group, on a server installed from ViciBox_v8.x86_64-8.0.1.iso
It's on a virtual box, specs as follows -
CPU:
2 vCore
RAM:
4096 MB
Storage:
60 GB SSD
This isn't a performance issue, it works great. I'm trying to figure out how to dynamically pop up a google map based on the information in the active call when the agent clicks the web form button. I don't want to modify the app or database at all if I can help it either.
I'm pasting this block of code into the web form field. When the web form button is clicked it winds up taking the user to http://vicdialIPaddress/agc.... (and then all of the code after)
I tried it the other way around in case the app is expecting the iframe tag first, but that crashes the load of the agent session.
The goal is to build a URI-encoded representation of the customer's address and pass that to google maps as one URL in a new window.
It took me a day to setup an "extension" that I can transfer an answering machine call to, thought this problem would be equally straightforward but I'm kind of stumped.
(edit - remove identifying domain name)
BUILD: 180908-1618
© 2018 ViciDial Group, on a server installed from ViciBox_v8.x86_64-8.0.1.iso
It's on a virtual box, specs as follows -
CPU:
2 vCore
RAM:
4096 MB
Storage:
60 GB SSD
This isn't a performance issue, it works great. I'm trying to figure out how to dynamically pop up a google map based on the information in the active call when the agent clicks the web form button. I don't want to modify the app or database at all if I can help it either.
I'm pasting this block of code into the web form field. When the web form button is clicked it winds up taking the user to http://vicdialIPaddress/agc.... (and then all of the code after)
- Code: Select all
<script language="javascript">
function newSite() {
var siteroot="https://www.google.com/maps/search/?api=1&map_action=pano";
var customer_address="--A--address1--B-- --A--city--B--,--A--state--B-- --A--postal_code--B--";
var customer_address_URIcoded=encodeURI(customer_address);
var fullURL=siteroot+"&query="+customer_address_URIcoded;
document.getElementById('myIframe').src = fullURL;
}
</script>
<iframe id="myIframe" src="http://www.somesite.net/favicon.ico" onLoad="newSite();"></iframe>
I tried it the other way around in case the app is expecting the iframe tag first, but that crashes the load of the agent session.
- Code: Select all
<iframe id="myIframe" src="http://www.somesite.net/favicon.ico" onLoad="newSite();">
<script language="javascript">
function newSite() {
var siteroot="https://www.google.com/maps/search/?api=1&map_action=pano";
var customer_address="--A--address1--B-- --A--city--B--,--A--state--B-- --A--postal_code--B--";
var customer_address_URIcoded=encodeURI(customer_address);
var fullURL=siteroot+"&query="+customer_address_URIcoded;
document.getElementById('myIframe').src = fullURL;
}
</script>
</iframe>
The goal is to build a URI-encoded representation of the customer's address and pass that to google maps as one URL in a new window.
It took me a day to setup an "extension" that I can transfer an answering machine call to, thought this problem would be equally straightforward but I'm kind of stumped.
(edit - remove identifying domain name)