I’m using query’s ui dialog and i’m adding a form to the dialog box. If I use any spaces or returns between the tags I get the following error: SyntaxError: Unexpected EOF
If I move everything onto one line it fixes the problem, but it is obviously very difficult to read. Is there another way to handle this?
here is the script (it is working but difficult to read and make changes to)
$(document).ready(function() {
var $dialog = $("<div></div>")
.html("<form action='scripts/proc_registered_user.php' method='post' name='form' id='form' accept-charset='utf-8'><fieldset><input type='hidden' name='unreguser' value='%s' id='unreguser' /> <br /><h1>This is an unregistered user.</h1><p>....</p></fieldset><br /><p id='mail_submit'><input type='submit' value='Yes, Send an email' /></p></form>")
.dialog({
autoOpen: false,
title: 'Basic Dialog'
});
$('#opener').click(function() {
$dialog.dialog('open');
// prevent the default action, e.g., following a link
return false;
});
});
</script>