[jQuery] Re: Edittable plugin problem

2009-06-02 Thread bharani kumar
yes please send it

On Tue, Jun 2, 2009 at 6:26 AM, Gustavo Salomé gustavon...@gmail.comwrote:

 No way you can do this.
 Ive a modified version of the plugin that i made which can do this.
 Ill send to if u want it.

 2009/6/1 bharani kumar bharanikumariyer...@gmail.com

 Hi All,
 Am using the editable plug in ,

 When i edit the values , i want to check the already exist and also want
 to pass the unique key to the query , for the Update WHERE condition ,

 script type=text/javascript charset=utf-8
 var oTable;

 $(document).ready(function() {
  /* Apply the jEditable handlers to the table */
 $('#example tbody td').editable( 'edit_update.php?id='(i want the getID
 value here ), {
  callback: function( sValue, y ) {
 var aPos = oTable.fnGetPosition( this );
  oTable.fnUpdate( sValue, aPos[0], aPos[1] );
 }
 } );
  /* Init DataTables */
 oTable = $('#example').dataTable();
  } );
 /script


 tbody
  ?php
while($row=mysql_fetch_object($result)){
 $id = $row-id;
  echo tr;
 echo td onclick = getID($id) $row-value/td;
  echo /tr;
 }
   ?
  /tbody


 How i do this ,

 Thanks
 --
 Regards
 B.S.Bharanikumar
 http://php-mysql-jquery.blogspot.com/




 --
 Gustavo Salome Silva




-- 
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/


[jQuery] Already Exist jquery plugin

2009-06-02 Thread bharani kumar
Hi All ,
Name of Plug in for User or Email already exist  ,




-- 
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/


[jQuery] Ann: jqPlot 0.6.2 released

2009-06-02 Thread Chris Leonello

jqPlot is an open source plotting plugin for jQuery.  The 0.6.2
release adds many new features including:

Rotated axis text.
Vertical and horizontal bar charts.
Automatic trend line computation.
Data point highlighting.
Cursor tooltips showing data and grid position.
And many other features.

The jqPlot homepage is at http://www.jqplot.com/

The downloads page is at http://bitbucket.org/cleonello/jqplot/downloads/

The mailing list/Google group is at  http://groups.google.com/group/jqplot-users

jqPlot is built from the ground up as an extensible and plugable
plugin.  Handling of data, drawing of plot elements, events, virtually
everything is handled by a plugin.  This means you can enhance or swap
out core functionality without touching the core code.


[jQuery] Re: json indexing not working for me

2009-06-02 Thread Peter Marino
I wish I could tell you.. I don't have any way of dumping the return json
results.but I do know if I do a json.member I get a valid object
but json.member.name is invalid?

it would seem that this is the reason its not working but why?

server side:
?php
$arr = $_GET;
$myjson = json_encode($arr);
echo $myjson;
?

On Tue, Jun 2, 2009 at 7:55 AM, Steven Yang kenshin...@gmail.com wrote:

 json is the data passed back from the serverdoes the data passed back from
 server look like

 {
 member :
  {
 name : some name
 }
 }
 ?

 or are u just trying to access your data?




-- 
Power Tumbling - http://www.powertumbling.dk
OSG-Help - http://osghelp.com


[jQuery] Re: json indexing not working for me

2009-06-02 Thread Steven Yang
sorry i am not too familiar with phpput i guess $arr or $_GET is all the
parameters you get from the GET request.
can you simply print out the $arr and $myjson somewhere on server and see?


[jQuery] Re: json indexing not working for me

2009-06-02 Thread Peter Marino
:)  yea. working on that now
trying to create a way I can debug this on the server -

peter

On Tue, Jun 2, 2009 at 10:04 AM, Steven Yang kenshin...@gmail.com wrote:

 sorry i am not too familiar with phpput i guess $arr or $_GET is all the
 parameters you get from the GET request.
 can you simply print out the $arr and $myjson somewhere on server and see?




-- 
Power Tumbling - http://www.powertumbling.dk
OSG-Help - http://osghelp.com


[jQuery] Form plugin asynchronous behavior

2009-06-02 Thread dann

Hello all,

An application I'm building has a form that can initiate several
different actions on the server side, which take varying amounts of
time to return (up to 30 seconds or so). I'm using the jQuery Form
plugin to AJAXify the form. I've set the dataType option to json and
I'm using a beforeSubmit and success callback.

The problem I'm having is that the form submissions seem to be queued
and submitted synchronously, so if a user submits a request that takes
say 30 seconds and then immediately submits another request that only
takes 2 seconds the latter results aren't displayed for 32 seconds. It
also seems to affect multiple tabs in the same browser (tested on
Safari and Firefox), so a 30 second process in one tab and a 2 second
process in another have the same 32 second wait for the second
process.

I've tried searching both this newsgroup and google for answers but
I'm having trouble finding the appropriate search terms. If anyone can
point me in the right direction I'd be incredibly grateful.

Thanks!

dann


[jQuery] Accessing iframe's content

2009-06-02 Thread Paul Peelen

Hi,

I am trying to access the content of an iframe. I have search google
and read a couple of other post, but my problem is a little bit more
complicated.

I can't use the ...contents().find(whatever) function though the
result is of content type text/plain. In other words: There is not
HTML is the result. The result cannot be tampered with either.

Because contents, html and text are not really helping me I thought to
use a counter. Whenever the length would be more than 1 I would show
the result. But that doesn't seem to work either.

Anybody that has encountered this problem and can help?

Regards,
Paul Peelen


[jQuery] How to prevent a particular field being submitted in form submission

2009-06-02 Thread Clare

I have  email, password and some other fields, and I'm using $.post to
send data.

$(#MyForm).submit(function(){
$.post('/register.php',
$(this).serializeArray(),
callback,
json
);
return false;
});


In Ajax form submission, I don't want to submit a particular field.
The serializeArray() method returns all the fields in the form. So, I
tried something like this to prevent the password field being
serialized.

var serialized = [];
$(this).serializeArray().filter(function (value, index) {
if (value.name != data[User][passwd]) {
serialized.push(value);
}
});

This works great but the ajax submission doen't work.
Is there any solution for this?
Many thanks!


[jQuery] jCarousel plugin question

2009-06-02 Thread scranthdaddy

Hi, I am using the jCarousel plugin.  I have the container set to 100%
so it spans the width of the page.  If I only have a single image (or
just a couple images) in the container, the images repeat instead of
just showing blank space.  Any ideas?

Thanks!


[jQuery] jQuery ajax 404 error

2009-06-02 Thread raymond

Hi, all.
I have extremely annoying issue for my project, which made me keeping
3 days on it.
I used jQuery.ajax, but it gets all time 404 error, although target
url is still available.
When I have checked with firebug console, yes, it shows target url
with red color, which might mean that no file on this url.
But when I expand this request, I can see the response which I wanna
get.
I really do not understand what s going on there.

Any tips on this situation?
dataType is set as text and what I wanna get is letter like P, T,
etc.

Thank you.


[jQuery] Need a boost on managing a loop to show and hide

2009-06-02 Thread david

Hello, I'm still inexperienced in javascript and have chosen jQuery to
learn. This is the following situation:

Control:
ul class=list
 liPost #1/li
 liPost #2/li
/ul
I'm doing a loop on php, it gives me this output,
echo div class='posts' id='$uniqueID' ;
echo h1 Summary /h1;
echo p {$Content} /p;
echo /div;

How do I handle that to show or display? I want to toggle the content,
but when I do, it actives all the hidden post at the same time, making
an undesirable output.

So in the event that a user clicks the element I want that exact
element to be displayed while the others remain hidden.
This is what I'm using, still reading, but since I don't know how to
identify or match an ID against the selected element its hard for me
to know what I'm doing

$('ul.list').click(function() {  $('div.posts').show() });


[jQuery] JSON- PHP generated JS-file question

2009-06-02 Thread Kristof

Hello, i have just joined this group. First Google group i join !
I'm not native English speaking so sorry if i make some grammar
mistakes.

Anyway, the past 2 weeks i've been looking into JSON/AJAX functions of
jquery.
Now the reason for me doing that is that I want to make the following:

I want to have an input field that ask you for a code, let's say
abc, my script should then automatically search for the price in the
database, so with an onblur i suppose.

Now i googled/read etc etc, and i came up with a script that worked.
It ran a PHP script, generated an array according to the SJON standard
that i found on the official website.

BUT after re-thinking  what I was doing i thought to myself what if I
have a database with 10 000 products. I would load a query each time
to search trough these 10 000 products/items.  So I figured there must
be a better way. So i came up with the following idea:

lets run the PHP scripts one's a day and generate a .JS file
containing ALL the products in some sort of array readable for
$.getJson(). And this is where I get stuck:
how can I read trough the JS file and only select the price of the
item of witch I typed in the code abc ?

so if I have products.JS generated by PHP-script containing :
{channel:{items:[{id:1,prijs:10,naam:a},
{id:2,prijs:5,naam:b},
{id:3,prijs:22,naam:c}]}}

how could I select the prijs of product a from that JS-file ? Is
it at all possible and if so how ?

Help would be greatly appreciated !


[jQuery] How to prevent a particular field being submitted in form submission

2009-06-02 Thread Clare

I have  email, password and some other fields, and I'm using $.post to
send data for Ajax submission.

$(#MyForm).submit(function(){
$.post('/register.php',
$(this).serializeArray(),
callback,
json
);
return false;
});

The problem is that I don't want to submit a particular field.
The serializeArray() returns all the fields in the form. So, I tried
something like this to prevent the password field being serialized.

var serialized = [];
$(this).serializeArray().filter(function (value, index) {
if (value.name != data[User][passwd]) {
serialized.push(value);
}
});

This works great but the ajax submission doen't work.
Is there any solution for this?

Many thanks!


[jQuery] Re: jquery accordion inside the jquery tabs

2009-06-02 Thread Ryan

I'm getting the exact same problem.  Accordion inside 2nd tab of 3 is
freezing.  Visual Studio points to this line:

 j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit

g is NaN, l.prop is height.  g is set right before this:

g=(l.now-l.start)/(l.end-l.start)

l.now, l.start, l.end are all 0.

No answer yet.

R


[jQuery] Re: Multipart forms, file uploads and the accept header

2009-06-02 Thread atd

  I have a simple file upload form.  It works exactly as expected
  without javascript.  It *almost* works as expected when I convert it
  to an ajax form, with something like form.ajaxSubmit(options).  My
  options contain a dataType definition, {'dataType' : 'json'}.  I
  believe that this directly relates to the HTTP Accept header and lets
  my server know the type of data that I'm expecting to get back.  If I
  don't select a file to upload and hit submit then the Accept header is
  populated correctly (application/json, text/javascript, */*).  If I
  do select a file to upload and hit submit then the Accept header
  ignores my dataType and appears to default to the browser default
  (something like text/html,application/xhtml+xml,application/
  xml;q=0.9,*/*;q=0.8).  In practice, this means that although the file
  is uploaded correctly, I'm unable to determine the the type of
  response required from the server (in Rails I can't use respond_to to
  detect a request for a js response).  I'm wondering whether this is by
  design or whether something's wrong here.


 File uploads don't use ajax, the form plugin only makes it appear that
 way.  A true browser submit takes place when uploading a file.

Is there any way to catch the HTML response?

I tried success callback data, but it is blank.


[jQuery] Can jQuery parse XML locally?

2009-06-02 Thread fredriley

Ok, perhaps that's a provocative subject line, but it is my basic
question. I'm testing jQuery's capacity for parsing XML files, and
have immediately hit the error:

Access to restricted URI denied code: 1012

This came simply from replicating the example at
http://www.xml.com/pub/a/2007/10/10/jquery-and-xml.html and running it
locally via File|Open (no server). If I run the code on Apache (http://
www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jquery_xml1.html) it
works fine.

A search for the error string shows that it's common and is caused by
a cross-domain XML request (strange as it's running locally), and a
couple of discussions suggest using JSON instead. Now, I'm not going
to recast my XML docs as JSON, so before I go any further I would like
to know if jQuery can be used to parse XML files on local disk? It has
to be local disk as this is for a desktop application which won't rely
on a live connection. If not, no bother, I'll use something else,
maybe Flash or Flex; if so, I'd appreciate tips as to how to get past
this fatal error.

Nothing's ever easy in the Javascript world... ;(

Cheers

Fred

PS: Is there a way of getting notification of replies to a thread on
this group, anyone know?


[jQuery] Re: jQuery ajax 404 error

2009-06-02 Thread Jonathan Vanherpe (T T NV)


raymond wrote:

Hi, all.
I have extremely annoying issue for my project, which made me keeping
3 days on it.
I used jQuery.ajax, but it gets all time 404 error, although target
url is still available.
When I have checked with firebug console, yes, it shows target url
with red color, which might mean that no file on this url.
But when I expand this request, I can see the response which I wanna
get.
I really do not understand what s going on there.

Any tips on this situation?
dataType is set as text and what I wanna get is letter like P, T,
etc.

Thank you.


If you load it directly, does firebug still show a 404 error for the 
request?


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] Parsing a very large xml file

2009-06-02 Thread Tolis Christomanos


I have a xml file about 2MB. When i try to parse it my browser stops 
responding... Any good advices for parsing large xml files with jquery?


[jQuery] Re: Parsing a very large xml file

2009-06-02 Thread Michael Lawson

What are you doing with the file exactly?

Is there anyway you can break it up to parse smaller chunks?

Does the file have to be 2mb in the first place?  Won't this make the
overall experience of your page/application much slower?

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   Tolis Christomanos christoma...@gmail.com  
   
  To: jquery-en@googlegroups.com   
   
  Date:   06/02/2009 08:43 AM  
   
  Subject:[jQuery] Parsing a very large xml file   
   






I have a xml file about 2MB. When i try to parse it my browser stops
responding... Any good advices for parsing large xml files with jquery?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Parsing a very large xml file

2009-06-02 Thread Tolis Christomanos


Michael Lawson wrote:


What are you doing with the file exactly?

Is there anyway you can break it up to parse smaller chunks?

Does the file have to be 2mb in the first place? Won't this make the 
overall experience of your page/application much slower?


cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone: 1-276-206-8393
E-mail: mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. 
If you find they make sense, conform to your experience, and don't 
harm yourself or others, only then should you accept them.'


Inactive hide details for Tolis Christomanos ---06/02/2009 08:43:48 
AM---I have a xml file about 2MB. When i try to parse it myTolis 
Christomanos ---06/02/2009 08:43:48 AM---I have a xml file about 2MB. 
When i try to parse it my browser stops



From:   
Tolis Christomanos christoma...@gmail.com

To: 
jquery-en@googlegroups.com

Date:   
06/02/2009 08:43 AM

Subject:
[jQuery] Parsing a very large xml file






I have a xml file about 2MB. When i try to parse it my browser stops
responding... Any good advices for parsing large xml files with jquery?


Well i need this large files which is going to become much bigger 
because my client wants to be able to see his website offline and 
distribute it in cds. So i generate all my mysql base to an xml file and 
then i parse it with xmlI know its stupid but my client wants to 
have only one xml file for tyhe whole site


[jQuery] Re: accessing dom from different domain ?

2009-06-02 Thread kaspar


waseem sabjee

thank you for replay
I think there would be the same restriction of different domains


On Jun 1, 7:34 pm, waseem sabjee waseemsab...@gmail.com wrote:
 $.ajax({
 URL :www.myurl.com
 success: function(html) {
 var my id = $(#myid, html);
 alert(myid);

 });
 });
 On Mon, Jun 1, 2009 at 7:51 AM, kaspar kaspar...@gmail.com wrote:

  Ricardo ,
  thank you for replay
  but I'm getting the same  exception Permission denied to
  get property

         jq13(#open-oauth-button).click(function(event){
                 TwitterService.getAuthUrl(function(url){
                         var myRef = window.open(url,'mywin',

   'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');
                         var win=window;
                         jq13(myRef.document).ready(function(){
                                 var self = win.jq13(this);

   self.jq13(div.buttons#deny).click(function(event){

                                         alert(lala);

                                 });

                         });

                 });
         });

  I think the problem is in
  jq13(myRef.document). Main window has localhost domain but myRef
  window has twitter.com domain so there is cross domain security work .
  I'm wondering is the any ability to monitor events in  myRef window?
 http://friendfeed.com/seems made it work but dont know how :)

  On Jun 1, 2:50 am, Ricardo ricardob...@gmail.com wrote:
   does the document in the other window also have a jq13 object? If
   not you have to use the one in your main window and pass the other
   window's document as context:

   jq13(myRef.document).ready(function(){
      // grab the document in a jq object
      var self = this.parentWindow.jq13(this);
      self.find(div.buttons#deny).click(function(event){
           alert(lala);
      });

   });

   Not tested, might not work but you get the idea.

   On May 31, 3:38 pm, kaspar kaspar...@gmail.com wrote:

Hello
I'm trying to make Twitter OAuth  and getting Permission denied to
get property

here is the code

        jq13(#open-oauth-button).click(function(event){
                TwitterService.getAuthUrl(function(url){
                        var myRef = window.open(url,'mywin',

  'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');

                        jq13(myRef.document).ready(function(){

  myRef.jq13(div.buttons#deny).click(function(event){
                                        alert(lala);
                                });

                        });
                });
        });

is it possible to create event listeners on dom from different
domain ?


[jQuery] Re: Parsing a very large xml file

2009-06-02 Thread Michael Lawson

Can you share with me some of the xml and some of your code? Maybe we can
optimize something.


cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   Tolis Christomanos christoma...@gmail.com  
   
  To: jquery-en@googlegroups.com   
   
  Date:   06/02/2009 09:13 AM  
   
  Subject:[jQuery] Re: Parsing a very large xml file   
   






Michael Lawson wrote:

 What are you doing with the file exactly?

 Is there anyway you can break it up to parse smaller chunks?

 Does the file have to be 2mb in the first place? Won't this make the
 overall experience of your page/application much slower?

 cheers

 Michael Lawson
 Development Lead, Global Solutions, ibm.com
 Phone: 1-276-206-8393
 E-mail: mjlaw...@us.ibm.com

 'Examine my teachings critically, as a gold assayer would test gold.
 If you find they make sense, conform to your experience, and don't
 harm yourself or others, only then should you accept them.'

 Inactive hide details for Tolis Christomanos ---06/02/2009 08:43:48
 AM---I have a xml file about 2MB. When i try to parse it myTolis
 Christomanos ---06/02/2009 08:43:48 AM---I have a xml file about 2MB.
 When i try to parse it my browser stops


 From:
 Tolis Christomanos christoma...@gmail.com

 To:
 jquery-en@googlegroups.com

 Date:
 06/02/2009 08:43 AM

 Subject:
 [jQuery] Parsing a very large xml file

 




 I have a xml file about 2MB. When i try to parse it my browser stops
 responding... Any good advices for parsing large xml files with jquery?


Well i need this large files which is going to become much bigger
because my client wants to be able to see his website offline and
distribute it in cds. So i generate all my mysql base to an xml file and
then i parse it with xmlI know its stupid but my client wants to
have only one xml file for tyhe whole site

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Parsing a very large xml file

2009-06-02 Thread Gordon

Your best bet in that case is trying to talk your client out of it
then.  XML is not a very efficient format for data and a file
containing effectively the entire database is only ever going to be
huge and unwieldy. If you're processing it in a browser it's simply
going to be slow, there's no getting around that. If you can find a
way of only fetching the data you need at the time you should do
that.

On Jun 2, 2:12 pm, Tolis Christomanos christoma...@gmail.com wrote:
 Michael Lawson wrote:

  What are you doing with the file exactly?

  Is there anyway you can break it up to parse smaller chunks?

  Does the file have to be 2mb in the first place? Won't this make the
  overall experience of your page/application much slower?

  cheers

  Michael Lawson
  Development Lead, Global Solutions, ibm.com
  Phone: 1-276-206-8393
  E-mail: mjlaw...@us.ibm.com

  'Examine my teachings critically, as a gold assayer would test gold.
  If you find they make sense, conform to your experience, and don't
  harm yourself or others, only then should you accept them.'

  Inactive hide details for Tolis Christomanos ---06/02/2009 08:43:48
  AM---I have a xml file about 2MB. When i try to parse it myTolis
  Christomanos ---06/02/2009 08:43:48 AM---I have a xml file about 2MB.
  When i try to parse it my browser stops

  From:      
  Tolis Christomanos christoma...@gmail.com

  To:        
  jquery-en@googlegroups.com

  Date:      
  06/02/2009 08:43 AM

  Subject:  
  [jQuery] Parsing a very large xml file

  

  I have a xml file about 2MB. When i try to parse it my browser stops
  responding... Any good advices for parsing large xml files with jquery?

 Well i need this large files which is going to become much bigger
 because my client wants to be able to see his website offline and
 distribute it in cds. So i generate all my mysql base to an xml file and
 then i parse it with xmlI know its stupid but my client wants to
 have only one xml file for tyhe whole site


[jQuery] BlockUI not always firing

2009-06-02 Thread Shadraq

I posted this in the UI group and was told to put it in here...

My problem is that I have a function that is to call blockUI both
upon
login and logout. BlockUI only fires upon logout.
Here's my code:
**code**
function Processing(dataString,l_processing,control)
{
if (l_processing == yes)
{
$().ajaxStart(function()
{
$.blockUI(
{
message: $
('img#l-processing'),
css:
{
 
border: 'none',
 
padding: '15px',
 
backgroundColor: '#000',
 
'-webkit-border-radius': '10px',
 
'-moz-border-radius': '10px',
 
'-ms-filter': 'progid:DXImageTransform.Microsoft.Alpha
(Opacity=50)',
 
'filter': 'progid:DXImageTransform.Microsoft.Alpha
(Opacity=50)',
 
opacity: '.5'
}
})
});
if(control == logout)
{
 $.ajax({
 
type: POST,
  url:
logout.php,
 
data: dataString,
});
 
ReloadPage();
}
else if(control == login)
{
$.ajax({
  type:
POST,
  url:
login.php,
  data:
dataString,
});
ReloadPage();
//return
false;
}
}
l_processing = no;
control = no;
}
**end code**
All vars are being passed correctly. else if(control == login)
fires just fine, within the if(l_processing == yes), but the
BlockUI portion does not start. However, when control = logout
BlockUI starts up just fine.
I've done alerts and find that all variables being sent into the
function are populating as they should.
Any ideas?


[jQuery] Re: BlockUI not always firing

2009-06-02 Thread Donny Kurnia


Shadraq wrote:

I posted this in the UI group and was told to put it in here...

My problem is that I have a function that is to call blockUI both
upon
login and logout. BlockUI only fires upon logout.
Here's my code:
**code**
function Processing(dataString,l_processing,control)
{
if (l_processing == yes)
{
$().ajaxStart(function()
{
$.blockUI(
{
message: $
('img#l-processing'),
css:
{
 
border: 'none',
 
padding: '15px',
 
backgroundColor: '#000',
 
'-webkit-border-radius': '10px',
 
'-moz-border-radius': '10px',
 
'-ms-filter': 'progid:DXImageTransform.Microsoft.Alpha

(Opacity=50)',
 
'filter': 'progid:DXImageTransform.Microsoft.Alpha

(Opacity=50)',
 
opacity: '.5'

}
})
});
if(control == logout)
{
 $.ajax({
 
type: POST,

  url:
logout.php,
 
data: dataString,

});
 
ReloadPage();

}
else if(control == login)
{
$.ajax({
  type:
POST,
  url:
login.php,
  data:
dataString,
});
ReloadPage();
//return
false;
}
}
l_processing = no;
control = no;
}
**end code**
All vars are being passed correctly. else if(control == login)
fires just fine, within the if(l_processing == yes), but the
BlockUI portion does not start. However, when control = logout
BlockUI starts up just fine.
I've done alerts and find that all variables being sent into the
function are populating as they should.
Any ideas?



It's hard to read your code. You can put the code in the pastie, or 
pastebin, then put the url here.
You can put $.ajaxStart and $.ajaxstop outside the if block. This will 
reduce the code complexity.


--
Donny Kurnia
http://blog.abifathir.com
http://hantulab.blogspot.com
http://www.plurk.com/user/donnykurnia


[jQuery] Re: Accessing iframe's content

2009-06-02 Thread Liam Byrne


If the iframe is from a different domain, then this is not possible.

Paul Peelen wrote:

Hi,

I am trying to access the content of an iframe. I have search google
and read a couple of other post, but my problem is a little bit more
complicated.

I can't use the ...contents().find(whatever) function though the
result is of content type text/plain. In other words: There is not
HTML is the result. The result cannot be tampered with either.

Because contents, html and text are not really helping me I thought to
use a counter. Whenever the length would be more than 1 I would show
the result. But that doesn't seem to work either.

Anybody that has encountered this problem and can help?

Regards,
Paul Peelen



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.339 / Virus Database: 270.12.49/2149 - Release Date: 06/01/09 17:55:00


  




[jQuery] Re: accessing dom from different domain ?

2009-06-02 Thread kaspar

This restriction calls Same origin policy
http://en.wikipedia.org/wiki/Same_origin_policy

On Jun 1, 7:34 pm, waseem sabjee waseemsab...@gmail.com wrote:
 $.ajax({
 URL :www.myurl.com
 success: function(html) {
 var my id = $(#myid, html);
 alert(myid);

 });
 });
 On Mon, Jun 1, 2009 at 7:51 AM, kaspar kaspar...@gmail.com wrote:

  Ricardo ,
  thank you for replay
  but I'm getting the same  exception Permission denied to
  get property

         jq13(#open-oauth-button).click(function(event){
                 TwitterService.getAuthUrl(function(url){
                         var myRef = window.open(url,'mywin',

   'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');
                         var win=window;
                         jq13(myRef.document).ready(function(){
                                 var self = win.jq13(this);

   self.jq13(div.buttons#deny).click(function(event){

                                         alert(lala);

                                 });

                         });

                 });
         });

  I think the problem is in
  jq13(myRef.document). Main window has localhost domain but myRef
  window has twitter.com domain so there is cross domain security work .
  I'm wondering is the any ability to monitor events in  myRef window?
 http://friendfeed.com/seems made it work but dont know how :)

  On Jun 1, 2:50 am, Ricardo ricardob...@gmail.com wrote:
   does the document in the other window also have a jq13 object? If
   not you have to use the one in your main window and pass the other
   window's document as context:

   jq13(myRef.document).ready(function(){
      // grab the document in a jq object
      var self = this.parentWindow.jq13(this);
      self.find(div.buttons#deny).click(function(event){
           alert(lala);
      });

   });

   Not tested, might not work but you get the idea.

   On May 31, 3:38 pm, kaspar kaspar...@gmail.com wrote:

Hello
I'm trying to make Twitter OAuth  and getting Permission denied to
get property

here is the code

        jq13(#open-oauth-button).click(function(event){
                TwitterService.getAuthUrl(function(url){
                        var myRef = window.open(url,'mywin',

  'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');

                        jq13(myRef.document).ready(function(){

  myRef.jq13(div.buttons#deny).click(function(event){
                                        alert(lala);
                                });

                        });
                });
        });

is it possible to create event listeners on dom from different
domain ?


[jQuery] Re: Unable to Formulate a Proper Title

2009-06-02 Thread kiusau

On Jun 1, 4:21 pm, kiusau kiu...@mac.com wrote:
 On Jun 1, 9:39 am, kiusau kiu...@mac.com wrote:

It would be unjust to say that my time was completely wasted in this
forum, but it would be foolish for me to waste any more, because I
have discovered here what I dislike most about IT forum's in general.
So, with these few words I will say good-bye.

To those who have helped me, I wish you well and my very best in your
continued endeavor.
To those who have left me hanging, may you suffer the same frustration
that I have felt.
To those who have sought to derail me, I am sure that you will find
your own gutter, if you are not in it already.
To those who have treated me with indifference, I am leaving.

Roddy




[jQuery] Superfish menu - I want my current active tab and corresponding sub nav to display on certain pages -- a newbie begging for help.

2009-06-02 Thread Juliane

