Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're about to go live with Live Agent (the version that built into your Salesforce instance).

We're using some a prechat form which appears as a popup window when the user clicks the "Chat" button.

When the window pops up, our form doesn't fit fully inside. I'm trying to find where to define the size of that pop-up window.

I can't find it in any setting, and changing the Visualforce page that represents the Pre Chat form doesn't make a difference.

Does anyone know where the Size of the pop up window is referenced?


***Per the comment below - I also thought it would be in the code for the button. Nearest I can tell it calls a method onclick called "Liveagent.startChat()" but I don't see that javascript anywhere.

<body style="background:transparent">
        <span class="buttonSmall">                                    
            <a id="liveagent_button_online_573400000004CMA" href="javascript://Chat" style="display: none;" onclick="liveagent.startChat('573400000004CMA')">
                <img src="~/hgstatic/img/hgLiveChatButtonBig.png" alt="Live Chat" />
              <div id="liveagent_button_offline_573400000004CMA" style="display: none;"><a href="" target="_new"><img src="~/hgstatic/img/hgContactUsBig.png" alt="Contact Us" /></a></div>

         <script type="text/javascript">
             if (!window._laq) { window._laq = []; }
             window._laq.push(function () {
                 liveagent.showWhenOnline('573400000004CMA', document.getElementById('liveagent_button_online_573400000004CMA'));
                 liveagent.showWhenOffline('573400000004CMA', document.getElementById('liveagent_button_offline_573400000004CMA'));

        <script type='text/javascript' src='@ConfigurationManager.AppSettings["SalesForceScriptLink"]'></script>
        <script type='text/javascript'>
share|improve this question
It might be referenced on the actual "Chat" button, if the button executes javascript. Check into that. – jonnybro Feb 21 '13 at 20:49
jonnybro - thanks for the comment. I thought it might be there too, but I don't see it. – Salesforce Wizard Feb 21 '13 at 21:38
Dig into the HTML and find the startChat() method within Javascript. It will more than likely be in a linked file... My gut tells me its probably within that method. – jonnybro Feb 21 '13 at 21:46
up vote 2 down vote accepted

Thanks to Jon Aniano ‏@jonaniano " There is an undocumented method for this (will be documented in Summer - SAFE HARBOR applies). You can use it today.

Before your "init" call in your deployment code: liveagent.setChatWindowHeight(500); liveagent.setChatWindowWidth(500);

where (500) in the example above would be your size in pixels. Hope this helps "

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.