I'm displaying a form in a Thickbox and using the jQuery form plugin
to process the form and load the results back into the same Thickbox

It's working perfectly in Firefox, but when the form is submitted in
Chrome/Safari you are sent to the page in the action attribute.

This is the js in the Thickbox ajax content: (jquery.js is linked on
the original page that loads the Thickbox inside it.)

<script src="js/jquery.form.js" type="text/javascript"
<script type="text/javascript" >
// prepare the form when the DOM is ready
$(document).ready(function() {
// bind form using ajaxForm
// target identifies the element(s) to update with the server response
target: '#sender',

// success identifies the function to invoke when the server response
// has been received; here we apply a fade-in effect to the new
success: function() {

HTML in the Thickbox ajax content:

<div id="sender">
<form id="msg_form" action="sender.php" method="post">
<input type="hidden" name="msg" value="lorem ipsum" />
<input type="submit" value="submit" />

In Firefox, this works perfectly and loads the results from sender.php
in #sender inside the original Thickbox. In Chrome/Safari it just
sends you to sender.php.

Reply via email to