c# - jQuery event binding issues with radio buttons -


When I load the document on my radio button, then I try to bind an onClick function to get jQuery I am here.

ASP goes back to the database and finds all open markers and then it sends feedback on the page with raw HTML to create an image of a radio button and marker. What I need to do is jQuery (or anything for that matter), an onclick bind, which indicates what is clicked on, so I can send that marker back to the database to add a person .

I have tried till now which is a fat one. In debugging I added alerts to each function and I look like 3x, but attr ('id') is undefined.

This is the html radio button on the form

  & lt; Br / & gt; & Lt; P & gt; Choose the open marker for the new user: & lt;% getMarkers (); & Gt%; & Lt; / P & gt;   

This is codebehind for that call

  while (reader.Read ()) {if (readIndex% 3 == 0) markerTable + = " & Lt; tr & gt; "; String marker id = reader ["marker_id"]. ToString (); String filename = reader ["marker_filename"]. ToString (); MarkerTable + = "& lt; td> Input  & Lt; / Labels & gt; & Lt; / Input & gt; Label for & quot; & Lt; Label = & lt; / TD & gt; "; ReadIndex ++; if (readIndex% 3 == 0) MarkerTable +" "& lt; / tr & gt;"; } If (readIndex% 3! = 0) markertable + "" & lt; / Tr & gt; "; MarkerTable +" "& lt; / table & gt;"; } And markertable = "& lt; p & gt; not empty marker. Please delete the user to continue. & Lt; / p & gt;"; SCon.Close (); Return MarkerTable;   

Bella I have a source pasted from this function in the post.

I have two questions.

  1. Why does this not work? It looks like it should, I'm getting 3 elements from my jQuery selector statement, it's being asked from the $. Document .ready () Why are the characteristics unaffected?
  2. Is there a better way to do this? I was planning to add value to the Value Page variable and then to send it back to the stored procedure on the server with an ASP button, it was planning to add that marker from some other field to the database with some text. I realized I could add an onClick event to the HTML response, but Dang, I need to understand what I'm doing is not working.

    I am very new to the web, so if I am duly out of the mark, then I am open to suggestions.

      $ (document) .ready (function () { $ ('Input: Radio') Each (function (radElem) {var radId = $ (this) .attr ('id'); Alert (radId);}); $ ('Input: radio'). 'Click', function () {warning ('click');});});    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

jsp - Google line chart x-axis shrinks on transition -

java - Reaching JTextField in a DocumentListener -