![]() |
|
|
|
#1 |
|
Please anybody help me........
I am trying to insert a record from HTML page controls (textbox ) to MS Access database. I am using following coade for that, but I am not geting result. Please anybody can guide me for these codes. <html> <head> <title>Feedback Form</title> <script type="text/javascript"> window.write("hello"); function getSubmit() { var name,email,comments; name=name.value; email=email.value; comments=commnets.value; var cn = new ActiveXobject("ADODB.Connection"); var rs = new ActiveXObject("ADODB.Recordset"); var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Documents and Settings\Velosys2-office\My Documents\feedback\Users.mdb"; var SQL = "INSERT INTO user_tbl(uName,Email,Comments) VALUES (" & _ "'" & name& "'," & _ "'" & email & "'," & _ "'" & commnets & "')" cn.Open(strConn); rs.Open(SQL, cn); rs(1)=name.value; rs(2)=email.value ; rs(3)=comments.value; rs.Close(); cn.Close(); } </script> </head> <body> <div align="center"> <table width="80%" border="0"> <td><b>FEEDBACK FORM</b></td> <tr> <td>Name :</td> <td><input type="text" name="name"></td> </tr> <tr> <td>Email :</td> <td> <input type="text" name="email"></td> </tr> <tr> <td>Comments :</td> <td><textarea name="comments"></textarea></td> </tr> <tr> <td> </td> <td><input type="button" value="submit" onclick="getSubmit();"> </td> </tr> </table> </div> </body> </html> I tried with action in HTML codes too, I called another asp page with action ,but instead of running codes on that asp page it is just opening that asp page and asking to save/open that asp page. hiralcp |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| javascript not working in Html | kgriffin | General Help Related Topics | 0 | 10-19-2008 10:46 PM |
| Store HTML table Values into Database | subscribeid | Software | 0 | 09-05-2008 02:39 PM |
| how to write codes to connect access database using html codes | hiralcp | Software | 0 | 12-18-2007 08:49 PM |
| CSS (& Javascript) - a:active | ruffy | Software | 0 | 10-30-2006 06:53 PM |