Jump to content

Search the Community

Showing results for tags 'java script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. I need to call a javascript or a php function from a form made in php, so that I could make change in data base on clicks. 1)I included the function on onclick event on submit but nothing happens. 2)The file name in which this code is include is view_users.php could someone hel me solve this <?php mysql_select_db("programmers") or die(mysql_error()); $data = mysql_query("SELECT * FROM user_allotment") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { echo "<tr>"; echo "<td>".$info['id'] . "</td>"; echo "<td>".$info['uname'] . "</td> "; echo "<td>".$info['password'] . "</td>"; $id=$info['id']; echo "<form method="post" action="view_users.php">"; echo "<td><label><input type="button" name=/"$id/" value="edit" align="middle" onclick="edit()"/></label></td>"; echo "<td><label><input type="button" name=/"$id/" value="delete" align="middle" onclick="edit()"/></label></td>"; echo "<td><label><input type="checkbox" name=/"$id/" value="privilege" align="middle" onclick="edit()"/></label></td>"; echo "</form>"; echo "</tr>"; } ?>
  2. Hi. I have here my Javascript code that adds dynamic textbox (row) my problem is how can I save this to database using PHP script? How you can help me guys.. Thanks! <script type="text/Javascript"> function addRow®{ var root = r.parentNode;//the root var allRows = root.getElementsByTagName('tr');//the rows' collection var cRow = allRows[0].cloneNode(true)//the clone of the 1st row var cInp = cRow.getElementsByTagName('input');//the inputs' collection of the 1st row for(var i=0;i<cInp.length;i++){//changes the inputs' names (indexes the names) cInp.setAttribute('name',cInp.getAttribute('name')+'_'+(allRows.length+1)) } root.appendChild(cRow); } function shownames(){ var allInp=document.getElementsByTagName('input'); for(var i=0;i<allInp.length;i++){ alert(allInp.name) } } </script> My HTML code: <form method= POST> <table width="1024" border="0" cellspacing="6" cellpadding="0"> <tr> <td width="195"><div class="user"><input type="text" name="textfield_a" id="user" tabindex="6"/></div></td> <td width="410"><div class="reported"><input type="text" name="textfield_b" id="reported" tabindex="7"/></div></td> <td width="399"><div class="reported"><input type="text" name="textfield_c" id="reported" tabindex="8"/></div></td> <td width="10"><input name="button" type="button" value="+" onclick="addRow(this.parentNode.parentNode)"></td> </tr> </table> </form>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.