Jump to content

jQuery : Retrieving VALUES


Andy11548

Recommended Posts

Sorry for the double topic. I realised that I didn't explain it right in the other topic.

 

Right, I have multiple values comming from the same class name.

 

How would I go around retrieving all the values from the same class name.

 

<input type="hidden" class="test" value="1" />

<a href="#">Delete</a>

-----------------------------------------------------------

<input type="hidden" class="test" value="2" />

<a href="#">Delete</a>

-----------------------------------------------------------

<input type="hidden" class="test" value="3" />

<a href="#">Delete</a>

-----------------------------------------------------------

<input type="hidden" class="test" value="4" />

<a href="#">Delete</a>

 

Right, thats pretty much it (not exactly how it is). However, when I try and retrieve the values, it only lets me click on the first "Delete" link. The others will not work as it's only picking up the first Value.

 

If I deleted the first topic (value="1"), the Delete Link then works for Value 2.

 

How do I make them ALL work?

Link to comment
Share on other sites

When the confirm its the one they want to select, it will send the value (being the ID of the post) to a PHP script that will delete it.

 

I just need to get it to recognise the values independantly.

 

Also, each delete link has a ID that is like

<input type="submit" value="Test button" id="test_'.$testF['id'].'" />

 

So, each link has a different number after the "test_" part.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.