I'm a novice and relied on freelancer to build my superfish menu.
Everything is working correctly here -- http://www.cmpl.org/ but I
want to take it to the next level.  When a user clicks on a major sub
tab (such as About Us) I want the horizontal sub navigation to stay
visible (not hover and disappear on mouseout).

Is there a way to do this?  I see in my CSS (also built by the
freelancer) that I have elements that relate to the current li but
that seems to affect only the background color.  CSS is available here
-- http://www.cmpl.org/_styles/styles.css

Can anyone help me use something in superfish (that I don't know
about) to make my current active tab show all the sub navigation?

--Juliane


[jQuery] Re: location persistance + ajax load problem

2009-06-02 Thread Victor Jonsson

I too need to find a solution to persistance when using async.

dipidi: Have you found a solution to yours?

Regards, Victor

On 5 Apr., 18:23, dip...@gmail.com dip...@gmail.com wrote:
 [SORRY!, this is a proper message, the first one i forgot to add a
 topic]

 hey all,

 having a problem with treeview by Jörn Zaefferer.

 I load the content from json, but i losepersistanceof location. i
 get the tree folded and i don't know what branch i'm on to.

 i managed to fix this by pasting the location code in .async.js,

                         var sm = current.find(a).filter(function()
 { return
 this.href.toLowerCase() == location.href.toLowerCase(); });
                                 if ( sm.length ) {
                                         sm.addClass(selected).parents
 (ul, li).add( sm.next() ).show
 ();
                                 }

 but now the branch is marked as selected, however the tree is not open
 (all folded)

 any ideas?


[jQuery] Re: jQuery ajax 404 error

2009-06-02 Thread Chris Chen
are you sure the url is available??

2009/6/2 Jonathan Vanherpe (T  T NV) jonat...@tnt.be


 raymond wrote:

 Hi, all.
 I have extremely annoying issue for my project, which made me keeping
 3 days on it.
 I used jQuery.ajax, but it gets all time 404 error, although target
 url is still available.
 When I have checked with firebug console, yes, it shows target url
 with red color, which might mean that no file on this url.
 But when I expand this request, I can see the response which I wanna
 get.
 I really do not understand what s going on there.

 Any tips on this situation?
 dataType is set as text and what I wanna get is letter like P, T,
 etc.

 Thank you.


 If you load it directly, does firebug still show a 404 error for the
 request?

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




-- 
Chris


[jQuery] Hover image under flash element.....

2009-06-02 Thread Warrick

I am trying to place several hover/tool tips using jQuery in a page
that contains a flash elemnt to the right. When viewed in a browser
the hover/tool tip appears partially below the adjacent flash element.
Any one have any ideas???
Thanks


[jQuery] Treeview, async, persist location

2009-06-02 Thread victorjons...@gmail.com

Good day.

I'm using the treeview plugin with async. And it works great.

But I miss the persist location functionality.

Does anyone have a solution to this?

I have a parameter in the URL that could be used to load that page's
submenus.
(the value of that parameter is the same as the value used to return
the correct submenus)

So maybe there is a way, after the tree has loaded initially, to read
the URL parameter and read/add to the tree as needed.

But I'm not very good at jquery or javascript in general.

If anyone has an example or an idea though, i might be able to figure
it out.

Thanks, Victor


[jQuery] LI:last of submenu's

2009-06-02 Thread josb...@gmail.com

I don't want background-image's on all the last list-items of a
submenu.
I use this code but it only apply the edit to the last submenu.
$('ul#sidebarmenu1 ul li:last a').css('background-image', 'none');
How can i apply this to all submenu's?
My HTML (generated by CMS):
ul class=menu id=sidebarmenu1
li class=parent item65a href=#spanLink 1/span/a
ul
li class=item73a href=/link/spanSublink 1/
span/a/li
   li class=item77a href=/link/spanSublink 2(*)/
span/a/li
/ul
/li
li class=item66a href=/link/ target=_blankspanLink 2/
span/a/li
li class=parent item65a href=#spanLink 3/span/a
ul
li class=item73a href=/link/spanSublink 1/
span/a/li
li class=item74a href=/link/spanSublink 2(*)
/span/a/li   /ul
/li
/ul


[jQuery] Jquery Superfish navbar question

2009-06-02 Thread FnTm

Hi!

I have a problem, that i think is mostly css related, but I am not
sure.

What I would like to do, is have the second tier of the navbar
centered under the first tier menu item. A little example:
Menu Menu Menu Menu Menu Menu
-|---
-Menu Menu Menu--

What would I have to do to accomplish this?

Thanks!


[jQuery] Re: Request: build hoverFlow in jquery core

2009-06-02 Thread Mark

On Mon, Jun 1, 2009 at 9:46 PM, Mark mark...@gmail.com wrote:
 Hey,

 The biggest issue i always had with jquery was that queue build up stuff.
 Now we have the hoverFlow plugin to fix that:
 http://www.2meter3.de/code/hoverFlow/index.html
 But i was wondering.. shouldn't this be part of the core? like for
 example that you can say to the animate function to run once and not
 build up the queue?
 Also the ability hoverFlow provides seems to be something that really
 should be in the core because everyone working with effects will
 probably need it at some point in time.

 So that's why i request to make hoverFlow part of the jquery core.

 Just out of curiosity. What's the fastest way to imitate the hoverFlow
 effect without adding that plugin?
 i personally would rather avoid adding any more javascript plugins to
 my site. one should be enough unless your doing extreme things.


No comments? suggestions? or just anything?


[jQuery] Re: Hover image under flash element.....

2009-06-02 Thread Nic Hubbard

You need to use the wmode for your flash element.  Setting wmode to
opaque should fix this.

On Jun 2, 5:38 am, Warrick warric...@gmail.com wrote:
 I am trying to place several hover/tool tips using jQuery in a page
 that contains a flash elemnt to the right. When viewed in a browser
 the hover/tool tip appears partially below the adjacent flash element.
 Any one have any ideas???
 Thanks


[jQuery] Any way to make an anonymous function die?

2009-06-02 Thread Laker Netman

I am using .live() in jQuery 1.3.2 to assign a dynamic click event to
multiple Select lists. When one of the lists is clicked on I would
like to have that particular list to no longer be clickable.

Here's the issue. I currently assign the click function in .live()
with an anonymous function, so the only thing I have been able to do
so far is $(this).die('click') when a Select is clicked on. This, of
course, kills the event for ALL my Selects.

Does anyone know of a way to do this without creating a separate,
named function for the die() function to use later?

Thanks,
Laker


[jQuery] Re: Any way to make an anonymous function die?

2009-06-02 Thread Isaac Gonzalez


I'm not sure if this is the best solution but you can always change  
the class name of the li after it's been click. Then add a conditional  
statement in your anonymous function filter list with the revised  
class name.





On Jun 2, 2009, at 8:55 AM, Laker Netman wrote:



I am using .live() in jQuery 1.3.2 to assign a dynamic click event to
multiple Select lists. When one of the lists is clicked on I would
like to have that particular list to no longer be clickable.

Here's the issue. I currently assign the click function in .live()
with an anonymous function, so the only thing I have been able to do
so far is $(this).die('click') when a Select is clicked on. This, of
course, kills the event for ALL my Selects.

Does anyone know of a way to do this without creating a separate,
named function for the die() function to use later?

Thanks,
Laker




[jQuery] Re: Add Class to all form elements

2009-06-02 Thread waseem sabjee
Yes but he only wants to add class to forms. myway is loop through all
forms. or all forms with a specific class. then for each form loop through
all inputs. this way is better only if you want certain forms not to have
the class name or if you have inputs that are not within forms.


On Tue, Jun 2, 2009 at 3:07 AM, mkmanning michaell...@gmail.com wrote:


 Or you could just do this:

 $(':input,:checkbox,:radio').addClass('YOUR_CLASSNAME');


 On Jun 1, 10:24 am, waseem sabjee waseemsab...@gmail.com wrote:
  script
  $(function() {
 
  var myforms = $(form);
 
  myforms.each(function(i) {
 
  var myform = myforms.eq(i);
 
  var myfields = $(input, myform);
 
  myfields.each(function(i) {
 
  var myfield = myfields.eq(i);
 
  myfield.addClass(myflied_+i);
 
  });
  });
  });
 
  /script
 
  On Mon, Jun 1, 2009 at 7:19 PM, Loony2nz loony...@gmail.com wrote:
 
   Hey everyone,
 
   I need help with a jquery task.
 
   I have a form that has it's HTML inserted into the database (yeah yeah
   I know..not my idea..I'm new here and just finding this out).
 
   Anyway, each form field has an embedded class in the HTML.
 
   The form is dynamically generated.  Can be anywhere from 5 to 10 to 20
   to 50 fields.
 
   How can I loop over each form field and add a new class to the field
   (either input or radio or checkbox)?
 
   Thoughts?
 
   Thanks!



[jQuery] Re: accessing dom from different domain ?

2009-06-02 Thread waseem sabjee
I currently use that cod on a few sties. it works perfectly.

On Tue, Jun 2, 2009 at 3:58 PM, kaspar kaspar...@gmail.com wrote:


 This restriction calls Same origin policy
 http://en.wikipedia.org/wiki/Same_origin_policy

 On Jun 1, 7:34 pm, waseem sabjee waseemsab...@gmail.com wrote:
  $.ajax({
  URL :www.myurl.com
  success: function(html) {
  var my id = $(#myid, html);
  alert(myid);
 
  });
  });
  On Mon, Jun 1, 2009 at 7:51 AM, kaspar kaspar...@gmail.com wrote:
 
   Ricardo ,
   thank you for replay
   but I'm getting the same  exception Permission denied to
   get property
 
  jq13(#open-oauth-button).click(function(event){
  TwitterService.getAuthUrl(function(url){
  var myRef = window.open(url,'mywin',
 
'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');
  var win=window;
  jq13(myRef.document).ready(function(){
  var self = win.jq13(this);
 
self.jq13(div.buttons#deny).click(function(event){
 
  alert(lala);
 
  });
 
  });
 
  });
  });
 
   I think the problem is in
   jq13(myRef.document). Main window has localhost domain but myRef
   window has twitter.com domain so there is cross domain security work .
   I'm wondering is the any ability to monitor events in  myRef window?
  http://friendfeed.com/seems made it work but dont know how :)
 
   On Jun 1, 2:50 am, Ricardo ricardob...@gmail.com wrote:
does the document in the other window also have a jq13 object? If
not you have to use the one in your main window and pass the other
window's document as context:
 
jq13(myRef.document).ready(function(){
   // grab the document in a jq object
   var self = this.parentWindow.jq13(this);
   self.find(div.buttons#deny).click(function(event){
alert(lala);
   });
 
});
 
Not tested, might not work but you get the idea.
 
On May 31, 3:38 pm, kaspar kaspar...@gmail.com wrote:
 
 Hello
 I'm trying to make Twitter OAuth  and getting Permission denied to
 get property
 
 here is the code
 
 jq13(#open-oauth-button).click(function(event){
 TwitterService.getAuthUrl(function(url){
 var myRef = window.open(url,'mywin',
 
   'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');
 
 jq13(myRef.document).ready(function(){
 
   myRef.jq13(div.buttons#deny).click(function(event){
 alert(lala);
 });
 
 });
 });
 });
 
 is it possible to create event listeners on dom from different
 domain ?



[jQuery] Re: LI:last of submenu's

2009-06-02 Thread Mauricio (Maujor) Samy Silva
Use 
$('ul#sidebarmenu1 ul li:last-child a').css('background-image', 'none');

:last = Matches ONLY  the last selected element.
last-child = Matches ALL elements that are the last child of their parent.

Maurício

  -Mensagem Original- 
  De: josb...@gmail.com 
  Para: jQuery (English) 
  Enviada em: terça-feira, 2 de junho de 2009 10:01
  Assunto: [jQuery] LI:last of submenu's



  I don't want background-image's on all the last list-items of a
  submenu.
  I use this code but it only apply the edit to the last submenu.
  $('ul#sidebarmenu1 ul li:last a').css('background-image', 'none');
  How can i apply this to all submenu's?


[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread waseem sabjee
$(#myfieldid).attr({
value:;
});

this should set the value to nothing.

On Tue, Jun 2, 2009 at 7:24 AM, Clare little.miss.miracle.g...@gmail.comwrote:


 I have  email, password and some other fields, and I'm using $.post to
 send data for Ajax submission.

 $(#MyForm).submit(function(){
$.post('/register.php',
$(this).serializeArray(),
callback,
json
);
return false;
 });

 The problem is that I don't want to submit a particular field.
 The serializeArray() returns all the fields in the form. So, I tried
 something like this to prevent the password field being serialized.

 var serialized = [];
 $(this).serializeArray().filter(function (value, index) {
if (value.name != data[User][passwd]) {
serialized.push(value);
}
 });

 This works great but the ajax submission doen't work.
 Is there any solution for this?

 Many thanks!



[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread waseem sabjee
SORRY
SYNTAX ERROR
here is the correct

$(#myfieldid).attr({
value:
});


On Tue, Jun 2, 2009 at 6:11 PM, waseem sabjee waseemsab...@gmail.comwrote:

 $(#myfieldid).attr({
 value:;
 });

 this should set the value to nothing.


 On Tue, Jun 2, 2009 at 7:24 AM, Clare 
 little.miss.miracle.g...@gmail.comwrote:


 I have  email, password and some other fields, and I'm using $.post to
 send data for Ajax submission.

 $(#MyForm).submit(function(){
$.post('/register.php',
$(this).serializeArray(),
callback,
json
);
return false;
 });

 The problem is that I don't want to submit a particular field.
 The serializeArray() returns all the fields in the form. So, I tried
 something like this to prevent the password field being serialized.

 var serialized = [];
 $(this).serializeArray().filter(function (value, index) {
if (value.name != data[User][passwd]) {
serialized.push(value);
}
 });

 This works great but the ajax submission doen't work.
 Is there any solution for this?

 Many thanks!





[jQuery] Re: How to prevent a particular field being submitted in form submission

2009-06-02 Thread Gustavo Salomé
Try to disable the field.
I think its gonna work.

