deus3X
27 Oct 2007, 8:46 AM
i try to pass some php variable to a an Ext.onReady function but can't do it. here's the function:
Ext.onReady(function(){
Ext.get('del').on('click', function(e){
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?', del);
});
function del(btn){
if (btn == 'yes'){
function JumpToURL(surl) { window.location.href = surl; }
}
else {
window.location.href='';
}
};
here's the call:
<form><select name="jumpMenu" id="del" OnChange="JumpToURL(this.value);">
<option value="">Actions</option>
<option value="delete.php?email='.$row['email'].'&id='.$row['id'].'">Delete</option>
</select></form>
i fell that i'm mixing something between the del function and my JumpToUrl function but i don't get it.
Thanks for your help.
Ext.onReady(function(){
Ext.get('del').on('click', function(e){
Ext.MessageBox.confirm('Confirm', 'Are you sure you want to do that?', del);
});
function del(btn){
if (btn == 'yes'){
function JumpToURL(surl) { window.location.href = surl; }
}
else {
window.location.href='';
}
};
here's the call:
<form><select name="jumpMenu" id="del" OnChange="JumpToURL(this.value);">
<option value="">Actions</option>
<option value="delete.php?email='.$row['email'].'&id='.$row['id'].'">Delete</option>
</select></form>
i fell that i'm mixing something between the del function and my JumpToUrl function but i don't get it.
Thanks for your help.