thickbox and ajax
I have a little problem that I just can't figure out. I'd like to post data to server (php) and then after processing display the result with thickbox iframe.
I looked at ajax example from thickbox, but there's no passing, processing and ret开发者_如何学编程urning at the same time. The basic example works for me.
Any ideas?
Thanks! Newman
Did you read this part?
Description: Use a hidden HTTP request (AJAX) to fetch files from the same server and have ThickBox display the contents of the files. Instructions: Create a link element () Give the link a class attribute with a value of thickbox (class="thickbox") Provide a path in the href to the file/directory on the server. (href="ajaxLogin.htm") In the href attribute, after the URL path to the file, add the following query on to the end of the URL: ?height=300&width=300 Change the values of height and width in the query accordingly Optionally you may add modal=true to the query string (e.g. ?height=300&width=300&modal=true) so that closing a ThickBox will require calling the tb_remove() function from within the ThickBox. See the login example, where you must click cancel to close the ThickBox. Important to Remember: In order to open new Ajax content in an open Ajax ThickBox, its code must also contain the appropriate HTML (class=""thickbox) to launch an Ajax ThickBox (see demo for example). The only catch is, the ThickBox calls must include both the width and height of the original ThickBox. If you leave it blank the window will resize to the default size(630x440).
The example and it's description make sense. You are not preforming the AJAX request - ThickBox does that based on the href value of the link with the class ThickBox, and loads that data into the resulting ThickBox.
精彩评论