jQuery iframe-ThickBox removes parameter

I had a iframe-ThickBox link with a strange behaviour: Clicking on it leads to an application error (because the id param was missing), copying the url in a new browser tab worked well.

<a href="/controller/action?TB_iframe=true&height=500&width=650&id=123">link</a>

What happened? jQuery-Thickbox removes all parameters after TB as mentioned in the description:
Important to Remember:
Add all other query parameters before the TB_iframe parameters. Everything after the “TB” is removed from the URL.

So rearranging the order fixed the problem.

<a href="/controller/action?id=123&TB_iframe=true&height=500&width=650">link</a>

The real problem was not so obvious, because we use a link-Tag which transformed the URL in a map to add parameters and transformed it back to a URL. In that transformation the order got lost. We fixed that problem with a LinkedHashMap instead of HashMap.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: