Я использую следующий код для публикации данных формы в player / index.php и открытия их в диалоговом окне. Поскольку в моей таблице несколько таких форм, мне нужно использовать $ (this).
Но теперь он не открывается в диалоге.
Новый код (не открывает диалоговое окно, но отображает данные в URL):
$("#recordingdialog").dialog({
//other options, width, height, etc...
modal: true,
bgiframe: true,
autoOpen: false,
height: 200,
width: 350,
draggable: true,
resizeable: true,
title: "Play Recording",});
$(this).click(function() {
$.post('player/index.php', $(this).attr('form').serialize(), function (data) {
$("#recordingdialog").html(data).dialog("open");
});
return false;
});
Старый код (работает только на одной форме):
$("#recordingdialog").dialog({
//other options, width, height, etc...
modal: true,
bgiframe: true,
autoOpen: false,
height: 550,
width: 550,
draggable: true,
resizeable: true,
title: "Play Recording",});
$("#wavajax button").click(function() {
$.post('player/index.php', $("#wavajax").serialize(), function (data) {
$("#recordingdialog").html(data).dialog("open");
});
return false;
});