NewYiiFan
(Weise Sprueche)
1
VIEW
echo CHtml::submitButton(
Yii::t ('Somethin', 'next'),
array(
'name' => 'next',
'onclick' => "checkDetails()"
));
[b]
JS[/b]
checkDetails() {
PREVENT_SUBMITTING
}
How should PREVENT_SUBMITTING look? What would prevent submitting in this case, without any condition? A simple
event.preventDefault() // or
return false;
does not work…
Many thanks…
ahmed201
(Rifajas)
2
try this onclick=>"return checkDetails( )"
NewYiiFan
(Weise Sprueche)
3
thank you but, it does not work. I am a little desperate, does yii overwrite this somewhere, somehow?
ahmed201
(Rifajas)
4
have you tried with form onsubmit event?