2009/6/2 waseem sabjee waseemsab...@gmail.com

 SORRY
 SYNTAX ERROR
 here is the correct

 $(#myfieldid).attr({
 value:
 });



 On Tue, Jun 2, 2009 at 6:11 PM, waseem sabjee waseemsab...@gmail.comwrote:

 $(#myfieldid).attr({
 value:;
 });

 this should set the value to nothing.


 On Tue, Jun 2, 2009 at 7:24 AM, Clare little.miss.miracle.g...@gmail.com
  wrote:


 I have  email, password and some other fields, and I'm using $.post to
 send data for Ajax submission.

 $(#MyForm).submit(function(){
$.post('/register.php',
$(this).serializeArray(),
callback,
json
);
return false;
 });

 The problem is that I don't want to submit a particular field.
 The serializeArray() returns all the fields in the form. So, I tried
 something like this to prevent the password field being serialized.

 var serialized = [];
 $(this).serializeArray().filter(function (value, index) {
if (value.name != data[User][passwd]) {
serialized.push(value);
}
 });

 This works great but the ajax submission doen't work.
 Is there any solution for this?

 Many thanks!






-- 
Gustavo Salome Silva


[jQuery] Re: jqPlot - New charting plugin

2009-06-02 Thread Chris Leonello

I've made significant updates to the jqPlot plotting plugin: data
tooltips, rotated axis text, customizable date formatters, vertical
and horizontal bar charts and many other features.  Visit the home
page, http://www.jqplot.com/ or the project page, 
http://www.bitbucket.org/cleonello/jqplot/
if you are interested.  There are a slew of dynamically generated unit
tests and examples at http://www.jqplot.com/tests/ also.


On Apr 10, 4:36 am, Chris Leonello chris.leone...@gmail.com wrote:
 I've added an examples page demonstrating some of the current features
 ofjqPlot.  It is here:

 http://www.hacknack.com/jqplot/examples.html

 Note, it doesn't demonstrate how to create a plugin forjqPlot.  I'll
 get to that too.

 On Apr 8, 10:32 pm, Ralph Whitbeck ralph.whitb...@gmail.com wrote:

  Hey Chris,

  So the difference betweenjqPlotand Flot is thatjqPlotis extensible or
  that your plugin will take plugins of it's own?

  That's pretty cool if I got that right.

  Are there other differences?  CanjqPlotdo the same examples as 
  Flot's?http://people.iola.dk/olau/flot/examples/

  Ralph

  On Wed, Apr 8, 2009 at 8:23 PM, Chris Leonello 
  chris.leone...@gmail.comwrote:

   Hi,

   I'd like to announcejqPlot, a new charting plugin for jQuery.  jqPlot
   was inspired by Flot, but has a more extensible plugin like
   architecture.  For example, logarithmic axes are supported through a
   logAxes plugin renderer.

   There is a loose coupling between user inputs, data handling, and
   drawing of the chart objects.  All graph elements are created through
   renderers.  This means that, independent of thejqPlotcore code, a
   new renderer to e.g. draw spider graphs can be written and plugged in.

   ThejqPlothome page can be found here::

  http://code.google.com/p/jqplot/

   Documentation is here:

  http://www.hacknack.com/jqplot/

   and I've set up a discussion group at:
  http://groups.google.com/group/jqplot-users

  jqPlotis fully functional, but is still under heavy development.
   There may be bugs and not all features are implemented yet.  Some of
   the currentjqPlotfeatures:

   * Line/scatter graphs.
   * Customizable line markers and line styles.
   * Dual x/y axis support.
   * Logarithmic x/y axis support (through plugin).
   * Axis customizations including turning off tick marks and sprintf
   style tick label formatting.
   * Chart title, legend and grid formating and customization.

   Features I'm currently working on:

   * Better, stronger, faster documentation.
   * Automatic trend line calculation.
   * Bar/Column charts.
   * Hi lo close (candlestick) charts.
   * Bubble charts.
   * Interactive features including highlighting and event support.

   Take a look.  Give it a try.  Let me know what you think.  All
   comments, criticisms and feedback are welcome.




[jQuery] Re: Add Class to all form elements

2009-06-02 Thread Gustavo Salomé
Try it:
$('form').find(':input,:radio,:checkbox').addClass('class');


2009/6/2 waseem sabjee waseemsab...@gmail.com

 Yes but he only wants to add class to forms. myway is loop through all
 forms. or all forms with a specific class. then for each form loop through
 all inputs. this way is better only if you want certain forms not to have
 the class name or if you have inputs that are not within forms.



 On Tue, Jun 2, 2009 at 3:07 AM, mkmanning michaell...@gmail.com wrote:


 Or you could just do this:

 $(':input,:checkbox,:radio').addClass('YOUR_CLASSNAME');


 On Jun 1, 10:24 am, waseem sabjee waseemsab...@gmail.com wrote:
  script
  $(function() {
 
  var myforms = $(form);
 
  myforms.each(function(i) {
 
  var myform = myforms.eq(i);
 
  var myfields = $(input, myform);
 
  myfields.each(function(i) {
 
  var myfield = myfields.eq(i);
 
  myfield.addClass(myflied_+i);
 
  });
  });
  });
 
  /script
 
  On Mon, Jun 1, 2009 at 7:19 PM, Loony2nz loony...@gmail.com wrote:
 
   Hey everyone,
 
   I need help with a jquery task.
 
   I have a form that has it's HTML inserted into the database (yeah yeah
   I know..not my idea..I'm new here and just finding this out).
 
   Anyway, each form field has an embedded class in the HTML.
 
   The form is dynamically generated.  Can be anywhere from 5 to 10 to 20
   to 50 fields.
 
   How can I loop over each form field and add a new class to the field
   (either input or radio or checkbox)?
 
   Thoughts?
 
   Thanks!





-- 
Gustavo Salome Silva


[jQuery] Ajax forms

2009-06-02 Thread Dave Maharaj :: WidePixels.com

Can someone give me a hand getting this right. Using the jQuery Form Plugin
on http://malsup.com/jquery/form/ I am trying to submit a form but the
script I am having problems with. I know its wrong...but cant figure out how
to remove the duplicate post and url parts.

$(document).ready(function() {
  $('#UpdateForm').bind('submit', function() {
var queryString = $('#UpdateForm').formSerialize();
$.post('/update', queryString);
$(this).ajaxSubmit({
type:   'post',
url:'/update',
target: '#userForm',
success:function()
{alert(queryString);} 
});
return false; // -- important!
});
});

Can someone point out the correct way to set up this function?

Thanks,

Dave



[jQuery] Re: Superfish menu - I want my current active tab and corresponding sub nav to display on certain pages -- a newbie begging for help.

2009-06-02 Thread Laker Netman

On Jun 2, 8:41 am, Juliane jmor...@cmpl.org wrote:
 I'm a novice and relied on freelancer to build my superfish menu.
 Everything is working correctly here --http://www.cmpl.org/but I
 want to take it to the next level.  When a user clicks on a major sub
 tab (such as About Us) I want the horizontal sub navigation to stay
 visible (not hover and disappear on mouseout).

 Is there a way to do this?  I see in my CSS (also built by the
 freelancer) that I have elements that relate to the current li but
 that seems to affect only the background color.  CSS is available here
 --http://www.cmpl.org/_styles/styles.css

 Can anyone help me use something in superfish (that I don't know
 about) to make my current active tab show all the sub navigation?

 --Juliane

