[jQuery] JQuery scope

2007-03-06 Thread Harlley Roberto

Guys,

Does someone know why my function doesn't work ? How does work the scope on
JQuery with ajax?
The commented alert is working fine.

   function LerXML(ordem) {
   var diretorio;
   $.get(../modulos.xml, function(xmldataset){
   diretorio= $(diretorio:eq( + ordem + ) , xmldataset);
   //alert(diretorio.text());
   });
   return diretorio.text();
   }
   alert(LerXML(0));

--
[]'s

Harlley R. Oliveira
www.syssolution.com.br
---
~ U never try U'll never learn ~
---
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery scope

2007-03-06 Thread Harlley Roberto

Great tip man. Thank you so much!

On 3/6/07, John Resig [EMAIL PROTECTED] wrote:


$.get() isn't synchronous, the return will occur before the request
has finished.

You could give this a try, instead:
function LerXML(ordem) {
var diretorio;
$.ajax({
type: GET,
url: ../modulos.xml,
async: false,
success: function(xmldataset){
diretorio= $(diretorio:eq( + ordem + ) ,
xmldataset);
}
});
return diretorio.text();
}
alert(LerXML(0));

More info:
http://docs.jquery.com/Ajax

Of course, synchronous XML requests can slow down your application -
so it would, most likely, be preferred to write your code using a
callback, instead.

More info:

http://docs.jquery.com/How_jQuery_Works#Callbacks.2C_Functions.2C_and_.27this.27

--John

On 3/6/07, Harlley Roberto [EMAIL PROTECTED] wrote:
 Guys,

 Does someone know why my function doesn't work ? How does work the scope
on
 JQuery with ajax?
 The commented alert is working fine.

 function LerXML(ordem) {
 var diretorio;
 $.get(../modulos.xml, function(xmldataset){
 diretorio= $(diretorio:eq( + ordem + ) ,
xmldataset);
 //alert(diretorio.text());
 });
 return diretorio.text();
 }
 alert(LerXML(0));

 --
 []'s

 Harlley R. Oliveira
  www.syssolution.com.br
 ---
 ~ U never try U'll never learn ~
 ---


 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
[]'s

Harlley R. Oliveira
www.syssolution.com.br
---
~ U never try U'll never learn ~
---
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Error IE6

2007-01-16 Thread Harlley Roberto

Hi guys,

Why jquery does not work correctly in IE6 ? Has Anybody else ever had this
same issue ?

Error: 'style' is null or it does not a object
line 480 ]if (!force  elem.style[prop]) {

--
[]'s

Harlley R. Oliveira
www.syssolution.com.br
---
~ U never try U'll never learn ~
---
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Error IE6

2007-01-16 Thread Harlley Roberto

This part of my code that is not working:

   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);
   }
   }



2007/1/16, Mike Alsup [EMAIL PROTECTED]:


 Why jquery does not work correctly in IE6 ? Has Anybody else ever had
this
 same issue ?

 Error: 'style' is null or it does not a object
  line 480 ]if (!force  elem.style[prop]) {


Can you please provide more information or a sample test page?   Thanks.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
[]'s

Harlley R. Oliveira
www.syssolution.com.br
---
~ U never try U'll never learn ~
---
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Timer statement

2007-01-16 Thread Harlley Roberto

I am using grow efect, but a I need to call another function just after of
determined seconds. Is it possivel I do it with JQuery ?

For example:
   $('#containerMenu').Grow(200);
   $('#listaMenu').css( {display: block} ); // I need to that
statement to be executed after 300 ms
   $('#teste').css( {display: block} );


--
[]'s

Harlley R. Oliveira
www.syssolution.com.br
---
~ U never try U'll never learn ~
---
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] JQuery and CakePHP (slightly OT)

2006-12-14 Thread Harlley Roberto

If you wanna simplicity and documentation, you should use Code Igniter [
www.*code**igniter*.com http://www.codeigniter.com ]

As CMS use Textpattern [ www.textpattern.com ]

Harlley

On 12/14/06, Will Jessup [EMAIL PROTECTED] wrote:


Does anybody care about Symfony-project and jQuery?

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





--
[]'s

Harlley R. Oliveira
www.syssolution.com.br
---
~ U never try U'll never learn ~
---
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Selected value in dropdownlist

2006-10-05 Thread Harlley Roberto
Hi folks,How can I get selected value in dropdownlist?That code does not work. Why ?$(document).ready(function(){ var test;  test = document.getElementById(ddlCourse).value;
 $(#ddlCourse).change( function() { $('#class').load('filter_report.asp', {ajax:'1', cod_course: test }); } );});thanks,Harlley 
[EMAIL PROTECTED]
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Selected value in dropdownlist

2006-10-05 Thread Harlley Roberto
It works! Thanks a lot :-)On 10/5/06, Sam Collett [EMAIL PROTECTED] wrote:
On 05/10/06, Harlley Roberto [EMAIL PROTECTED] wrote: Hi folks, How can I get selected value in dropdownlist? That code does not work. Why ?
 $(document).ready(function() { var test; test = document.getElementById(ddlCourse).value; $(#ddlCourse).change( function() { $('#class').load('filter_report.asp', {ajax:'1',
 cod_course: test }); } ); }); thanks, Harlley[EMAIL PROTECTED]You can get the selected value like this:
test = $(#ddlCourse).val()___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Att.Harlley R. Oliveira[EMAIL PROTECTED]
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/