how to change javascript to php script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chitiey
    New Member
    • Nov 2006
    • 2

    how to change javascript to php script

    i would like to change some javascript to php script.

    there's d javascript

    function addRowToTable()
    {
    var tbl = document.getEle mentById('tblSa mple');
    var lastRow = tbl.rows.length ;
    var iteration = lastRow;
    var row = tbl.insertRow(l astRow);

    var cellLeft = row.insertCell( 0);
    var textNode = document.create TextNode(iterat ion);
    cellLeft.append Child(textNode) ;

    var cellRight = row.insertCell( 1);
    var el = document.create Element('input' );
    el.type = 'text';
    el.name = 'txtRow' + iteration;
    el.id = 'txtRow' + iteration;
    el.size = 40;
    el.onkeypress = keyPressTest;
    cellRight.appen dChild(el);

    var cellRightSel = row.insertCell( 2);
    var sel = document.create Element('input' );
    sel.type = 'text';
    sel.name = 'txtRow' + iteration;
    sel.id = 'txtRow' + iteration;
    sel.size = 20;
    sel.onkeypress = keyPressTest;
    cellRightSel.ap pendChild(sel);
    }


    help me plezz... :D
  • vssp
    Contributor
    • Jul 2006
    • 268

    #2
    <?php
    function addRowToTable()
    {

    $tdl=$_POST['tblsample');


    }

    ?>


    Thsi way using to whole function to change php

    vssp

    Comment

    • chitiey
      New Member
      • Nov 2006
      • 2

      #3
      thanx...i hv to work harder n harder 4 dis lah...

      Comment

      Working...