Question re: populating a field in a form
Here's te situation. I have a form that needs a specific field updated with a captured URL parameter. I can grab the parameter and I can assign it to a specific field using the following code:
$("div.divName .genericClass:eq(1) input:.Textbox").val(OotBJob);
The problem is all the fields are automatically assigned the same generic class, so I cannot look for a specific class and the field position can potentially change.
Is there a way to find a specific form field by the text that precedes it?
For example if, within this generated form, the layout for each entity is:
<div class="divName">
<div class="Label">Text I Need To Find</div>
<div class="Value">
<input class="Textbox" type="text" value="" name="variedNameByForm">
</div>
</div>
Since "divName", "Label" and "Value" are identical for each form entity, and the name value is different for each form, the only thing I could search for would be the "Text I Need To Find". Can anyone point me in the right direction on this one?