Forums/Community/Product Feedback

PlannedDoneNot planned

Use dropbox more than once without refresh

Cliff Wells
suggested this on November 15, 2010 07:40

There needs to be a way to submit additional questions via the dropbox without refreshing the page.   The current situation only allows for one question without revisiting the page.   This makes dropbox useless for AJAX-managed sites which never (or rarely) generate full refreshes.    

[EDIT]

As I mention in my final comment, I've found a workaround.   However it would be nice to see this made into a configuration option (i.e. refresh_on_submit, or something shorter).   Changing Zenbox.hide to test that value seems pretty straightforward:

hide: function (event) {
    if (Zenbox._settings['refresh_on_submit'] == true) 
        Zenbox.is_rendered = false;
    Zenbox._overlay().style.display = 'none';
    return Zenbox._cancelEvent(event);
}

 

Incidentally, given the number of really nice Javascript HTML editors that have been available for years, I cannot fathom why you have this utterly crappy one on this forum.   I mean, seriously, at least let a user enter raw text if nothing else.   The difficulty of putting a small code fragment here is borderline ridiculous.

 

Comments

User photo
Gabe
Project C Beta Testers

DropBox also needs to be refresh itself if there is a search and user closes DropBox. Currently, a user can perform a forum search, exit out of DropBox, open the tab again and see the same search. 

November 17, 2010 13:41
User photo
Cliff Wells

I figured out a workaround.   It requires not using the side tab and using a link instead.   When the link is clicked, use Javascript to refresh the iframe that the dropbox resides, then call Zenbox.init() again and finally Zenbox.show().   I used jQuery, but the idea only requires Javascript.    I don't see a way to delimit code blocks in these comments, so this will be probably display ugly =(

 

<a href="#" id="support-link">Support</a>

<script type="text/javascript">

//<![CDATA[

   $("#support-link").click (function () {

 

        $("#zenbox_iframe").attr ({

            src: $("#zenbox_iframe").attr ("src")

        });

        if (typeof (Zenbox) !== "undefined") {

            Zenbox.init ({

                dropboxID:   "xxx",

                url:         "youraccount.zendesk.com",

                hide_tab: true 

            });

        }

        Zenbox.show ();

        return false;

    })

//]]>
</src>

 

 

I'm glad I figured this out.   I'd already setup a test account with a competitor as this limitation was pretty much a show-stopper for us.

            Zenbox.init ({                                                                                                                                                                      
                dropboxID:   "737",                                                                                                                                                             
                url:         "rangertelecom.zendesk.com",                                                                                                                                       
                tabID:       "help",                                                                                                                                                            
                tabColor:    "50B7D0",                                                                                                                                                          
                tabPosition: "Left",                                                                                                                                                            
                requester_name: "%(full_name)s",                                                                                                                                                
                requester_email: "%(email_address)s",                                                                                                                                           
                hide_tab: true                                                                                                                                                                  
            });                                                                                                                                                                                 
        }                                                                                                                                                                                       
        Zenbox.show ();                                                                                                                                                                         
        return false;                                                                                                                                                                           
    })                           
November 17, 2010 16:39
User photo
Cliff Wells

Bah.

Can this forum suck any more?   Can I edit my comment?   Can I get code blocks?

November 17, 2010 16:40
User photo
Gabe
Project C Beta Testers

Cliff,

 

Thanks. We are looking into solutions as well. This is a great starting point for us. For future reference, i find http://pastie.org/ very useful for displaying code blocks with difficult forums.

 

Cheers,

Gabe

November 17, 2010 17:08
User photo
Cliff Wells

What it really needs at this point is a way to determine if the iframe actually needs to be refreshed.    Right now it's rather hackish in that the iframe is displayed, then it disappears and reappears.   I'll work this out and post the code later.

November 17, 2010 18:56
User photo
Cliff Wells

So here's my final, much simpler solution:

 

$("#support-link").click ( function () {

    Zenbox.is_rendered = false;

    Zenbox.show ();

    return false;

});

 

The downside is that it relies on Zenbox internals that may be subject to change.

November 19, 2010 16:15
User photo
Cliff Wells

To utilize this workaround with the side tab, do the following:

Zenbox.init ( /* options */ );

Zenbox.hide = function (event) {

    Zenbox.is_rendered = false;

    Zenbox._overlay().style.display = 'none';

    return Zenbox._cancelEvent (event);

}

November 19, 2010 17:29
User photo
Kevin Swan

Cliff,

 

Thanks for your efforts here--remarkable Zendesk hasn't just fixed this. It's clearly poorly designed. Even much cheaper (free!) options like uservoice and getsatisfaction have this solved.

Just so I'm clear, where do I put the code above for the slide-tab option? In the custom CSS of the dropbox (PS: They should rename this "TicketDrop" or something, to keep it clear that it's not the Dropbox we all know and love)?  Or does this go on the page, in or around the code for the actual TickeDrop (r)?

January 26, 2011 10:48
User photo
Cliff Wells

Hi Kevin,

 

The code for the side-tab option goes in your index.html right after Zenbox.init().   It basically just overrides the Zenbox.hide() method with a small bit of code that causes Zenbox to think it hasn't yet been rendered, which causes it to start fresh the next time it's opened.   You don't need any other changes.

January 26, 2011 11:13
User photo
Kevin Swan

got it. thanks!

January 26, 2011 11:47
User photo
Arno

Hi Cliff, I can't get this to work. I must be doing something wrong here. Where do I put your code? In the Dropbox script? Does it have to start with <script> and end with </script>. Bit of a Javascript noob here.

February 10, 2011 07:48
User photo
Cliff Wells

Hi Arno,

Simply follow the directions for setting up dropbox as normal, and then add the following stanza right after Zenbox.init ( /* options */ );

Zenbox.hide = function (event) {

    Zenbox.is_rendered = false;

    Zenbox._overlay().style.display = 'none';

    return Zenbox._cancelEvent (event);

}

That's it.   Nothing else to do.

February 10, 2011 09:06
User photo
Arno

@Cliff, thanks for your quick reply. It works great now! Amazing this is not a standard setting though.

February 10, 2011 11:36
User photo
Jake Holman
Product Manager

So this will actually be addressed in a forthcoming update of the Zendesk dropbox (as well as some pretty nice design changes).

Note the caveat of this is: if someone is filling out the ticket form, and has written a 500 word essay in their ticket, they'll lose all of it once they close the Zendesk dropbox, since they'll start from the beginning again.

February 13, 2011 15:05
User photo
Cliff Wells

Looking forward to seeing this addressed.   As far as the caveat, I don't see a problem with this.   I am unaware of any existing applications where a previously closed window retains its data if you open it again, so while this might be an interesting feature, it's certainly not an expected one.   

February 13, 2011 19:54
User photo
Arno
@Jake Great, looking forward to the new design. Re:500 words essay: that will teach them ;-)
February 14, 2011 10:57
User photo
Cliff Wells

One thing I'd ask is that this thread be updated when the new changes take effect.   I expect my little hack will not be co-exist nicely and I'd like to have some warning to remove it.

February 14, 2011 12:25
User photo
Jake Holman
Product Manager

@Cliff: Likely on the 24th of February

February 14, 2011 12:28
User photo
Paul Benson
telispire

It appears the new dropbox version still does not refresh.

March 04, 2011 14:31
User photo
Jake Holman
Product Manager

@Paul: I can assure you it does. The newer version of the dropbox needs you to generate new code - we did not automatically update previous versions. 

March 04, 2011 14:34