javascript - Empty form with for statement -
i have for
statement create 20 number of forms, after creating elements forms empty(but have input elements on it) , why cannot send objects post.
<form method="post" ></form>
this code :
for($i= 1 ; $i<=$numtest ; $i++){ $mdata = $numtoword->towordfa($i); echo ' <li> <div class="questitle2 noselect"><a href="#">عنوان سوال '.$mdata.'</a></div> <div class="quescontent"> <input type="text" class="questitle byekan" name="tt'.$i.'" id ="tt'.$i.'" placeholder="عنوان سوال '.$i.'" onclick="select()" /><br/> <div style="text-align:right;margin-top:10px;" class="qkind">نوع سوال : <input type="radio" name="istest'.$i.'" id="is2test'.$i.'" value="yt2" onclick="add_choice(\'c'.$i.'\' , \'yt2\');" /><label for="is2test'.$i.'"><span class="noselect fade"> 2 گزینه ای</span></label> <input type="radio" name="istest'.$i.'" id="is4test'.$i.'" value="yt4" onclick="add_choice(\'c'.$i.'\' , \'yt4\');" /><label for="is4test'.$i.'"><span class="noselect fade"> 4 گزینه ای</span></label> <input type="radio" name="istest'.$i.'" id="nottest'.$i.'" value="nt2" onclick="add_choice(\'c'.$i.'\' , \'nt2\');"/><label for="nottest'.$i.'"><span class="noselect fade"> تـشریحی</span></label> </div> <form method="post" > <input type="hidden" name="tid1" value="'.$tkey.'"/> <input type="hidden" name="thisquestion1" value="'.$i.'"/> <div class="choosepart" id="c'.$i.'"></div> <div id="res"> </div> <input class="fade" id="sc'.$i.'" style="margin-top:5px;" type="button" name="send" onclick="formget( this.form , \'tests.php\' , \'res\' , \'dd\' ,\''.$i.'\');" value="ثبت این سوال" disabled/> </form> </div> </li> '; }
ajax put input elements in div of above code :
<div class="choosepart" id="c'.$i.'"></div>
how can moderate that?
thanks in advance
when use ::
trying access method statically function signature should declared as: public static function toword2()
.
i think defined method toword2
non-static , trying invoke static. said.
1) if want invoke static method, should use ::
, define method static.
// defining static method in foo class. public static function toword2() { /* code */ } // invoking static method numerichelper::toword2();
2) otherwise, if want invoke instance method should instance class, use ->
.
// defining non-static method in foo class. public function toword2() { /* code */ } // invoking non-static method. $objnumerichelper = new numerichelper(); $objnumerichelper->toword2();
you can ride same thing about oop & static methods in php
Comments
Post a Comment