javascript - Simple jQuery call to change input value continues returning TypeError $(...) is null -
my hair falling out while i'm trying figure out why jquery keeps throwing typeerror think valid call replace input value in html.
the line below being called in 1 of functions change of input values name "form_key."
$('input[name="form_key"]').val("itworks!");
(resides in http://vt2.net/js/warp/warp.js)
there multiple pages have hidden input name , pages have more once, , i'm trying change value on page.
the page below has 1 firebug keeps showing typeerror no matter how many ways try replace value. http://vt2.net/my-test-product.html
it's simple , stupid keep missing it! ideas?
you use
http://vt2.net/js/lib/jquery/noconflict.js
where define
// avoid prototypejs conflicts, assign jquery $j instead of $ var $j = jquery.noconflict();
so operation jquery, need use $j
instead $
and $
prototype.js
function $(element) { if (arguments.length > 1) { (var = 0, elements = [], length = arguments.length; < length; i++) elements.push($(arguments[i])); return elements; } if (object.isstring(element)) element = document.getelementbyid(element); return element.extend(element); }
Comments
Post a Comment