Paul Collins schrieb:
Thanks for your help Jörn, that's solved that part of my equation.
I'm stuck again! I would like to find out how to get the value of an
id that ends in "_replace"
So for instance, I have the following line that looks for a input tag
with the type of submit, that has an id ending with "_replace". (It
can have anything before that).
So, for EG: <input type="submit" id="sendButton_replace" value="Send"/>
I then want to get the entire content of the id and store it into a
variable. I would also like to get the text in the Value and store it
as another variable.
I currently have:
$(document).ready(function(){
$(":submit[id$='_replace']");
var replaceID = $(":submit[id$='_replace']").val;
alert (replaceID);
return false;
});
How about...
$(":submit[id$='_replace']").attr("id")
Jörn