[jQuery] Re: Determine content type in $.post callback

2009-07-15 Thread dnagir
Hi Peter, Will try tomorrow. I believe this is exactly what I am after. Thanks a lot. Cheers, Dmitriy.

[jQuery] Re: Determine content type in $.post callback

2009-07-14 Thread dnagir
Hi, So the XHR is ONLY available from $.ajax and there's really no way to get it from methods ($.post)? I actually need this data in the ajaxSubmit callback of AjaxForm plug- in. This sounds like I have no option except to abandon the plug-in and do the work manually (or modify it)? Cheers.

[jQuery] Re: Chaining $.append

2009-07-13 Thread dnagir
Ohh. Guys, thanks a lot for the help. It DOES work. Problem was: The #foo element on the sample page is in IFRAME so it is not available from main page. Sorry, I missed this. Cheers.

[jQuery] Re: Chaining $.append

2009-07-13 Thread dnagir
James, > You forgot a closing quote on: > onclick='return false; This does not work either for me: $("newly added").appendTo("#foo") Tried on the same page in Firebug. http://docs.jquery.com/Manipulation/appendTo Does it work for you? Am I doing something wrong? Cheers, Dmitriy.

[jQuery] Re: Determine content type in $.post callback

2009-07-13 Thread dnagir
Hi Peter, >     var ContentTypeHeader = this.contentType; "this.contentType" is the content type of the REQUEST. I need to get the ContentType of the RESPONSE. No chance of getting it? Cheers, Dmitriy.

[jQuery] Re: Chaining $.append

2009-07-13 Thread dnagir
Hi Cody, > $("").text > (data.Name).appendTo("#prods-list"); I tried this: $("http://docs.jquery.com/Manipulation/appendTo But it doesn't seem to work for me. Cheers, Dmitriy..

[jQuery] Re: Determine content type in $.post callback

2009-07-13 Thread dnagir
Hi Rob, But I don't see where I can get the XMLHttpRequest objects. Only one thing related to XHR is this.xhr() function. And it returns a new XHR object, so obviously it has no headers. What am I missing? Cheers, Dmitriy. > > How can I check the ContentType header in the $.post callback? > >

[jQuery] Chaining $.append

2009-07-13 Thread dnagir
Hi, I'm using the code to create DOM. But the append returns current element and not the one it has created. So after I create some elements via append (or similar) I have to query to obtain the element. Isn't there other way of doing it? Instead of this code : var domId = "prod-" + data.Id; $("

[jQuery] Re: Determine content type in $.post callback

2009-07-12 Thread dnagir
Anybody? How can I check the ContentType header in the $.post callback?

[jQuery] Re: Dialog: set focus after 'show' animation

2009-07-12 Thread dnagir
Hi Richard, I added the bug report (4675). Sorry for posting UI question here. Cheers, Dmitriy.

[jQuery] Re: Dialog: set focus after 'show' animation

2009-07-09 Thread dnagir
Anybody?

[jQuery] Dialog: set focus after 'show' animation

2009-07-08 Thread dnagir
Hi, I'm using this code: var editDialog = $('#dialogEditor').dialog({ modal: true, autoOpen: false, position: 'top', width: dialogWidth || 300, show: 'fold', // focus is not set when this animation is enabled hide: 'fold', open: function

[jQuery] Re: Determine content type in $.post callback

2009-07-08 Thread dnagir
Hi Guys, Thanks a lot. Both eval and prototyp-ish ways are ok. Another question on this. The server returns ContentType header with value application/json. How can check this in the callback of the $.post function? I just don't see ContentType in any properties of "this". Cheers, Dmitriy.

[jQuery] Re: Determine content type in $.post callback

2009-07-07 Thread dnagir
SON On Jul 8, 1:12 am, Giovanni Battista Lenoci wrote: > dnagir ha scritto:> Anybody please? > > if(typeof(ret_data) == 'object') { > > } > > or if it's not evalueated by jquery try to eval with a try/catch block. > > :-)

[jQuery] Re: Determine content type in $.post callback

2009-07-07 Thread dnagir
Anybody please?

[jQuery] Determine content type in $.post callback

2009-07-07 Thread dnagir
Hi, How can I check if the content type is JSON or HTML here (server can return any)? $.post(url, params, function(data) { if (!isDataInJsonFormat(data, this)) { editDialog.html(data); return; };

[jQuery] Suggest scenario for pup-up form edit

2009-07-06 Thread dnagir
Hi, The scenario is: On a page there's an area with some details. When user click there a dialog opens to edit the fields. User can click Close/Cancel or Save. If Cancel - dialog gets closed. If Save -the data gets posted and then one of the 2 scenariouses happen: 1. Data is valid - dialog is cl

[jQuery] Re: Rollover Effects instead of alternate images

2009-05-24 Thread dnagir
Everybody, Thanks a lot for your all your replies. I appreciate it. I'll proceed with poor CSS and no JS. Cheers, Dmitriy.

[jQuery] Re: Rollover Effects instead of alternate images

2009-05-22 Thread dnagir
> Modern rollovers use a single image, not multiple images (you can use > a single image for all rollovers if you want). > > > But we always must have 2 images (similar ones). > > No, you don't. > Thanks a lot. I must have think about it. > > I understand it will never be as good as alternative i

[jQuery] Rollover Effects instead of alternate images

2009-05-21 Thread dnagir
Hi, Just wondering if there's some effect in JQ that we can use to simulate rollover. Usually when user hovers a mouse over a link/image it changes its src/ background to another one (for example arrow.png -> arrow_o.png). So users feels like it is highlighted or similar. But we always must have

[jQuery] Help choosing JavaScript library

2009-04-17 Thread dnagir
Hi, I know.. probably a bit naive but still. Sorry if something... Guys, can you please help me to choose JS library and say your experienced opinion on each one: http://dnagir.blogspot.com/2009/04/javascript-library-survey.html Much appreciated and many thanks in advance! Dmitriy.