Page 1 of 1

Need to Change WebForm Pop Up Location

PostPosted: Fri Sep 19, 2014 4:53 am
by rupen
Hi ,

Configuration :
Vicidial VERSION: 2.7-401a BUILD: 130508-2256 (Scratch Install) | Asterisk : 1.8.21.0 | One Servers | DAHDI: 2.9.0.1 | libpri : 1.4.14 | Allo E1 PRI CARD with 4 slots |No Extra Software After Installation | Intel(R) Xeon(R) CPU E3-1220 V2 @ 3.10GHz 8 MB Cache| 4 GB RAM | CentOS release 6.5 (Final) | Linux version 2.6.32-431.20.3.el6.i686 #1 SMP Thu Jun 19 19:51:30 UTC 2014 i686 i686 i386 GNU/Linux

Issue :
I have set web form pop up for each inbound call. A web form is pop up at top left corner of browser , i want to change it location to top left corner and also want to change size of pop up window.
I have also change below paramters of window,open in vicidial.php under agc folder

window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450');


but unable to do so.

Please suggest how can i change the locaiton of webform.

Re: Need to Change WebForm Pop Up Location

PostPosted: Fri Sep 19, 2014 5:22 am
by mflorell
There are currently no options built in to do what you are asking to do, and on some platforms the browser doesn't have the ability to choose where on the screen it will show up, so I'm not sure it is entirely possible on your systems for it to work.

Re: Need to Change WebForm Pop Up Location

PostPosted: Wed Sep 24, 2014 12:01 am
by rupen
Thank you matt for quick revert. :D

Re: Need to Change WebForm Pop Up Location

PostPosted: Wed Aug 12, 2015 1:48 pm
by xtdirect
Rather than edit the Vicidial source code you can resize and position the webform 'onLoad' via javascript.

I generally don't like to alter the Vici source code... makes upgrading more difficult.

Code: Select all
<script language="javascript">

  function resizeCRM(){
    var width = 600;
    var height = 400;
    window.resizeTo(width, height);
    window.moveTo(((screen.width - width) / 2), ((screen.height - height) / 2));     
  }
</script>

// Then...

<body onload=“resizeCrm();"></body>


Depending on your browser you may have to tweak the code... This works in Firefox... Chrome requires a 'trigger' attribute... Just google it..