Jump to content

joymis

Members
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

0 Neutral

About joymis

  • Rank
    Newbie
  1. Hello, I have this code <button class="btn btn-info" onclick="BatchAsign()">Batch</button> <button class="asign_btn" onclick="Asign({a:'1', b:'2'}, this)">Asign1</button> <button class="asign_btn" onclick="Asign({a:'2', b:'6'}, this)">Asign2</button> <button class="asign_btn" onclick="Asign({a:'5', b:'4'}, this)">Asign3</button> <script> function BatchAsign(){ $.each( $('.asign_btn'), function( key, val ) { $(this).trigger( "click", ['all'] ) }); } function Asign(arr, dom, x) { if(x == 'all'){ // I want do something } } </script> When I click BatchAsign button, I want pass a extra parameters to Asign. I used console.log(x), it's display 'undefined'. How can I get string 'all' in the function Asign? thanks.
  2. joymis

    can I commit once after multiple forms send?

    Thanks for your reply. I will try this method.
  3. Hello, My web db is oracle, and in my a same page have A form, B form, C form, I used three times ajax send ABC forms to do insert data to db after three times insert data to db, can I commit only one time? thanks.
  4. Thank you for your help I tried delete old dir and then upload the same dir and files again, it is can work. but I still don't know why this happened...
  5. Hello, I have a web dirs like this / obj/ a.php b.php c.php test/ d.php Contents of these files: d.php: require_once '../obj/a.php'; a.php: require_once 'b.php'; b.php: require_once 'c.php'; then I run d.php, the log display: PHP Warning: require_once(c.php): failed to open stream: No such file or directory in /var/www/xxx/test/b.php PHP Fatal error: require_once(): Failed opening required 'c.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/xxx/test/b.php Is there something obvious I'm missing? how do include paths work in PHP? thanks.
  6. joymis

    about ORA-06502 sql error

    ok, thank you for your help
  7. joymis

    about ORA-06502 sql error

    but my OUT bind type maybe number or string or array, or have any function can get OUT bind length? class DBObj{ public function spExec($sql, $params){ $stid = oci_parse($this->con, $sql); foreach ($params as $key => &$value) { if($value == 'sp_return') // I'm not sure $len // could I use something function get OUT bind length? oci_bind_by_name($stid, $key, $r, $len); else oci_bind_by_name($stid, $key, $value); } oci_execute($stid, OCI_DEFAULT) or die($this->dbError($stid)); return $r; } } $db = new DBObj(); // maybe this return number $sql = "BEGIN :ret := aaa(:p1, :p2, :p3); END;"; $params = array(':ret' => 'sp_return', ':p1' => '1', ':p2' => '2', ':p3' => '3'); $result = $db->spExec($sql, $params); echo $result; // maybe this return string or array $sql = "BEGIN :ret := bbb(); END;"; $params = array(':ret' => 'sp_return'); $result = $db->spExec($sql, $params); echo $result;
  8. joymis

    about ORA-06502 sql error

    Hello, I have some code like this $sql = "BEGIN :ret := sifw.sf_todoList('38000', '', 'all'); END;"; $stid = oci_parse($conn, $sql); oci_bind_by_name($stid, ':ret', $r); oci_execute($stid); I got a error : 「ORA-06502: PL/SQL: numeric or value error: character string buffer too small」 if I change oci_bind_by_name($stid, ':ret', $r) to oci_bind_by_name($stid, ':ret', $r, 200), it's work but I don't want to set a current length, because I do not know OUT bind type and length. how can I fixed this error? Thanks
  9. joymis

    embed an external page

    because it's height and scrollbar always out of control and let me crazy. It looks like I will have no choice.
  10. joymis

    embed an external page

    Hello, I have a page https://domainA.com/test.php and I hope embed an external page like http://domainB.com/test.php into https://domainA.com/test.php but I don't want to use iframe or frame In addition to these two methods there are other ways? thanks.
  11. joymis

    Move table row error

    Thank for your help, I'm not notice your main is $("#unexe_table").on("click", ".up, .down", function() {...}) not $(".up, .down").on("click", function() {...}) $("#unexe_table").on("click", ".up, .down", function() {...}) can be work thanks.
  12. joymis

    Move table row error

    Thank you for your help, I thought it would cover the original event handler my code was originally written like this, but tbody content from ajax return and I have use blockUI plugin function SearchQuery(){ $.ajax({ ...... async: false, beforeSend:function(){ $.blockUI({ css: { border: 'none', padding: '15px', backgroundColor: '#000', '-webkit-border-radius': '10px', '-moz-border-radius': '10px', opacity: .5, color: '#fff' }, message: '<p>Searching,please wait...</p>' }); }, success: function(response) { $("#query_content_unexe").html(response['query_content']); actOrder(); }, complete:function(){ $.unblockUI(); } }) } when I use "async: false" blockUI will not work, if I no use "async: false" up and down click will not work, so I used the function
  13. joymis

    Move table row error

    Hello, this is my code demo https://jsfiddle.net/ugkfk64o/ when I click "new" button and then click cell "c" -> "down" button, it will move 2 rows but if I don't click "new" button, I only click cell "c" -> "down" button, it's ok where is this error?
  14. joymis

    How can I get tr index

    ok, thank you for your help
  15. joymis

    How can I get tr index

    it's work. Thank you for your help.
×