If you want to *completely* disable the automatic hiding of menues,
then you can do this...
(After making a back up copy of your superfish.js file)
Open superfish.js in Notepad (don't use Wordpard, Word, etc)
Change line 29 from this:
$$.hideSuperfishUl();
to this:
//$$.hideSuperfishUl();

Adding the two slashes turns the line into a comment, so the function
to hide the menu is never called.

NOTE: This may have side-effects if superfish is used elsewhere in
your site. It's a brute-force solution, but it works. I took a look at
your site and I think this is the behavior you want.

Laker



[jQuery] Re: Add Class to all form elements

2009-06-02 Thread mkmanning

if you have inputs that are not within forms
That should never happen if you're using valid markup ;)

Although the OP gave no indication there'd be other forms on the page,
if you want to target a specific form just use the context:

$(':text,:checkbox,:radio',$('SPECIFIC_FORM')).addClass
('YOUR_CLASSNAME');

Although it's not clear from the OP's text that he wants the classes
added for styling, that's a reasonable assumption. You're assigning a
class whose name is set using the value of i (myflied_+i), so
given that the OP said there could be anywhere from 5 to 10 to 20 to
50 fields, it would be extremely difficult to use those classes for
styling purposes.

Even if the class is to be used only for targeting the form elements
later with script, you'd have to use a ^= filter on the class name
since you could have classnames ranging from myfield_0 to
myfield_50. In short, there's not much to gain by adding the number
to the end of the class.


On Jun 2, 9:07 am, waseem sabjee waseemsab...@gmail.com wrote:
 Yes but he only wants to add class to forms. myway is loop through all
 forms. or all forms with a specific class. then for each form loop through
 all inputs. this way is better only if you want certain forms not to have
 the class name or if you have inputs that are not within forms.

 On Tue, Jun 2, 2009 at 3:07 AM, mkmanning michaell...@gmail.com wrote:

  Or you could just do this:

  $(':input,:checkbox,:radio').addClass('YOUR_CLASSNAME');

  On Jun 1, 10:24 am, waseem sabjee waseemsab...@gmail.com wrote:
   script
   $(function() {

   var myforms = $(form);

   myforms.each(function(i) {

   var myform = myforms.eq(i);

   var myfields = $(input, myform);

   myfields.each(function(i) {

   var myfield = myfields.eq(i);

   myfield.addClass(myflied_+i);

   });
   });
   });

   /script

   On Mon, Jun 1, 2009 at 7:19 PM, Loony2nz loony...@gmail.com wrote:

Hey everyone,

I need help with a jquery task.

I have a form that has it's HTML inserted into the database (yeah yeah
I know..not my idea..I'm new here and just finding this out).

Anyway, each form field has an embedded class in the HTML.

The form is dynamically generated.  Can be anywhere from 5 to 10 to 20
to 50 fields.

How can I loop over each form field and add a new class to the field
(either input or radio or checkbox)?

Thoughts?

Thanks!


[jQuery] Re: Parsing a very large xml file

2009-06-02 Thread Gustavo Salomé
I had the same problem a while ago
Theres a bug about it, you cant use the success function, you must use the
complete function function in the ajax request

2009/6/2 Gordon grj.mc...@googlemail.com


 Your best bet in that case is trying to talk your client out of it
 then.  XML is not a very efficient format for data and a file
 containing effectively the entire database is only ever going to be
 huge and unwieldy. If you're processing it in a browser it's simply
 going to be slow, there's no getting around that. If you can find a
 way of only fetching the data you need at the time you should do
 that.

 On Jun 2, 2:12 pm, Tolis Christomanos christoma...@gmail.com wrote:
  Michael Lawson wrote:
 
   What are you doing with the file exactly?
 
   Is there anyway you can break it up to parse smaller chunks?
 
   Does the file have to be 2mb in the first place? Won't this make the
   overall experience of your page/application much slower?
 
   cheers
 
   Michael Lawson
   Development Lead, Global Solutions, ibm.com
   Phone: 1-276-206-8393
   E-mail: mjlaw...@us.ibm.com
 
   'Examine my teachings critically, as a gold assayer would test gold.
   If you find they make sense, conform to your experience, and don't
   harm yourself or others, only then should you accept them.'
 
   Inactive hide details for Tolis Christomanos ---06/02/2009 08:43:48
   AM---I have a xml file about 2MB. When i try to parse it myTolis
   Christomanos ---06/02/2009 08:43:48 AM---I have a xml file about 2MB.
   When i try to parse it my browser stops
 
   From:
   Tolis Christomanos christoma...@gmail.com
 
   To:
   jquery-en@googlegroups.com
 
   Date:
   06/02/2009 08:43 AM
 
   Subject:
   [jQuery] Parsing a very large xml file
 
  
 
 
   I have a xml file about 2MB. When i try to parse it my browser stops
   responding... Any good advices for parsing large xml files with jquery?
 
  Well i need this large files which is going to become much bigger
  because my client wants to be able to see his website offline and
  distribute it in cds. So i generate all my mysql base to an xml file and
  then i parse it with xmlI know its stupid but my client wants to
  have only one xml file for tyhe whole site




-- 
Gustavo Salome Silva


[jQuery] Re: Edittable plugin problem

2009-06-02 Thread Gustavo Salomé
Its here:
http://jquery.izfree.com/editable.js

Now any function get the return (data, object)
You can use it, for example, this way:
$('object').editable({onSubmit:function(data,$this){
class=$this.attr('class');
}});

2009/6/2 bharani kumar bharanikumariyer...@gmail.com

 yes please send it


 On Tue, Jun 2, 2009 at 6:26 AM, Gustavo Salomé gustavon...@gmail.comwrote:

 No way you can do this.
 Ive a modified version of the plugin that i made which can do this.
 Ill send to if u want it.

 2009/6/1 bharani kumar bharanikumariyer...@gmail.com

 Hi All,
 Am using the editable plug in ,

 When i edit the values , i want to check the already exist and also want
 to pass the unique key to the query , for the Update WHERE condition ,

 script type=text/javascript charset=utf-8
 var oTable;

 $(document).ready(function() {
  /* Apply the jEditable handlers to the table */
 $('#example tbody td').editable( 'edit_update.php?id='(i want the getID
 value here ), {
  callback: function( sValue, y ) {
 var aPos = oTable.fnGetPosition( this );
  oTable.fnUpdate( sValue, aPos[0], aPos[1] );
 }
 } );
  /* Init DataTables */
 oTable = $('#example').dataTable();
  } );
 /script


 tbody
  ?php
while($row=mysql_fetch_object($result)){
 $id = $row-id;
  echo tr;
 echo td onclick = getID($id) $row-value/td;
  echo /tr;
 }
   ?
  /tbody


 How i do this ,

 Thanks
 --
 Regards
 B.S.Bharanikumar
 http://php-mysql-jquery.blogspot.com/




 --
 Gustavo Salome Silva




 --
 Regards
 B.S.Bharanikumar
 http://php-mysql-jquery.blogspot.com/




-- 
Gustavo Salome Silva


[jQuery] accessing value in ajax form without submitting the form

2009-06-02 Thread in...@reenie.org


I have a form. Upon submit, the data is sent to the server. Under 
certain conditions, the form is replaced via ajax with a set of radio 
buttons that offer the user a a choice.


I need to access the radio buttons before I submit the form again.
Normally I could just access the buttons with getelementbyid but it is 
not available, presumably because they were generated via ajax.


I could submit the form just to access the radio buttons and then submit 
it again, but I'd like to avoid that.


How do I do this?


[jQuery] Re: Already Exist jquery plugin

2009-06-02 Thread jsuggs

You are going to have to be more specific than that.  Where are the
values for user or email stored?  In a database?  If so, then you'd
probably need to make an ajax call with the values that you would want
to check.  You might want to take a look at one of my other posts
where I show you how I do something similar:

http://groups.google.com/group/jquery-en/browse_thread/thread/17e6f22477bcbb32/9340ed6fa8cac46a?hl=enlnk=gstq=murmp#9340ed6fa8cac46a

On Jun 2, 1:04 am, bharani kumar bharanikumariyer...@gmail.com
wrote:
 Hi All ,
 Name of Plug in for User or Email already exist  ,

 --
 Regards
 B.S.Bharanikumarhttp://php-mysql-jquery.blogspot.com/


[jQuery] Re: accessing value in ajax form without submitting the form

2009-06-02 Thread jsuggs

You said the form is replaced by an ajax call.  Can you show us what
is going on in that call?

On Jun 2, 12:25 pm, in...@reenie.org in...@reenie.org wrote:
 I have a form. Upon submit, the data is sent to the server. Under
 certain conditions, the form is replaced via ajax with a set of radio
 buttons that offer the user a a choice.

 I need to access the radio buttons before I submit the form again.
 Normally I could just access the buttons with getelementbyid but it is
 not available, presumably because they were generated via ajax.

 I could submit the form just to access the radio buttons and then submit
 it again, but I'd like to avoid that.

 How do I do this?


[jQuery] Re: Already Exist jquery plugin

2009-06-02 Thread Chris Chen
why

2009/6/3 jsuggs jsu...@gmail.com


 You are going to have to be more specific than that.  Where are the
 values for user or email stored?  In a database?  If so, then you'd
 probably need to make an ajax call with the values that you would want
 to check.  You might want to take a look at one of my other posts
 where I show you how I do something similar:


 http://groups.google.com/group/jquery-en/browse_thread/thread/17e6f22477bcbb32/9340ed6fa8cac46a?hl=enlnk=gstq=murmp#9340ed6fa8cac46a

 On Jun 2, 1:04 am, bharani kumar bharanikumariyer...@gmail.com
 wrote:
  Hi All ,
  Name of Plug in for User or Email already exist  ,
 
  --
  Regards
  B.S.Bharanikumarhttp://php-mysql-jquery.blogspot.com/




-- 
Chris


[jQuery] Mouseleave event

2009-06-02 Thread zayatzz

Hello

Is it possible to mouseleave event have some kind of delay inserted
into it?

I have this small script, which is working just fine :

script type=text/javascript
$(document).ready(function () {
$(ul.LvlOne 
li:has(ul)).bind(mouseenter,function(event){
$(ul.LvlTwo).slideToggle('medium');
});
$(ul.LvlOne 
li:has(ul)).bind(mouseleave,function(event){
$(ul.LvlTwo).slideToggle('medium');
});
});
/script

The problem is that the menu that opens is quite long and visitors of
the site (me among them) move cursor down where menu is supposed to
end up when its fully opened, but since the menu has not reached this
far, the mouseleave event fires. When computer or browser is slow you
can see even stranger thing.

Menu gets mouseleave event and starts closing, but not before menu
reaches the cursor. That means the menu gets mouseleave, then
mouseenter, does not reach cursor before mouseleave event fires, then
gets mouseenter again and keeps closing/opening/closing/opening/
closing/opening forever.

So what i want to know, if it is possible to insert some kind of
delays or doublechecks into the system to stop this kind of stuff from
happening or should i just tell everybody to slow down their mouse
movement?

Alan


[jQuery] Re: Stop .blur() on tabbing out.

2009-06-02 Thread Gustavo Salomé
Im not sure if i understood what you want, but try this:

function glow(){
if($('#front').data('state')==true)return false;
   var myCols = [{param:'background-color', fromColor: '#222',
toColor: 'random', random: true}]
   $('#front').colorBlend(myCols).data('state',true);
}

function stopGlow(){
if($('#front').data('state')!=true)return false;
   var myCols = [{action: 'stop'}]
   var myCols2 = [{param: 'background-color', toColor: '#222',
isFade: false, cycles: 1}]
   $(#front).colorBlend(myCols).colorBlend(myCols2);
  $('#front').colorBlend(myCols).data('state',false);
}


2009/6/1 w.m...@hotmail.co.uk w.m...@hotmail.co.uk


 Hi everyone,

 I'll post the code first and then ask my question...

 $('input, select, textarea').change().focus(function(){glow
 (self)}).blur(function(){stopGlow()})

 function glow(){
var myCols = [{param:'background-color', fromColor: '#222',
 toColor: 'random', random: true}]
$('#front').colorBlend(myCols);
 }

 function stopGlow(){
var myCols = [{action: 'stop'}]
var myCols2 = [{param: 'background-color', toColor: '#222',
 isFade: false, cycles: 1}]
$(#front).colorBlend(myCols).colorBlend(myCols2);

 }

 so...i have my form, and i want the function glow() to happen when an
 input is focused. Then when it unfocuses stopGlow() should happen.
 This all works perfectly, but, when you tab from input 1 to input to
 stopGlow() occurs then glow() occurs.

 The problem with this is that i want glow() to just carry on when any
 input is focused. Using something like:

 if($(input).is(:focus)){return false;} doesn't work, so i'm not
 sure what to do.

 I hope you understand my question and can help!

 Wmonk




-- 
Gustavo Salome Silva


[jQuery] Re: Mouseleave event

2009-06-02 Thread Gustavo Salomé
Try the setTimeout function

2009/6/2 zayatzz alan.kesselm...@gmail.com


 Hello

 Is it possible to mouseleave event have some kind of delay inserted
 into it?

 I have this small script, which is working just fine :

script type=text/javascript
$(document).ready(function () {
$(ul.LvlOne
 li:has(ul)).bind(mouseenter,function(event){
$(ul.LvlTwo).slideToggle('medium');
});
$(ul.LvlOne
 li:has(ul)).bind(mouseleave,function(event){
$(ul.LvlTwo).slideToggle('medium');
});
});
/script

 The problem is that the menu that opens is quite long and visitors of
 the site (me among them) move cursor down where menu is supposed to
 end up when its fully opened, but since the menu has not reached this
 far, the mouseleave event fires. When computer or browser is slow you
 can see even stranger thing.

 Menu gets mouseleave event and starts closing, but not before menu
 reaches the cursor. That means the menu gets mouseleave, then
 mouseenter, does not reach cursor before mouseleave event fires, then
 gets mouseenter again and keeps closing/opening/closing/opening/
 closing/opening forever.

 So what i want to know, if it is possible to insert some kind of
 delays or doublechecks into the system to stop this kind of stuff from
 happening or should i just tell everybody to slow down their mouse
 movement?

 Alan




-- 
Gustavo Salome Silva


[jQuery] Re: Can jQuery parse XML locally?

2009-06-02 Thread jsuggs

Basic answer, yes.  If you copied and pasted the example html, then
the url parameter references labels.xml, which would have to reside
in the same directory as where you saved the html file. Also, don't
forget that you also need the jquery file it references as well.

So to more succinctly answer you question.  You will need to have
three files in your local directory.
1) The html file.
2) The jquery file (named jquery.js in that example)
3) The xml file (named labels.xml)

That should solve your problem.

On Jun 2, 6:07 am, fredriley fred.ri...@gmail.com wrote:
 Ok, perhaps that's a provocative subject line, but it is my basic
 question. I'm testing jQuery's capacity for parsing XML files, and
 have immediately hit the error:

 Access to restricted URI denied code: 1012

 This came simply from replicating the example 
 athttp://www.xml.com/pub/a/2007/10/10/jquery-and-xml.htmland running it
 locally via File|Open (no server). If I run the code on Apache 
 (http://www.nottingham.ac.uk/~ntzfr/test/ajax/jquery/jquery_xml1.html) it
 works fine.

 A search for the error string shows that it's common and is caused by
 a cross-domain XML request (strange as it's running locally), and a
 couple of discussions suggest using JSON instead. Now, I'm not going
 to recast my XML docs as JSON, so before I go any further I would like
 to know if jQuery can be used to parse XML files on local disk? It has
 to be local disk as this is for a desktop application which won't rely
 on a live connection. If not, no bother, I'll use something else,
 maybe Flash or Flex; if so, I'd appreciate tips as to how to get past
 this fatal error.

 Nothing's ever easy in the Javascript world... ;(

 Cheers

 Fred

 PS: Is there a way of getting notification of replies to a thread on
 this group, anyone know?


[jQuery] fadeIn() on elements with alpha filter not working properly in IE

2009-06-02 Thread Luch Univision

I am running into an effect issue with IE only. I have a UL with
about 4 LI and I apply the fadeIn() on individual LI based on user
actions.  Inside of each LI I have a div that is styled with:

-moz-opacity:.8; opacity:0.80; filter:alpha(opacity=80);

The problem is that when I fadeIn() the LI all of its children
elements' opacity is taken from 0 to 100%, AND THEN the div that is
styled with the opacity is taken back to 80%.  This causes sort of a
flicker because it goes from 0% to 100% and then quickly back to 80%.

Is there a way to get around this? Is that a known bug? I saw some
people that had posted similar questions but without answers:

http://groups.google.com/group/jquery-en/browse_thread/thread/51e149642787e846/424497df76ec88ad

I would appreciate any tips or work arounds as I am pressed for time
to deliver a page and this is virtually the only issue holding me
back!

additional info:
using: jquery-1.3.2.min.js


[jQuery] Re: fadeIn() on elements with alpha filter not working properly in IE

2009-06-02 Thread Gustavo Salomé
Its true, i had the same problem a while ago.
I couldnt solve it.


2009/6/2 Luch Univision lara...@us.univision.com


 I am running into an effect issue with IE only. I have a UL with
 about 4 LI and I apply the fadeIn() on individual LI based on user
 actions.  Inside of each LI I have a div that is styled with:

 -moz-opacity:.8; opacity:0.80; filter:alpha(opacity=80);

 The problem is that when I fadeIn() the LI all of its children
 elements' opacity is taken from 0 to 100%, AND THEN the div that is
 styled with the opacity is taken back to 80%.  This causes sort of a
 flicker because it goes from 0% to 100% and then quickly back to 80%.

 Is there a way to get around this? Is that a known bug? I saw some
 people that had posted similar questions but without answers:


 http://groups.google.com/group/jquery-en/browse_thread/thread/51e149642787e846/424497df76ec88ad

 I would appreciate any tips or work arounds as I am pressed for time
 to deliver a page and this is virtually the only issue holding me
 back!

 additional info:
 using: jquery-1.3.2.min.js




-- 
Gustavo Salome Silva


[jQuery] Re: JSON- PHP generated JS-file question

2009-06-02 Thread jsuggs

Look at some of the auto-complete plugins, they do a lot of what you
are asking for already including caching of results so that you don't
have to do as many lookups or requests.

http://plugins.jquery.com/project/autocompletex
http://plugins.jquery.com/project/js-autocomplete
http://plugins.jquery.com/project/ajax-autocomplete

And yes, having a process run daily to generate the values can be a
good idea if you don't need up-to-date values.  One other method is to
have a trigger run every time that a new value is added.  That way,
when the first item is added the file will be created with just the
single item.  You wouldn't have to hit the database again until
another item was added and the file overwritten.  Both methods are
pretty common practice, but don't overestimate the cost of doing a
live database lookup, if you have an index on the column that you are
searching through then its impact should be fairly minimal (thus
eliminating the need for a more complex solution).

On Jun 2, 4:03 am, Kristof kristofstrooba...@gmail.com wrote:
 Hello, i have just joined this group. First Google group i join !
 I'm not native English speaking so sorry if i make some grammar
 mistakes.

 Anyway, the past 2 weeks i've been looking into JSON/AJAX functions of
 jquery.
 Now the reason for me doing that is that I want to make the following:

 I want to have an input field that ask you for a code, let's say
 abc, my script should then automatically search for the price in the
 database, so with an onblur i suppose.

 Now i googled/read etc etc, and i came up with a script that worked.
 It ran a PHP script, generated an array according to the SJON standard
 that i found on the official website.

 BUT after re-thinking  what I was doing i thought to myself what if I
 have a database with 10 000 products. I would load a query each time
 to search trough these 10 000 products/items.  So I figured there must
 be a better way. So i came up with the following idea:

 lets run the PHP scripts one's a day and generate a .JS file
 containing ALL the products in some sort of array readable for
 $.getJson(). And this is where I get stuck:
 how can I read trough the JS file and only select the price of the
 item of witch I typed in the code abc ?

 so if I have products.JS generated by PHP-script containing :
 {channel:{items:[{id:1,prijs:10,naam:a},
 {id:2,prijs:5,naam:b},
 {id:3,prijs:22,naam:c}]}}

 how could I select the prijs of product a from that JS-file ? Is
 it at all possible and if so how ?

 Help would be greatly appreciated !


[jQuery] Re: Form plugin asynchronous behavior

2009-06-02 Thread Gustavo Salomé
Be sure to set the ajax param 'async' to true.

2009/6/2 Mike Alsup mal...@gmail.com


  The problem I'm having is that the form submissions seem to be queued
  and submitted synchronously, so if a user submits a request that takes
  say 30 seconds and then immediately submits another request that only
  takes 2 seconds the latter results aren't displayed for 32 seconds. It
  also seems to affect multiple tabs in the same browser (tested on
  Safari and Firefox), so a 30 second process in one tab and a 2 second
  process in another have the same 32 second wait for the second
  process.

 Is the 30 second request a file upload?




-- 
Gustavo Salome Silva


[jQuery] Re: Any way to make an anonymous function die?

2009-06-02 Thread Ricardo

Or add another class name:

select class=myselects
   opt.../
/select

select class=myselects
   opt.../
/select

$('.myselects:not(.clicked)').live('click', function(){
 $(this).addClass('clicked');
});

On Jun 2, 1:00 pm, Isaac Gonzalez ier...@gmail.com wrote:
 I'm not sure if this is the best solution but you can always change  
 the class name of the li after it's been click. Then add a conditional  
 statement in your anonymous function filter list with the revised  
 class name.

 On Jun 2, 2009, at 8:55 AM, Laker Netman wrote:



  I am using .live() in jQuery 1.3.2 to assign a dynamic click event to
  multiple Select lists. When one of the lists is clicked on I would
  like to have that particular list to no longer be clickable.

  Here's the issue. I currently assign the click function in .live()
  with an anonymous function, so the only thing I have been able to do
  so far is $(this).die('click') when a Select is clicked on. This, of
  course, kills the event for ALL my Selects.

  Does anyone know of a way to do this without creating a separate,
  named function for the die() function to use later?

  Thanks,
  Laker


[jQuery] Re: JSON- PHP generated JS-file question

2009-06-02 Thread James

I don't mean to step on your idea, but I think the database method
probably works better. Databases are usually highly optimized to do
text-search and it should be fairly quick. By using the separate JSON
file method, you're just placing all the processing work on the client-
side, which might hinder their experience because it will be slower
for them depending on their computer specs.

Anyway, regardless of which method you're using, the jQuery
Autocomplete plug-in:
http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
might be of use for you.

(Sorry, this post does not answer your question of searching in a JSON
object.)

On Jun 1, 11:03 pm, Kristof kristofstrooba...@gmail.com wrote:
 Hello, i have just joined this group. First Google group i join !
 I'm not native English speaking so sorry if i make some grammar
 mistakes.

 Anyway, the past 2 weeks i've been looking into JSON/AJAX functions of
 jquery.
 Now the reason for me doing that is that I want to make the following:

 I want to have an input field that ask you for a code, let's say
 abc, my script should then automatically search for the price in the
 database, so with an onblur i suppose.

 Now i googled/read etc etc, and i came up with a script that worked.
 It ran a PHP script, generated an array according to the SJON standard
 that i found on the official website.

 BUT after re-thinking  what I was doing i thought to myself what if I
 have a database with 10 000 products. I would load a query each time
 to search trough these 10 000 products/items.  So I figured there must
 be a better way. So i came up with the following idea:

 lets run the PHP scripts one's a day and generate a .JS file
 containing ALL the products in some sort of array readable for
 $.getJson(). And this is where I get stuck:
 how can I read trough the JS file and only select the price of the
 item of witch I typed in the code abc ?

 so if I have products.JS generated by PHP-script containing :
 {channel:{items:[{id:1,prijs:10,naam:a},
 {id:2,prijs:5,naam:b},
 {id:3,prijs:22,naam:c}]}}

 how could I select the prijs of product a from that JS-file ? Is
 it at all possible and if so how ?

 Help would be greatly appreciated !


[jQuery] Create Ajax Request and edit html request

2009-06-02 Thread Kevz

[b]Hay guys![/b],

I worked with now in jQuery. Property however at present the following
problem:

[i]I provide a AJAX Request. the side is loaded, the parameters all
conveyed and back receives I a complete HTML side. Now I would like to
have only certain elements however from this side, like DIV, SPAN etc.

How can I make with the AJAX Request return in such a way best, which
I can select these elements thereby? Simply it would be unfortunately
not functioned over the function $ (“element”), it… even if I indicate
the HTML Request as secondly parameter.[/i]


Excused, for my bad English. ;-)

Translatertool. There is unfortunately too many words, in order to
describe my problem. ^^


[jQuery] Re: [autocomplete] hard time with accent

2009-06-02 Thread Tom Worster

On 6/1/09 2:48 PM, Gui guilhermealcant...@gmail.com wrote:

 I'm currently using this JQuery autocomplete plugin. It fits my needs,
 pretty cool, however I'm having a hard time with accents. If I type:
 Antonio, the plugin won't retrieve Antônio. I mean, it won't handle
 the special characters (á, à, é, í, ó, ú and so on.)
 
 Is there any option so that it can handle them?

for the local database, i'm not aware of one. if you're using ajax and
remote back end then maybe you can handle this in your script. if using
mysql backend, perhaps setting a different collation and tweaking your query
is all you need. 




[jQuery] Re: accessing dom from different domain ?

2009-06-02 Thread Ricardo

Right, you won't be able to circumvent that.

Thinking of it, it's not feasible to use OAuth via javascript. One,
because of these cross-domain issues, two, because you would expose
your secret to the browser. You should probably do the authentication
server-side and pass only what's necessary to JS.

 thank you for replay
 but I'm getting the same  exception Permission denied to
 get property

         jq13(#open-oauth-button).click(function(event){
                 TwitterService.getAuthUrl(function(url){
                         var myRef = window.open(url,'mywin',
                         
 'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');
                         var win=window;
                         jq13(myRef.document).ready(function(){
                                 var self = win.jq13(this);
                                 
 self.jq13(div.buttons#deny).click(function(event){

                                         alert(lala);

                                 });

                         });

                 });
         });

 I think the problem is in
 jq13(myRef.document). Main window has localhost domain but myRef
 window has twitter.com domain so there is cross domain security work .
 I'm wondering is the any ability to monitor events in  myRef 
 window?http://friendfeed.com/seems made it work but dont know how :)

 On Jun 1, 2:50 am, Ricardo ricardob...@gmail.com wrote:

  does the document in the other window also have a jq13 object? If
  not you have to use the one in your main window and pass the other
  window's document as context:

  jq13(myRef.document).ready(function(){
     // grab the document in a jq object
     var self = this.parentWindow.jq13(this);
     self.find(div.buttons#deny).click(function(event){
          alert(lala);
     });

  });

  Not tested, might not work but you get the idea.

  On May 31, 3:38 pm, kaspar kaspar...@gmail.com wrote:

   Hello
   I'm trying to make Twitter OAuth  and getting Permission denied to
   get property

   here is the code

           jq13(#open-oauth-button).click(function(event){
                   TwitterService.getAuthUrl(function(url){
                           var myRef = window.open(url,'mywin',
                           
   'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');

                           jq13(myRef.document).ready(function(){

                                   
   myRef.jq13(div.buttons#deny).click(function(event){
                                           alert(lala);
                                   });

                           });
                   });
           });

   is it possible to create event listeners on dom from different
   domain ?


