Welcome Guest, Not a member yet? Register   Sign In
form_open_multipart() ...
#1

[eluser]Asinox[/eluser]
hi, all right here? Big Grin

guys i have a litter problem

im trying to pass a javascript function to the form.... in this way
Code:
$js = 'onsubmit="return Spry.Utils.submitForm(this, updateResponseDiv)';
echo form_open_multipart('Dashboard/procesar_nuevo_negocio',$js);

the result is :
Code:
<form action="...//" mnsubmit="return Spry.Utils.submitForm(this, updateResponseDiv) method="post">

do u see the MNSUBMIT??


I have something wrong of is a bug???

Thanks u
#2

[eluser]pistolPete[/eluser]
You are passing a string but the attributes should be an array:

User Guide
Quote:Adding Attributes
Attributes can be added by passing an associative array to the second parameter

The corrected code looks like:
Code:
$js = array('onsubmit' =>'return Spry.Utils.submitForm(this, updateResponseDiv);');
#3

[eluser]Asinox[/eluser]
yes, is true....i forget Sad

thanks u




Theme © iAndrew 2016 - Forum software by © MyBB