[jQuery] how convert low jquery version function to new version?

2009-08-10 Thread arun kumar

hi,

this is jquery table editor plugin,
http://dev.iceburg.net/jquery/tableEditor/demo.php

it is work in this version

/*
 * jQuery 1.0.3 - New Wave Javascript
 *
 * Copyright (c) 2006 John Resig (jquery.com)
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * $Date: 2006-10-27 11:15:44 -0400 (Fri, 27 Oct 2006) $
 * $Rev: 501 $
 */
and the function is



$().ready(function() {
$("#editableTable").tableSorter({
sortColumn: 'First Name',   // Integer or 
String of the name of the
column to sort by.
sortClassAsc: 'headerSortUp',   // class name for 
ascending sorting
action to header
sortClassDesc: 'headerSortDown',// class name for 
descending
sorting action to header
headerClass: 'header',  // class name 
for headers (th's)
disableHeader: 'ID' // DISABLE Sorting on ID
}).tableEditor({
EDIT_HTML: 'EDIT2',
SAVE_HTML: 'Save',
FUNC_PRE_EDIT: 'preEdit',  //not working jquery 1.3.2
FUNC_POST_EDIT: 'postEdit',//not working jquery 1.3.2
FUNC_PRE_SAVE: 'preSave',  //not working jquery 1.3.2
FUNC_UPDATE: 'updateTable' //not working jquery 1.3.2
});
});

function updateTable(o) {
alert('FUNC_UPDATE called');
}

function preSave(o) {
alert('FUNC_PRE_SAVE called');
}

function postEdit(o) {
alert('FUNC_POST_EDIT called');
}

function preEdit(o) {
alert('FUNC_PRE_EDIT called');
}


it is not working latest version jquery-1.3.2

table sorter fuction is working new version and tableEditor function
is not working

tell your suggestion how i write this table editor function to latest
jquery version




[jQuery] Re: Problems with Content-Type header set to text/xml

2008-08-23 Thread Arun Kumar

No solutions???

On Aug 17, 2:42 pm, Arun Kumar <[EMAIL PROTECTED]>
wrote:
> A small correction,
>
> If I set that header, it is not working in FF. If I remove that
> header, it is not working in IE 7.
>
> Than I added another parameter to my ajax request, dataType: "text/
> xml". This time, If I set the header, it is working in FF and not
> working in IE 7 and If I remove that header, then it is not working in
> FF and working in IE 7.
>
> On Aug 17, 2:21 pm,ArunKumar<[EMAIL PROTECTED]>
> wrote:
>
> > If I( don't set thatheader, Ajax requests are not working in FF. If I
> > set thisheader, Ajax request is not working in IE.
>
> > On Aug 15, 12:22 am, Bil Corry <[EMAIL PROTECTED]> wrote:
>
> > >ArunKumarwrote on 8/14/2008 1:08 PM:
>
> > > > I am using PHP as server side language and I am sending Ajax request
> > > > to that page and if I set
> > > >header("Content-Type: text/xml");
> > > > Then, in jQuery, I am not able to parse the response object even
> > > > though I use dataType: "xml".
>
> > > > If I remove theheader, then it is working in Ajax( I am able to use
> > > > the response in jQuery). But if I remove thatheaderfunction, then
> > > > browser is displaying that XML as a text file(When accessed using
> > > > normal HTTP protocol, not Ajax).
>
> > > If nothing else, you can detect if the request contains the 
> > > "X-Requested-With"header, if so, that's jQuery so don't use text/xml, 
> > > otherwise, you can use the text/xml content type.
>
> > > - Bil


[jQuery] Re: XML Parsing: Getting a node value

2008-08-23 Thread Arun Kumar

No solutions?

On Aug 17, 2:12 pm, Arun Kumar <[EMAIL PROTECTED]>
wrote:
> Have a look at the sample code given below:
>
> http://www.w3.org/
> TR/html4/strict.dtd">
> 
>         
>                 
>                 XML Parsing
>         
>         
>                  src="jQuery.js">
>                 
>                         var strXML = "<?xml version='1.0'?>" +
>                                                  
> "<bodyTag><search:totalResults>3</search:totalResults></
> bodyTag>";
>
>                         if (document.implementation &&
> document.implementation.createDocument)
>                     {
>                         objDocument = 
> document.implementation.createDocument("", "",
> null);
>                     }
>                     else if (typeof ActiveXObject != 'undefined')
>                     {
>                         try
>                         {
>                             objDocument = new 
> ActiveXObject('Microsoft.XMLDOM');
>                         }
>                         catch (e)
>                         {
>                         }
>                     }
>
>                         objDocument.load(strXML);
>                         alert(objDocument);
>                         alert($("bodyTag", objDocument).find("search\
> \:totalResults").text());
>
>                 
>         
> 
>
> The above sample is tested in IE7, using jQuery 1.2.6


[jQuery] $("#id").focus

2008-07-21 Thread Arun Kumar

I am creating an anchor tag using JS DOM. Focus event handler is
binded to it using

$("#id").focus(function(){
 displayDetails(this.id);
});


I am focussing it using $("#id").focus(), then the displayDetails() is
called for twice.


[jQuery] Finding the element which has focus

2008-07-20 Thread Arun Kumar

I am using jQuery table key navigation plugin and I have three key
navigateable tables. And focus can be moved across tables. How can I
know the table name which has focus?


[jQuery] Re: XML Parsing: Getting a node value

2008-07-12 Thread Arun Kumar

I searched in Google and I posted a question here. After some time, I
saw the same response on Nabble. Any way thank you very much.

On Jul 12, 8:43 pm, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> You should check the rest of the threads. Someone JUST asked the same
> and got a response.
>
> $("A", xmlDoc).find("os\\:TestTag").text();
>
> --
> Ariel Fleslerhttp://flesler.blogspot.com/
>
> On 12 jul, 09:12, Arun Kumar <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have the following XML File:
>
> > 
> >     10
> >     JSHDHSKJAD
> > 
>
> > I want to get the tag os:TestTag value. I am using the following query
> > (This XML is in xmlDoc variable).
>
> > $("A", xmlDoc).find("os:TestTag").text();
>
> > The above query is not working, So I tried the below one:
> > $("A", xmlDoc).find("TestTag").text();
>
> > But no use.
> > How can I get that node value?- Hide quoted text -
>
> - Show quoted text -


[jQuery] XML Parsing: Getting a node value

2008-07-12 Thread Arun Kumar

I have the following XML File:


10
JSHDHSKJAD


I want to get the tag os:TestTag value. I am using the following query
(This XML is in xmlDoc variable).

$("A", xmlDoc).find("os:TestTag").text();

The above query is not working, So I tried the below one:
$("A", xmlDoc).find("TestTag").text();

But no use.
How can I get that node value?


[jQuery] Finding whether a tag is present in between two specified tags or not

2008-07-08 Thread Arun Kumar

Suppose I have two tags  and  as below:


2008-07-07


TestTag Text Node


20:15:45


How can I find whether TestTag is present in between the  and
 tags or not?

The  may present any where in the document. But I want to
know whether it is present between  and  tags or not?

TestTag is not the only tag that exists between Date and Time tags.


[jQuery] Re: Sorting a JSON object based on it's keys

2008-06-27 Thread Arun Kumar

what about using jQuery.makeArray() method?

I tried this and converted that object into an array and then I used
sort() method. But no use.

On Jun 27, 12:33 pm, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> No, you can't do that. Your jsonObj is an *object*, not an array, so it has
> no sort order.
>
> If you want to be able to sort your object, it needs to be an array, e.g.
>
> var jsonObj = [
>         {
>                 "Name" : "B",
>                 "Position" : "Sr"
>         },
>         {
>                 "Name" : "S",
>                 "Position" : "Sr"
>         },
>         {
>                 "Name" : "A",
>                 "Position" : "Jr"
>         }
> ];
>
> That is something you can sort. You can use JavaScript's sort() method of
> the Array object with a callback function that compares two elements as you
> wish.
>
> If you have a large number of elements in the array, a sort callback can
> slow down sorting. Let me know if this is the case - I have a very fast
> array sort method for just this situation. To late at night for me to post
> it right now, but remind me tomorrow...
>
> -Mike
>
>
>
> > From: Arun Kumar
>
> > I have a JSON object (dynamically created) which is given below:
>
> > var jsonObj = {
> >    1 : {
> >            "Name" : "B",
> >            "Position" : "Sr"
> >    },
> >    2 : {
> >            "Name" : "S",
> >            "Position" : "Sr"
> >    },
> >    3 : {
> >            "Name" : "A",
> >            "Position" : "Jr"
> >    }
> > };
>
> > In the above JSON object, keys can be strings also.
>
> > Is there anyway that I can sort this JSON object  based on these keys?
>
> > The output should be as below:
>
> > var jsonObj = {
> >    2 : {
> >            "Name" : "Sai",
> >            "Position" : "Sr"
> >    },
> >    1 : {
> >            "Name" : "Bhushan",
> >            "Position" : "Sr"
> >    },
> >    3 : {
> >            "Name" : "Arun",
> >            "Position" : "Jr"
> >    }
> > };- Hide quoted text -
>
> - Show quoted text -


[jQuery] Sorting a JSON object based on it's keys

2008-06-26 Thread Arun Kumar

I have a JSON object (dynamically created) which is given below:

var jsonObj = {
1 : {
"Name" : "B",
"Position" : "Sr"
},
2 : {
"Name" : "S",
"Position" : "Sr"
},
3 : {
"Name" : "A",
"Position" : "Jr"
}
};

In the above JSON object, keys can be strings also.

Is there anyway that I can sort this JSON object  based on these keys?

The output should be as below:

var jsonObj = {
2 : {
"Name" : "Sai",
"Position" : "Sr"
},
1 : {
"Name" : "Bhushan",
"Position" : "Sr"
},
3 : {
"Name" : "Arun",
"Position" : "Jr"
}
};


[jQuery] Elements not having a class

2008-06-12 Thread Arun Kumar

How can I get DIV elements not having a class ("test-class") inside a
main DIV#Main?

I am trying

var count = 0;
$("#Main > div").each(function(){
   if(!($(this).hasClass(".test-class")))
   {
   count += 1;
   }
});
alert(count);

But this is not the correct way I think.

How can I do it?


[jQuery] How to disable use of proxy in jQuery UI sortables

2008-06-10 Thread Arun Kumar

How to disable use of proxy in jQuery UI sortables functionality?

I am sorting three DIV elements that contains iFrames inside it. While
Dragging is started, for some time I am not able to view content
inside that iFrame which is being dragged as it is a proxy element for
the original one. So, Is there any alternative for this?

How to use our own proxy element instead of default one?


[jQuery] jQuery Sortables

2008-06-09 Thread Arun Kumar

Visit http://tech-test.tutorialsforu.com/jQueryDnD.html, There is some
problem in using jQuery sortables. You can find screen shot is
at:http://tech-test.tutorialsforu.com/jQueryDnD.PNG

Got this problem while dragging the div item.


[jQuery] Problem when posting messages...

2008-06-09 Thread Arun Kumar

I don't know why it is taking more time to get my posted message on
jQuery-en group messages list...?


[jQuery] [autocomplete] JSON response

2008-06-05 Thread Arun Kumar

I am getting JSON response(string format) from the URL to which I am
sending request. I want to use the methods formatResult to format the
result.

$("#month").autocomplete("Search.php", {
 minChars: 0,
 max: 12,
 autoFill: true,
 mustMatch: true,
 matchContains: false,
 scrollHeight: 220,
 formatItem: function(data, i, total) {
 if ( data[0] == months[new Date().getMonth()] )
 return false;
 return data[0];
 }
});

Here, the Search.php will return a JSON (string format). But this
plugin is looking for "|" symbols in the Ajax response.

Where can I convert to a JSON object using eval and use it as a local
JSON data?


[jQuery] Re: Drag and Drop of Gadgets

2008-06-05 Thread Arun Kumar


Already asked...

But got no useful response.

On Jun 4, 6:42 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> Please ask on the jQuery UI list:
>
> http://groups.google.com/group/jquery-ui
>
> - Richard
>
> On Tue, Jun 3, 2008 at 3:54 AM, Arun Kumar <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > Can I use sortables for div's that contains iFrames (Shindig gadgets)?
> > that doesn't need refresh of iFrame?
>
> > Inside that iFrame, I have placed a alert, and each time I drag it, I
> > will get two alerts.
> > Is there any way of not using a proxy element?- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: UI sortables problem

2008-06-05 Thread Arun Kumar

That is why I have posted a question here...

On Jun 3, 9:19 pm, Sid <[EMAIL PROTECTED]> wrote:
> Nope, nothing happening on dragging anything
>
> On Jun 3, 5:35 pm, Arun Kumar <[EMAIL PROTECTED]> wrote:
>
>
>
> > Not that,
>
> > Drag that gadget
>
> > DnD is not working...
>
> > View source...
>
> > On Jun 3, 5:24 pm, Sid <[EMAIL PROTECTED]> wrote:
>
> > > Didnt work on my FF 2.0.0.14 WinXP Pro SP2 at 1024x768
> > > I clicked and small little windows with a blue minimize and a red
> > > close button opened. Inside the container, the default "error" page
> > > opened.
>
> > > On Jun 3, 12:53 pm, Arun Kumar <[EMAIL PROTECTED]>
> > > wrote:
>
> > > > Please visit the URL below and let me know if there is any problem in
> > > > using the jQuery UI sortables.
>
> > > >http://tech-test.tutorialsforu.com/-Hidequoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: UI sortables problem

2008-06-03 Thread Arun Kumar

Not that,

Drag that gadget

DnD is not working...

View source...

On Jun 3, 5:24 pm, Sid <[EMAIL PROTECTED]> wrote:
> Didnt work on my FF 2.0.0.14 WinXP Pro SP2 at 1024x768
> I clicked and small little windows with a blue minimize and a red
> close button opened. Inside the container, the default "error" page
> opened.
>
> On Jun 3, 12:53 pm, Arun Kumar <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Please visit the URL below and let me know if there is any problem in
> > using the jQuery UI sortables.
>
> >http://tech-test.tutorialsforu.com/- Hide quoted text -
>
> - Show quoted text -


[jQuery] Drag and Drop of Gadgets

2008-06-03 Thread Arun Kumar

Can I use sortables for div's that contains iFrames (Shindig gadgets)?
that doesn't need refresh of iFrame?

Inside that iFrame, I have placed a alert, and each time I drag it, I
will get two alerts.
Is there any way of not using a proxy element?


[jQuery] UI sortables problem

2008-06-03 Thread Arun Kumar

Please visit the URL below and let me know if there is any problem in
using the jQuery UI sortables.

http://tech-test.tutorialsforu.com/


[jQuery] Re: load() function in synchronous manner.

2008-06-03 Thread Arun Kumar

It is not working for me in the case of load() function. I have to try
it once again.

On May 29, 3:54 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> $.load() using $.ajax() at it's core so yes.
>
> It's a really good idea to check the documentation and the source code
> when you have questions like this.
>
> Karl Rudd
>
> On Thu, May 29, 2008 at 8:13 PM,ArunKumar
>
>
>
> <[EMAIL PROTECTED]> wrote:
>
> > Will these settings gets applied to load() function also?
>
> > On May 28, 3:21 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >> Woops sorry, hit Send too soon.
>
> >>http://docs.jquery.com/Ajax/jQuery.ajaxSetup
>
> >> And the options are defined here, in the Options tab:
>
> >>http://docs.jquery.com/Ajax/jQuery.ajax#options
>
> >> The $.ajaxSetup() call applies to all AJAX based calls after that,
> >> until they're changed.
>
> >> Karl Rudd
>
> >> On Wed, May 28, 2008 at 12:31 AM,ArunKumar
>
> >> <[EMAIL PROTECTED]> wrote:
>
> >> > Not this case, I want to know how to use it synchronously.
>
> >> > On May 27, 4:47 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >> >> Ok that's nothing to do with sync vs async. As I said, some examples
> >> >> of the code you're using would be helpful.
>
> >> >> Karl Rudd
>
> >> >> On Tue, May 27, 2008 at 9:14 PM,ArunKumar
>
> >> >> <[EMAIL PROTECTED]> wrote:
>
> >> >> > How can I use this load() function to load a page in sync?
>
> >> >> > In IE, Object doesn't support this method or property.
>
> >> >> > On May 27, 3:52 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >> >> >> If you're getting errors it usually means something is working in a
> >> >> >> different way it was meant to work. What sort of errors are you
> >> >> >> getting? Some examples of the code would be helpful.
>
> >> >> >> Karl Rudd
>
> >> >> >> On Tue, May 27, 2008 at 3:32 PM,ArunKumar
>
> >> >> >> <[EMAIL PROTECTED]> wrote:
>
> >> >> >> > I know.
>
> >> >> >> > The reason for using this is, I am loading a page using load()
> >> >> >> > function. Then I am performing some operations on the fields in 
> >> >> >> > that
> >> >> >> > page. If the load function is used to load in asynchronous manner, 
> >> >> >> > I
> >> >> >> > will get some errors in IE.
>
> >> >> >> > This is the reason for loading it in sync.
>
> >> >> >> > How can I use this load() function to load a page in sync?
>
> >> >> >> > On May 27, 2:42 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >> >> >> >> Yes but the more important question to ask is why do you want to 
> >> >> >> >> load
> >> >> >> >> something synchronously. Bear in mind that loading something
> >> >> >> >> synchronously will lock the _entire_ browser up until it's 
> >> >> >> >> finished.
> >> >> >> >> (At least that's been my impression of why it's not used).
>
> >> >> >> >> Karl Rudd
>
> >> >> >> >> On Tue, May 27, 2008 at 1:54 AM,ArunKumar
>
> >> >> >> >> <[EMAIL PROTECTED]> wrote:
>
> >> >> >> >> > Can I use jQuery load() function to load a dynamic page in 
> >> >> >> >> > synchronous
> >> >> >> >> > manner? (async: false)- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: load() function in synchronous manner.

2008-05-29 Thread Arun Kumar

Will these settings gets applied to load() function also?

On May 28, 3:21 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> Woops sorry, hit Send too soon.
>
> http://docs.jquery.com/Ajax/jQuery.ajaxSetup
>
> And the options are defined here, in the Options tab:
>
> http://docs.jquery.com/Ajax/jQuery.ajax#options
>
> The $.ajaxSetup() call applies to all AJAX based calls after that,
> until they're changed.
>
> Karl Rudd
>
> On Wed, May 28, 2008 at 12:31 AM, Arun Kumar
>
> <[EMAIL PROTECTED]> wrote:
>
> > Not this case, I want to know how to use it synchronously.
>
> > On May 27, 4:47 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >> Ok that's nothing to do with sync vs async. As I said, some examples
> >> of the code you're using would be helpful.
>
> >> Karl Rudd
>
> >> On Tue, May 27, 2008 at 9:14 PM, Arun Kumar
>
> >> <[EMAIL PROTECTED]> wrote:
>
> >> > How can I use this load() function to load a page in sync?
>
> >> > In IE, Object doesn't support this method or property.
>
> >> > On May 27, 3:52 pm, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >> >> If you're getting errors it usually means something is working in a
> >> >> different way it was meant to work. What sort of errors are you
> >> >> getting? Some examples of the code would be helpful.
>
> >> >> Karl Rudd
>
> >> >> On Tue, May 27, 2008 at 3:32 PM, Arun Kumar
>
> >> >> <[EMAIL PROTECTED]> wrote:
>
> >> >> > I know.
>
> >> >> > The reason for using this is, I am loading a page using load()
> >> >> > function. Then I am performing some operations on the fields in that
> >> >> > page. If the load function is used to load in asynchronous manner, I
> >> >> > will get some errors in IE.
>
> >> >> > This is the reason for loading it in sync.
>
> >> >> > How can I use this load() function to load a page in sync?
>
> >> >> > On May 27, 2:42 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> >> >> >> Yes but the more important question to ask is why do you want to load
> >> >> >> something synchronously. Bear in mind that loading something
> >> >> >> synchronously will lock the _entire_ browser up until it's finished.
> >> >> >> (At least that's been my impression of why it's not used).
>
> >> >> >> Karl Rudd
>
> >> >> >> On Tue, May 27, 2008 at 1:54 AM, Arun Kumar
>
> >> >> >> <[EMAIL PROTECTED]> wrote:
>
> >> >> >> > Can I use jQuery load() function to load a dynamic page in 
> >> >> >> > synchronous
> >> >> >> > manner? (async: false)


[jQuery] load() problem in IE7

2008-05-23 Thread Arun Kumar

I have a html page with two alerts and it's source is given below: