Unless jQuery 1.3 has made vast improvement in the "name=Xxx"
functionality, it is *horrendously slow*! I use a custom function to
access form-fields - $F("fieldName") - which is up to 1000-times
faster on large pages in my web-application. But this method is
dependant on other custom methods, so
Beauty. That's what I was looking for.
And thanks to the point to the docs.
On Feb 6, 4:09 pm, sem101 wrote:
> Always give your elements id's (instead of name values) -- or at least
> a class attribute, so they can be targeted. (You can target name
> values, but it's a bit more work.)
>
> Exa
Without using IDs, you can use:
var myVar = $("input[name=myHiddenInput]").val();
On Feb 6, 10:54 am, james wrote:
> Hi,
>
> If I have a form:
>
> onsubmit="javascript:doStuff()">
>
>
>
>
>
> What is the equivalent JQuery syntax for the following?
>
> function doStuff() {
>
Always give your elements id's (instead of name values) -- or at least
a class attribute, so they can be targeted. (You can target name
values, but it's a bit more work.)
Examples:
var myHiddenInput = $('#myHiddenInput').val();
var myNonHiddenText = $('#myNonHiddenText').val();
$("form#myFor
4 matches
Mail list logo