[jQuery] Re: Mouseleave event

2009-06-02 Thread zayatzz

Thanks.

I did that:

script type=text/javascript
$(document).ready(function () {
$(ul.LvlOne 
li:has(ul)).bind(mouseenter,function(event){
$(ul.LvlTwo).slideToggle('medium');
});
$(ul.LvlOne 
li:has(ul)).bind(mouseleave,function(event){
setTimeout(function () {
$(ul.LvlTwo).slideToggle('medium');
}, 2000);
});
});
/script

Even with 4 second or longer delay it starts flashing at some point.

It actually became worse, because now you have 2 seconds to get your
mouse cursor back to where menu is supposed to be so you have even
more chances for the menu to start jumping up and down, closed -
open...

Perhaps there should be somekind of doublecheck at mouseleave event
that checks if the mouseenter on same element havent fired already?

Alan.

On Jun 2, 8:33 pm, Gustavo Salomé gustavon...@gmail.com wrote:
 Try the setTimeout function

 2009/6/2 zayatzz alan.kesselm...@gmail.com





  Hello

  Is it possible to mouseleave event have some kind of delay inserted
  into it?

  I have this small script, which is working just fine :

         script type=text/javascript
                 $(document).ready(function () {
                         $(ul.LvlOne
  li:has(ul)).bind(mouseenter,function(event){
                                 $(ul.LvlTwo).slideToggle('medium');
                         });
                         $(ul.LvlOne
  li:has(ul)).bind(mouseleave,function(event){
                                 $(ul.LvlTwo).slideToggle('medium');
                         });
                 });
         /script

  The problem is that the menu that opens is quite long and visitors of
  the site (me among them) move cursor down where menu is supposed to
  end up when its fully opened, but since the menu has not reached this
  far, the mouseleave event fires. When computer or browser is slow you
  can see even stranger thing.

  Menu gets mouseleave event and starts closing, but not before menu
  reaches the cursor. That means the menu gets mouseleave, then
  mouseenter, does not reach cursor before mouseleave event fires, then
  gets mouseenter again and keeps closing/opening/closing/opening/
  closing/opening forever.

  So what i want to know, if it is possible to insert some kind of
  delays or doublechecks into the system to stop this kind of stuff from
  happening or should i just tell everybody to slow down their mouse
  movement?

  Alan

 --
 Gustavo Salome Silva


[jQuery] Re: Create Ajax Request and edit html request

2009-06-02 Thread Gustavo Salomé
Select the elements you want before the request, like:
var $elements=$('input');
$.ajax({success:function(data){
alert($elements.html());
}});

2009/6/2 Kevz godec...@gmx.net


 [b]Hay guys![/b],

 I worked with now in jQuery. Property however at present the following
 problem:

 [i]I provide a AJAX Request. the side is loaded, the parameters all
 conveyed and back receives I a complete HTML side. Now I would like to
 have only certain elements however from this side, like DIV, SPAN etc.

 How can I make with the AJAX Request return in such a way best, which
 I can select these elements thereby? Simply it would be unfortunately
 not functioned over the function $ (“element”), it… even if I indicate
 the HTML Request as secondly parameter.[/i]


 Excused, for my bad English. ;-)

 Translatertool. There is unfortunately too many words, in order to
 describe my problem. ^^




-- 
Gustavo Salome Silva


[jQuery] Re: Create Ajax Request and edit html request

2009-06-02 Thread Andy Matthews

If you're loading in a chunk of HTML, then you can treat that chunk as a
jQuery object. For example, if you have the following HTML code that is
being pulled back from an AJAX call, and you only want to use the div tag
you might do something like this.

REMOTE HTML:

p
This is a paragraph of text that we do NOT want to display in the
site
/p
div
img src=jquery.jpg /
spanthis is my title/span
/div


AJAX CALL:
--
$.get('somehtmlpage.html',
// callback function on successful load
function(data){
var $myDiv = $('div',data);
}
);

When your AJAX call returns successfully, you look for a div tag in the
context of the returned piece of HTML. Note that this is untested, but it
should work just fine.


Andy matthews



-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Kevz
Sent: Tuesday, June 02, 2009 12:51 PM
To: jQuery (English)
Subject: [jQuery] Create Ajax Request  and edit html request


[b]Hay guys![/b],

I worked with now in jQuery. Property however at present the following
problem:

[i]I provide a AJAX Request. the side is loaded, the parameters all conveyed
and back receives I a complete HTML side. Now I would like to have only
certain elements however from this side, like DIV, SPAN etc.

How can I make with the AJAX Request return in such a way best, which I can
select these elements thereby? Simply it would be unfortunately not
functioned over the function $ (element), it. even if I indicate the HTML
Request as secondly parameter.[/i]


Excused, for my bad English. ;-)

Translatertool. There is unfortunately too many words, in order to describe
my problem. ^^




[jQuery] Re: accessing dom from different domain ?

2009-06-02 Thread waseem sabjee
That data I transfer was non-sensitive data, but yeah...I am looking for a
better way.

On Tue, Jun 2, 2009 at 8:24 PM, Ricardo ricardob...@gmail.com wrote:


 I guess you're using local pages on IE, otherwise same origin policy
 applies.

 On Jun 2, 1:08 pm, waseem sabjee waseemsab...@gmail.com wrote:
  I currently use that cod on a few sties. it works perfectly.
 
  On Tue, Jun 2, 2009 at 3:58 PM, kaspar kaspar...@gmail.com wrote:
 
   This restriction calls Same origin policy
  http://en.wikipedia.org/wiki/Same_origin_policy
 
   On Jun 1, 7:34 pm, waseem sabjee waseemsab...@gmail.com wrote:
$.ajax({
URL :www.myurl.com
success: function(html) {
var my id = $(#myid, html);
alert(myid);
 
});
});
On Mon, Jun 1, 2009 at 7:51 AM, kaspar kaspar...@gmail.com wrote:
 
 Ricardo ,
 thank you for replay
 but I'm getting the same  exception Permission denied to
 get property
 
jq13(#open-oauth-button).click(function(event){
TwitterService.getAuthUrl(function(url){
var myRef = window.open(url,'mywin',
 
  'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');
var win=window;
jq13(myRef.document).ready(function(){
var self = win.jq13(this);
 
  self.jq13(div.buttons#deny).click(function(event){
 
alert(lala);
 
});
 
});
 
});
});
 
 I think the problem is in
 jq13(myRef.document). Main window has localhost domain but myRef
 window has twitter.com domain so there is cross domain security
 work .
 I'm wondering is the any ability to monitor events in  myRef
 window?
http://friendfeed.com/seemsmade it work but dont know how :)
 
 On Jun 1, 2:50 am, Ricardo ricardob...@gmail.com wrote:
  does the document in the other window also have a jq13 object?
 If
  not you have to use the one in your main window and pass the
 other
  window's document as context:
 
  jq13(myRef.document).ready(function(){
 // grab the document in a jq object
 var self = this.parentWindow.jq13(this);
 self.find(div.buttons#deny).click(function(event){
  alert(lala);
 });
 
  });
 
  Not tested, might not work but you get the idea.
 
  On May 31, 3:38 pm, kaspar kaspar...@gmail.com wrote:
 
   Hello
   I'm trying to make Twitter OAuth  and getting Permission
 denied to
   get property
 
   here is the code
 
   jq13(#open-oauth-button).click(function(event){
   TwitterService.getAuthUrl(function(url){
   var myRef = window.open(url,'mywin',
 
 'left=20,top=20,width=1000,height=400,toolbar=0,resizable=0');
 
   jq13(myRef.document).ready(function(){
 
 myRef.jq13(div.buttons#deny).click(function(event){
   alert(lala);
   });
 
   });
   });
   });
 
   is it possible to create event listeners on dom from different
   domain ?



[jQuery] Re: fadeIn() on elements with alpha filter not working properly in IE

