All your solutions don't take into account that IE6 will still submit
the form if you hit enter
Good catch, Klaus. As usual!
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
since blockUI is generally a very useful thing i'd like
to propose a fairly simple workaround: just don't do the
blending when firefox/linux is detected - only display the
popup.
@bander: Thanks for the feedback. 3 seconds is an interesting value
because that's exactly how long the server
I can't seem to find the center() plugin that is listed at visualjquery.com,
anyone know where it is?
http://jquery.com/dev/svn/trunk/plugins/center/center.js?format=txt
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Perhaps a better option would be for the overlay to use the same
background (image or colour) as the page? The effect would be the same
as having a page with only the loading message on it.
I think that would be rather jarring visually. The page should remain
visible, just not usable.
For
Also, why does a string get returned as an array instead of a string?
I think that's just a firebug thing. It sees that the object has a
length prop and treats it like an array.
But more interesting is that your test did not produce the expected results.
is there any easy possibility to send a GET request like when sending it
via normal html? I am trying to simply load an URL with some GET
parameters, but I cannot load it in the foreground, but only with
getting a result set which represents the whole HTML code.
That sounds like the default
No, you didn't really. But I have to use some JS to do this, because the
html form won't work that way. I am using a CMS that builds a form
around all the content which prevents a form from being usable in the
usual way, because nested forms don't work. So I have to manually read
out the
I think that's just getting too fancy for this plugin. This is meant
to be a very low overhead solution and I'd like to get the size down
to 1K if possible.
Well, I couldn't get it under 1K, but it's under 2! (packed)
I've made the following changes to blockUI:
- ghosting is not performed
do jquery selectors support something like 'select every [EMAIL PROTECTED]
OR password]', eg: $('[EMAIL PROTECTED]|password]) ? .. i know i can select
them like $('[EMAIL PROTECTED],[EMAIL PROTECTED]'), but the other method
could be faster, if supported, i think :)..
I think you can do
hmmm, is it necessary to use this.functionName?
Yes, if you want the function to be public. Otherwise, no.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
In IE, innerHTML (aka .html()) will not retain the script from the
response. evalScripts which tries to .find('script') will not find
anything. And exactly that will be executed.
Jan,
This does work, as long as there is something before the script tag.
See this bug report for details:
Well, while I'd still like to know if this selector was added to the API, I
did find a solution to my problem.
It's been in core since v1.0.2.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
But in jQuery 1.1. it is not like that and submit() invokes the submit
method of the form as well (at least according to the changelog). I was
trying to describe the concerns I have with that.
No, that's not true. $(..).submit() does *not* submit the form.
I found it right here ...
http://docs.jquery.com/Ajax#.24.ajaxSetup.28_settings_.29
or is there some global object that you can extend?
That was added in v1.1.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
FireBug say $(this).id is not a function
What is to do?
You'll need to rewrite that as: $(this).attr(id)
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Strangely, the button element has no methods
whatsoever[1]
[1]
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-34812697
According to this spec they do:
http://www.w3.org/TR/html4/interact/forms.html#h-17.5
___
jQuery mailing list
According to this spec they do:
Sorry, Klaus, I think I misread your post.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Plus, it's driving me crazy.
Be aware that thickbox also uses $(document).ready(). If it runs
before your code then things won't work. You may need to do this so
that your doc-ready is registered first:
script type=text/javascript src=jquery.js/script
script type=text/javascript
Therefore how can i use JQuery to return the html tabl element object?
$(..) is not a shortcut for document.getElementById. It returns a
jQuery object, not a DOM element. Use this to get the element:
$(#allProjects)[0];
___
jQuery mailing list
Try this:
$.ajaxStart($.blockUI);
$.ajaxStop($.unblockUI);
It is $.ajaxStart not $().ajaxStart (these are not supposed to be
Klaus, that doesn't work. ajaxStart, and the rest, are bound to the
jQuery prototype. $.ajaxStart is not a defined function.
$.fn.ajaxStart is.
I said I was confused yesterday... I have never used them and thought
they work like $.ajaxTimeout. Ok, then make it:
$(document.body).ajaxStart($.blockUI).ajaxStop($.unblockUI);
That will work. But I still prefer this syntax:
$().ajaxStart($.blockUI).ajaxStop($.unblockUI);
:-)
If the example on that page won't work with the latest plug-in, shouldn't
it be changed? Or is there a different site now that shows more current
examples?
The example page and source code are in sync and always have been.
Your version is not in sync with the example page. Sorry for the
Whew! I thought for a moment that I was going crazy. I'll download the
unpacked version and use it for the time being. Thanks for looking into it
for me Mike! :o)
No problem, Chris. That was my fault for not testing the packed
version. Lesson learned. I'll upload the new stuff tonight
I thought I had this working, but now I'm getting the following error in
the FireBug console:
Chris,
It's surely a bug in my code but do you have a test page where I can
test it? Thanks.
Mike
___
jQuery mailing list
discuss@jquery.com
$.fn.isEmpty = function() {
var isempty = true;
this.each(
function() {
if (this.value.length != 0) {
isempty = false;
}
}
);
return isempty;
anyone know the difference between these two?
ajaxStop is triggered when the number of outstanding ajax requests
reaches zero. ajaxComplete is triggered after each response is
received. ajaxComplete is also passed the XHR and the settings
object.
I'm trying to find out if there's a jQuery equivalent to this:
form.ElementName.select();
Those DOM methods are still available to you:
$('#myInput')[0].select();
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
So in my refactoring, I have been doing this:
function test(arg1,arg2){
obj = (typeof arg1 == 'string') ? $('#'+arg1) : $(arg1);
return obj;
}
At some point you're going to bite the bullet and convert all the
calling functions to include the '#' right? Hope so. Until then you
could just
jQuery.fn._find = jQuery.fn.find;
jQuery.fn.find = function(t, context) {
if (typeof t == 'string')
t = '#' + t;
return this._find(t, context);
}
Of course that really limits how you can use jQuery but it may get you
over the hump.
Maybe this one make more sense:
jQuery.fn._find = jQuery.fn.find;
jQuery.fn.find = function(t, context) {
if (typeof t == 'string' document.getElementById(t))
t = '#' + t;
return this._find(t, context);
}
It's sort of a Prototype conversion plugin I suppose. And probably
useful
I have a form with multiple checkboxes, each with their own unique id.
How do I go about returning the ids of the selected checkboxes into an
array?
This should do it:
var a[];
$(':checkbox').each(function() {
if (this.id) a.push(this.id);
});
At the point of doing document.getElementById(t), you might as well just
return that since that's all jQuery is going to do anyways.
No, jQuery will validate that the elem is within the given context (if any).
You might consider something like (only tested on FF2/win32):
jQuery.fn._find =
I finally got around to finishing the pages and packaging the plugin last
night. Enjoy!
Excellent work , Jonathan! Note that the compatibility plugin is
necessary for use with jQuery v1.1.
Mike
___
jQuery mailing list
discuss@jquery.com
Nicely done...
This might be a setting you've got on the menu, but it doesn't seem very
responsive. It's almost a whole second of wait onmouseover for the menu to
popup.
Yeah, it's 500ms which is a bit sluggish for my liking as well. Just
mod the file if you want something different. I set
try to use jdMenu with jquery-1.1b.js i receive an error:
$(this[0]).ancestors is not a function
in jquery.jdMenu.js (Line 28)
Um, you quoted the answer to your own question.
Excellent work , Jonathan! Note that the compatibility plugin is
necessary for use with jQuery v1.1.
the docs say that load
Bind a function to the load event of each matched element.
But if you notice, the docs indicate there is more than one load
function. The one you're quoting is a bind for the load event.
You're invoking a load action directly for which the docs say:
Load HTML from
function checkState(id) {
if ($(id).className == something) { etc
Use the is method:
$(id).is(something);
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Stephen,
I put up a sample page that shows how to use blockUI to display a
modal dialog. This may help give you some ideas.
http://malsup.com/jquery/block/dialog.html
Mike
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Pretty cool, Mike! Having the hourglass cursor inside the dialog is kinda
annoying though...
Good catch, Aaron - thanks. That style was bleeding through because I
forgot to add the cursor style on the question dialog. It's fixed
now.
Mike
___
You need to use ajaxForm() for that functionality. ajaxSubmit() will not do it.
Mike
On 1/15/07, yi huang [EMAIL PROTECTED] wrote:
I've found a similar question here
(http://jquery.com/pipermail/discuss_jquery.com/2006-August/009469.html)
.
But it seems that it's still not resolved .
--
I think it's really well done. Don't let them get you down Joshua...great
job.
I agree. I think it looks quite nice.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hi Lucas,
Issue 2: $(#el).load doesn't support post params any longer
This is a bug and will be fixed. You can fix it in your own copy by
editing this line in the load function:
if ( jQuery.isFunction( params.constructor ) ) {
Change it to this:
if ( jQuery.isFunction( params ) ) {
Issue
Anyone know if this is my doing or a bug?
There's a bug in the load function. See this thread for a temporary
work-around:
http://jquery.com/discuss/2007-January/021767/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I like using the load method a lot, and with jQuery 1.1,
I've noticed that now it doesn't post the object params parameter to
This has been fixed in SVN.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
On 1/16/07, Guntur N. Sarwohadi [EMAIL PROTECTED] wrote:
I already downloaded the latest revision, 1073. but still found the
fn.apply is not a function error after calling load(url, data). is this
the right revision with that fix for load? sorry for being stupid.
No, it's not in 1073. I just
var arrElementos = $(p).get();
var tempo = 1000;
for(var i in arrElementos) {
if (i == 0) {
setTimeout($(arrElementos[i]).DropInRight(1000), tempo);
}
else {
setTimeout($(arrElementos[i]).DropInLeft(1000),
tempo);
}
}
This
I ran this to try to look at the Object (using 1.04):
and learned quite a bit. (Although the page never fully loads, not sure
Yes, that's the API. Those are the properties and methods on the
jQuery object. You can view this information in a more useful format
online. Sam posted some very
Can anyone tell me how to solve this?
The code you have should work fine if it's moved to a doc-ready
function. But you can simplify it even more with ajaxForm:
$(function() {
$('#myForm').ajaxForm( { target: '#myForm' });
});
Remember, you need to wait for doc-ready before accessing dom
Harald,
I just re-read you post. You just need to run the ajaxForm code
within the callback method of $.post. In other words, after the new
form has been added to the dom you can prepare it using ajaxForm.
Sorry for the confusion.
Mike
___
jQuery
Ahh, that explains it. There isn't a submit button on the form. I have an
image that triggers the validation.
So... is there a way to get the form to submit without that. Perhaps I
should have a hidden submit button?
You don't *have* to have a submit button on the form, but you really
Anyway, grab it here:
http://gsgd.co.uk/sandbox/jquery.easing.php
Nice! Great stuff, George.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Jeez Mike, way to make me feel even older.My eleven year olds
haven't a clue what JavaScript is, but they're pretty good at
linerider! (http://www.linerider.com/)
Mike
On 1/17/07, Michael Geary [EMAIL PROTECTED] wrote:
Guys, I don't appreciate the profanity. My 10 and 11 year old
Hi frieds,
I am struggling with small query
In a form there are mutiple checkboxes , i have to check on next button
click that at least one checkboxes is checked or not
Using the form plugin you can do:
if (!$('#myFormId :checkbox').fieldValue()) {
// no checkboxes are checked
}
I set up a google-groups archive of this mailing list.
For those that don't know, the mailing list is also available on
Nabble (and has been for quite a while):
http://www.nabble.com/JQuery-f15494.html
___
jQuery mailing list
discuss@jquery.com
This works fine for the first step (the form that is initially loaded), but
fails to bind to the newly loaded form after submit. I tried moving the
recursive call into the after/success callback of .ajaxSubmit, but it didn't
make any difference. Not sure what else to try. Any suggestions?
I have been using the deserialize plugin to fill forms with JSON. But it
doesn't work properly with jQuery 1.1 Here are two test pages:
Bruce, the problem is a result of this bug:
http://jquery.com/dev/bugs/bug/804/
which has been fixed and is available now in SVN.
Mike
That would still be a bad way to do it i'd say, because if theres more than
one element with the id 'warningmsg' (I know there shouldnt be, but you cant
count on these things), it would fire more than once. I would just use if
($('#warningmsg')[0]).
Not true. If you have multiple elements
I think IE (c'mon, do I even need to *finish* this sentence?) returns an
array in those cases.
Just to clarify, the MS docs say that getElementById returns the first
object with the same ID attribute as the specified value.
___
jQuery mailing list
Hope someone can help me fix this, i'm not sure wether its jQuery, or my
javascript.
Try including Nifty before jQuery.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
what format does the return information need to be to get showResponse to
execute when dataType is set json, and with that said, should I have the
dataType set if I will be return information in the format of:
logged: true, moreinfo: the text, someother: blahblah
I suspect you're getting a
I'd love to do that!
Excellent. Glad to hear it. Thanks, Klaus!
Let's get it moved into SVN too.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
i have now release a stable Version. Have a look at:
http://olaf-bosch.de/bugs/jquery/faviconlinkmarker/index.html
Cool stuff, Olaf.
I love that the Nifty Corners favicon is distinctly square. :-)
___
jQuery mailing list
discuss@jquery.com
I'm new to jquery, I'm trying to make something that work
with jquery and form, but I'm in error and I don't know where:
You need to return false after your alert so that the normal browser
and page navigation is canceled.
I'm working on some major updates to my form plugin example page so
If you know some link where I can find good material, please let me
know where.
There is some good material here, just updated tonight.
http://www.malsup.com/jquery/form/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
This may have already been dicussed, but I just now noticed it. Has
anyone looked at http://joern.jquery.com/api-draft/cat.xml#cat recently?
It now contains the different sections of the API in a collapsible
tree-view.
I agree. It's really quite nice. And it makes great use of plugins.
For anyone seeking information about how to manage forms with jQuery,
I've just updated the Form Plugin example page at:
http://malsup.com/jquery/form/
You can find a quick start guide, API docs, examples, a FAQ and more.
Mike
___
jQuery mailing list
Did you use a (modified) version of my docTool for the API?
Hi Jörn,
Unfortunately I already had that part done when you posted about your
docTool! When I get time I may update that page using the docTool
because it provides some extra bits that I didn't include (tooltips,
etc). But first I
I'd also like to use Chili for the API browser. Looks like I have the
same problem that you had. What exactly did you modify to get it working?
Yeah, I like Chili a lot. I made a couple changes for optimization
because I didn't want unnecessary server calls and there were a couple
minor bugs
Recently I've started using the form plugin and I've noticed in firebug that
the X-Requested-With header is not being sended for POSTs requests. GETs
work fine.
I'm using last versions for both jquery and form plugin and Firefox 2.0
is it normal behaviour or do I loosing something?
Jip,
I
Is it important for us to be concerned with our Web portal applications
degrading gracefully if the user has scripting disabled in their browser?
That's a question only you (and your team and your managers) can
answer. But don't code yourself into a corner if you don't have to.
Consider what
So I thought, JavaScript or jQuery might be of help. If I detect the
old domain name, use jQuery to force a change. We mainly use FF2, IE6,
You should handle this type of redirect on the server.
___
jQuery mailing list
discuss@jquery.com
I found the issue, it seems blockUI is hardcoded to have a width of 250px
Hi Gavin,
I optimized for what I anticipated to be the most common use case:
adding a simple text message. In cases like that any block element
will grab as much width as it can which makes it difficult to get the
right
Marc, you're right - this should be documented!
I updated the docs with the following:
IMPORTANT NOTE ON STYLES AND POSITIONING:
The default styling of the blocking message includes the following:
top:50%;left:50%;width:250px;margin:-50px 0 0
What do you think of adding a third bool flag that if set, tells it to
calculate
the margin and dimensions?
Gavin,
How did you calc the dimensions in modalContent if there weren't any
specifically assigned. Or would the bool flag imply that the new
message has explicit dimensions that can
IE6 freezes, and I need to kill the proccess. After that, I visited
Damn, it sure does. I'll have a look at it Juan.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
IE6 freezes, and I need to kill the proccess. After that, I visited
Damn, it sure does. I'll have a look at it Juan.
Interesting. It's this call that causes the problem:
var h = jQuery.curCSS(this, 'height');
Anyone know why that might be?
I'm struggling with these global ajax callback handlers. The
documentations states as follows:
$(#msg).ajaxComplete(function(request, settings){
$(this).prepend('pSuccessfully loaded url: ' +
settings.url + '/
p');
}
);
Those docs
Does anyone see a problem with what I have that keeps the
rounded corners from working?
You don't ever invoke the corner method. You need to add a script
that causes the rounding:
script type=text/javascript
$('.demo').corner();
/script
___
jQuery
The IE6 bug in the corner plugin has been fixed. Apologies to anyone
that was having a problem with it! You can get the latest rev here:
http://jquery.com/dev/svn/trunk/plugins/corner/jquery.corner.js?format=txt
___
jQuery mailing list
That would result in adding the following code to the body:
div align=right class=my_div
http://alterform.com Alterform
/div
I think DOM tools are great for working with nasty things like tables,
but jQuery handles simple insertions quite well on its own. Your
example could be written
Hi Nate,
I just reread my last message and it seems very negative - I didn't
mean for it to sound that way. Your plugin is cool and quite tiny!
Nice work.
Mike
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
This plugin is something I've just started working with, and I am very
interested in community comments. The default CSS has some
cross-platform issues -- IE fixed positioning, maybe more. I have to run
IE under wine so I'm not seeing any transparency... nor can be sure it
works. Safari
So, for instance, with that link inside that div, sometimes as I create it,
I'd like to attach an event to JUST that anchor tag, rather than having to
create a custom ID, assign it, then do another jQuery call to bring it up
and attach an event.
Still doable, but less readable:
$('a
It would be nice to allow clicks presses ONLY if originating from
within the modal window. Perhaps this could be accomplished by examining
focus parent? Would this block users from typing in the browser's
address bar? The goal would be to allow a form within a modal window to
be populated
Bruce,
Ugh. I meant Brice. Sorry!
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
The time has come:
http://jquery.bassistance.de/api-browser/
Fantastic, Jörn. This is a really great tool.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I want to submit the form on change of a dropdown selection rather than
clicking the submit button.
Hi John,
ajaxForm is not the right method to use in your case. ajaxForm adds
event listeners so that it can submit your form data when the user
clicks a submit element. To submit the form data
It appears to not work at all in safari, all corners are black.
At first I thought this was by design on the demo page, but now that
I look at it in FF, corners are white.
Like Dave said, you need to assign background colors in Safari. What
demo page has this problem? This Safari screenshot
Keep in mind, that page has 448k in JS. Too big to use.
The dialogs aren't really modal either because you can activate other
links via keyboard.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
I have just updated the Tabs plugin, which now supports loading tab
content via Ajax. As you would expect I did that in an unobtrusive manner.
As always, great job, Klaus. This is a great feature.
Watching it in FireBug it looks like there's a little issue with
double loading. Not always,
At long last, I have put together a downloadable Visual jQuery package.
Nice, Yahuda. I like the stream-lined UI.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Whoa! What?!? Did you just update your site? All I've seen is the ajaxForm
and ajaxSubmit tabs. Anyway, thanks - it was just what I needed!
Yes, I just added some more examples. I'm trying to get enough out
there to cover the common questions and some of the not-so-obvious
features. Glad that
I'm really confused why this isn't working. I need serious help... asap!
Hi Christopher,
You code isn't working because $.ajax is an asynchronous call. You
invoke it and give it a callback method (success). That callback
method is invoked whenever the server response is received. You need
to
Is there anyway to reference an element in the request page?
Sure. Just use the jqForm argument. For instance, if you need to
reference an element that has a name attribute of 'username' you would
write:
var element = jqForm[0].username;
You can also perform normal jQuery selections within
Am I right if I say that this only applies to input types that is submitted
with the form? I've tried to get to a div with id=response:
$('#response', jqForm).appendTo(Error message);
return false;
but in vain. I can write to a input element but not anything else, right?
No. The jQuery
$('#response', jqForm).appendTo(Nyhedsbrev type er ikke...);
This looks like the problem. I think you want append not appendTo.
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Good points. You're right of course, key/mouse events should only be
blocked for the underlying content. I'll try to fix that in blockUI
(I found another bug in there too, so thanks for making me take
another look at it.)
I just updated blockUI and added better event handling. Mouse and
One thing that i noticed is, sometimes .css(width) returns 'auto' in
IE, but .width() always successfully return computed width. Any plan
about this? perhaps a .computed(width) ? :)
Brandon, please let us know if this behavior changes. The corner
plugin relies on testing for the 'auto' value.
... i tried this, according to the doc it should work, yet it does not do
what i want: display a wait modal screen on page unload, and hide it when
the page is loaded. what am i doing wrong?
Hi Alexandre,
Do you have a sample page somewhere we could look at?
Yep, a replace() function would be nice.
Here you go, world's smallest plugin:
$.fn.replace = function(o) { return this.after(o).remove(); };
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
201 - 300 of 460 matches
Mail list logo