Hi there,
I got a select-field (FldSelectInfo) in a html-form (FrmInfoSelect) and want to open another webpage (url) according to the item I select in this field.
I wrote something like
[JS]
var selected = $('#FldSelectInfo').serialize();
$('#frmInfoSelect').submit(function(event) {
$('#showData').show();
$('#showData').html('Loading data, please wait...');
var disp = $.ajax({
type: "POST",
url: selected + '.php',
data: $('#frmInfoSelect').serialize(),
async: false
}
).responseText;
$('#selectData').hide();
$('#showData').show().html(disp);
return false;
});
[/JS]
whereas an item looks like
For the moment, I got redirected to FldSelectInfo=mynewpage.php instead of mynewpage.php.
Can anyone figure out what I'm doing wrong?
Thanks a lot!
Sincerely,
Steve
I got a select-field (FldSelectInfo) in a html-form (FrmInfoSelect) and want to open another webpage (url) according to the item I select in this field.
I wrote something like
[JS]
var selected = $('#FldSelectInfo').serialize();
$('#frmInfoSelect').submit(function(event) {
$('#showData').show();
$('#showData').html('Loading data, please wait...');
var disp = $.ajax({
type: "POST",
url: selected + '.php',
data: $('#frmInfoSelect').serialize(),
async: false
}
).responseText;
$('#selectData').hide();
$('#showData').show().html(disp);
return false;
});
[/JS]
whereas an item looks like
HTML:
<option value='mynewpage'>Show new page</option>
Can anyone figure out what I'm doing wrong?
Thanks a lot!
Sincerely,
Steve