Taking data from a cell, adding it to form data, making SQL update query

phade2black

New Member
I've been given a problem to fix that's outside my expertise and could do with a little help pointing me in the right direction. I've been searching for a while, but perhaps my search chops aren't up to scratch.Short version: I have data in an html table (populated dynamically). I would like to grab the data from one of the cells, and send it, along with some user-input data, to a SQL update query.Long version:I have a phonebook. It is going to be necessary for individuals listed in the phonebook to update their main contact number on a daily basis. To do this, they will search for their name, and, once found, visit a page that will list all of that person's details in a table. Clicking on a button opens a modal window, in which they will be prompted to type in their new phone number. What I want to do is take that user-input phone number, and take the contents of one of the cells (their name), displayed on that same page, and submit that as a SQL update query.I don't have a lot so far, just the jQuery for grabbing the data from the cell. Any help. no matter how small, would be appreciated. Happy to provide any info or code that would be useful. \[code\]<table id="phone"> <tr> <td colspan="3" id="PhoneDetailHead">Need to change your extension? <a href="http://stackoverflow.com/questions/15573733/#" data-reveal-id="myModal">Click here</a></td> </tr> <tr> <td id="PhoneDetailHead">Full Name&nbsp;</td> <td id="phoneresults userName"><%=(Telephone.Fields.Item("FullName").Value)%></td> <td rowspan="8" id="phoneresults">&nbsp;&nbsp;&nbsp;<img src="http://stackoverflow.com/questions/15573733/<%=(Telephone.Fields.Item("Photo").Value)%>" alt="<%=(Telephone.Fields.Item("FullName").Value)%>" />&nbsp;&nbsp;&nbsp;</td> </tr> <tr> <td id="PhoneDetailHead">Ext&nbsp;</td> <td id="phoneresults"><%=(Telephone.Fields.Item("Ext").Value)%>&nbsp;<%=(Telephone.Fields.Item("Extras").Value)%></td> </tr> <tr> <td id="PhoneDetailHead">Mobile&nbsp;</td> <td id="phoneresults"><%=(Telephone.Fields.Item("Mobile").Value)%></td> </tr> <tr> <td id="PhoneDetailHead">&nbsp;Email Address&nbsp;</td> <td id="phoneresults"> <% strMail = "mailto:" & Telephone.Fields.Item("EMailAddress").Value %> <a href="http://stackoverflow.com/questions/15573733/<%=strMail%>" ><%=(Telephone.Fields.Item("EMailAddress").Value)%></a></td> </tr> <tr> <td id="PhoneDetailHead">Job Title&nbsp;</td> <td id="phoneresults"><%=(Telephone.Fields.Item("JobTitle").Value)%></td> </tr> <tr> <td id="PhoneDetailHead">Department&nbsp;</td> <td id="phoneresults"><%=(Telephone.Fields.Item("department2").Value)%></td> </tr> <tr> <td id="PhoneDetailHead">Site&nbsp;</td> <td id="phoneresults"><%=(Telephone.Fields.Item("siteadd").Value)%></td> </tr> <tr> <td id="PhoneDetailHead">Fax&nbsp;</td> <td id="phoneresults"><%=(Telephone.Fields.Item("sitefax").Value)%></td> </tr> <tr id="phoneresults"> <td colspan="3"><a href="http://intranet/phone/phoneForm.asp" title="New Search">New Search</a></td> </tr> </table>\[/code\]jQuery for grabbing data from the Name cell\[code\]var text = $('#userName').text();\[/code\]
 
Top