[jQuery] How to get the float direction of an element?

2009-12-18 Thread ximo wallas
Hi there, does anybody knows how to get the float direction of an element?
If I do this:
$(this).attr('style')
I will get all the styles, but I just want to get right or left...
Can anybody bring me some light?



  

Re: [jQuery] Random problems with load()?????

2009-12-11 Thread ximo wallas
The NET tab doesn't return anything...
It doesn't work, or it works only sometimes, for aparently no reason.

--- On Wed, 12/9/09, Juan Ignacio Borda juanignaciobo...@gmail.com wrote:

From: Juan Ignacio Borda juanignaciobo...@gmail.com
Subject: Re: [jQuery] Random problems with load()?
To: jquery-en@googlegroups.com
Date: Wednesday, December 9, 2009, 12:48 PM




  
  
try using firebug for firefox and look at the NET tab for response of
the server.



 Original Message 


  

  
Hello everyone!

I'm using load() to get some php content in ti a div, the PHP has a
long switch() conditional that brings back contents depending on var
received, it works fine, almost all the time...

Sometimes, the load function doesn't load anything, there's a callback
function for the load event, and it fires correctly, but nothing get
loaded.

It is not a PHP problem cause if I pass the var via URL to the PHP
document it works, even further, the same request sometimes works,
sometimes not...

Is this common? Can I get any error report from the load() function?


  

  
  






 



  

[jQuery] Random problems with load()?????

2009-12-09 Thread ximo wallas
Hello everyone!
I'm using load() to get some php content in ti a div, the PHP has a long 
switch() conditional that brings back contents depending on var received, it 
works fine, almost all the time...
Sometimes, the load function doesn't load anything, there's a callback function 
for the load event, and it fires correctly, but nothing get loaded.
It is not a PHP problem cause if I pass the var via URL to the PHP document it 
works, even further, the same request sometimes works, sometimes not...
Is this common? Can I get any error report from the load() function?



  

[jQuery] Problem traversing up list

2009-11-27 Thread ximo wallas
Hello there, after too much sarching I have almost give it up with the 
following.
I have a list with another list nested:
ul
    li id=item1Item 1
  ul
    li id=item1-1
  Item 1 - 1
    /li
    li id=item1-2

  Item 1 - 2

    /li
  /ul
    /li
/ul
Let's say I know the ID of item1-2 or item1-1 how can I get the id of the 
li (item1)?
I have tried with:
alert($('#item1-1').parentNode().id) 
But it gaves me an error, maybe just because it is an aberration...




  

Re: [jQuery] Problem traversing up list

2009-11-27 Thread ximo wallas
It returns an empty string, so it alerts, but nothing...
I will show you all the code:

