Closed GoogleCodeExporter closed 9 years ago
I'm also getting this error. I'm not sure exactly what is causing it but when I
have the watermark added to my form it causes an error in jQuery when the forum
is submitted, either via calling the submit event or just through a manual form
submission using a submit button.
It must be something else on the page that is causing the problem with the
watermark plugin.
Original comment by disc...@gmail.com
on 21 Jun 2010 at 3:54
Please install the latest release - 3.0.6. I can't guarantee the plugin will
work with every combination of third party software, but I have inserted many
sanity checks in the latest version that should catch errors like what you've
been seeing.
I'll close this issue, but please post again if you find this or something else
that interacts unexpectedly.
Original comment by t...@speednet.biz
on 22 Jun 2010 at 2:38
I experience this issue also.
Am not using google maps, and only a few jQuery UI widgets.
Tried jQuery 1.4.2 and 1.4.4
Using watermark 3.0.6.
stack:
jquery.watermark.js hideAll:
$.watermark.hide(":text,:password,:search,textarea")
jquery.watermark.js hide: $(selector).filter(selWatermarkDefined).each(
jquery-1.4.4.js(25) return new jQuery.fn.init( selector, context );
(188) return new jQuery.fn.init( selector, context );
(4340) jQuery.find( selector, this[i], ret );
(4119) return oldSizzle(query, context, extra, seed);
(3098) set = ret.expr ? Sizzle.filter(ret.expr, ret.set) : ret.set;
(3269) found = filter( item, match, i, curLoop );
(3677) return filter( elem, i, match, array );
(3601) return "text" === elem.type;
typeOf elem is DispHTMLGenericElement
elem.type is not defined
console.log(elem.type) returns "failed"
I initialize with:
function showWatermarks(isInit) {
$('#searchCriteria [placeholder]').each(function () {
var that = $(this);
if (isInit) that.watermark(that.attr('placeholder'));
else that.watermark();
});
}
With no elements matching the selector, form submission works fine. With
matching elements, I get the error described by the first reporter, a very
vague "Error" statement from IE.
Original comment by syndicat...@gmail.com
on 30 Nov 2010 at 1:31
Correction, a very vague "Failed" message, the same as returned by
console.log(elem.type) when broken on the error.
The error is the same as referred to in this article:
http://samuli.hakoniemi.net/when-jquery-returns-failed-in-ie-and-how-its-probabl
y-resolved/
It doesn't surface any errors in the browser status, only in the script
debugger. After this of course my form submit is not canceled, so the page
navigates away. Perhaps browser status would otherwise reflect javascript
errors.
Also, the invalid element iteration is first selected by stack line 3269
if ( match ) {
for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
if ( item ) {
found = filter( item, match, i, curLoop );
see attached graphic for details.
Original comment by syndicat...@gmail.com
on 30 Nov 2010 at 7:23
Attachments:
also of note, I've tested again with jquery.ajaxmanager as the only plugin
referenced.
That plugin is core to my app, so I didn't rip it out, but it doesn't do
anything active with the DOM anyway, afaik, and the error occurs the first and
every form submission.
Original comment by syndicat...@gmail.com
on 30 Nov 2010 at 4:03
I'm guessing that the problem is that you are trying to use the placeholder
attribute. Don't do that, because the plugin manipulates the placeholder
attribute directly.
You can try using an attribute such as data-placeholder, which in jQUery 1.4.4
gives the added benefit of allowing you to retrieve the text like
$("#id").data("placeholder").
Original comment by t...@speednet.biz
on 3 Dec 2010 at 4:04
That's correct, I was trying to use the "placeholder" attribute. I'll stop
that :) Thank you for the followup.
Original comment by syndicat...@gmail.com
on 3 Dec 2010 at 6:12
Original issue reported on code.google.com by
allist...@gmail.com
on 2 Jun 2010 at 3:46