Script Programming Question

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Script Programming Question

Postby bwettlaufer » Tue Oct 25, 2011 8:21 am

Good morning!

I have a question regarding the programming of scripts.

I would like to set up a pop-up of variable information based on state, coaching my call team members on a script based on the state assigned to each lead.

How would I go about setting up this in a script, to refer to an external text or html file, variable by state?

Thanks!
bwettlaufer
 
Posts: 19
Joined: Fri Nov 02, 2007 7:41 am

Postby mflorell » Tue Oct 25, 2011 11:35 am

The best way to do that would be by using an IFRAME, this is covered in the manual and the help screens on the admin page.
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby bwettlaufer » Tue Oct 25, 2011 11:49 am

I've got the idea of the IFRAME, but what I don't have a clue how to do is a conditional statement, to refer to an external table or database.

Such as 'if the state = "FL", then <iframe src="http://10.100.0.10/florida.php style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17"> </iframe>
bwettlaufer
 
Posts: 19
Joined: Fri Nov 02, 2007 7:41 am

Postby mflorell » Tue Oct 25, 2011 12:13 pm

You would have to program a page with the conditional statement, Scripts in Vicidial are not designed to do conditional statements themselves.
mflorell
Site Admin
 
Posts: 18339
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby randy_delgado_03 » Wed Nov 30, 2011 6:28 pm

In addition, you can create a PHP, put the URL in the IFrame and then inside the PHP Script you do the conditional statements. However, there's a limit ...

YOUR IMAGINATION!!! (^_^)
ViciBox v.7.0.3-160505
Asterisk 11.22.0-vici
Vicidial: VERSION: 2.12-563a BUILD: 160801-2119
Servers: Stand alone server (Database, Web, Telephony)
No Additional Softwares, No Third Party Softwares
randy_delgado_03
 
Posts: 178
Joined: Wed Dec 01, 2010 2:50 pm
Location: Manila, QC

Postby williamconley » Wed Nov 30, 2011 8:10 pm

you do not pull up a different iframe based on state. you let the web server inside the iframe have the state, and alter what it pops up based on that.

simple, and php/mysql scripts do this all day long. that's what they are for.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20019
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 204 guests