First I get the id of the element via URL with the URL param plugin:
(It works, if I do an alert it returns the right stuff)
var target = $.url.param(target);
alert($(#+target).parent().attr('id'));

This alerts nothing !!

--- On Fri, 11/27/09, Michel Belleville michel.bellevi...@gmail.com wrote:

From: Michel Belleville michel.bellevi...@gmail.com
Subject: Re: [jQuery] Problem traversing up list
To: jquery-en@googlegroups.com
Date: Friday, November 27, 2009, 11:10 AM

You don't need to use .parentNode() (vanilla DOM) but .parent() (jQuery flavor).
Then you can access any attribute using .attr().

So  instead try : $('#item1-1').parent().attr('id')
This should tadaaa.



Michel Belleville



2009/11/27 ximo wallas igguan...@yahoo.com




Hello there, after too much sarching I have almost give it up with the 
following.
I have a list with another list nested:
ul
    li id=item1Item 1
  ul
    li id=item1-1


  Item 1 - 1
    /li
    li id=item1-2

  Item 1 - 2

    /li
  /ul
    /li
/ul
Let's say I know the ID of item1-2 or item1-1 how can I get the id of the 
li (item1)?
I have tried with:
alert($('#item1-1').parentNode().id) 


But it gaves me an error, maybe just because it is an aberration...




  




  

[jQuery] Selecting all checked checkboxes: nothing seems to work

2009-11-17 Thread ximo wallas
I'm using this selector:
$('[name^=item]').map(function()
{
});
To access a group of checkboxes with names like:
item[1], item[2], item[3], item[4]
It works fine, but when trying to access only the selected ones, I can't find 
the way...
$('[name^=item]:checked').map(function()
{
});
This doesn't work...




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[jQuery] load() and utf-8 encoding, nothing seems to work...

2009-11-04 Thread ximo wallas
I've been googling around but found no answer that works for me.
I'm loading some content from a PHP script using the load() function inside an 
html document that already has the utf-8 encoding meta tag. I suposed that the 
rule at the head of the container document will affect all loaded contents, but 
it doesn't.
The PHP I'm loading is using a switch to serve different contents, for every 
case I have open php tags like this:

case '1':
?
Here comes the choosen HTML contents
?
break

In my PHP I have also placed a header to indicate the content is utf-8:
header ('Content-type: text/html; charset=utf-8');
But maybe just because the final content is out of php tags maybe it is not 
affecting the content...
I have also tried setting the AJAX defaults:

    $.ajaxSetup({ 
    scriptCharset: utf-8 , 
    contentType: text/html; charset=utf-8
    });
But not even like that...
How can I fix that?



  

[jQuery] Cant' read XML with IE 8

2009-09-28 Thread ximo wallas
I'm reading the contents of an XML perfectly with FF but IE doesn't load the 
contents of the XML, everything seems to be ok, can somebody tell me what's 
wrong?

    var xml = $.ajax(
        {
            type: GET,
            url: xmlFile,
            dataType: xml,
            success: function(xml) 
            {
                total = xml.getElementsByTagName(item).length;
                for(x=0;xtotal;x++)
                {
                    title[x] = 
xml.getElementsByTagName(title)[x].firstChild.data;
                desc[x] = 
xml.getElementsByTagName(desc)[x].firstChild.data;
            };
            }
        });


  

[jQuery] Problem controlling links of appended html

2009-09-26 Thread ximo wallas
Hi there, I'm appending some divs with a thumbnail to an existing div called 
main_area and i would like to take controll of the appended links, but I 
can't. I have tried this:
$(#main_area).append(div class=picsa href=pics/1.jpgimg 
src=pics/1_thumb.jpg width=100px height=100px/a/div, function(){ 
$(.pics a).click(function(event){
return null;
})
});

I have also tried to add a function when document ready to control 
$(#main_area a) but it neither works, It seems like appended content is out 
of the DOM, how can I reach those elements?



  

[jQuery] Problem loading flash movie inside div

2009-09-16 Thread ximo wallas
Hello, I have a div that already contains a flash movie and some code that 
adobe flash needs to display the movie:
///
div id=mydiv
!--url's used in the movie--
!--text used in the movie--
!--
p align=left/p
p align=center/p
--
!-- saved from url=(0013)about:internet --
script language=JavaScript type=text/javascript
    AC_FL_RunContent(
        'codebase', 
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
        'width', '800',
        'height', '450',
        'src', 'animation',
        'quality', 'high',
        'pluginspage', 'http://www.adobe.com/go/getflashplayer',
        'align', 'middle',
        'play', 'true',
        'loop', 'true',
        'scale', 'showall',
        'wmode', 'window',
        'devicefont', 'false',
        'id', 'animation',
        'bgcolor', '#ff',
        'name', 'animation',
        'menu', 'true',
        'allowFullScreen', 'false',
        'allowScriptAccess','sameDomain',
        'movie', 'animation',
        'salign', ''
        ); //end AC code
/script
noscript
    object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0;
 width=800 height=450 id=animation align=middle
    param name=allowScriptAccess value=sameDomain /
    param name=allowFullScreen value=false /
    param name=movie value=animation.swf /param name=quality 
value=high /param name=bgcolor value=#ff /    embed 
src=animation.swf quality=high bgcolor=#ff width=800 height=450 
name=animation align=middle allowScriptAccess=sameDomain 
allowFullScreen=false type=application/x-shockwave-flash 
pluginspage=http://www.adobe.com/go/getflashplayer; /
    /object
/noscript
/div
//
I'am attempting to load an html document that contains only a portion of html 
identical to the one in the div but pointing to another swf:
/
!--url's used in the movie--
!--text used in the movie--
!--
p align=left/p
p align=center/p
--
!-- saved from url=(0013)about:internet --
script language=JavaScript type=text/javascript
    AC_FL_RunContent(
        'codebase', 
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
        'width', '800',
        'height', '450',
        'src', 'animation2',
        'quality', 'high',
        'pluginspage', 'http://www.adobe.com/go/getflashplayer',
        'align', 'middle',
        'play', 'true',
        'loop', 'true',
        'scale', 'showall',
        'wmode', 'window',
        'devicefont', 'false',
        'id', 'animation2',
        'bgcolor', '#ff',
        'name', 'animation2',
        'menu', 'true',
        'allowFullScreen', 'false',
        'allowScriptAccess','sameDomain',
        'movie', 'animation2',
        'salign', ''
        ); //end AC code
/script
noscript
    object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0;
 width=800 height=450 id=animation2 align=middle
    param name=allowScriptAccess value=sameDomain /
    param name=allowFullScreen value=false /
    param name=movie value=animation2.swf /param name=quality 
value=high /param name=bgcolor value=#ff /    embed 
src=animation2.swf quality=high bgcolor=#ff width=800 height=450 
name=animation2 align=middle allowScriptAccess=sameDomain 
allowFullScreen=false type=application/x-shockwave-flash 
pluginspage=http://www.adobe.com/go/getflashplayer; /
    /object
/noscript

I'm using:
$(#mydiv).load('swf.html')
When I try to load it the content of the loaded html replaces the entire 
document, doesn't stay in div, why should it be?



  

[jQuery] Very disappointed with jquery and iframe communication

2009-09-15 Thread ximo wallas
After 1 day googling and trying I find no agreement in a solid method for 
comunicating with iframe, this is the nearest point I've been to get in touch 
with IFRAME:

$(frames['Theiframe']).ready( function () 
{
    alert('Frame is loaded');

});

This will alert the message, but any attempt to comunicate with the iframe and 
access it's contents have been useless, I have a hidden field with with ID 
login and I'm trying to get it's value:

$(frames['Theiframe']).find(#login).val(); //Doesn't work in FF 3.0.14

/

var $currentIFrame = $(frames['Theiframe']);
$currentIFrame.contents().find(body #login).val() //Neither does in FF 3.0.14

If you Google a few you will see that everyone is giving it's own opinion on 
how to do it, but there's no agreement and no crossbrowser solid solution...




  

[jQuery] Re: Very disappointed with jquery and iframe communication

2009-09-15 Thread ximo wallas
It is firing the alert, you think it is not?
How can I access it and have some control over?




  

[jQuery] Re: Very disappointed with jquery and iframe communication

2009-09-15 Thread ximo wallas
How can I tell to the iframe to load() a different content from the main 
document?

--- On Tue, 9/15/09, Paolo Chiodi chiod...@gmail.com wrote:

From: Paolo Chiodi chiod...@gmail.com
Subject: [jQuery] Re: Very disappointed with jquery and iframe communication
To: jquery-en@googlegroups.com
Date: Tuesday, September 15, 2009, 1:42 PM


Of course it doesn't work.
You are searching for node elements with id=login that are child of
your iframes. You need to use the dom of the page loaded inside the i
frame
try $(frames['Theiframe']).get(0).contentDocument

I in the content page is present jquery, use
$(frames['Theiframe']).get(0).contentWindow.$('#login')

BTW, you can access child dom only if in same domain

Paolo

On Tue, Sep 15, 2009 at 10:53 AM, ximo wallas igguan...@yahoo.com wrote:

 After 1 day googling and trying I find no agreement in a solid method for 
 comunicating with iframe, this is the nearest point I've been to get in touch 
 with IFRAME:

 $(frames['Theiframe']).ready( function ()
 {
     alert('Frame is loaded');

 });

 This will alert the message, but any attempt to comunicate with the iframe 
 and access it's contents have been useless, I have a hidden field with with 
 ID login and I'm trying to get it's value:

 $(frames['Theiframe']).find(#login).val(); //Doesn't work in FF 3.0.14

 /

 var $currentIFrame = $(frames['Theiframe']);
 $currentIFrame.contents().find(body #login).val() //Neither does in FF 
 3.0.14

 If you Google a few you will see that everyone is giving it's own opinion on 
 how to do it, but there's no agreement and no crossbrowser solid solution...





  

[jQuery] detecting events on iframe: reload

2009-09-14 Thread ximo wallas
Can I detect somehow if a content has been loaded in an iframe? 
I'm not talking about the first loading of the iframe, but afterwords. I have a 
flash movie inside an iframe and this flash movie loads a document in the 
iframe when a button is clicked, all I want is the main page to detect when 
this content has been loaded or when iframe content is modified or refreshed...
Any hints?



  

[jQuery] iframe accesing main document functions?

2009-09-14 Thread ximo wallas
Is this possible? Been trying but doesn't seem to work...



  

[jQuery] Getting value from fields that compose an array?

2009-09-11 Thread ximo wallas
Hello!
I have a form with some fields like this:

input type=text name=item[] id=item[1] /
input type=text name=item[] id=item[2] /
input type=text name=item[] id=item[3] /
input type=text name=item[] id=item[4] /

How can I retriev the values with jquery?

I'm using this:
***
item = new Array();
for(var n = 0 ; n  items_amount ; n++)
{
item = $(#item[n]).val();
}
**
Where n is a number that comes from a bucle FOR, cuase I also know how many 
elements come in the array...
I allways get undefined when I try to see item[] value.





  

[jQuery] Loading external text in to a text area?

2009-09-07 Thread ximo wallas
Hello, I would like to know if I can load a small text from a external source 
into a textarea.
the external source is a php that will write some clean text depending on the 
vars received.
I know load() can do the job for a div but I don't think it will work for a 
textarea.



  

[jQuery] Getting XML info problem

2009-08-25 Thread ximo wallas
I find it really sad that jquery doesn't have a oficial forum out there...
My question is posted in this one, I can't post it here cause the HTML inside 
will blow the e-mail:
http://www.jqueryhelp.com/viewtopic.php?t=3616
Can somebody help me with this, I'm really stuck...