[jQuery] Access denied | uncaught exception in FF 2.0 | servlet call from another domain

2009-10-20 Thread Mohammed Arif

Hi,

Seems like got stuck in the cross domain issue.

Just trying to get the XML response from the servlet call through POST
method:

$.ajax({
type: POST,
url: http://10.210.221.43:9081/shopsfinder/servlet/
ShopsFinderStoreServlet //THIS DOESN'T
//url: ../ShopsFinderStoreServlet //IT WORKS
..


It works fine when we place the servlet at the same location where our
application server is, with the relative path.

BUT we have to put the servlet somewhere else means [at some other
location], due to some limitations.

Then it doesn't hit the servlet and we don't give any response back to
the browser and it goes in error function as given:

error: function(XMLHttpRequest, textStatus, 
errorThrown) {
alert(errror XMLHttpRequest:  + 
XMLHttpRequest.responseXML + 
textStatus:  + textStatus +   errorThrown:  +errorThrown);
}

Which gives all the values NULL and get the exception in FF.

Do we have any work around to overcome this issue?

Many thanks
Mohammed Arif


[jQuery] Re: Access denied | uncaught exception in FF 2.0 | servlet call from another domain

2009-10-20 Thread Mohammed Arif

P.S: We also don't want to use the cross domain solution through
'PROXY'.

Thanks
Mohammed Arif

On Oct 20, 6:17 pm, Mohammed Arif arif.moham...@gmail.com wrote:
 Hi,

 Seems like got stuck in the cross domain issue.

 Just trying to get the XML response from the servlet call through POST
 method:

 $.ajax({
                         type: POST,
                         url: http://10.210.221.43:9081/shopsfinder/servlet/
 ShopsFinderStoreServlet //THIS DOESN'T
 //url: ../ShopsFinderStoreServlet //IT WORKS
 ..

 It works fine when we place the servlet at the same location where our
 application server is, with the relative path.

 BUT we have to put the servlet somewhere else means [at some other
 location], due to some limitations.

 Then it doesn't hit the servlet and we don't give any response back to
 the browser and it goes in error function as given:

                         error: function(XMLHttpRequest, textStatus, 
 errorThrown) {
                                 alert(errror XMLHttpRequest:  + 
 XMLHttpRequest.responseXML + 
 textStatus:  + textStatus +   errorThrown:  +errorThrown);
                                 }

 Which gives all the values NULL and get the exception in FF.

 Do we have any work around to overcome this issue?

 Many thanks
 Mohammed Arif


[jQuery] Re: Access denied | uncaught exception in FF 2.0 | servlet call from another domain

2009-10-20 Thread Mohammed Arif

Exceptions are XMLHttpRequest: null failure code 0x80004005
ns_error_failure etc.


On Oct 20, 6:18 pm, Mohammed Arif arif.moham...@gmail.com wrote:
 P.S: We also don't want to use the cross domain solution through
 'PROXY'.

 Thanks
 Mohammed Arif

 On Oct 20, 6:17 pm, Mohammed Arif arif.moham...@gmail.com wrote:

  Hi,

  Seems like got stuck in the cross domain issue.

  Just trying to get the XML response from the servlet call through POST
  method:

  $.ajax({
                          type: POST,
                          url: http://10.210.221.43:9081/shopsfinder/servlet/
  ShopsFinderStoreServlet //THIS DOESN'T
  //url: ../ShopsFinderStoreServlet //IT WORKS
  ..

  It works fine when we place the servlet at the same location where our
  application server is, with the relative path.

  BUT we have to put the servlet somewhere else means [at some other
  location], due to some limitations.

  Then it doesn't hit the servlet and we don't give any response back to
  the browser and it goes in error function as given:

                          error: function(XMLHttpRequest, textStatus, 
  errorThrown) {
                                  alert(errror XMLHttpRequest:  + 
  XMLHttpRequest.responseXML + 
  textStatus:  + textStatus +   errorThrown:  +errorThrown);
                                  }

  Which gives all the values NULL and get the exception in FF.

  Do we have any work around to overcome this issue?

  Many thanks
  Mohammed Arif


[jQuery] Intelligence not working

2009-10-13 Thread Muhammad Arif

Hello All:
 I am using JQuery if in a page i used only
script src=JQuery/jquery-1.2.6.js type=text/javascript/script
script  type=text/javascript
$(document).ready(function()
{
alter(Working on Intelligence);
}
);
/script
then its working fine...

 but when i add another script file below it so its intelligence is
not working

e.g

script src=JQuery/jquery-1.2.6.js type=text/javascript/script
script src=JQuery/ui.datepicker.js type=text/javascript/script
script src=JQuery/ui.core.js type=text/javascript/script
script  type=text/javascript
$(document).ready(function()
{
alter(Working on Intelligence);
}
);

so in this case the intelligence is not working.. if i remove or
comment the 2 script file which i have added to then its working
fine.. other wise not working..

can you please help me in this regards


[jQuery] Re: Intelligence not working

2009-10-13 Thread Muhammad Arif
thanx for the reply.. but its not working.. i have checked it...

Regards

On Tue, Oct 13, 2009 at 4:26 PM, Evgeny Bobovik bobo...@gmail.com wrote:


 try to swap them:
 script src=JQuery/jquery-1.2.6.js type=text/javascript/script
 script src=JQuery/ui.core.js type=text/javascript/script
 script src=JQuery/ui.datepicker.js type=text/javascript/script
 script  type=text/javascript
 $(document).ready(function()
 {
 alter(Working on Intelligence);
 }
 );
Gk___




 2009/10/13 Muhammad Arif brainsa...@gmail.com:
 
  Hello All:
  I am using JQuery if in a page i used only
  script src=JQuery/jquery-1.2.6.js type=text/javascript/script
  script  type=text/javascript
  $(document).ready(function()
  {
  alter(Working on Intelligence);
  }
  );
  /script
  then its working fine...
 
   but when i add another script file below it so its intelligence is
  not working
 
  e.g
 
  script src=JQuery/jquery-1.2.6.js type=text/javascript/script
  script src=JQuery/ui.datepicker.js type=text/javascript/script
  script src=JQuery/ui.core.js type=text/javascript/script
  script  type=text/javascript
  $(document).ready(function()
  {
  alter(Working on Intelligence);
  }
  );
 
  so in this case the intelligence is not working.. if i remove or
  comment the 2 script file which i have added to then its working
  fine.. other wise not working..
 
  can you please help me in this regards
 



[jQuery] browser window close

2009-10-06 Thread Muhammad Arif

Hello All:
  I'm trying to close a browser window.. using
windows.close().. but its not working...
so can you help me.
Regards


[jQuery] Re: browser window close

2009-10-06 Thread Muhammad Arif
Thanks you very much for your reply.. but if window.close() so for popup so
then how can we close a browser window
Regards

On Tue, Oct 6, 2009 at 4:08 PM, Jonathan Vanherpe (T  T NV) 
jonat...@tnt.be wrote:


 Muhammad Arif wrote:


 Hello All:
   I'm trying to close a browser window.. using
 windows.close().. but its not working...
 so can you help me.
 Regards


 I think it's window.close(), and i think you can only do this in popups.

 Jonathan

 --
 Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be



[jQuery] FCKeditor clone issue

2009-06-02 Thread Mohammed Arif

Hi Guys,

I am into serious FCKeditor issue while cloning, it works fine in IE
6/7 but it's not getting instantiated in FF 2/3.

Test URL:
http://www.mohammedarif.com/test/clone_fckeditor.html

This piece of functionality is really important for our project.

Also want instance name keeps increase in var oFCKeditor = new
FCKeditor('FCKeditor1')

Should be FCKeditor2 when we clone first time so on and so forth.

Is there a way to re-instantiate FCKEditor object with jQuery clone
method?

Looking for quick help.

Thanks
Mohammed Arif


[jQuery] Re: FCKeditor clone issue

2009-06-02 Thread Mohammed Arif

If someone has some other approach, that is also welcome.

Thanks
Mohammed Arif

On Jun 2, 4:15 pm, Mohammed Arif arif.moham...@gmail.com wrote:
 Hi Guys,

 I am into serious FCKeditor issue while cloning, it works fine in IE
 6/7 but it's not getting instantiated in FF 2/3.

 Test URL:http://www.mohammedarif.com/test/clone_fckeditor.html

 This piece of functionality is really important for our project.

 Also want instance name keeps increase in var oFCKeditor = new
 FCKeditor('FCKeditor1')

 Should be FCKeditor2 when we clone first time so on and so forth.

 Is there a way to re-instantiate FCKEditor object with jQuery clone
 method?

 Looking for quick help.

 Thanks
 Mohammed Arif


[jQuery] Re: Losing the form values in Firefox 2/3 only

2009-06-01 Thread Mohammed Arif

I am attaching the sample code to debug the issue:

http://www.mohammedarif.com/test/index.html

Steps to reproduce in FF 2/3:

1. Click on Add button, this will clone the entire piece of code and
append in DOM
2. Put some values in form fields in both the tables/divs
3. Click on Move up button, entire current table shifted to top but
form values get lost
4. Same behavior is coming on Move down and Move to top also.

But the entire piece of code is working fine in IE 6/7

Would appreciate some quick help to retain form values.

Thanks in advance
Mohammed Arif

On May 29, 1:59 pm, Arif arif.moham...@gmail.com wrote:
 Hi,

 Unexpectedly it's not happening in IE 6/7 :)

 So looking for form jQuery plugin which can save and deserialize form
 values on a event.

 Already using form plugin which saves form values in an Array but it
 doesn't write back the values, need to write back those values after
 some manipulation to the individual form.

 But the case is bit different here; we have been using multiple forms
 on a single page.

 Looking for quick reply.

 Thanks
 Mohammed Arif


[jQuery] Re: Losing the form values in Firefox 2/3 only

2009-06-01 Thread Mohammed Arif

Abrar, I am just cloning the set of elements not generating anything
on the fly, it works fine till the time I don't reset ids/strings in
given below code:

moveUpDown : function (that, traversOrder, noOfCharts){
Order = traversOrder || 'down'; //Provides fallback value which 
is
'down'
if (Order === up) {
var prevElem = 
$(that).closest([id*='+conTblHolderId+']).prev
();
if (prevElem.is([id*='+conTblHolderId+'])) {
//$.log(Inside up);

$(that).closest([id*='+conTblHolderId+']).insertBefore
(prevElem).css('background','green');

//$.log($(that).closest([id*='+conTblHolderId+']).html())
}
} else if (Order === down) {
var nextElem = 
$(that).closest([id*='+conTblHolderId+']).next
();
if (nextElem.is([id*='+conTblHolderId+'])) {

$(that).closest([id*='+conTblHolderId+']).insertAfter
(nextElem);
}
}
ContentTable.resetElemsIdsOrder(noOfCharts);
},

You could ee the last line ContentTable.resetElemsIdsOrder
(noOfCharts); which reset the order as well ids/string.

If I comment out this line of code, it works fine in FF also but then
my ordering get lost which is a project requirement.

And last point, live() is equal to bind() so there is no need to use
it in the current scenarios.

Thanks
Mohammed Arif

On Jun 1, 11:48 am, Abrar Arshad abrar.apt...@gmail.com wrote:
 hi arif,
           what i understood from your sample page and explanation that is
 you cannot get the values of those elements which were generated dynamically
 after the page is loaded. If that is the case , you can use jQuery live()
 event to solve this problem, google it

 I hope it will help you.

 On Mon, Jun 1, 2009 at 9:07 AM, Mohammed Arif arif.moham...@gmail.comwrote:



  I am attaching the sample code to debug the issue:

 http://www.mohammedarif.com/test/index.html

  Steps to reproduce in FF 2/3:

  1. Click on Add button, this will clone the entire piece of code and
  append in DOM
  2. Put some values in form fields in both the tables/divs
  3. Click on Move up button, entire current table shifted to top but
  form values get lost
  4. Same behavior is coming on Move down and Move to top also.

  But the entire piece of code is working fine in IE 6/7

  Would appreciate some quick help to retain form values.

  Thanks in advance
  Mohammed Arif

  On May 29, 1:59 pm, Arif arif.moham...@gmail.com wrote:
   Hi,

   Unexpectedly it's not happening in IE 6/7 :)

   So looking for form jQuery plugin which can save and deserialize form
   values on a event.

   Already using form plugin which saves form values in an Array but it
   doesn't write back the values, need to write back those values after
   some manipulation to the individual form.

   But the case is bit different here; we have been using multiple forms
   on a single page.

   Looking for quick reply.

   Thanks
   Mohammed Arif


[jQuery] Losing the form values in Firefox 2/3 only

2009-05-29 Thread Arif

Hi,

Unexpectedly it's not happening in IE 6/7 :)

So looking for form jQuery plugin which can save and deserialize form
values on a event.

Already using form plugin which saves form values in an Array but it
doesn't write back the values, need to write back those values after
some manipulation to the individual form.

But the case is bit different here; we have been using multiple forms
on a single page.

Looking for quick reply.

Thanks
Mohammed Arif


[jQuery] clone(true) events are losing when manipulating cloned html

2009-05-24 Thread Arif

Hi,

Can we manipulate clone() html before append() without losing events?

Let me explain it further.

I am cloning a set of html with the buttons action, it works fine.

But I need to manipulate the cloned html, actually I increment a
function parameter using replace(), it does work but lose the all the
events.

I hope, I am able to explain, let me know for more input.

Looking for quick reply.

Thanks
Mohammed Arif


[jQuery] A troll on jQuery in Linkedin QA board

2009-04-30 Thread S P Arif Sahari Wibowo

To those who in Linkedin, there a troll discrediting not only 
jQuery but the practise of using any library: 
http://www.linkedin.com/answers/technology/information-technology/computers-software/TCH_ITS_CMP/464788-10054134

Quote: You don't need a generic library, period. Bank it.

Funny. :-)

-- 
       (stephan paul) Arif Sahari Wibowo
   /___  /___/ /___/ /___  http://www.arifsaha.com/
  / / /   / /
 http://www.arifsaha.com/christhasrisen.html


[jQuery] Half star rating plugin query | looking curvalue:3.5 to show 3 and half stars by default

2009-03-24 Thread Arif

Hi All,

Just a quick question related to Ritesh star plugin which suits our
need.

Can we have curvalue:3.5 to show 3 and half stars out of 5 in rating
('', {maxvalue:5, curvalue:3.5});

Just wanted to show half star instead of increment value, which we
have right now in this plugin.

Not worried about hover and all, just wanted to show the star rating
so not looking for any other advance star rating plugin to show the
stars.

Quick help should be appreciated.

Thanks
Mohammed Arif


[jQuery] $.getJSON isn't working while getting the JSON data from hidden field

2009-03-17 Thread Arif

Hi,

I amn't able to parse hidden form field data in $.getJSON method,
seems like I am missing something.

Hidde Field:
input id=videoListJson type=hidden value={
'array':[
{
'title' :'title of video',
'description' :'this is a movie clip',
'postedBy' :'null',
'thumbnailData' :'null',
'noOfViews' :'2345',
'noOfComments' : '123',
'rating' :'4',
'thumbnailUrl' 
:'assets/dynamic/test_video.jpg',
'variantId' :'1',
'localeId' :'0',
'feedTypeID' :'0',
'feedId' :'12',
'videoId' :'null',
'feedUploadedDate' :'null'
},

{
'title' :'title of video',
'description' :'this is a movie clip',
'postedBy' :'null',
'thumbnailData' :'null'
}]

} /

This is my hidden filed with JSON value which I access in jQuery code,
I ma just storing in a variable videoListJson and getting in the
string format.

Pass the videoListJson into $.getJSON method a data parameter but it
didn't execute, seems like due to invalid data format or $.getJSON is
breaking somewhere.

jQuery Function:
$(function(){
var videoListJson = $('#videoListJson').val();
alert($('#videoListJson').val());
$.getJSON(videoListJson,
//function(data){
  $.each(storeJson, function(i,item){
for(k=0; k  item.length; k++) {
$(.itemContainer)[k].innerHTML = 'div
class=imageContainera href=# class=balloonTarget
balloonStyle=whiteBalloondiv class=ballonInfo hiddenthis is the
info/divimg src= '+item[k].thumbnailUrl+' //a/divdiv
class=titletitle of video/div';
}
  });
});

})

I am able to work by just doing cutom JavaScript:
var storeJson = eval('(' + $(#videoListJson).val() + ')');

But it losses the purpose of $.getJSON which works the same way.

Any pointers should be appreciated.

Thanks
Mohammed Arif


[jQuery] Re: $.getJSON isn't working while getting the JSON data from hidden field

2009-03-17 Thread Mohammed Arif

Steven, I am doing the same way as you said using eval and storing the
string in JS variable.

I may be wrong but as per my understanding $.getJSON also does eval()
internally.

Just wanted to do pure implementation only through $.getJSON without
using eval() custom JS method.

Thanks
Mohammed Arif

On Mar 18, 10:19 am, Steven Yang kenshin...@gmail.com wrote:
 Sorry if i am mistaken in anywaybut $.getJSON is suppose to be for getting
 JSON data from remote server or simply server, but not for you to eval a
 String into javascript object. And from the source of jQuery I believe it
 will simply to eval('('+json+')') anyway.
 And if you want to do it that way, why not just save your string in a
 javascript variable?
 or if its generated serverside, then you dont even have to eval it.


[jQuery] Re: JSON data issue in IE | Language Translation

2008-10-15 Thread Arif

It was because of EditPlus :)

By default, it saves HTML encoding in ANSI format that was the reason
not translating French characters properly.

It should be UTF-8 instead of ANSI encode.

And here we go with the shorter version of previous posted jQuery
code:

$.getJSON(json/data_ca_fr.json, function(json){
$(.json_trans).each(function(i){
var temp = $(.json_trans)[i].innerHTML;
$(.json_trans)[i].innerHTML = eval(json. + temp);
})
});

Need not to compare lots of innerHTML with JSON values but make sure
that you have the same JSON key string download in the html [i.e.
span class=json_transdownload/span]

Hope it helps someone for sure.

Thanks
Mohammed Arif



On Oct 15, 10:04 am, Gus [EMAIL PROTECTED] wrote:
 how'd you fix it?

 On Sep 25, 3:11 pm, Arif [EMAIL PROTECTED] wrote:

  I have resolved this :)

  Thanks
  Mohammed Arifhttp://www.mohammedarif.com

  On Sep 22, 2:24 pm, Arif [EMAIL PROTECTED] wrote:

   Even I got the issue, it's not been rendering because of French
   accented characters in IE.

   So what do I need to change theJSONcharacter encoding?

   P.S: I don't have server control, can change the front end layer
   (xhtml/css/js/json) only, and will not be able to write any server
   side code otherwise I could have easily done it.

   Many thanks
   Mohammed Arifhttp://www.mohammedarif.com

   On Sep 22, 11:12 am, Arif [EMAIL PROTECTED] wrote:

Hi All,

Hope, you all would be doing well.

I am trying to create a language translation utility using jQuery for
some specific words only, seems working fine in Firefox but don’t do
well in IE 6/7.

Given is theJSONfile, where I map headings which needs to be
translated in French.

   JSONData:
{
  download : télécharger,
  categories : sujets d'actualité,
  recent_comments : mais que l'histoire de l',
  recent posts : Messages Récents,
  also worthy : aussi digne,
  archieves : archives,

}

I am able to load myJSONfile successfully using $.getJSON(), it
translates in FF but does not do the same in IE 6/7.

jQuery Method:
function loadJSON(){
        $.getJSON(json/data_ca_fr.json, function(json){
                $(.json_trans).each(function(i){ //getting all the 
headings to
translate
                        switch($(.json_trans)[i].innerHTML) {
                          case Download: // Start here if 
$(.json_trans)[i].innerHTML
== download
                                $(.json_trans)[i].innerHTML 
=json.download;                                break;// Stop
here
                          case Categories: // Start here if 
$(.json_trans)[i].innerHTML
== download
                                $(.json_trans)[i].innerHTML 
=json.categories;
                                break;// Stop here
                          default
                                break;
                        }
                })
        });

}

I am just comparing English words in the page through innerHTML
because jQuery html() return the first array index only , defined
span tag with .json_trans class for picking up all the required spans
and do the translation.

I know, it’s not the robust way to do the language translation  but
does require for client and it’s not AJAX at all, just calling the
   jsonfile on dom ready.

Any quick pointer/ suggestion should be appreciated.

Thanks for your time
Mohammed Arifhttp://www.mohammedarif.com




[jQuery] Re: JSON data issue in IE | Language Translation

2008-09-24 Thread Arif

I have resolved this :)

Thanks
Mohammed Arif
http://www.mohammedarif.com

On Sep 22, 2:24 pm, Arif [EMAIL PROTECTED] wrote:
 Even I got the issue, it's not been rendering because of French
 accented characters in IE.

 So what do I need to change the JSON character encoding?

 P.S: I don't have server control, can change the front end layer
 (xhtml/css/js/json) only, and will not be able to write any server
 side code otherwise I could have easily done it.

 Many thanks
 Mohammed Arifhttp://www.mohammedarif.com

 On Sep 22, 11:12 am, Arif [EMAIL PROTECTED] wrote:

  Hi All,

  Hope, you all would be doing well.

  I am trying to create a language translation utility using jQuery for
  some specific words only, seems working fine in Firefox but don’t do
  well in IE 6/7.

  Given is the JSON file, where I map headings which needs to be
  translated in French.

  JSON Data:
  {
    download : télécharger,
    categories : sujets d'actualité,
    recent_comments : mais que l'histoire de l',
    recent posts : Messages Récents,
    also worthy : aussi digne,
    archieves : archives,

  }

  I am able to load my JSON file successfully using $.getJSON(), it
  translates in FF but does not do the same in IE 6/7.

  jQuery Method:
  function loadJSON(){
          $.getJSON(json/data_ca_fr.json, function(json){
                  $(.json_trans).each(function(i){ //getting all the 
  headings to
  translate
                          switch($(.json_trans)[i].innerHTML) {
                            case Download: // Start here if 
  $(.json_trans)[i].innerHTML
  == download
                                  $(.json_trans)[i].innerHTML = 
  json.download;                                break;// Stop
  here
                            case Categories: // Start here if 
  $(.json_trans)[i].innerHTML
  == download
                                  $(.json_trans)[i].innerHTML = 
  json.categories;
                                  break;// Stop here
                            default
                                  break;
                          }
                  })
          });

  }

  I am just comparing English words in the page through innerHTML
  because jQuery html() return the first array index only , defined
  span tag with .json_trans class for picking up all the required spans
  and do the translation.

  I know, it’s not the robust way to do the language translation  but
  does require for client and it’s not AJAX at all, just calling the
  json file on dom ready.

  Any quick pointer/ suggestion should be appreciated.

  Thanks for your time
  Mohammed Arifhttp://www.mohammedarif.com


[jQuery] JSON data issue in IE | Language Translation

2008-09-22 Thread Arif

Hi All,

Hope, you all would be doing well.

I am trying to create a language translation utility using jQuery for
some specific words only, seems working fine in Firefox but don’t do
well in IE 6/7.

Given is the JSON file, where I map headings which needs to be
translated in French.

JSON Data:
{
  download : télécharger,
  categories : sujets d'actualité,
  recent_comments : mais que l'histoire de l',
  recent posts : Messages Récents,
  also worthy : aussi digne,
  archieves : archives,
}

I am able to load my JSON file successfully using $.getJSON(), it
translates in FF but does not do the same in IE 6/7.


jQuery Method:
function loadJSON(){
$.getJSON(json/data_ca_fr.json, function(json){
$(.json_trans).each(function(i){ //getting all the headings to
translate
switch($(.json_trans)[i].innerHTML) {
  case Download: // Start here if 
$(.json_trans)[i].innerHTML
== download
$(.json_trans)[i].innerHTML = json.download;  
break;// Stop
here
  case Categories: // Start here if 
$(.json_trans)[i].innerHTML
== download
$(.json_trans)[i].innerHTML = json.categories;
break;// Stop here
  default
break;
}
})
});
}

I am just comparing English words in the page through innerHTML
because jQuery html() return the first array index only , defined
span tag with .json_trans class for picking up all the required spans
and do the translation.

I know, it’s not the robust way to do the language translation  but
does require for client and it’s not AJAX at all, just calling the
json file on dom ready.

Any quick pointer/ suggestion should be appreciated.

Thanks for your time
Mohammed Arif
http://www.mohammedarif.com


[jQuery] Re: JSON data issue in IE | Language Translation

2008-09-22 Thread Arif

Even I got the issue, it's not been rendering because of French
accented characters in IE.

So what do I need to change the JSON character encoding?

P.S: I don't have server control, can change the front end layer
(xhtml/css/js/json) only, and will not be able to write any server
side code otherwise I could have easily done it.

Many thanks
Mohammed Arif
http://www.mohammedarif.com

On Sep 22, 11:12 am, Arif [EMAIL PROTECTED] wrote:
 Hi All,

 Hope, you all would be doing well.

 I am trying to create a language translation utility using jQuery for
 some specific words only, seems working fine in Firefox but don’t do
 well in IE 6/7.

 Given is the JSON file, where I map headings which needs to be
 translated in French.

 JSON Data:
 {
   download : télécharger,
   categories : sujets d'actualité,
   recent_comments : mais que l'histoire de l',
   recent posts : Messages Récents,
   also worthy : aussi digne,
   archieves : archives,

 }

 I am able to load my JSON file successfully using $.getJSON(), it
 translates in FF but does not do the same in IE 6/7.

 jQuery Method:
 function loadJSON(){
         $.getJSON(json/data_ca_fr.json, function(json){
                 $(.json_trans).each(function(i){ //getting all the headings 
 to
 translate
                         switch($(.json_trans)[i].innerHTML) {
                           case Download: // Start here if 
 $(.json_trans)[i].innerHTML
 == download
                                 $(.json_trans)[i].innerHTML = 
 json.download;                                break;// Stop
 here
                           case Categories: // Start here if 
 $(.json_trans)[i].innerHTML
 == download
                                 $(.json_trans)[i].innerHTML = 
 json.categories;
                                 break;// Stop here
                           default
                                 break;
                         }
                 })
         });

 }

 I am just comparing English words in the page through innerHTML
 because jQuery html() return the first array index only , defined
 span tag with .json_trans class for picking up all the required spans
 and do the translation.

 I know, it’s not the robust way to do the language translation  but
 does require for client and it’s not AJAX at all, just calling the
 json file on dom ready.

 Any quick pointer/ suggestion should be appreciated.

 Thanks for your time
 Mohammed Arifhttp://www.mohammedarif.com


[jQuery] Find / traverse to next node matching a criteria?

2008-09-05 Thread S P Arif Sahari Wibowo

Hi!

Is there any feature in jQuery to find the next node matching a 
criteria, regardless of that next node a sibling or not?

I know there is next(expr) and prev(expr) methods, but 
this only works for sibling. I specifically need to have 
something to look into siblings and non-siblings.

The algorithm will probably look like this:
(a) for each subsequent siblings, check if that sibling match 
the criteria, if not, traverse down to find first tree match the 
criteria,
(b) failing that, go up to parent, then do (a) again,
(c) do that until no parent exist (means not found).

Maybe there is a plugin already doing that?

Thanks!

-- 
  (stephan paul) Arif Sahari Wibowo
_  _  _  _
   /  // // /
  _/ /  // _/  http://www.arifsaha.com/


[jQuery] Re: How to apply jQuery to an item which doesn't exist when the page is loaded.

2008-09-05 Thread S P Arif Sahari Wibowo

On Fri, 5 Sep 2008, lukas wrote:
 My PHP code creates a button which doesn't exist when my page 
 is loaded.  Hence, the according jQuery command doesn't work.

Not sure what you meant. For server-side scripting - such as PHP 
- loading a page is the only way for the script to create HTML 
objects - including buttons. So what you said does not make any 
sense. Are you talking about XMLHttpRequest / AJAX request?

Maybe you should point to an example page + source.

-- 
  (stephan paul) Arif Sahari Wibowo
_  _  _  _
   /  // // /
  _/ /  // _/  http://www.arifsaha.com/


[jQuery] Advantages of jQuery

2007-12-31 Thread Mohd Daslim Arif

Hi there.,
Season's Greetings.,

I very newbie to jQuery.

May I Know what are the advantages of jQuery over ajax tech.
Is it open a connection with the Server to Browser until the setted
cookie info ?
Can i able to develop my own function in that  integrate with it?


Thanks.,
Daslim