2009-06-02 Thread Mauricio (Maujor) Samy Silva
Reset the opacity to IE when fading in the element like so:

  -Mensagem Original- 
  De: Luch Univision 
  Para: jQuery (English) 
  Enviada em: terça-feira, 2 de junho de 2009 14:46
  Assunto: [jQuery] fadeIn() on elements with alpha filter not working properly 
in IE



  I am running into an effect issue with IE only. ...
  -moz-opacity:.8; opacity:0.80; filter:alpha(opacity=80);
  ...
  I saw some people that had posted similar questions but without answers:

  
http://groups.google.com/group/jquery-en/browse_thread/thread/51e149642787e846/424497df76ec88ad


[jQuery] Re: Mouseleave event

2009-06-02 Thread Gustavo Salomé
Check out this plugin:
http://cherne.net/brian/resources/jquery.hoverIntent.html
It may help you.
Instead of mouseenter and leave do
$('object').hoverIntent(function(){
 $(ul.LvlTwo).slideToggle('medium');

},function(){
   setTimeout(function () {
   $(ul.LvlTwo).slideToggle('

 medium');
}, 2000);


});

2009/6/2 zayatzz alan.kesselm...@gmail.com


 Thanks.

 I did that:

script type=text/javascript
$(document).ready(function () {
$(ul.LvlOne
 li:has(ul)).bind(mouseenter,function(event){
$(ul.LvlTwo).slideToggle('medium');
});
$(ul.LvlOne
 li:has(ul)).bind(mouseleave,function(event){
 setTimeout(function () {

  $(ul.LvlTwo).slideToggle('medium');
}, 2000);
});
});
/script

 Even with 4 second or longer delay it starts flashing at some point.

 It actually became worse, because now you have 2 seconds to get your
 mouse cursor back to where menu is supposed to be so you have even
 more chances for the menu to start jumping up and down, closed -
 open...

 Perhaps there should be somekind of doublecheck at mouseleave event
 that checks if the mouseenter on same element havent fired already?

 Alan.

 On Jun 2, 8:33 pm, Gustavo Salomé gustavon...@gmail.com wrote:
  Try the setTimeout function
 
  2009/6/2 zayatzz alan.kesselm...@gmail.com
 
 
 
 
 
   Hello
 
   Is it possible to mouseleave event have some kind of delay inserted
   into it?
 
   I have this small script, which is working just fine :
 
  script type=text/javascript
  $(document).ready(function () {
  $(ul.LvlOne
   li:has(ul)).bind(mouseenter,function(event){
  $(ul.LvlTwo).slideToggle('medium');
  });
  $(ul.LvlOne
   li:has(ul)).bind(mouseleave,function(event){
  $(ul.LvlTwo).slideToggle('medium');
  });
  });
  /script
 
   The problem is that the menu that opens is quite long and visitors of
   the site (me among them) move cursor down where menu is supposed to
   end up when its fully opened, but since the menu has not reached this
   far, the mouseleave event fires. When computer or browser is slow you
   can see even stranger thing.
 
   Menu gets mouseleave event and starts closing, but not before menu
   reaches the cursor. That means the menu gets mouseleave, then
   mouseenter, does not reach cursor before mouseleave event fires, then
   gets mouseenter again and keeps closing/opening/closing/opening/
   closing/opening forever.
 
   So what i want to know, if it is possible to insert some kind of
   delays or doublechecks into the system to stop this kind of stuff from
   happening or should i just tell everybody to slow down their mouse
   movement?
 
   Alan
 
  --
  Gustavo Salome Silva




-- 
Gustavo Salome Silva


[jQuery] Re: fadeIn() on elements with alpha filter not working properly in IE

2009-06-02 Thread Mauricio (Maujor) Samy Silva
Sorry for the previous post.Hit send early :-(

Reset the opacity to IE when fading in the element like so:

$('elementToFade').css('filter','alpha(opacity=80)').fadeIn();

Maurício
-Mensagem Original- 
De: Luch Univision 
Para: jQuery (English) 
Enviada em: terça-feira, 2 de junho de 2009 14:46
Assunto: [jQuery] fadeIn() on elements with alpha filter not working 
properly in IE



I am running into an effect issue with IE only. ...
-moz-opacity:.8; opacity:0.80; filter:alpha(opacity=80);
...
I saw some people that had posted similar questions but without answers:


http://groups.google.com/group/jquery-en/browse_thread/thread/51e149642787e846/424497df76ec88ad


[jQuery] Re: Ann: jqPlot 0.6.2 released

2009-06-02 Thread Jack Killpatrick


This is really great work, thanks for sharing! Good stuff!

- Jack

Chris Leonello wrote:

jqPlot is an open source plotting plugin for jQuery.  The 0.6.2
release adds many new features including:

Rotated axis text.
Vertical and horizontal bar charts.
Automatic trend line computation.
Data point highlighting.
Cursor tooltips showing data and grid position.
And many other features.

The jqPlot homepage is at http://www.jqplot.com/

The downloads page is at http://bitbucket.org/cleonello/jqplot/downloads/

The mailing list/Google group is at  http://groups.google.com/group/jqplot-users

jqPlot is built from the ground up as an extensible and plugable
plugin.  Handling of data, drawing of plot elements, events, virtually
everything is handled by a plugin.  This means you can enhance or swap
out core functionality without touching the core code.

  





[jQuery] CSS attributes as a variable.

2009-06-02 Thread jeff

Hello, I am trying to get the color of an element and change the color
of another element with that color. Does this make sense?

What is wrong with this? I would like all of the H1 tags to inherent
the color of .ui-state-error. Thank you in advance!

$(function(){
   var color = $('.ui-state-error').css('color');
   $(H1).css({'color', ' + color + '});
   });



[jQuery] jquery help

2009-06-02 Thread alienfactory

can anyone in the jquery community help me with an issue. the group
for fancybox is not very active

my problem is the following
i am trying to use a callback  in the fancybox plugin
'callbackOnStart':function(){ $(.target).css({'visibility':
'hidden'}); this example hides all the classes marked target
but i need to only target the actual item being clicked.

 i tried to use callbackOnStart':function(){ $(this).css
({'visibility':
'hidden'});
but does not seem to work
can anyone help me out with this i know this is not a fancybox group
so thanks in advance for any suggestion or help
Thanks
Terry
$(.target).fancybox( {
 'zoomSpeedIn': 500,
 'zoomSpeedOut':300,
 'easingIn': 'easeOutCubic',
 'easingOut'   : 'easeInBack',
 'overlayOpacity':  0.5,
 'frameHeight': 499,
 'frameWidth': 345,
 'imageScale': true,
 'overlayShow': true,
 'callbackOnStart':function(){ $(.target).css
({'visibility':
'hidden'});
  },
 'callbackOnClose':function(){ $(.target).css
({'visibility': 'visible'});
  }
});


[jQuery] Re: jquery help

2009-06-02 Thread Michael Lawson

Hmm, i'm not familiar with fancy box, but I don't see an onclick event
being bound to any objects.  What should your code do, and what is it doing
instead?

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


   
  From:   alienfactory alienfacto...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/02/2009 02:51 PM  
   
  Subject:[jQuery] jquery help 
   






can anyone in the jquery community help me with an issue. the group
for fancybox is not very active

my problem is the following
i am trying to use a callback  in the fancybox plugin
'callbackOnStart':function(){ $(.target).css({'visibility':
'hidden'}); this example hides all the classes marked target
but i need to only target the actual item being clicked.

 i tried to use callbackOnStart':function(){ $(this).css
({'visibility':
'hidden'});
but does not seem to work
can anyone help me out with this i know this is not a fancybox group
so thanks in advance for any suggestion or help
Thanks
Terry
$(.target).fancybox( {
 'zoomSpeedIn': 500,
 'zoomSpeedOut':300,
 'easingIn': 'easeOutCubic',
 'easingOut'   : 'easeInBack',
 'overlayOpacity':  0.5,
 'frameHeight': 499,
 'frameWidth': 345,
 'imageScale': true,
 'overlayShow': true,
 'callbackOnStart':function(){ $(.target).css
({'visibility':
'hidden'});
  },
 'callbackOnClose':function(){ $(.target).css
({'visibility': 'visible'});
  }
});

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: CSS attributes as a variable.

2009-06-02 Thread waseem sabjee
something like this

var mycolor = #000;
$(h1).css({color:mycolor });

this is your statement

'color', ' + color + '

it should be

color:color

On Tue, Jun 2, 2009 at 8:50 PM, jeff jeffreykarbow...@gmail.com wrote:


 Hello, I am trying to get the color of an element and change the color
 of another element with that color. Does this make sense?

 What is wrong with this? I would like all of the H1 tags to inherent
 the color of .ui-state-error. Thank you in advance!

 $(function(){
   var color = $('.ui-state-error').css('color');
   $(H1).css({'color', ' + color + '});
   });




[jQuery] Re: Any way to make an anonymous function die?

2009-06-02 Thread Laker Netman



On Jun 2, 1:08 pm, Ricardo ricardob...@gmail.com wrote:
 Or add another class name:

 select class=myselects
    opt.../
 /select

 select class=myselects
    opt.../
 /select

 $('.myselects:not(.clicked)').live('click', function(){
      $(this).addClass('clicked');

 });

 On Jun 2, 1:00 pm, Isaac Gonzalez ier...@gmail.com wrote:

  I'm not sure if this is the best solution but you can always change  
  the class name of the li after it's been click. Then add a conditional  
  statement in your anonymous function filter list with the revised  
  class name.

  On Jun 2, 2009, at 8:55 AM, Laker Netman wrote:

   I am using .live() in jQuery 1.3.2 to assign a dynamic click event to
   multiple Select lists. When one of the lists is clicked on I would
   like to have that particular list to no longer be clickable.

   Here's the issue. I currently assign the click function in .live()
   with an anonymous function, so the only thing I have been able to do
   so far is $(this).die('click') when a Select is clicked on. This, of
   course, kills the event for ALL my Selects.

   Does anyone know of a way to do this without creating a separate,
   named function for the die() function to use later?

   Thanks,
   Laker

Thanks for the suggestions Isaac.

Your second post got me thinking. Here's what I came up with for the
final solution:
$(.selectList:not(.clicked)).live(mousedown,function(){
$(this).addClass('clicked');
... additional processing occurs here 
});

This is executed within $document.ready()
All of the Selects have the class selectList from the start and,
based on your suggestion, the clicked class is added when a
particular list is clicked on. The initial selector does the rest,
eliminating already clicked selects from future consideration. Very
nice!

Laker


[jQuery] Re: CSS attributes as a variable.

2009-06-02 Thread mkmanning

$(h1).css({'color':color});

On Jun 2, 11:50 am, jeff jeffreykarbow...@gmail.com wrote:
 Hello, I am trying to get the color of an element and change the color
 of another element with that color. Does this make sense?

 What is wrong with this? I would like all of the H1 tags to inherent
 the color of .ui-state-error. Thank you in advance!

 $(function(){
                    var color = $('.ui-state-error').css('color');
                    $(H1).css({'color', ' + color + '});
                    });


[jQuery] Re: CSS attributes as a variable.

2009-06-02 Thread jeff

Worked! Thanks!!!

On Jun 2, 2:58 pm, waseem sabjee waseemsab...@gmail.com wrote:
 something like this

 var mycolor = #000;
 $(h1).css({color:mycolor });

 this is your statement

 'color', ' + color + '

 it should be

 color:color

 On Tue, Jun 2, 2009 at 8:50 PM, jeff jeffreykarbow...@gmail.com wrote:

  Hello, I am trying to get the color of an element and change the color
  of another element with that color. Does this make sense?

  What is wrong with this? I would like all of the H1 tags to inherent
  the color of .ui-state-error. Thank you in advance!

  $(function(){
                    var color = $('.ui-state-error').css('color');
                    $(H1).css({'color', ' + color + '});
                    });


[jQuery] Re: tilde (~) selector

2009-06-02 Thread Jakub Suder

I've checked in multiple browsers using browsershots.org, and only the
ones from Opera 10 and Firefox 3.1 were OK, the rest were broken
(example: Firefox 3.0: http://dl.getdropbox.com/u/41808/ff3win.png).

It looks like this might be the answer: 
http://osdir.com/ml/jquery-dev/2009-03/msg00185.html
(although apparently it wasn't fixed since March - it still breaks in
my Firefox on jquery-nightly (jquery-1.3.1 works, 1.3.2 doesn't).

JS


[jQuery] Re: Any way to make an anonymous function die?

2009-06-02 Thread Laker Netman



On Jun 2, 1:59 pm, Laker Netman laker.net...@gmail.com wrote:
 On Jun 2, 1:08 pm, Ricardo ricardob...@gmail.com wrote:



  Or add another class name:

  select class=myselects
     opt.../
  /select

  select class=myselects
     opt.../
  /select

  $('.myselects:not(.clicked)').live('click', function(){
       $(this).addClass('clicked');

  });

  On Jun 2, 1:00 pm, Isaac Gonzalez ier...@gmail.com wrote:

   I'm not sure if this is the best solution but you can always change  
   the class name of the li after it's been click. Then add a conditional  
   statement in your anonymous function filter list with the revised  
   class name.

   On Jun 2, 2009, at 8:55 AM, Laker Netman wrote:

I am using .live() in jQuery 1.3.2 to assign a dynamic click event to
multiple Select lists. When one of the lists is clicked on I would
like to have that particular list to no longer be clickable.

Here's the issue. I currently assign the click function in .live()
with an anonymous function, so the only thing I have been able to do
so far is $(this).die('click') when a Select is clicked on. This, of
course, kills the event for ALL my Selects.

Does anyone know of a way to do this without creating a separate,
named function for the die() function to use later?

Thanks,
Laker

 Thanks for the suggestions Isaac.

 Your second post got me thinking. Here's what I came up with for the
 final solution:
         $(.selectList:not(.clicked)).live(mousedown,function(){
                 $(this).addClass('clicked');
 ... additional processing occurs here 
         });

 This is executed within $document.ready()
 All of the Selects have the class selectList from the start and,
 based on your suggestion, the clicked class is added when a
 particular list is clicked on. The initial selector does the rest,
 eliminating already clicked selects from future consideration. Very
 nice!

 Laker

And Ricardo, too! Sorry didn't catch the second author! 8)


[jQuery] Re: jquery help

2009-06-02 Thread alienfactory

thanks for responding, fanctbox is a lightbox plugin if you have not
already notice, when clicking on a image it loads an ajax requested
file it works find the code below will hide all classes with the name
target.

i need a callback function to hide the item that is clicked i imagine
the click handler is handled in the facnybox plugin but that is where
my knowledge ends

maybe if I set a click handler in call back it will work?

you can see what is happening at http://www.macpeeps.com/codabooks


Thanks again for any help you guys can offer

On Jun 2, 11:58 am, Michael Lawson mjlaw...@us.ibm.com wrote:
 Hmm, i'm not familiar with fancy box, but I don't see an onclick event
 being bound to any objects.  What should your code do, and what is it doing
 instead?

 cheers

 Michael Lawson
 Development Lead, Global Solutions, ibm.com
 Phone:  1-276-206-8393
 E-mail:  mjlaw...@us.ibm.com

 'Examine my teachings critically, as a gold assayer would test gold. If you
 find they make sense, conform to your experience, and don't harm yourself
 or others, only then should you accept them.'

   From:       alienfactory alienfacto...@gmail.com                          
                                                   

   To:         jQuery (English) jquery-en@googlegroups.com                 
                                                    

   Date:       06/02/2009 02:51 PM                                             
                                                    

   Subject:    [jQuery] jquery help                                            
                                                   

 can anyone in the jquery community help me with an issue. the group
 for fancybox is not very active

 my problem is the following
 i am trying to use a callback  in the fancybox plugin
 'callbackOnStart':function(){ $(.target).css({'visibility':
 'hidden'}); this example hides all the classes marked target
 but i need to only target the actual item being clicked.

  i tried to use callbackOnStart':function(){ $(this).css
 ({'visibility':
 'hidden'});
 but does not seem to work
 can anyone help me out with this i know this is not a fancybox group
 so thanks in advance for any suggestion or help
 Thanks
 Terry
         $(.target).fancybox( {
                          'zoomSpeedIn':         500,
                          'zoomSpeedOut':        300,
                          'easingIn'        : 'easeOutCubic',
              'easingOut'       : 'easeInBack',
                          'overlayOpacity':      0.5,
                          'frameHeight': 499,
                          'frameWidth': 345,
                          'imageScale': true,
                          'overlayShow':         true,
                          'callbackOnStart':function(){ $(.target).css
 ({'visibility':
 'hidden'});
               },
              'callbackOnClose':function(){ $(.target).css
 ({'visibility': 'visible'});
                   }
                 });

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload


[jQuery] Superfish Horizontal Nav-bar Question

2009-06-02 Thread gerbert

On the Superfish Horizontal Nav-bar there is one issue I am having:
when a user hovers over a button that doesn't have a subnav, it
doesn't clear out the current subnav menu...I think it would be
better usability-wise to clear out the links so the subnav is empty
when a parent link has no sub-menu.
 It's confusing (for example) when you rollover Home in a navigation
bar and the subnav for Products/Services is still showing.

Here is an example of the behaviour I am talking about:

http://www.rad-dudes.com/menu/x.html

Thanks for any help,
Justin


[jQuery] Re: Mouseleave event

2009-06-02 Thread zayatzz

Thanks for the info

This mouseintent is quite cool script.
I did just what you suggested - i just removed the extra 2 seconds
timeout and used config from the example instead.

Thanks again.

Alan


On Jun 2, 9:41 pm, Gustavo Salomé gustavon...@gmail.com wrote:
 Check out this 
 plugin:http://cherne.net/brian/resources/jquery.hoverIntent.html
 It may help you.
 Instead of mouseenter and leave do
 $('object').hoverIntent(function(){
                              $(ul.LvlTwo).slideToggle('medium');

 },function(){

                                setTimeout(function () {
                                        $(ul.LvlTwo).slideToggle('



  medium');
                                 }, 2000);
 });

 2009/6/2 zayatzz alan.kesselm...@gmail.com





  Thanks.

  I did that:

         script type=text/javascript
                 $(document).ready(function () {
                         $(ul.LvlOne
  li:has(ul)).bind(mouseenter,function(event){
                                 $(ul.LvlTwo).slideToggle('medium');
                         });
                         $(ul.LvlOne
  li:has(ul)).bind(mouseleave,function(event){
                                  setTimeout(function () {

   $(ul.LvlTwo).slideToggle('medium');
                                 }, 2000);
                         });
                 });
         /script

  Even with 4 second or longer delay it starts flashing at some point.

  It actually became worse, because now you have 2 seconds to get your
  mouse cursor back to where menu is supposed to be so you have even
  more chances for the menu to start jumping up and down, closed -
  open...

  Perhaps there should be somekind of doublecheck at mouseleave event
  that checks if the mouseenter on same element havent fired already?

  Alan.

  On Jun 2, 8:33 pm, Gustavo Salomé gustavon...@gmail.com wrote:
   Try the setTimeout function

   2009/6/2 zayatzz alan.kesselm...@gmail.com

Hello

Is it possible to mouseleave event have some kind of delay inserted
into it?

I have this small script, which is working just fine :

       script type=text/javascript
               $(document).ready(function () {
                       $(ul.LvlOne
li:has(ul)).bind(mouseenter,function(event){
                               $(ul.LvlTwo).slideToggle('medium');
                       });
                       $(ul.LvlOne
li:has(ul)).bind(mouseleave,function(event){
                               $(ul.LvlTwo).slideToggle('medium');
                       });
               });
       /script

The problem is that the menu that opens is quite long and visitors of
the site (me among them) move cursor down where menu is supposed to
end up when its fully opened, but since the menu has not reached this
far, the mouseleave event fires. When computer or browser is slow you
can see even stranger thing.

Menu gets mouseleave event and starts closing, but not before menu
reaches the cursor. That means the menu gets mouseleave, then
mouseenter, does not reach cursor before mouseleave event fires, then
gets mouseenter again and keeps closing/opening/closing/opening/
closing/opening forever.

So what i want to know, if it is possible to insert some kind of
delays or doublechecks into the system to stop this kind of stuff from
happening or should i just tell everybody to slow down their mouse
movement?

Alan

   --
   Gustavo Salome Silva

 --
 Gustavo Salome Silva


[jQuery] Re: fadeIn() on elements with alpha filter not working properly in IE

2009-06-02 Thread Luch Univision

Mauricio,

I am dealing with the fading in of one li which in turn has three
child elements:

...
li id=foo
img /
div class=opacity/div
img /
li
...

.opacity {
-moz-opacity:
.8; opacity:0.80;
filter:alpha(opacity=80);
}

...

$('#foo').fadeIn('slow');

...

So, by doing what you suggested, the entire li will have the opacity
of 80%, but what I really want is just the div inside of the li to
keep its opacity (alpha filter in IE) while fading in.  NOTE that the
end result of the div is fine, but the process of how it gets there
through the fading in is what is the problem because it goes from
0-100 . .then 80.



On Jun 2, 2:44 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 Sorry for the previous post.Hit send early :-(

 Reset the opacity to IE when fading in the element like so:

 $('elementToFade').css('filter','alpha(opacity=80)').fadeIn();

 Maurício
     -Mensagem Original-
     De: Luch Univision
     Para: jQuery (English)
     Enviada em: terça-feira, 2 de junho de 2009 14:46
     Assunto: [jQuery] fadeIn() on elements with alpha filter not working 
 properly in IE

     I am running into an effect issue with IE only. ...
     -moz-opacity:.8; opacity:0.80; filter:alpha(opacity=80);
     ...
     I saw some people that had posted similar questions but without answers:

    http://groups.google.com/group/jquery-en/browse_thread/thread/51e1496...


[jQuery] Re: Superfish Horizontal Nav-bar Question

2009-06-02 Thread waseem sabjee
Isn't this a Superdrop style menu ?

ahh anyway in order to achieve that you would need to have a specific class
for those that don't have drop downs.

then for the hove event

var theclass  $(this).attr(class);

if(theclass != nosub) {
$(lower).show();
} else {
$(lower).hide();
}


On Tue, Jun 2, 2009 at 9:15 PM, gerbert gerb...@gmail.com wrote:


 On the Superfish Horizontal Nav-bar there is one issue I am having:
 when a user hovers over a button that doesn't have a subnav, it
 doesn't clear out the current subnav menu...I think it would be
 better usability-wise to clear out the links so the subnav is empty
 when a parent link has no sub-menu.
  It's confusing (for example) when you rollover Home in a navigation
 bar and the subnav for Products/Services is still showing.

 Here is an example of the behaviour I am talking about:

 http://www.rad-dudes.com/menu/x.html

 Thanks for any help,
 Justin



[jQuery] Re: tilde (~) selector

2009-06-02 Thread Mauricio (Maujor) Samy Silva
Yes, it appear to be a 1.3.2 jQuery version bug.
Take a look at test cases:

Version 1.3.1 working: http://jsbin.com/usidi/edit

Version 1.3.2 doesn't working: http://jsbin.com/upapu/edit

Maurício
  -Mensagem Original- 
  De: Jakub Suder 
  Para: jQuery (English) 
  Enviada em: terça-feira, 2 de junho de 2009 16:05
  Assunto: [jQuery] Re: tilde (~) selector



  I've checked in multiple browsers using browsershots.org, and only the
  ones from Opera 10 and Firefox 3.1 were OK, the rest were broken
  (example: Firefox 3.0: http://dl.getdropbox.com/u/41808/ff3win.png).

  It looks like this might be the answer: 
http://osdir.com/ml/jquery-dev/2009-03/msg00185.html
  (although apparently it wasn't fixed since March - it still breaks in
  my Firefox on jquery-nightly (jquery-1.3.1 works, 1.3.2 doesn't).

  JS

[jQuery] Re: jquery help

2009-06-02 Thread alienfactory

ok i added a click handler to the callback

'callbackOnStart':function(){ $('.target').click(function(){$(this).css
({'visibility': 'hidden'}); });

but when clicked on the first time it does nothing but any time after
that it work as intended




[jQuery] Re: Can jQuery parse XML locally?

2009-06-02 Thread fredriley

On Jun 2, 6:42 pm, jsuggs jsu...@gmail.com wrote:
 Basic answer, yes.  If you copied and pasted the example html, then
 the url parameter references labels.xml, which would have to reside
 in the same directory as where you saved the html file. Also, don't
 forget that you also need the jquery file it references as well.

 So to more succinctly answer you question.  You will need to have
 three files in your local directory.
 1) The html file.
 2) The jquery file (named jquery.js in that example)
 3) The xml file (named labels.xml)

 That should solve your problem.

Thanks very much, it does. As it happens, only the html and xml files
need to be together - the jquery file can sit in another directory,
which is handy.

Ok, that's good - I prefer not to mess around with Flash and XML if I
can help it. Life just ain't long enough for all the aggro that
entails... ;(

Cheers

Fred


[jQuery] text of first sibling of a parent...How do I get it

2009-06-02 Thread con-man-jake

Still a newbie.
I have this:

table
   tr

  td
 text I want to get
  /td

  td
  /td

  td
 div id=knowndiv/div
  /td

   tr
/table

If I have the div with id of knowndiv as an object (call it obj),
How do I get the text inside the first td?


[jQuery] Re: Superfish Horizontal Nav-bar Question

2009-06-02 Thread gerbert

Thanks waseem,

I'm not sure what superdrop is, but mine is a slightly modified
version of the superfish nav-bar style located here:

http://users.tpg.com.au/j_birch/plugins/superfish/#examples

I will try to implement your code. The hard part is going to be
putting it in the right place. These plugins are great, but have a lot
of existing javascript that's confusing for a beginner like myself.

Cheers!

On Jun 2, 12:23 pm, waseem sabjee waseemsab...@gmail.com wrote:
 Isn't this a Superdrop style menu ?

 ahh anyway in order to achieve that you would need to have a specific class
 for those that don't have drop downs.

 then for the hove event

 var theclass  $(this).attr(class);

 if(theclass != nosub) {
 $(lower).show();

 } else {
 $(lower).hide();
 }
 On Tue, Jun 2, 2009 at 9:15 PM, gerbert gerb...@gmail.com wrote:

  On the Superfish Horizontal Nav-bar there is one issue I am having:
  when a user hovers over a button that doesn't have a subnav, it
  doesn't clear out the current subnav menu...I think it would be
  better usability-wise to clear out the links so the subnav is empty
  when a parent link has no sub-menu.
   It's confusing (for example) when you rollover Home in a navigation
  bar and the subnav for Products/Services is still showing.

  Here is an example of the behaviour I am talking about:

 http://www.rad-dudes.com/menu/x.html

  Thanks for any help,
  Justin


[jQuery] Re: text of first sibling of a parent...How do I get it

2009-06-02 Thread waseem sabjee
first lets give an ID to your table

table id=mytable

now heres your script.

var obj = $(mytable);
var rows = $(tr):

// according to this we going to find text in the first td of the first tr

rows.each(function(i) {

var columns = rows.eq(i);

alert(columns.eq(0).text());

});

the script above should give you some direction in navigating through a
table and addressing specific columns in specific rows.

but lets say you stuck with only that div having a id and can't do much

then your script would be as follows

var obj = $(#knowndiv);

var navigator = obj.parent();
// you have just set the  navigator to be on the td that wraps the div

navigator = navigator.parent();
// now you selected the td

navigator = navigator.prev();
// you have now selected the previous tr

navigator = $(td, navigator);
// you have now selected the td tag in that tr
// you can alert the text like so

alert(navigator.text();

// however you may be faced with multiple td tags and you only want to alert
the first one
// in that case

navigator = navigator.eq(0);
// you have slected the very first td
alert(navigato.text): On Tue, Jun 2, 2009 at 9:38 PM, con-man-jake 
jakedim...@gmail.com wrote:


 Still a newbie.
 I have this:

 table
   tr

  td
 text I want to get
  /td

  td
  /td

  td
 div id=knowndiv/div
  /td

   tr
 /table

 If I have the div with id of knowndiv as an object (call it obj),
 How do I get the text inside the first td?



  1   2   >