How do I reference a hidden input in a specifc form using jQuery? -


I have many forms on that page that all have an hidden input. The form name / id is GPA-Entry-Form-1, I am trying to get the value of hidden fields like this:

  $ ('# deleteThisGPAEntry-1'). Click (function () {var recordId = $ ('GPA-Entry-Form-1 # RCORID'). Val (); Alert ('You clicked me ID:' + recordId); Return return; });  

Unfortunately, I am doing something wrong I

What am I doing wrong?

Thank you,

Josh

< P> You forgot to sign pounds! (Perhaps the most common mistake of jQuery).

Consistent with your form, use GPA-Entry-Form-1 as an ID:

  $ ('# GPA-Entry-Form-1 #recordId '). Val ();  

Use this if its name is:

  $ ('form [name = GPA-entry-form-1] #recordId'). Val ();  

You should use this descriptive selector correctly.

Good luck!


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -