Re: [jQuery] Call ajax on sucess response from a previous ajax

2010-01-20 Thread Michael Lawson
Do you have any code to share?

cheers

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

'When seen from outer space, our beautiful blue planet has no national
boundaries.'

http://www.givesmehope.com/




  From:   Bonji benho...@googlemail.com   



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



  Date:   01/20/2010 11:46 AM   



  Subject:[jQuery] Call ajax on sucess response from a previous ajax








Hi.

Im not sure if this is the correct way of going about this so i
thought i'd ask the experts...

I have a jquery ajax script which simply returns true or false based
on the response from a php script.

This works just fine.

However i want to know if it is possible to load a second ajax call if
the first returns true?

I've tried placing the second $.ajax inside the success fuction of the
first $.ajax but the second call never triggers or doesn't return
anything.

Is there a way of queuing $.ajax functions so they fire on after
another?

inline: graycol.gifinline: ecblank.gif

Re: [jQuery] Re: Call ajax on sucess response from a previous ajax

2010-01-20 Thread Michael Lawson

Well, one thing you could do is to put your other ajax call on an interval.
You have a boolean that says whether or not authentication was successful.
Each time the interval tries to run your second ajax call, it first checks
to see if this boolean is true, if it is, make the call.  If its not, do
nothing.  Once it has been run, disable your interval.

cheers

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

'When seen from outer space, our beautiful blue planet has no national
boundaries.'

http://www.givesmehope.com/


   
  From:   Bonji benho...@googlemail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   01/20/2010 12:43 PM  
   
  Subject:[jQuery] Re: Call ajax on sucess response from a previous ajax
   





Ok basically on click of any anchor tag this ajax script calls a php
script called sessions.php

//data
   var data = 'do=update';
//run ajax
$.ajax({
 //post rather than get (default)
 type: POST,
 //pass to php script
 url: /php-bin/sessions.php,
 //send data
 data: data,
 //data type
 dataType: 'json',
 //timeout
 timeout: 5000,
 //cache
 cache: true,
 //success function
 success:
 //result function
 function(result){
 //if result.error
 if(result.error)
 {
 //redirect

location.href=result.redirect;
 }
 },
 //error function
 error:
 //error function
 function(){
 //load facebox internal error
 faceboxURL
('php-bin/alert.php?do=internalError');
 }
});//ajax

It posts 'do=update' as data to the php script which selects the
correct php switch.

The php script then checks if the user is logged in and updates the
users timestamp. All session data is stored in a mysql database.

The datatype returned is in a json array.

So on success the ajax checks the array value 'result.error' and if
set to true it currently redirects the user to the 'result.location'
value which is defined in the json array.

In other words... if the user was not found or their session has
expired it redirects the user to the location set in the php script as
they need to be authenticated to use the site.

However this means that the anchor tag is only checking user data.
What about its original function which is also an ajax call?

I thought i might be able to add the second ajax call as an else
statement to the if(result.error) statement.

In other words... if the user is authenticated and the timestamp was
updated run the origianl anchor tag function (which is also an ajax
call)

At the moment the two ajax calls run at the same time which is fine
except the second ajax is used to load content to the page. The first
ajax call completes half way through the second ajax call cycle.

In other words... if the user was not found or their session has
expired the second ajax still loads content to the page but gets cut
off half way through loading while the first one is redirecting.

This is ok but it is scrappy looking to see the page trying to load
content into a div (second ajax) while the first is redirecting.

I hope i havn't lost you. I've tried to explain as clearly as i can.

Ben



On Jan 20, 4:53 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 Do you have any code to share?

 cheers

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

 'When seen from outer space, our beautiful blue planet has no national
 boundaries.'

 http://www.givesmehope.com/

   From:       Bonji benho...@googlemail.com


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


   Date:       01/20/2010 11:46 AM


   Subject:    [jQuery] Call ajax on sucess response from a previous ajax


 Hi.

 Im not sure if this is the correct way of going about this so i
 thought i'd ask the experts...

 I have a jquery ajax script which simply returns true or false based
 on the response from a php script.

 This works just fine.

 However i want to know if it is possible to load a second ajax

Re: [jQuery] can I add 2 jquery in 1 page

2009-12-22 Thread Michael Lawson
Not exactly sure why you would want to do that.

Load the first jQuery with jQuery.noConflict();

Then you can access that one by saying jQuery(), and the second using the
default $()


cheers

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

'When seen from outer space, our beautiful blue planet has no national
boundaries.'

http://www.givesmehope.com/



 
  From:   sonubagga pradeepbagga.de...@gmail.com  
 

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

 
  Date:   12/22/2009 08:44 AM   
 

 
  Subject:[jQuery] can I add 2 jquery in 1 page 
 

 





hi
I m using 2 jquery in my site

1 is jquery tabs

2 is jquery has selectors

both jquery files are different

when I use both tabs are not working in my site

please tell any solution


Thanks in advance

inline: graycol.gifinline: ecblank.gif

Re: [jQuery] ajax

2009-12-17 Thread Michael Lawson

Is your selector correct for your success function?

perhaps you meant $(#loading) instead of $(loading)  ?

cheers

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

'When seen from outer space, our beautiful blue planet has no national
boundaries.'

http://www.givesmehope.com/


   
  From:   idcoder idrishlaxmid...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   12/17/2009 08:15 AM  
   
  Subject:[jQuery] ajax
   





i am trying to submit a form using jquery and ajax. The form gets
submitted without going to the url through ajax and values are entered
successfully in DB if all entries are correct and validated. also it
does not updated the DB if any errors.

here is the javascript

$(document).ready(function(){

 $('#regist').submit(function(e) {

 $.ajax({
 type: POST,
 url: submit1.php,
 data: $('#regist').serialize(),
 dataType: json,
 success: function(){
 $(loading).append(img
id='checkmark' src='images/check.png' /
);
 }
 });
 return false;
 e.preventDefault();

 });

});

But i cannot work out the success event in ajax..anything i insert
into success event does not work...any help would be
appreciated..thanks

inline: graycol.gifinline: ecblank.gif

[jQuery] AUTO: Michael Lawson is out of the office (returning 12/16/2009)

2009-12-14 Thread Michael Lawson


I am out of the office until 12/16/2009.

I will be unavailable on 12/15/2009 due to travel.

Please contact Dianne Spillers for any issues with Blue Direct, or
Alexandre Antabi or Brian Grier for any issues with IBM Press Room.  For
all else you may contact Leena Paulose.  Thanks






(it's Thanksgiving)


Note: This is an automated response to your message  [jQuery] Re:
Debugging in IE sent on 12/14/09 14:31:35.

This is the only notification you will receive while this person is away.

[jQuery] AUTO: Michael Lawson is out of the office (returning 11/30/2009)

2009-11-25 Thread Michael Lawson


I am out of the office until 11/30/2009.

Due to severe triptophan intake, I will be unable to check my email, nor
will I be in the office.




(it's Thanksgiving)


Note: This is an automated response to your message  [jQuery] Re: Close
Button using prettyPhoto w/ JQuery sent on 11/25/09 13:46:49.

This is the only notification you will receive while this person is away.

[jQuery] Re: Check if function exists

2009-09-02 Thread Michael Lawson
if(functioname)
{
 //it exists, do stuff
}
cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'



   
  From:   shapper mdmo...@gmail.com   
   

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

   
  Date:   09/02/2009 11:28 AM   
   

   
  Subject:[jQuery] Check if function exists 
   

   






Hello,

I am loading TinyMCE using the new JQuery Plugin:

script type=text/javascript
  $().ready(function() {
 $('textarea.tinymce').tinymce({
   // Location of TinyMCE script
 script_url : '../js/tinymce/jscripts/tiny_mce/tiny_mce.js',

Is there a way to load only if tinymce plugin is present without
getting an error?

Basically if I don't want to load the tinymce I just don't load the
plugin ...
... Because I am not able to pass, I think, to my SiteScript.JS file
if I want to load or not the plugin.

Thanks,
Miguel

inline: graycol.gifinline: ecblank.gif

[jQuery] AUTO: Michael Lawson is out of the office (returning 08/31/2009)

2009-08-28 Thread Michael Lawson


I am out of the office until 08/31/2009.

I will be out of the office this afternoon

If you have any questions or concerns, please contact Leena Paulose


Note: This is an automated response to your message  [jQuery] changing URL
with slider sent on 8/28/09 8:43:47.

This is the only notification you will receive while this person is away.

[jQuery] Re: syntax problems

2009-08-26 Thread Michael Lawson
If you are using the most recent version of jQuery, the @ notation is no
longer used.  Try removing it and see what happens.

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'



 
  From:   holicGirl mirna.bagnola...@gmail.com
 

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

 
  Date:   08/26/2009 04:20 PM   
 

 
  Subject:[jQuery] syntax problems  
 

 






Hello,
I have a basic knowlegde of jQuery and a problem in selecting a link.
To be specific I've a problem with the syntax.

I'm using several libraries so I can't use for example the $
('a#myLink') function but I've to write jq('a...@id=myLink]').

The application don't recognize the syntax, it shows this message:
 Syntax error, unrecognized expression: [...@id=myLink]

Can someone help me?

Thanks in advance

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Realtime ajax response

2009-08-24 Thread Michael Lawson

Unless I'm mistaken in my understanding of your issue, this is kind of what
AJAX was really meant for.  You can certainly post something, and then do a
get on whatever it was you posted to to get a response.  You might want to
take a polling approach where you set a javascript timer or timeout to do
the get request after a certain amount of time to allow the service to do
its work.  You're just making two AJAX calls on the page, instead of one.
Here is an example for you, its a shoutbox module I wrote in PHP using
javascript.  It isn't using jQuery (to eliminate dependencies) but you can
get the idea


http://sourceforge.net/projects/easyshoutbox/files/easyshoutbox/Easy_shout_box_0.5/

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Josip Lazic jlaz...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/24/2009 08:19 AM  
   
  Subject:[jQuery] Realtime ajax response  
   






Hi,

can jQuery display response from .post request in realtime?

I force buffer flush in PHP with ob_start, and ob_flush, I know that I
can set target='iframeID' to my form, but I need ajax and target
should be div.

Thanks

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: PHP IDE with support JQuery

2009-08-24 Thread Michael Lawson

As a codeigniter fanboy, I'd be very anxious to mess around with the CI
plugin for your IDE.  the jQuery plugin also looks very cool!

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   s...@codelobster.com s...@codelobster.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/24/2009 09:45 AM  
   
  Subject:[jQuery] PHP IDE with support JQuery 
   






Hi.

Let me introduce free PHP IDE with available JQuery plug-in (paid):

Codelobster PHP Edition (http://www.codelobster.com) - has all
standart abilities for editing code
- PHP/HTML/CSS/JavaScript highlighting, autocomplete, code structure
- PHP debugger
- code folding, tooltips, help and etc.

and it has special JQuery features:
- autocomplete for JQuery library
- context and dynamic help for JQuery library

We are waiting for your comments and suggestions.

Regards,
Codelobster Team.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: setInterval()

2009-08-24 Thread Michael Lawson

'this' is undefined in the current scope

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   solow solow.wes...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/24/2009 09:31 AM  
   
  Subject:[jQuery] Re: setInterval()   
   






I really need this

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson
Try wrapping your html text in a CDATA section so that the xml parser
doesn't strip them out

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'



   
  From:   Seth claudiu.dan...@gmail.com   
   

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

   
  Date:   08/12/2009 11:41 AM   
   

   
  Subject:[jQuery] html in xml tag  
   

   






Hi guys,

I have an XML file like this

?xml version=1.0 encoding=utf-8?
data
 item
 nameLorem ipsum/name
 descriptionLorem ipsum dolor sit amet,
consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.br //description
 imageimages/coal.jpg/image
 /item
/data
. etc

now on description tag i need to enter some formating elements like
br p li bold etc, if i enter html elements this line desc = $
(this).find(description).text(); will strip all my html code ..
probably because of the .text() function at the end, my question is
what function to try at the end because .html() is not working like
this desc = $(this).find(description).html(); is not working ..
basically i need to be able to read the html elements too so i can
display in the div that will display the info ... dose anybody know
some jquery function that dose that ?

Thanks!

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson

It looks like you're using an RSS feed given the xml format, so you
probably want to use the CDATA sections anyways so that RSS readers don't
get confused by the HTML tags.

Now, maybe I just don't understand exactly what you're trying to
accomplish?  Are you saying you want to just read the contents of the
description field?

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Seth claudiu.dan...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/12/2009 03:48 PM  
   
  Subject:[jQuery] Re: html in xml tag 
   






Thank you Michael for your reply however wrapping the data intro !
[CDATA[]] don't work ... i have try that before i just did not mention
it, if anybody has other ideas or some suggestions i will appreciate
it, i'm sure somebody has done this before i just hope he is here on
forum :D

Thanks!

On Aug 12, 6:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 Try wrapping your html text in a CDATA section so that the xml parser
 doesn't strip them out

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

   From:       Seth claudiu.dan...@gmail.com


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


   Date:       08/12/2009 11:41 AM


   Subject:    [jQuery] html in xml tag


 Hi guys,

 I have an XML file like this

 ?xml version=1.0 encoding=utf-8?
 data
              item
                          nameLorem ipsum/name
                          descriptionLorem ipsum dolor sit amet,
 consectetur adipisicing
 elit, sed do eiusmod tempor incididunt ut labore et dolore magna
 aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
 laboris nisi ut aliquip ex ea commodo consequat.br //description
                          imageimages/coal.jpg/image
              /item
 /data
 . etc

 now on description tag i need to enter some formating elements like
 br p li bold etc, if i enter html elements this line desc = $
 (this).find(description).text(); will strip all my html code ..
 probably because of the .text() function at the end, my question is
 what function to try at the end because .html() is not working like
 this desc = $(this).find(description).html(); is not working ..
 basically i need to be able to read the html elements too so i can
 display in the div that will display the info ... dose anybody know
 some jquery function that dose that ?

 Thanks!

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson

Scratch that, my bad.  On closer look its not RSS :)  (its the first thing
that comes to mind when i see item followed by description)

My previous question still stands though, are you just wanting to read the
contents of the description field?

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Michael Lawson/Raleigh/Contr/i...@ibmus   
   
  To: jquery-en@googlegroups.com   
   
  Cc: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/12/2009 04:01 PM  
   
  Subject:[jQuery] Re: html in xml tag 
   





It looks like you're using an RSS feed given the xml format, so you
probably want to use the CDATA sections anyways so that RSS readers don't
get confused by the HTML tags.

Now, maybe I just don't understand exactly what you're trying to
accomplish? Are you saying you want to just read the contents of the
description field?

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'

Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you
Michael for your reply however wrapping the data intro !Seth ---08/12/2009
03:48:48 PM---Thank you Michael for your reply however wrapping the data
intro !
   
   
 From:  Seth claudiu.dan...@gmail.com
   
   
 To:jQuery (English) jquery-en@googlegroups.com
   
   
 Date:  08/12/2009 03:48 PM
   
   
 Subject:   [jQuery] Re: html in xml tag   
   






Thank you Michael for your reply however wrapping the data intro !
[CDATA[]] don't work ... i have try that before i just did not mention
it, if anybody has other ideas or some suggestions i will appreciate
it, i'm sure somebody has done this before i just hope he is here on
forum :D

Thanks!

On Aug 12, 6:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 Try wrapping your html text in a CDATA section so that the xml parser
 doesn't strip them out

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

   From:       Seth claudiu.dan...@gmail.com


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


   Date:       08/12/2009 11:41 AM


   Subject:    [jQuery] html in xml tag


 Hi guys,

 I have an XML file like this

 ?xml version=1.0 encoding=utf-8?
 data
              item
                          nameLorem ipsum/name
                          descriptionLorem ipsum dolor sit amet,
 consectetur adipisicing
 elit, sed do eiusmod tempor incididunt ut labore et dolore magna
 aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
 laboris nisi ut aliquip ex ea commodo consequat.br //description
                          imageimages/coal.jpg/image
              /item
 /data
 . etc

 now on description tag i need to enter some formating elements like
 br p li bold etc, if i enter html elements this line desc = $
 (this).find(description).text(); will strip all my html code ..
 probably because of the .text() function at the end, my question is
 what function to try at the end because .html() is not working like
 this desc = $(this).find(description).html(); is not working ..
 basically i need to be able to read

[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson

Just leave the html in there as it is

have you tried the contents() function yet?

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Seth claudiu.dan...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/12/2009 04:13 PM  
   
  Subject:[jQuery] Re: html in xml tag 
   






yes basicaly i want to read the content of description but to keep the
formatting elements from html b br p etc

On Aug 12, 11:03 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 Scratch that, my bad.  On closer look its not RSS :)  (its the first
thing
 that comes to mind when i see item followed by description)

 My previous question still stands though, are you just wanting to read
the
 contents of the description field?

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

   From:       Michael Lawson/Raleigh/Contr/i...@ibmus


   To:         jquery-en@googlegroups.com


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


   Date:       08/12/2009 04:01 PM


   Subject:    [jQuery] Re: html in xml tag


 It looks like you're using an RSS feed given the xml format, so you
 probably want to use the CDATA sections anyways so that RSS readers don't
 get confused by the HTML tags.

 Now, maybe I just don't understand exactly what you're trying to
 accomplish? Are you saying you want to just read the contents of the
 description field?

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

 Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you
 Michael for your reply however wrapping the data intro !Seth
---08/12/2009
 03:48:48 PM---Thank you Michael for your reply however wrapping the data
 intro !

  From:              Seth claudiu.dan...@gmail.com


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


  Date:              08/12/2009 03:48 PM


  Subject:           [jQuery] Re: html in xml tag


 Thank you Michael for your reply however wrapping the data intro !
 [CDATA[]] don't work ... i have try that before i just did not mention
 it, if anybody has other ideas or some suggestions i will appreciate
 it, i'm sure somebody has done this before i just hope he is here on
 forum :D

 Thanks!

 On Aug 12, 6:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote:



  Try wrapping your html text in a CDATA section so that the xml parser
  doesn't strip them out

  cheers

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

  'Whether one believes in a religion or not,
  and whether one believes in rebirth or not,
  there isn't anyone who doesn't appreciate kindness and compassion..'

    From:       Seth claudiu.dan...@gmail.com

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

    Date:       08/12/2009 11:41 AM

    Subject:    [jQuery] html in xml tag

  Hi guys,

  I have an XML file like this

  ?xml version=1.0 encoding=utf-8?
  data
               item
                           nameLorem ipsum/name
                           descriptionLorem ipsum dolor sit amet,
  consectetur adipisicing
  elit, sed do eiusmod tempor incididunt ut labore et dolore magna
  aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.br //description
                           imageimages/coal.jpg/image
               /item
  /data
  . etc

  now on description tag i need to enter some formating elements like
  br p li bold etc, if i enter html elements this line desc = $
  (this).find(description).text(); will strip all my html code ..
  probably because of the .text() function at the end, my question is
  what function to try at the end because .html() is not working like
  this desc = $(this).find(description).html(); is not working ..
  basically i need to be able to read the html

[jQuery] Re: Regular Expression validation

2009-08-07 Thread Michael Lawson

yes, you can grab the value of the textbox and match it against a regular
expression
var reg = new RegExp(/[a-zA-Z]/);
if(reg.test(string))
{
return valid;
}
else
{
return not valid;
}

like that


cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   nouky a.noor...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/07/2009 02:45 PM  
   
  Subject:[jQuery] Regular Expression validation   
   






I would like to validate a textbox that numbers cannot be entered into
the text input, how do i do this??? With regular expression??

nouky

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: a select question

2009-08-03 Thread Michael Lawson

mmm a little more information in regards to what exactly you want to do but

$('div').eq(i);  where i is the index of the div you want to access

alternatively you could also do $('div:eq(i)');

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   David .Wu chan1...@gmail.com 
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   08/03/2009 09:37 AM  
   
  Subject:[jQuery] a select question   
   






if I have 3 div, how to filter the div without class abc?

div/div
div class=abc/div
div/div

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: URL redirect

2009-07-30 Thread Michael Lawson
document.location.href= url;

would that work for you?

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'



   
  From:   anush anushshe...@gmail.com 
   

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

   
  Date:   07/30/2009 11:54 AM   
   

   
  Subject:[jQuery] URL redirect 
   

   






Hi,

I have an input text field with city names which uses the jquery
autocomplete plugin.

Now I would like to redirect the page when a city is selected. Can you
anybody tell me how I could go about doing it.

 $().ready(function() {
$('#cities').autocomplete(.autocomplete.php, {
 width: 260,
 selectFirst: false,
 matchSubset :0,
  });

  });

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: jQuery and the 'this' keyword

2009-07-30 Thread Michael Lawson

Because you are binding the click event to the button and not your object

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   #micah micah.a.sm...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/30/2009 03:45 PM  
   
  Subject:[jQuery] jQuery and the 'this' keyword   
   






I've created a javascript object like so:

var myObj={
 //internally used
 OtherFunction: function(){ alert('hi');},

 //externally used
 EditInfo: function(){
   this.OtherFunction();
 }
};

if i bind EditInfo to a button, like so:

$('#myButton').click(myObj.EditInfo)

Then (this) is pointing to the button, not to myObj. Why is that?

I'm using FF3.5

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: jQuery and the 'this' keyword

2009-07-30 Thread Michael Lawson

Hmmm i'm not quite sure what you're trying to do exactly :)

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   #micah micah.a.sm...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/30/2009 03:52 PM  
   
  Subject:[jQuery] Re: jQuery and the 'this' keyword   
   






Would you recommend using the .bind(type, data, fn) function to
achieve what i'm trying to do? Or could you steer me in the right
direction? I'm surprised that the .click() works in that manner. How
would you dynamically assign that function to that button?

On Jul 30, 3:48 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 Because you are binding the click event to the button and not your object

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

   From:       #micah micah.a.sm...@gmail.com


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


   Date:       07/30/2009 03:45 PM


   Subject:    [jQuery] jQuery and the 'this' keyword


 I've created a javascript object like so:

 var myObj={
      //    internally used
      OtherFunction: function(){ alert('hi');},

      //    externally used
      EditInfo: function(){
            this.OtherFunction();
      }

 };

 if i bind EditInfo to a button, like so:

 $('#myButton').click(myObj.EditInfo)

 Then (this) is pointing to the button, not to myObj. Why is that?

 I'm using FF3.5

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Selector help needed

2009-07-24 Thread Michael Lawson

Links that have inner active links?

$(a:has(ul li a.active)).css(active);


i think that'll work if i understood you right

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   iceangel89 iceange...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/24/2009 09:24 AM  
   
  Subject:[jQuery] Re: Selector help needed
   






sorry the code is

ul
lia href=#Link 1/a/li
li
a href=#Link 2/a
ul
lia href=# class=activeLink 2.1/a/li
lia href=#Link 2.2/a/li
/ul
/li
/ul


On Jul 24, 9:20 pm, iceangel89 iceange...@gmail.com wrote:
 with the markup like:

 prelt;ulgt;
     lt;ligt;lt;a href=quot;#quot;gt;Link 1lt;/agt;lt;/ligt;
     lt;ligt;
         lt;a href=quot;#quot;gt;Link 2lt;/agt;
         lt;ulgt;
             lt;ligt;lt;a href=quot;#quot;
 class=quot;activequot;gt;Link 2.1lt;/agt;lt;/ligt;
             lt;ligt;lt;a href=quot;#quot;gt;Link 2.2lt;/
 agt;lt;/ligt;
         lt;/ulgt;
     lt;/ligt;
 lt;/ulgt;
 /pre

 i want to add a class active to , Link 2 (line 4), or links that
 have inner a.active links. how can i do it with jquery or even pure
 css?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: jquery

2009-07-23 Thread Michael Lawson

I'm sorry, I really didn't understand what you were asking/telling here.
Also, can you please provide a more concrete example, as well as any code
that will help us figure out your problem?  Thanks

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   rama ramadobb...@gmail.com 
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/23/2009 08:26 AM  
   
  Subject:[jQuery] jquery  
   






when i am submitting the form with jquery, it's not checking for the
entire form, it is checking only the first label, that too how many
times i am pressing submit button that many times that error label is
printing how to avoid this, and how to do entire form validationon
submit.



inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Detect Enter event with Jquery on Linux

2009-07-22 Thread Michael Lawson

Try checking for 28 instead of 13

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Shi Zhuguo bluefl...@gmail.com 
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/22/2009 08:20 AM  
   
  Subject:[jQuery] Detect Enter event with Jquery on Linux 
   






Hi there,

I am using jquery to make a Comet chat client. But I have problems to
detect press enter event on Linux. It's really strange. The same
code runs well on windows:

j.input.bind(keydown, function(l) {
 if (l.keyCode == 13) {
//doing some stuff here, like sending the
message

Any suggestions?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread Michael Lawson

Maybe you should pull the definition of the function out of the document
ready definition?

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   evanbu...@gmail.com evanbu...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/22/2009 11:21 AM  
   
  Subject:[jQuery] Re: Calling other functions inside a function   
   






Thank you. The Firebug suggestion was helpful.  The error message is
saying that getDirectorIds() is not defined.

script type=text/javascript
// make sure at least one checkbox is checked
function validateSubmit() {
if( $(input:checkbox:checked).length == 0 ) {
 alert( Please select at least one section for your PDF profile );
 return false;
 } else {
 createCharts();

 // error occurs here
 getDirectorIDs();
 return true;
 }
 }
/script

This is the getDirectorIDs() function:

script language=javascript type=text/javascript
 // this gets all of the director id_individual values
 $(document).ready(function getDirectorIDs() {
 var result = ;
 $(.chkDirector:checked).each(function() {
 result = result + $(this).val() + ,;
 });
 // place the selected id_individual values in the label control
lblCheckedDirectors2
 document.getElementById('lblCheckedDirs').value = result;

 alert(cool);
 });
/script

On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote:
 The reason this would happen is that you have a fatal error somewhere
inside
 your createCharts() function. When this error occurs, it stops all
 JavaScript execution for the current event.

 Do you have any debugging tools such as Firebug? If not, install Firebug
and
 try again. Open the Firebug panel and make sure it's enabled for your
site,
 then reload the page and do whatever you need to do to trigger the error.

 It's very likely that Firebug will give you an error message showing
exactly
 what the problem is.

 If the problem isn't clear from that message (or if you don't get one),
try
 sprinkling the code inside createCharts() with console.log() calls:

     function createCharts() {
         console.log(1);
         // some of your code here
         console.log(2);
         // some more of your code here
         console.log(3);
         // and some more of your code here
         console.log(4);
     }

 By watching the Firebug console, you will then be able to see which of
your
 console.log() calls were actually executed.

 -Mike



  From: evanbu...@gmail.com

  This is probably more of a basic javascript question than a
  specific jquery function.  I have this jQuery function named
  validateSubmit() which calls two other regular javascript
  functions.  When using IE, both createCharts() and
  getDirectorIDs get called but when using FireFox, only
  createCharts() gets called and never makes it to
  getDirectorIDs() and I'm not sure why this occurs.  Thanks

  script type=text/javascript
  // make sure at least one checkbox is checked function
  validateSubmit() {
          if( $(input:checkbox:checked).length == 0 ) {
            alert( Please select at least one section for your
  PDF profile );
            return false;
          } else {
              createCharts();

               getDirectorIDs();
           return true;
          }
     }
  /script- Hide quoted text -

 - Show quoted text -

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread Michael Lawson

No, i was thinking something like this

script language=javascript type=text/javascript
function getDirectorIds() {
var result = ;
$(.chkDirector:checked).each(function() {
result = result + $(this).val() + ,;
});
// place the selected id_individual values in the label
control lblCheckedDirectors2
document.getElementById('lblCheckedDirs').value =
result;
}



// this gets all of the director id_individual values
  $(document).ready(function() {
  getDirectoryIds();
});
   /script


Typically, you use $(document).ready(function(){...}); to run a function
after the document is finished loading, when its ready.  Not to actually
define the function :)

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   evanbu...@gmail.com evanbu...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/22/2009 02:18 PM  
   
  Subject:[jQuery] Re: Calling other functions inside a function   
   






Is this the right way to do it ?

script language=javascript type=text/javascript
// this gets all of the director id_individual values
  $(document).ready(function() {
function getDirectorIds() {
var result = ;
$(.chkDirector:checked).each(function() {
result = result + $(this).val() + ,;
});
// place the selected id_individual values in the label
control lblCheckedDirectors2
document.getElementById('lblCheckedDirs').value =
result;
}
});
   /script



On Jul 22, 11:34 am, Michael Lawson mjlaw...@us.ibm.com wrote:
 Maybe you should pull the definition of the function out of the document
 ready definition?

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

   From:       evanbu...@gmail.com evanbu...@gmail.com


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


   Date:       07/22/2009 11:21 AM


   Subject:    [jQuery] Re: Calling other functions inside a function


 Thank you. The Firebug suggestion was helpful.  The error message is
 saying that getDirectorIds() is not defined.

 script type=text/javascript
 // make sure at least one checkbox is checked
 function validateSubmit() {
 if( $(input:checkbox:checked).length == 0 ) {
  alert( Please select at least one section for your PDF profile );
  return false;
  } else {
  createCharts();

  // error occurs here
  getDirectorIDs();
  return true;
  }
  }
 /script

 This is the getDirectorIDs() function:

 script language=javascript type=text/javascript
  // this gets all of the director id_individual values
  $(document).ready(function getDirectorIDs() {
  var result = ;
  $(.chkDirector:checked).each(function() {
  result = result + $(this).val() + ,;
  });
  // place the selected id_individual values in the label control
 lblCheckedDirectors2
  document.getElementById('lblCheckedDirs').value = result;

  alert(cool);
  });
 /script

 On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote:



  The reason this would happen is that you have a fatal error somewhere
 inside
  your createCharts() function. When this error occurs, it stops all
  JavaScript execution for the current event.

  Do you have any debugging tools such as Firebug? If not, install
Firebug
 and
  try again. Open the Firebug panel and make sure it's enabled for your
 site,
  then reload the page and do whatever you need to do to trigger the
error.

  It's very likely that Firebug will give you an error message showing
 exactly
  what the problem is.

  If the problem isn't clear from that message (or if you don't get one),
 try
  sprinkling the code inside createCharts() with console.log() calls:

      function createCharts() {
          console.log(1);
          // some of your code here
          console.log(2);
          // some more of your code here
          console.log(3);
          // and some more of your code here
          console.log(4);
      }

  By watching the Firebug console, you will then be able to see which of
 your
  console.log() calls were actually executed.

  -Mike

   From: evanbu...@gmail.com

[jQuery] Re: Calling other functions inside a function

2009-07-22 Thread Michael Lawson

Np, let me know if that works for you!

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   evanbu...@gmail.com evanbu...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/22/2009 02:48 PM  
   
  Subject:[jQuery] Re: Calling other functions inside a function   
   






Thanks.  I've been looking for an example of this for a long time.

On Jul 22, 2:33 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 No, i was thinking something like this

 script language=javascript type=text/javascript
 function getDirectorIds() {
         var result = ;
         $(.chkDirector:checked).each(function() {
             result = result + $(this).val() + ,;
         });
         // place the selected id_individual values in the label
 control lblCheckedDirectors2
         document.getElementById('lblCheckedDirs').value =
 result;
         }

     // this gets all of the director id_individual values
       $(document).ready(function() {
       getDirectoryIds();
     });
    /script

 Typically, you use $(document).ready(function(){...}); to run a function
 after the document is finished loading, when its ready.  Not to actually
 define the function :)

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

   From:       evanbu...@gmail.com evanbu...@gmail.com


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


   Date:       07/22/2009 02:18 PM


   Subject:    [jQuery] Re: Calling other functions inside a function


 Is this the right way to do it ?

 script language=javascript type=text/javascript
     // this gets all of the director id_individual values
       $(document).ready(function() {
         function getDirectorIds() {
         var result = ;
         $(.chkDirector:checked).each(function() {
             result = result + $(this).val() + ,;
         });
         // place the selected id_individual values in the label
 control lblCheckedDirectors2
         document.getElementById('lblCheckedDirs').value =
 result;
         }
     });
    /script

 On Jul 22, 11:34 am, Michael Lawson mjlaw...@us.ibm.com wrote:





  Maybe you should pull the definition of the function out of the
document
  ready definition?

  cheers

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

  'Whether one believes in a religion or not,
  and whether one believes in rebirth or not,
  there isn't anyone who doesn't appreciate kindness and compassion..'

    From:       evanbu...@gmail.com evanbu...@gmail.com

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

    Date:       07/22/2009 11:21 AM

    Subject:    [jQuery] Re: Calling other functions inside a function

  Thank you. The Firebug suggestion was helpful.  The error message is
  saying that getDirectorIds() is not defined.

  script type=text/javascript
  // make sure at least one checkbox is checked
  function validateSubmit() {
  if( $(input:checkbox:checked).length == 0 ) {
   alert( Please select at least one section for your PDF profile );
   return false;
   } else {
   createCharts();

   // error occurs here
   getDirectorIDs();
   return true;
   }
   }
  /script

  This is the getDirectorIDs() function:

  script language=javascript type=text/javascript
   // this gets all of the director id_individual values
   $(document).ready(function getDirectorIDs() {
   var result = ;
   $(.chkDirector:checked).each(function() {
   result = result + $(this).val() + ,;
   });
   // place the selected id_individual values in the label control
  lblCheckedDirectors2
   document.getElementById('lblCheckedDirs').value = result;

   alert(cool);
   });
  /script

  On Jul 21, 7:28 pm, Michael Geary m...@mg.to wrote:

   The reason this would happen is that you have a fatal error somewhere
  inside
   your createCharts() function. When this error occurs, it stops all
   JavaScript execution for the current event.

   Do you have any debugging tools such as Firebug? If not, install
 Firebug
  and
   try again. Open the Firebug panel and make sure it's enabled for your
  site

[jQuery] Re: Selector help

2009-07-18 Thread Michael Lawson

Selectors are strings, including the special operators.  So your select
should look like this:

'this + h1'.  What you have there just concatenates the two strings
together making your selector 'thish1'

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Warfang warfang...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/19/2009 01:11 AM  
   
  Subject:[jQuery] Selector help   
   






I'm pretty new to Javascript/ jQuery, so this is really bugging me.

I'm trying to get the height of an h1 that is a sibling to this. The
value for the variable h1Height, however, returned as null in the
console in Firebug. Perplexed, I tried console.logging ('this'+'+h1')
to see what it was interpreted as. It brought back this+h1, which
should select an h1 adjacent to this (which is a div).

Javascript
h1Height =  $('this'+'h1').height();

What went wrong?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: I dont understand why this doesnt work.

2009-07-17 Thread Michael Lawson
That shouldn't work at all.  Unless your page is sitting at
http://twitter.com

http://en.wikipedia.org/wiki/Same_origin_policy


cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'



   
  From:   Mike mgor...@gmail.com  
   

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

   
  Date:   07/17/2009 04:09 PM   
   

   
  Subject:[jQuery] I dont understand why this doesnt work.  
   

   






Its simple:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml; 
head
title/title

script src=jquery.js type=text/javascript/script


script type=text/javascript
 $(document).ready(function() {
$.get(http://twitter.com/statuses/user_timeline/
19092829.rss);
});
 /script
/head
body

/body
/html


In IE and Opera this works perfectly, but in FF 3.5, Chrome, and
Safari I get a 400 Bad Request.  Looking at the request using Fiddler2
and FireBug, something is replacing GET with OPTIONS.  But in IE and
Opera, it is still showing up as GET.  I dont get it

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: 3 Solitaire

2009-07-14 Thread Michael Lawson
wow you're right, i just couldn't stop :)

Looks great!

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'



 
  From:   weepy jonah...@gmail.com
 

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

 
  Date:   07/14/2009 11:23 AM   
 

 
  Subject:[jQuery] 3 Solitaire 
 

 






Hi

Check out the slick card game I just made - at http://www.lovesolitaire.com

It entirely made in jQuery (1.3.3pre).

It's also strangely addictive - so be careful! Love to hear any
feedback any of you have!

weepy

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: 3 Solitaire

2009-07-14 Thread Michael Lawson

I did just notice though

script
  var PORTAL_URI='yumoov.com';

  var AUTH_TOKEN = vLVJRvNMHbLBpOsxgyWfu1LfINHkHUVwwPKFX7mB89E=;

  $().ready(function() {

  })

/script


you don't define a type here making your page invalid

cheers

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

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   John Newman john.newma...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/14/2009 03:42 PM  
   
  Subject:[jQuery] Re: 3 Solitaire
   






excellent, very nice.  I am not a fan of flash, this is refreshing.

I guess none of this is open source?


On Jul 14, 12:30 pm, Rick Faircloth r...@whitestonemedia.com
wrote:
 very good, weepy!

 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
 Behalf Of Michael Lawson
 Sent: Tuesday, July 14, 2009 11:38 AM
 To: jquery-en@googlegroups.com
 Cc: jQuery (English)
 Subject: [jQuery] Re: 3 Solitaire

 wow you're right, i just couldn't stop :)

 Looks great!

 cheers

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

 'Whether one believes in a religion or not,
 and whether one believes in rebirth or not,
 there isn't anyone who doesn't appreciate kindness and compassion..'

 Inactive hide details for weepy ---07/14/2009 11:23:42 AM---Hiweepy
 ---07/14/2009 11:23:42 AM---Hi

 From:

 weepy jonah...@gmail.com

 To:

 jQuery (English) jquery-en@googlegroups.com

 Date:

 07/14/2009 11:23 AM

 Subject:

 [jQuery] 3 Solitaire

   _

 Hi

 Check out the slick card game I just made -
athttp://www.lovesolitaire.com

 It entirely made in jQuery (1.3.3pre).

 It's also strangely addictive - so be careful! Love to hear any
 feedback any of you have!

 weepy

  image001.gif
  1KViewDownload

  image002.png
  1KViewDownload

  image003.png
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Access li by item in the array

2009-07-09 Thread Michael Lawson

If i'm reading your code right, you may want to try eq(i) instead of index
(i).  index is used to return the index of the match element, its not used
to retrieve that element.

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:   expresso dschin...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/09/2009 09:55 AM  
   
  Subject:[jQuery] Access li by item in the array
   






Is it possible to target certain li in an unordered list by index
with jQuery?  I thought maybe I could use .index but was not able to
get the syntax right.

I thought maybe something like this would work but is has not:

$(#mycarousel  li).index(i).css(margin-right, 5px);

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: $.get ajax call on http page to https on same domain

2009-07-09 Thread Michael Lawson

Hi Scott,

unfortunately (or fortunately depending on your POV), same domain policy
applies to the whole domain, including protocol.
http://www.mysite.com making a request to https://www.mysite.com  is not
valid

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:   Scott sc...@appletree.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/09/2009 03:56 PM  
   
  Subject:[jQuery] $.get ajax call on http page to https on same domain
   






I'm successfully able to make jQuery $.get ajax calls, everything
works great.  But some ajax calls pass credentials, so I need those
calls to be secure.  I simply try $.get(https://localhost/ajax.xml;,
etc...); instead of http.  But now it's not working, instead of an
http get call, I see in firebug an http OPTIONS request is sent to the
server and without the cookies.  So my tomcat server returns a
redirect to my login page (as it doesn't see a session id in the
cookie or url) and the ajax call fails..

What's going on?  Why doesn't it simply issue the exact same get
request jQuery does when the destination url is http?  How can I make
this work?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Cannot disable div

2009-07-08 Thread Michael Lawson

Maybe a mail rule setup wrong?

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:   MorningZ morni...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/08/2009 03:01 PM  
   
  Subject:[jQuery] Re: Cannot disable div  
   






What is up with the repeated posts?  Seems to happen on any topic you
are involved in



inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Cannot disable div

2009-07-08 Thread Michael Lawson

Thats part of how a form submission works, its not the site.  FF will warn
you if you submitted something using a form and are trying to refresh that
same page.

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:   expresso dschin...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/08/2009 03:56 PM  
   
  Subject:[jQuery] Re: Cannot disable div  
   






Because I refresh the page here and it reposts it.  I didn't build
this forum.  Mabye someone should fix that.

On Jul 8, 2:11 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 Maybe a mail rule setup wrong?

 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:       MorningZ morni...@gmail.com


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


   Date:       07/08/2009 03:01 PM


   Subject:    [jQuery] Re: Cannot disable div


 What is up with the repeated posts?  Seems to happen on any topic you
 are involved in

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Syntax Explanation

2009-07-02 Thread Michael Lawson

this notation $.jcarousel means you want to access that field, whether it
be to set it to something else, or read the contents.
this notation in javascript jcarousel: '0.2.3'is setting a key
value pair where jcaraousel is the key and 0.2.3 is the  value

does that make sense?

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:   expresso dschin...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/02/2009 10:23 AM  
   
  Subject:[jQuery] Syntax Explanation  
   






jQuery right now is still like a foreign language to me.  I have
books, etc. but can someone tell me what's going on here:

// Create shortcut for internal use
var $jc = $.jcarousel;

$jc.fn = $jc.prototype = {
jcarousel: '0.2.3'
};

what is prototype, and what is jcarousel: '0.2.3', is that just
setting some other variable's value?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Syntax Explanation

2009-07-02 Thread Michael Lawson

Thats correct!

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:   expresso dschin...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/02/2009 11:28 AM  
   
  Subject:[jQuery] Re: Syntax Explanation  
   






Thanks.

so   $jc.fn = $jc.prototype

$jc is just the entire object and .fn is just a variable/field that
was created somewhere else in the code?

On Jul 2, 9:44 am, Michael Lawson mjlaw...@us.ibm.com wrote:
 this notation $.jcarousel means you want to access that field, whether it
 be to set it to something else, or read the contents.
 this notation in javascript     jcarousel: '0.2.3'    is setting a key
 value pair where jcaraousel is the key and 0.2.3 is the  value

 does that make sense?

 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:       expresso dschin...@gmail.com


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


   Date:       07/02/2009 10:23 AM


   Subject:    [jQuery] Syntax Explanation


 jQuery right now is still like a foreign language to me.  I have
 books, etc. but can someone tell me what's going on here:

     // Create shortcut for internal use
     var $jc = $.jcarousel;

     $jc.fn = $jc.prototype = {
         jcarousel: '0.2.3'
     };

 what is prototype, and what is jcarousel: '0.2.3', is that just
 setting some other variable's value?

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Question on : syntax

2009-07-02 Thread Michael Lawson

One thing to keep in mind, is that when you are using   : to specify a
filter, it will always be inside of a string.  input:buttonfor
example.
The syntax you have here is the key value notation in javascript.  It will
almost always exist outside of a string.  You are setting the setup key to
the anonymous function you have there.

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:   expresso dschin...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/02/2009 01:09 PM  
   
  Subject:[jQuery] Question on : syntax
   






I have yet another syntax question.

I know that : can be used for specifying things like filters, but what
does it do in this case:

$jc.fn.extend({

setup: function() {
this.first = null;
this.last  = null;
this.prevFirst = null;
this.prevLast  = null;
this.animating = false;
this.timer = null;
this.tail  = null;
this.inTail= false;

if (this.locked)
return;

this.list.css(this.lt, this.pos(this.options.offset) +
'px');
...rest of code here
},

so what is the syntax setup:an attribute?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: var $varname

2009-07-02 Thread Michael Lawson

Just to addon to what Waseem here has said:

When you are using the default jQuery library, the variable $ is set to the
value of jQuery, which creates a shortcut for you so that you don't have to
keep typing jQuery everytime you want to access it, you can just type $.

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:   waseem sabjee waseemsab...@gmail.com   
   
  To: jquery-en@googlegroups.com   
   
  Date:   07/02/2009 02:26 PM  
   
  Subject:[jQuery] Re: var $varname
   





its not really a jquery variable

in standard js you can say
var $myvar = hello;
and
var myvar = hello;

both will work the same

you can access jquery using either the $ or  JQuery
like

$(#myid).hide();
JQuery(#myid).hide();


in a line of the JQuery library code you would see something like

JQuery = window.JQuery = window.$ ...

your could say its like short hand code

instead of saying JQuery() al the time you can just say $()

On Thu, Jul 2, 2009 at 8:18 PM, expresso dschin...@gmail.com wrote:

  what's the difference between:

  var varname

  var $varname

  obviously I think 2nd is a jQuery variable?  If that's the case why
  should I care and where is the docs on that?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Problem accessing external iframe form values

2009-07-01 Thread Michael Lawson

It isn't possible.  iframes abide  by the same origin policy just as ajax
requests do.

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:   James james.gp@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   07/01/2009 02:18 PM  
   
  Subject:[jQuery] Re: Problem accessing external iframe form values
   






I believe that it's not possible, in general, as you said due to
security reasons.

On Jul 1, 12:17 am, skywalk3r luca.martinc...@gmail.com wrote:
 Hi, I'm getting sick trying to solve this problem:

 I have a web page A that loads another page B using an iframe (or an
 object tag), the B page is an external page (it's not on my server)
 and contains a form.

 I want to be able to auto fill the form with pre-defined values. In
 jquery i think it's impossible due to security reasons, somebody can
 help me?!?!

 I hope I explained the problem correctly, if you need more info just
 tell me.
 Thanks,

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: The Balance between PHP and JQuery

2009-06-25 Thread Michael Lawson

The best thing you can keep in mind here is that PHP runs on the backend,
and jQuery runs on the front end.  In most cases php will run first.  So
for example, if php generates an html page with some javascript on it, the
javascript, once it makes it to your browser, has access to everything on
the page (well, besides iframes with src attributes not in your domain, but
thats another topic) , whether php generated it or not.

Does that make sense and/or help at all?

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:   Pkunzipula pkunzip...@hotmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/25/2009 04:37 PM  
   
  Subject:[jQuery] The Balance between PHP and JQuery  
   






Hello Everyone!

I am new to both PHP and JQuery, and I am running into conflict over
which language is right for which task.

For instance:

I have a simple content management system (PHP) which allows
administrators to add and update stories with a textarea form.

I then use PHP to retrieve the input from the textarea, find the new
line breaks and convert them to p/p tags.  It works.

I then use the JQuery selector $('#slide div p:first').addClass
('noIndent') to take indenting off the first paragraph of each story
where #slide and div are both hard-coded into the HTML, but the p is
generated by PHP.

It doesn't work.  Is it my syntax, or do I really have to use PHP to
generate the classes too?  Or do I need to back it up and use JQuery
instead to output the p/p tags?

I appreciate any effort to clarify this matter, and in the process,
could you give me some simple guidelines of where you draw the line
between PHP and JQuery?

Thanks for your time!

Arlen

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: XML manipulation

2009-06-23 Thread Michael Lawson

I can't speak for javascript as I'm not the expert here, but in a lot of
other languages you have to explicitly tell objects and functions that the
String you are using is xml, else its just a string, which sounds like your
problem here.

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:   bigb bryanands...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/23/2009 11:39 AM  
   
  Subject:[jQuery] XML manipulation
   






I'm having some real difficulty figuring out how to manipulate xml
data with jquery. Here is my situation. I have a hidden TextArea that
contains xml data, something like this:

items
  item value='1' text='x'/item
  item value='2' text='y'/item
/items


So, let's say I want to remove the item with value='1'.

1) I grab the value of the textarea:

var xml = $(# + id).val();

2) I then find the node and remove it:

$(xml).find(item[value='123']).remove();


Problem is, it doesn't remove anything! It finds the node just fine,
but the remove() function doesn't seem like it is doing anything. I've
tried looping through eacy item $('item',xml).each(function ); and
then calling remove(); but that does not work either. Any help on how
to manipulate xml data correctly? Thank you.

Bryan

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: how to make a function with JQuery

2009-06-12 Thread Michael Lawson

It almost sounds to me like you're confused on what jQuery actually is?  
Does it works similary like woring with Javascript and DOM ? in your email

jQuery is a code library for use by javascript code.  It provides easy
access to the DOM and tons of other convenient features for you, so that
you don't have to implement them yourself in javascript.

In javascript, you would define a function as follows

function foo()
{
//code here
}

or, several jQuery functions can take anonymous functions as input.  For
example
jQuery.get(http://www.my-great-site.com,function(xml){
//code here can use the xml returned by the http get
}

does that help at all?

Here is a reference on creating javascript functions:
http://www.w3schools.com/js/js_functions.asp


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:   MorningZ morni...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/12/2009 09:00 AM  
   
  Subject:[jQuery] Re: how to make a function with JQuery  
   






jQuery *function*?

Do you mean jQuery plugin?

http://www.learningjquery.com/2007/10/a-plugin-development-pattern


On Jun 11, 10:54 pm, marcelsnews marcelsn...@gmail.com wrote:
 Hello every one,

 I'm a new user of JQuery and i'm trying to use it on a web site that
 i'm building. Keep in mind that i'm also new on the web.

 So i wanted to know:
 -  How to define a function with JQuery.
 -  Does it works similary like woring with Javascript and DOM ?
 - Shall my function, if allowed, be defined in the $(document).ready
 () ... ?

 thank

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Regular Expressions and jQuery

2009-06-12 Thread Michael Lawson
Maybe I'm reading this wrong, but the regular expression you are using
looks like it returns a match on valid phone numbers?  If that is the case
why not
return true when it matches, false when it doesn't.  Ir just put a ! in
front of the match function

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:   John jmcl...@birchrunsoccer.org 
 

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

 
  Date:   06/12/2009 09:38 AM   
 

 
  Subject:[jQuery] Regular Expressions and jQuery   
 

 






Hello all,
I have some experience in Regular Expressions but this one has me
pulling my hair out.

I have a form with several input fields including a phone number
field.  I have a submit button that is linked to jquery form plugin.
My validation is checked on beforeSubmit. ( i.e. beforeSubmit:
validateForm )
I've used validateForm() for other simple validation via javascript.
This time I'm using jQuery Form which shouldn't be and isn't a
problem.   My issue is in the validation of phone number.

Within validateForm is this...

function validateForm(formData, jqForm, options) {

  var queryString = $.param(formData);
  alert(queryString);

 // VALIDATE ENTIRE FORM
 //phone
 if (validate_phone($('input
[name=piResults]').fieldValue(), Please
enter a valid phone number.) == false){
 phoneNum.focus();
 return false;
 }
}

// VALIDATE PHONE NUMBER
function validate_phone(value,alerttxt){

 var re = /^\(\d{3}\)\d{3}-\d{4}$/;

 if( value.match(/^\(\d{3}\)\d{3}-\d{4}$/) ){
 return false;
 }
 else{
 return true;
 }
}

When validate_phone is called, the parameter value is correct. The
problem is the match is not checked.
Is there another way?

Thanks for any help.

J Mcleod

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Change form action based on button clicked

2009-06-12 Thread Michael Lawson
function go(button)
{
 $(#my_form).attr(action,button.value);
}

and then in your button tag add this
onclick='go(this)'

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:   ciupaz luigi.zambe...@gmail.com 
 

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

 
  Date:   06/12/2009 10:27 AM   
 

 
  Subject:[jQuery] Change form action based on button clicked   
 

 






Hi all,
I have a form like this:

form id=my_form method=post action=

Name: br /
input type=text id=name name=name /

input type=submit id=submit1 value=Go to page 1 /
input type=submit id=submit2 value=Go to page 2 /

/form

how can I change my action form so the form goes to Page1.htm with
click on button1 and goes to Page2.htm to click on button2, and
mantein the value inserted in textbox name?

Thanks a lot.

Luis

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Can Jquery parse an xml file?

2009-06-10 Thread Michael Lawson

Absolutely!

The one area you can run into issues is with namespace prefixs, other than
that though you should be good to go.  Just use selectors as you would
normally

node
 book
  authordata/author
 /book
/node

to grab the data text from this you would say

$(node  book  author).text();

or you could just use $(author).text();

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:   zweb neerash...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/10/2009 05:18 PM  
   
  Subject:[jQuery] Can Jquery parse an xml file?   
   






Can jquery be used to read/traverse a xml file?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Can Jquery parse an xml file?

2009-06-10 Thread Michael Lawson

This is of course dependant on whether or not you can read in the xml file
via AJAX or some other means

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:   zweb neerash...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/10/2009 05:18 PM  
   
  Subject:[jQuery] Can Jquery parse an xml file?   
   






Can jquery be used to read/traverse a xml file?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: posting an xml

2009-06-03 Thread Michael Lawson

The most likely reason to see permission denied because you are trying to
use ajax to access a domain that is not the same as your own, and therefore
invoking the same origin policy in your browser.  For example, if your
domain is my.domain.com and you are trying to post to that URL you have
below, it won't work.

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:   gnh...@gmail.com gnh...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   06/03/2009 08:37 AM  
   
  Subject:[jQuery] posting an xml  
   






hai

i want to post an xml document to a url like
https://newport.ingrammicro.com/mustang.
But i don't know java and jQuery .i know only php ,,javascript , ajax
and asp , So is there is any another way to do this .Actually it's
work in our local system , But while uploading it's not working , also
shown javascript error permission denied .why this shown in only
site?.is it's not possible to do this using javascript and ajax. Or
for using jQuery , what are the requirement for that?  can u help me?

Thanks in advance

inline: graycol.gifinline: ecblank.gif

[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 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: 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: Reverse a collection of jQuery elements.

2009-05-27 Thread Michael Lawson

var temp = new Array();
var objects = $(#some_selector).parents(li);
for(var i = 0; i  objects.size(); i++)
{
temp[(objects.size()-1) - i] = objects.eq(i);
}


pretty sure that after that runs the temp array will contain your objects
in reverse order.  please correct me if i'm wrong here, trying to write
this at the last minute before leaving work :)

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:   simshaun simsh...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   05/27/2009 05:51 PM  
   
  Subject:[jQuery] Reverse a collection of jQuery elements.
   






I need to reverse the collection jQuery returns when I use

$(#some_selector).parents(li);

in order to build a path.

Is this doable? It'd be nice if jQuery had a reverse() method.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Reverse a collection of jQuery elements.

2009-05-27 Thread Michael Lawson

hehe what Brandon said!

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:   Brandon Aaron brandon.aa...@gmail.com  
   
  To: jquery-en@googlegroups.com   
   
  Date:   05/27/2009 05:54 PM  
   
  Subject:[jQuery] Re: Reverse a collection of jQuery elements.
   






$.fn.reverse = [].reverse;

$('#some_selector').parents('li').reverse();


:)

--
Brandon Aaron

On Wed, May 27, 2009 at 4:51 PM, simshaun simsh...@gmail.com wrote:

 I need to reverse the collection jQuery returns when I use

    $(#some_selector).parents(li);

 in order to build a path.

 Is this doable? It'd be nice if jQuery had a reverse() method.


inline: graycol.gifinline: ecblank.gif

[jQuery] AUTO: Michael Lawson is out of the office (returning 05/26/2009)

2009-05-20 Thread Michael Lawson


I am out of the office until 05/26/2009.

Enjoying a weekend of anime geekdom at Animazement in Raleigh NC.

www.animazement.org

If you have any questions or concerns, please contact Leena Paulose


Note: This is an automated response to your message  [jQuery] Re: How to
print json data, key and value sent on 5/20/09 14:52:22.

This is the only notification you will receive while this person is away.

[jQuery] Re: Adding/Removing text on texarea

2009-05-19 Thread Michael Lawson

If you select the text area and use the text() function on it, you'll get a
string back.  You can do whatever you want with it from there and then just
reinsert it again, thats one option at least

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:   Johannes Theile jo...@theile.org   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   05/19/2009 09:56 AM  
   
  Subject:[jQuery] Adding/Removing text on texarea 
   






Hi,
I have a list of text-snippets which should be inserted into a
textarea, separated by a comma. When I click the same text-snipped
again, it should be removed from the textarea.

I managed to to implement the inserting with the following code, but
for the removal I have no idea.

$(a.tags2textarea).click(function()
{
 $(textarea.txt_tags).append($(this).html()+, );
 return false;
});

Maybe someone can help me.

Best regards,
Johannes

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: how to uncheck the check box

2009-05-15 Thread Michael Lawson
If you absolutely must use a checkbox you could do the following:

when you click on a check box, set the checked attribute of the other
checkboxes in the same group to 湴
cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Danny Nolan danny_no...@yahoo.co.uk 
  

  
  To: jquery-en@googlegroups.com
  

  
  Date:   05/15/2009 11:48 AM   
  

  
  Subject:[jQuery] Re: how to uncheck the check box 
  

  





   
 Change to a standard radio group? 
   
 --- On Fri, 5/15/09, bharani kumar
 bharanikumariyer...@gmail.com wrote:
   
  From: bharani kumar bharanikumariyer...@gmail.com  
  Subject: [jQuery] how to uncheck the check box   
  To: jquery-en@googlegroups.com   
  Date: Friday, May 15, 2009, 9:38 AM  
   
  Hi all   
   
  Can u tell me , how to uncheck the check box , when i check  
  another check box,   
   
  for example  
   
  having 4 check boxes,
   
  be default check box is checked ,.   
   
   
  when i check the check box 2 , then need to uncheck the checked  
  one ,
   
  How to do this in jquery ,   
   
   
  Thanks   
   
  --   
  உங்கள் நண்பன்
  பரணி  குமார்  
   
  Regards  
  B.S.Bharanikumar 
   
  POST YOUR OPINION
  http://bharanikumariyerphp.site88.net/bharanikumar/  
   



inline: graycol.gifinline: ecblank.gif

[jQuery] Re: css syntax

2009-05-13 Thread Michael Lawson
if the bgc equals ffccc, or the bgc equals rgb(255,204,204) then set the
backgroundColor to ff, if not, set it to ff

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   runrunforest craigco...@gmail.com   



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



  Date:   05/13/2009 11:55 AM   



  Subject:[jQuery] css syntax   









Hi,

Can someone help me explain the meaning of these two lines

var bgc = $(this).css('backgroundColor');
$(this).css({backgroundColor: bgc == '#ff' || bgc == 'rgb(255,
204, 204)' ? '#ff' : '#ff'});

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: JQuery and Ajax

2009-05-13 Thread Michael Lawson
You could try the Yslow addon for firebug.  You also might want to check
any validation you are performing on the front end, and what you're doing
on the backend that might be a bottleneck.
cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   nat natasha.d...@gmail.com  



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



  Date:   05/13/2009 03:35 PM   



  Subject:[jQuery] JQuery and Ajax  









Hi,

I am working on adding asynchronous form submission inside a jquery
dialog. I am using .ajax().
Everything is working correctly, but the submission takes longer than
I would like.
I am new to jquery and am unsure how to debug/optimize this. How do I
determine if the lag is in the front or backend?

Thanks,
Natasha

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Cannot get jquery to work

2009-04-30 Thread Michael Lawson

Try

addClass()

instead of

addclass()
cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Anil virap...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/30/2009 08:20 AM  
   
  Subject:[jQuery] Cannot get jquery to work   
   






I downloaded the from
http://docs.jquery.com/Downloading_jQuery#Download_jQuery,
and store the script in public/javascripts/jquesry.js

I included the file using following command
%= javascript_include_tag jquery.js %

I want to add class to table class using following command  inside
script tag.
(document).ready( function() {
$('tr:odd').addclass('odd');
   $('tr:even').addclass('even');
   alert(abc'); //for debugging
 $('th').parent().addclass('table-heading');
  }
 );


But I cannot get the alert neither I can see the class in tr tag.

I am a newbie to rails.
any help is appreciated.

Thanks in  advance



Thanks
Anil

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: reading show/hide state

2009-04-27 Thread Michael Lawson

You can use the jQuery filters :hidden and :visible

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Tom Worster f...@thefsb.org 
   
  To: jquery-en@googlegroups.com jquery-en@googlegroups.com
   
  Date:   04/27/2009 10:33 AM  
   
  Subject:[jQuery] reading show/hide state 
   






when using show() and hide(), what's the right way for the script to read
the state of the element? i've found that attr('display') can be used but
this seems like an undocumented hack and could fail in future releases of
jquery.



inline: graycol.gifinline: ecblank.gif

[jQuery] Re: ajax append problem

2009-04-27 Thread Michael Lawson

instead of  $(.content).append(html);
do
var contentToAppend = html.find(#cont);
$(.content).append(contentToAppend);

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   clicforw...@googlemail.com clicforw...@googlemail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/27/2009 11:03 AM  
   
  Subject:[jQuery] ajax append problem 
   






Hello,

im using this script to load a external site into my DOM.
It works fine but i need just a part of this test.html.

For example: I want to append just the div #cont from test.html
How can i do that?

script type=text/javascript
$.ajax({
  url: test.html,
  cache: false,
  success: function(html){
$(.content).append(html);
  }
});
/script

Thanks for Help!

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: ajax append problem

2009-04-27 Thread Michael Lawson

my bad, try this

$(html).find('#cont');
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   clicforw...@googlemail.com clicforw...@googlemail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/27/2009 01:17 PM  
   
  Subject:[jQuery] Re: ajax append problem 
   






Hello Michael,

thanks for this.
I got a error:  html.find is not a function
Any idea?

script type='text/javascript' src='http://ajax.googleapis.com/ajax/
libs/jquery/1.3.2/jquery.min.js'/script
script type=text/javascript
$(document).ready(function(){
 $.ajax({
 url: leistung.html,
 cache: false,
 success: function(html) {
 var loadCont = html.find('#cont');
 $(.content).append(loadCont);
 }
 });
});
/script


On Apr 27, 5:07 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 instead of  $(.content).append(html);
 do
 var contentToAppend = html.find(#cont);
 $(.content).append(contentToAppend);

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 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:       clicforw...@googlemail.com clicforw...@googlemail.com


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


   Date:       04/27/2009 11:03 AM


   Subject:    [jQuery] ajax append problem


 Hello,

 im using this script to load a external site into my DOM.
 It works fine but i need just a part of this test.html.

 For example: I want to append just the div #cont from test.html
 How can i do that?

 script type=text/javascript
 $.ajax({
   url: test.html,
   cache: false,
   success: function(html){
     $(.content).append(html);
   }});

 /script

 Thanks for Help!

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: AJAX Response causing character display problems with chars like

2009-04-24 Thread Michael Lawson

You could always try converting it to an html entity in your application,
then you don't have to worry about character sets.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   rmeder rme...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/24/2009 08:56 AM  
   
  Subject:[jQuery] AJAX Response causing character display problems with 
chars like
   






Hi Guys,

When passing a é character as part of an an ajax responset and
printing the text to the screen from js, the value display as a ?. I
tried converting the piece of text to utf8 and then it displays
correctly on a windows server however on Linux server the vallues
still displays as a ?.

I am using Java as my backend code and encode the text as UTF8 by
using the getBytes method. Can anybody assist me with the problem or
have any suggestions how to go about fixxing it.


Regards,

Ryan






inline: graycol.gifinline: ecblank.gif

[jQuery] Re: AJAX Response causing character display problems with chars like

2009-04-24 Thread Michael Lawson

I mean, convert it in your java application to an entity, that way when it
hits your javascript its a plain ASCII character representation of the
special character.  When the rendering engine picks it up, it'll display as
the special character.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   rmeder rme...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/24/2009 09:44 AM  
   
  Subject:[jQuery] Re: AJAX Response causing character display problems 
with chars like
   






when displaying as html content it works fine soon as you pass this
text through js the problem occurs by converting the é character as
a ?.


Any thoughts



On Apr 24, 2:59 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 You could always try converting it to an html entity in your application,
 then you don't have to worry about character sets.

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 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:       rmeder rme...@gmail.com


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


   Date:       04/24/2009 08:56 AM


   Subject:    [jQuery] AJAX Response causing character display problems
with chars like

 Hi Guys,

 When passing a é character as part of an an ajax responset and
 printing the text to the screen from js, the value display as a ?. I
 tried converting the piece of text to utf8 and then it displays
 correctly on a windows server however on Linux server the vallues
 still displays as a ?.

 I am using Java as my backend code and encode the text as UTF8 by
 using the getBytes method. Can anybody assist me with the problem or
 have any suggestions how to go about fixxing it.

 Regards,

 Ryan

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: AJAX xml problem

2009-04-23 Thread Michael Lawson

I've heard of people doing /: or //: or ///: but i've never had that work
for me.


cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   barton bartonphill...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/23/2009 01:23 PM  
   
  Subject:[jQuery] Re: AJAX xml problem
   






Is there no way to escape the ':'?
Btw, I don't find it surprising that IE6 has a problem.

On Apr 21, 10:01 am, Michael Lawson mjlaw...@us.ibm.com wrote:
 If you put a : in a jQuery selector, jQuery thinks you are going to be
 declaring a filter.

 btw

 [nodeName=] may not owrk in ie6.  Might want to verify.

 Anyone from jQuery knows if any work is being done to fix xml namespaces?

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 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:       barton bartonphill...@gmail.com


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


   Date:       04/21/2009 11:59 AM


   Subject:    [jQuery] Re: AJAX xml problem


 Thanks that worked -- but why does $item.find(media:thumbnail) not
 work? I can get the other items with, for example, $item.find
 (description). I guess it is the ':' that makes the difference but
 why?

 Thanks again.

 On Apr 20, 1:42 pm, Michael Lawson mjlaw...@us.ibm.com wrote:



  try this

  $([nodeName=media:thumbnails]);

  cheers

  Michael Lawson
  Content Tools Developer, Global Solutions, ibm.com
  Phone:  1-828-355-5544
  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:       barton bartonphill...@gmail.com

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

    Date:       04/20/2009 03:30 PM

    Subject:    [jQuery] Re: AJAX xml problem

  Is this one just too difficult to answer?

  On Apr 17, 1:08 pm, barton bartonphill...@gmail.com wrote: I have a

 rss feed and want to navigate to media:thumbnails url='  etc. I
can't figure out what to use for a selector as the
   media:thumbnails just doesn't work. I am doing a .find(). Any ideas.
   The feed


ishttp://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
 which I get via a php proxy



  athttp://www.bartonphillips.dyndns.org/test/test.php?xml=1

   Thanks

   graycol.gif
   1KViewDownload

   ecblank.gif
   1KViewDownload



  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: $(#field) is null

2009-04-22 Thread Michael Lawson

In the event that MorningZ is right, and it makes sense to me:

$ = jQuery;

should do the trick.


cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   MorningZ morni...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/22/2009 09:15 AM  
   
  Subject:[jQuery] Re: $(#field) is null 
   






has nothing to do with the .text method, as he is saying his selector
isn't working (hence the null message)... besides that is perfectly
valid JavaScript to get the text value from an option

jjsanders:

What happens if before this line

$(function(){

you put

alert($);

because the fact you get null on $(#ppsub_ppterm_id) and not have
jQuery go about it's business silently (which it should), means you
don't have jQuery referenced properly or it's conflicting with
something else used on the page

On Apr 22, 9:03 am, Abrar Arshad abrar.apt...@gmail.com wrote:
 hi,
      i didnt try it but i think the problem is with your text() method
that
 you have used as a  property on 3rd line.

 On Wed, Apr 22, 2009 at 3:48 PM, jjsanders jigalroe...@gmail.com wrote:

  Hello,

  I have a selectbox with month periods in it.

  Here is my code:

  $(function(){

                         $(#ppsub_ppterm_id).change(function(){
                                         var term =
  this.options[this.selectedIndex].text;

                                         if(term == Eenmalig){
                                                 $(.idealtd).show();
                                         }else{
                                                 $(.idealtd).hide();
                                                 //$(#ppsub_amount
  option:selected).val('anders');
                                         }
                         });

         });

  select name=ppsub_ppterm_id class=ppsub_ppterm_id
  id=ppsub_ppterm_id style=width: 100px; font-size: 11px;
                                                 option
  value=MMaand/option
                                                 option
  value=KKwartaal/option
                                                 option
  value=HHalfjaar/option
                                                 option
  value=JJaar/option
                                                 option selected
  value=EEenmalig/option
                                         /select

  But when i load my page i staight away get an error:

  $(#ppsub_ppterm_id) is null
  Line 17

  any idea's?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Why would adding this onclick alert cause this code to fail???

2009-04-22 Thread Michael Lawson

I think your problem is here:

alert('Help!');

You are using ' to delimit the Help string, but also to delimit the
out.push string, at the same time.  So you are escaping the string and
passing Help! as a variable instead of a string.  try escaping the 's with
\

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Rick Faircloth r...@whitestonemedia.com
   
  To: jquery-en@googlegroups.com   
   
  Date:   04/22/2009 09:17 AM  
   
  Subject:[jQuery] Why would adding this onclick alert cause this code to 
fail???
   





Without going into a lot of other code which could be impacting this, I
wanted to start with this question:

Is there any reason why adding this onclick alert to this line of code
would cause the entire block of code
generated using out.push to fail? (onclick is in the top line)...

out.push('div style=margin-top:12px;[ a class=link onclick=alert
('Help!');save changes/a ]
input id=' + row[2] + ' class=saveChangesButton name=button
type=button value=Save Changesnbsp;nbsp;
input id=cancelChangesButton type=button value= Cancel /div');

If I take out the onclick, the all the out.push code block section, of
which this is a part, runs fine.
Put it in, the entire code block fails to display.

I was just wondering if there something inherently different about using
this onclick script as part of injected code.

Also, using the onclick anywhere else on the page (outside of the out.push
generated code block) work normally.

Thanks for any insight!

Rick



-

It has been my experience that most bad government is the result of too
much government. - Thomas Jefferson
inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Why would adding this onclick alert cause this code to fail???

2009-04-22 Thread Michael Lawson

Hehehe, no prob.  I know how frustrating little errors like that can be :)

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Rick Faircloth r...@whitestonemedia.com
   
  To: jquery-en@googlegroups.com   
   
  Date:   04/22/2009 09:30 AM  
   
  Subject:[jQuery] Re: Why would adding this onclick alert cause this code  
to fail???
   





Thanks, Michael!  That was it!

That was driving me crazy!

Rick

On Wed, Apr 22, 2009 at 9:23 AM, Michael Lawson mjlaw...@us.ibm.com
wrote:
  I think your problem is here:

  alert('Help!');

  You are using ' to delimit the Help string, but also to delimit the
  out.push string, at the same time. So you are escaping the string and
  passing Help! as a variable instead of a string. try escaping the 's with
  \

  cheers

  Michael Lawson
  Content Tools Developer, Global Solutions, ibm.com
  Phone: 1-828-355-5544
  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 Rick Faircloth ---04/22/2009 09:17:53
  AM---Without going into a lot of other code which could be impaRick
  Faircloth ---04/22/2009 09:17:53 AM---Without going into a lot of other
  code which could be impacting this, I wanted to start with this question:



   
   
 From:  Rick Faircloth r...@whitestonemedia.com  
   
   
 To:jquery-en@googlegroups.com 
   
   
 Date:  04/22/2009 09:17 AM
   
   
 Subject:   [jQuery] Why would adding this onclick alert cause this
code to fail???
   






  Without going into a lot of other code which could be impacting this, I
  wanted to start with this question:

  Is there any reason why adding this onclick alert to this line of code
  would cause the entire block of code
  generated using out.push to fail? (onclick is in the top line)...

  out.push('div style=margin-top:12px;[ a class=link onclick=alert
  ('Help!');save changes/a ]
  input id=' + row[2] + ' class=saveChangesButton name=button
  type=button value=Save Changesnbsp;nbsp;
  input id=cancelChangesButton type=button value= Cancel /div');

  If I take out the onclick, the all the out.push code block section, of
  which this is a part, runs fine.
  Put it in, the entire code block fails to display.

  I was just wondering if there something inherently different about using
  this onclick script as part of injected code.

  Also, using the onclick anywhere else on the page (outside of the
  out.push generated code block) work normally.

  Thanks for any insight!

  Rick



  
-

  It has been my experience that most bad government is the result of too
  much government. - Thomas Jefferson




--
-

It has been my experience that most bad government is the result of too
much government. - Thomas Jefferson
inline: graycol.gifinline: ecblank.gifinline: 18520449.gif

[jQuery] Re: How do we change the css stylesheet of selected accordion header

2009-04-21 Thread Michael Lawson

A little more code or example would be helpful but...

whats keeping you from using the css() function?
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   abhishekgal...@gmail.com abhishekgal...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/21/2009 09:20 AM  
   
  Subject:[jQuery] How do we change the css stylesheet of selected 
accordion header
   






Can anyone please tell me ,how do we change the css stylesheet of
selected accordion header.

I want that the selected accordion should have different background
color and other which are not selected should have different
background color.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: AJAX xml problem

2009-04-21 Thread Michael Lawson

If you put a : in a jQuery selector, jQuery thinks you are going to be
declaring a filter.

btw

[nodeName=] may not owrk in ie6.  Might want to verify.

Anyone from jQuery knows if any work is being done to fix xml namespaces?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   barton bartonphill...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/21/2009 11:59 AM  
   
  Subject:[jQuery] Re: AJAX xml problem
   






Thanks that worked -- but why does $item.find(media:thumbnail) not
work? I can get the other items with, for example, $item.find
(description). I guess it is the ':' that makes the difference but
why?

Thanks again.

On Apr 20, 1:42 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 try this

 $([nodeName=media:thumbnails]);

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 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:       barton bartonphill...@gmail.com


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


   Date:       04/20/2009 03:30 PM


   Subject:    [jQuery] Re: AJAX xml problem


 Is this one just too difficult to answer?

 On Apr 17, 1:08 pm, barton bartonphill...@gmail.com wrote: I have a
rss feed and want to navigate to media:thumbnails url='
  etc. I can't figure out what to use for a selector as the
  media:thumbnails just doesn't work. I am doing a .find(). Any ideas.
  The feed


ishttp://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
which I get via a php proxy

 athttp://www.bartonphillips.dyndns.org/test/test.php?xml=1



  Thanks



  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: AJAX xml problem

2009-04-20 Thread Michael Lawson

try this

$([nodeName=media:thumbnails]);

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   barton bartonphill...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/20/2009 03:30 PM  
   
  Subject:[jQuery] Re: AJAX xml problem
   






Is this one just too difficult to answer?

On Apr 17, 1:08 pm, barton bartonphill...@gmail.com wrote:
 I have a rss feed and want to navigate to media:thumbnails url='
 etc. I can't figure out what to use for a selector as the
 media:thumbnails just doesn't work. I am doing a .find(). Any ideas.
 The feed
ishttp://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml
 which I get via a php proxy
athttp://www.bartonphillips.dyndns.org/test/test.php?xml=1

 Thanks

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: problem with IE extracting the document title from an ajax request response

2009-04-08 Thread Michael Lawson

What does your response look like?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Zac Spitzer zac.spit...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/08/2009 08:36 AM  
   
  Subject:[jQuery] problem with IE extracting the document title from an 
ajax request  response
   






Is there a trick with IE for extracting the title from
an ajax response?

This works fine in FF but fails in IE using 1.3.2
var newTitle=$(response).filter(TITLE);

it's a horrible problem to google as title is sooo common

z

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: dont waste ur time with this it dont work

2009-04-06 Thread Michael Lawson

I seem to be having the same problem with jQuery

Every time I do this alert($('#test').text()); and test contains the answer
from 1 / 0   the whole fabric of the universe seems to come apart.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Eric Garside gars...@gmail.com 
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/06/2009 11:48 AM  
   
  Subject:[jQuery] Re: dont waste ur time with this it dont work   
   






Do you have a test page you can show? jQuery does, indeed, work. And
well at that. We can help you fix your problems, but please don't come
onto the list and post inflammatory nonsense. :)

On Apr 6, 11:19 am, brian bally.z...@gmail.com wrote:
 Wow, thanks for the tip! I'm sure all of the other tens of thousands
 of people using jQuery will be relieved to know that there's *just no
 point* in going on with it any longer. You've potentially saved each
 of us from years of heartache and despair.

 Thanks again!

 On Mon, Apr 6, 2009 at 11:11 AM, Paul pnmorri...@gmail.com wrote:

  ive spent all day trying to get this to work.
  are u sure it has been tested using v 1.2.6

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: dont waste ur time with this it dont work

2009-04-06 Thread Michael Lawson


Of course! a parallel universe! why didn't I thin of that?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Eric Garside gars...@gmail.com 
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   04/06/2009 12:48 PM  
   
  Subject:[jQuery] Re: dont waste ur time with this it dont work   
   






Mike, the problem there isn't with jQuery, it's with Math. For some
reason, the original developers felt x/0 throws a rather nasty
exception. Have you tried porting your code to a parallel universe and
running it there to see if it's still tearing spacetime?

On Apr 6, 11:51 am, Michael Lawson mjlaw...@us.ibm.com wrote:
 I seem to be having the same problem with jQuery

 Every time I do this alert($('#test').text()); and test contains the
answer
 from 1 / 0   the whole fabric of the universe seems to come apart.

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-828-355-5544
 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:       Eric Garside gars...@gmail.com


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


   Date:       04/06/2009 11:48 AM


   Subject:    [jQuery] Re: dont waste ur time with this it dont work


 Do you have a test page you can show? jQuery does, indeed, work. And
 well at that. We can help you fix your problems, but please don't come
 onto the list and post inflammatory nonsense. :)

 On Apr 6, 11:19 am, brian bally.z...@gmail.com wrote:

  Wow, thanks for the tip! I'm sure all of the other tens of thousands
  of people using jQuery will be relieved to know that there's *just no
  point* in going on with it any longer. You've potentially saved each
  of us from years of heartache and despair.

  Thanks again!

  On Mon, Apr 6, 2009 at 11:11 AM, Paul pnmorri...@gmail.com wrote:

   ive spent all day trying to get this to work.
   are u sure it has been tested using v 1.2.6



  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Trying to understand how to use global variables...

2009-04-06 Thread Michael Lawson
Hi Rick,

A global variable is available throughout a single instance of the script.
For example, If I have a global variable called foo, I can access it in any
function within the same script.  However, If my application changes pages,
I will lose the values in those globals, or even the definitions
themselves.  Does that help your understanding any?

Session variables are a better example of static, or class variables than
globals.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Rick Faircloth r...@whitestonemedia.com   
  

  
  To: jquery-en@googlegroups.com  
  

  
  Date:   04/06/2009 01:17 PM   
  

  
  Subject:[jQuery] Trying to understand how to use global variables...  
  

  





I’ve read up on the subject, but my application is showing that
my understanding has gaps.

If I have an ajax function that in the returned “response” exists
a value called “response.STORY_ID” and I used the statement in the
success section of the ajax function, gNewStoryID = response.STORY_ID,
and then alert(gNewStoryID), I do get the property ID returned in the
alert.

Now I want to use that variable, gNewStoryID, in other functions.  My
understanding
was that, by using gNewStoryID = response.STORY_ID, I was creating a global
variable
that could then be used in any function.

However, when I try to use the gNewStoryID in another function, for
instance,
$(‘#newStoryIDSpan’).empty().append(gNewStoryID);
I get an error stating “gNewstoryID is not defined”.

Where is my understanding in complete?  I was think that a global
javascript variable
would be available through the application as is a ColdFusion session
variable.

Thanks for helping me understand!

Rick
---
It has been my experience that most bad government is the result of too
much government. - Thomas Jefferson

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Trying to understand how to use global variables...

2009-04-06 Thread Michael Lawson
You're very welcome Rick,


Can you provide some code or links to some examples of what you're seeing?
As mentioned in another post, that would greatly help in diagnosing your
problem.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Rick Faircloth r...@whitestonemedia.com   
  

  
  To: jquery-en@googlegroups.com  
  

  
  Date:   04/06/2009 01:43 PM   
  

  
  Subject:[jQuery] Re: Trying to understand how to use global variables...  
  

  





Hi, Michael and thanks for the reply…

That helps some, but something I realized after I posted confuses me
even more.

I noticed the global variable I set, gNewStoryID, did show up when I tried
to used it in another function on the same page, *even while throwing the
error at the same time!*

Why would the gNewStoryID variable show up in a different function
that uses the statement “$(‘#newStoryTitleID’).empty().append
(gNewStoryID);”
and display with the correct value on-screen, then immediately throw an
error
that “gNewStoryID is not defined” ???

I was passing the variable around between functions using function xyz
(response),
but thought I’d make it simpler by creating global variables.  But the
outcome is confusing.

Concerning the static or class variables…do those function more like
session variables that.
are available throughout all js code on a page, or even throughout an
application?

Thanks for the tutoring!

Rick

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Michael Lawson
Sent: Monday, April 06, 2009 1:23 PM
To: jquery-en@googlegroups.com
Cc: jquery-en@googlegroups.com
Subject: [jQuery] Re: Trying to understand how to use global variables...



Hi Rick,

A global variable is available throughout a single instance of the script.
For example, If I have a global variable called foo, I can access it in any
function within the same script. However, If my application changes pages,
I will lose the values in those globals, or even the definitions
themselves. Does that help your understanding any?

Session variables are a better example of static, or class variables than
globals.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone: 1-828-355-5544
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 Rick Faircloth ---04/06/2009 01:17:24 PM---I’ve
read up on the subject, but my application is showRick Faircloth
---04/06/2009 01:17:24 PM---I’ve read up on the subject, but my application
is showing that my understanding has gaps.


   
   
 From:Rick Faircloth r...@whitestonemedia.com  
   
   
 To:  jquery-en@googlegroups.com 
   
   
 Date:04/06/2009 01:17 PM  
   
   
 Subject: [jQuery] Trying to understand how to use global  
  variables

[jQuery] Re: Trying to understand how to use global variables...

2009-04-06 Thread Michael Lawson
The function should occur sequentially, but that execution of your success
function might not.  AJAX is by default asynchronous so it will not affect
the rest of the page loading.  That also means that if you try to access a
variable that is only set by that success function before AJAX returns, you
might get that error.  Do you have an example of where else in your code
that variable is being accessed?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Rick Faircloth r...@whitestonemedia.com   
  

  
  To: jquery-en@googlegroups.com  
  

  
  Date:   04/06/2009 02:08 PM   
  

  
  Subject:[jQuery] Re: Trying to understand how to use global variables...  
  

  





This is part of a content management system for a client, so it’s not.
publicly accessible…if it appears I can’t solve the problem otherwise,
I’ll set up a test case based on the code that is publicly accessible.

However, here’s the relevant code from the app that shows what I’m
doing:  (and just so you’re not confused, I’ve swapped from using
the gNewStoryID variable to gNewStoryTITLE variable, but the usage
is exactly the same)

From the AJAX success section in which the global variable is set:

success:  function(response) {
if (response.MESSAGE == ‘Success’ )
{gNewStoryTITLE = response.TITLE;
  alert(gNewStoryTITLE);--- variable shows
up here with correct value
  fnCreateStorySuccessResponse();}

So you can see that the fn in which I’m going to use the new global
variable
is being called *after* the global var is established, in
fnCreateStorySuccessResponse().

fnCreateStorySuccessResponse consists of this code:
(it has more lines than below, but they are irrelevant and don’t involve
the variable)

$(‘#newStoryTitleSPAN’).empty().append(gNewStoryTITLE);

The gNewStoryTitle variable shows up in the specified Span correctly, but
then firebug
immediately throws and “gNewStoryTITLE is not defined” error.

Actually, from observing the sequence of events on the screen, even after
removing the
alert(gNewStoryTITLE); from the sequence, it almost appears as if the
sequence of events is firing out of sequence that is specified above.

The error message is actually showing up in firebug before the
gNewStoryTitle value
gets displayed on-screen in the span, which happens when
fnCreateStorySuccessResponse()
is triggered.

It’s as if fnCreateStorySuccessResponse() tries to use the variable before
it is set, then
after the error message is displayed, the variable is finally set and
properly displayed on-screen.  But that doesn’t make sense.

Shouldn’t the order of statements in the success: section of the ajax
fuction occur
sequentially?

Rick

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Michael Geary
Sent: Monday, April 06, 2009 1:37 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Trying to understand how to use global variables...

It would be easier if you had a link to a test page or at least some code
to look at. Otherwise we can only guess what might be wrong.

Here is one possibility.

Note what you said here:

 ...by using gNewStoryID = response.STORY_ID, I was creating a
 global variable that could then be used in any function.

(emphasis added)

You are exactly right: First you create the global variable with the
assignment statement, and then you can use it.

The question is, when is then?

The global variable is created when your callback function executes.

These other functions where you're trying to use it: Are they being called
before the callback function executes, or after? If you put alert() or
console.log() calls wherever you set or reference your global

[jQuery] Re: namespaces XML parsing

2009-03-18 Thread Michael Lawson

We were running into a similar problem with an AJAX application and here is
what we did to get around namespaces:

jQuery(entries).find([...@nodename=namespace:elementName]);

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   Martijn Houtman martijn.hout...@gmail.com  
   
  To: jquery-en@googlegroups.com   
   
  Date:   03/18/2009 01:06 PM  
   
  Subject:[jQuery] Re: namespaces XML parsing  
   






On Mar 18, 2009, at 5:52 PM, David wrote:

  For example, in FF, if a look for a tag, I have to write ns
  \\:tag ,.
  but if a look for an attribute I have to write ns:attribute. In
  google Chrome (WebKit), I have to write tag or attribute and it
  works.

  Has this problem been solved, or is there any plugin to deal with
  it?.
  It is veri tedious to code a parsing case for each browser (IE, FF,
  Webkit, etc..)



AFAIK, this problem has not been solved yet, jQuery does not handle
namespaces at all. The ns\\:field is more of a hack and does not work in IE
when parsing to XML (through the AJAX option dataType: xml).

What you might want to try is removing the dataType option (so that it is
passed as a string), then replace the : character with something else (e.g.
a dash). This way the XML parser will leave the namespaces alone.

Please note that I have not tried this, it's based on the things I have
read about it.

Regards,
--
Martijn.

inline: graycol.gifinline: ecblank.gif

[jQuery] AUTO: Michael Lawson is out of the office (returning 03/16/2009)

2009-03-06 Thread Michael Lawson


I am out of the office until 03/16/2009.

I am out getting married to the most intelligent, beautiful, wonderful, and
understanding girl I've ever met in my entire life.

If you need assitance please contact Leena Paulose or Laura Ashley Bridges.


Note: This is an automated response to your message  [jQuery] Re: IE7
removes whitespace from HTML sent on 3/6/09 10:33:54.

This is the only notification you will receive while this person is away.

[jQuery] Re: Auto update PHP session variables using Ajax/JQuery

2009-03-05 Thread Michael Lawson
Make a post request to a php page that changes the value.  The session
variable gets set to whatever the value of the parameter in the post array
is set to.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   themba themba.ntl...@gmail.com  
   

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

   
  Date:   03/05/2009 02:45 PM   
   

   
  Subject:[jQuery] Auto update PHP session variables using Ajax/JQuery  
   

   






Hi Guys,

I need help with updating a Session Variable using Javascript, my goal
is to have a text filed that will accept numeric input, then onblur or
onChange, the PHP session variable must be updated with the new
numeric value, how can I do this?

Thank you in advance.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Access to restricted error

2009-03-05 Thread Michael Lawson

Your URL's look ok, so I don't think its a same origin policy issue.  Maybe
its the permissions on the php file?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
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:   sonicsteps jor...@mediafuel.net
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   03/05/2009 02:45 PM  
   
  Subject:[jQuery] Access to restricted error  
   






I'm get a Access to restricted URI denied code: 1012 --- try
{ parent = parent.parentNode; } after I do an $.ajax call to send
form data to an email processor (PHP).  It's located in the exact same
folder, so I'm unsure to why I'm receiving this error.  The link for
this file is http://www.mediafuel.net/test/colts/ajax2/index2.html.
You click on Send to Friend, then if you fill out the form information
and click the button to send the information. The php file is at
http://www.mediafuel.net/test/colts/ajax2/stfcolts.php

Thanks.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: How to use the GET method to display data without refreshing the page

2009-02-24 Thread Michael Lawson

You could use the jQuery AJAX functions to make a call to a php page that
processes your request and then sends back your display data in the
response.

for example $.get(test.php, { show: productid } );

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   ¥oosu£ mayoo...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/24/2009 06:31 AM  
   
  Subject:[jQuery] How to use the GET method  to display data without 
refreshing the  page
   






Hi jQuery Geeks,

Recently i saw a nice example in Prototype to use the  get  display
data without refreshing the page . how to do that in jQuery, i'm
almost tired of doing it, see the below php code this how my php code
goes, so i guess one of you guys can help me.


a href=catalog.php?show=productidShow product as per the id hi/a

?php
  switch($_GET['show']){
  case 'productid':
   echo 'show the product as per the product id';
   break;


 default:
  echo 'Show list of product';
  break;
}
?



inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Hello world example - works in IE6; fails in firefox 3

2009-02-23 Thread Michael Lawson

What does the error console say?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   Adelle Hartley ade...@akemi.com.au 
   
  To: jquery-en@googlegroups.com   
   
  Date:   02/23/2009 09:45 AM  
   
  Subject:[jQuery] Hello world example - works in IE6; fails in firefox 3
   






Hi all,

Any idea why this works in ie6 but not firefox?

html
head
script type=text/javascript src=jquery.js/script
script type=text/javascript
$(document).ready(function()
{
   $(a).click(function()
   {
 alert(Hello world!);
   });
});
/script
/head
body
 a href=#Link/a
/body
/html

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Auto-Replacing HTML-entities

2009-02-18 Thread Michael Lawson

Since you're saving it with php why not just use the php functions that do
the same?

http://us3.php.net/htmlentities

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   Frederik Ring frederik.r...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/18/2009 08:14 AM  
   
  Subject:[jQuery] Auto-Replacing HTML-entities
   






Hello!

I have setup a simple editor site for a image gallery where the user
can visually edit (sort entries, add entries, edit captions) the HTML
of a ul. When finished the content gets saved via PHP. Is there a
simple way to have special characters in image captions converted into
HTML entities?

The way I read the then transmitted ul is:

var html = $('#container').html();
$('#textfield').text('html');

The content of the #textfield is then written into a new HTML file. Is
there a jQuery-way to do it or would I have to use a RegExp?

Thanks!

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Auto-Replacing HTML-entities

2009-02-18 Thread Michael Lawson

Great!

And if you need any PHP help, feel free to email me directly!  I know it
better than I do javascript ;)

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   Frederik Ring frederik.r...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/18/2009 08:28 AM  
   
  Subject:[jQuery] Re: Auto-Replacing HTML-entities
   






Perfect! I'm not exactly good at PHP, so I didn't know about that, but
it seems to be exactly what I am looking for! Thanks!

On Feb 18, 2:19 pm, Michael Lawson mjlaw...@us.ibm.com wrote:
 Since you're saving it with php why not just use the php functions that
do
 the same?

 http://us3.php.net/htmlentities

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-919-517-1568 Tieline:  255-1568
 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:       Frederik Ring frederik.r...@gmail.com


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


   Date:       02/18/2009 08:14 AM


   Subject:    [jQuery] Auto-Replacing HTML-entities


 Hello!

 I have setup a simple editor site for a image gallery where the user
 can visually edit (sort entries, add entries, edit captions) the HTML
 of a ul. When finished the content gets saved via PHP. Is there a
 simple way to have special characters in image captions converted into
 HTML entities?

 The way I read the then transmitted ul is:

 var html = $('#container').html();
 $('#textfield').text('html');

 The content of the #textfield is then written into a new HTML file. Is
 there a jQuery-way to do it or would I have to use a RegExp?

 Thanks!

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: A question for John Resig

2009-02-18 Thread Michael Lawson

I don't know about Javascript, but a good deal depends on how that
functionality is implemented, and what language you're in.  They're not
always the same thing, and shouldn't always be used like they are the same
thing.  Again though, they may be in Javascript, i'm not saying they're
not. (I'm not really a javascript expert)

In the Java language, for example, you have the instanceof operator.  This
is fine if you only need to check the type of something only a few times,
but if it's a several times per unit time kinda thing, you start to run
into efficiency problems.  So using methods that make use of more efficient
algorithms become the better way to go.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   Aleem B ale...@gmail.com   
   
  To: jquery-en@googlegroups.com   
   
  Date:   02/18/2009 08:36 AM  
   
  Subject:[jQuery] Re: A question for John Resig   
   






 I know they are there and I've used added functions to save on the
 code size, which makes a big difference when used a lot.

It doesn't make any difference save for a few characters.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Validation Plugin: How to submit invalid form via JavaScript

2009-02-18 Thread Michael Lawson
If you're trying to submit the form even if it doesn't validate...then why
validate in the first place? i'm confused
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   shmolch obuluchevsk...@gmail.com
 

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

 
  Date:   02/18/2009 09:26 AM   
 

 
  Subject:[jQuery] Validation Plugin: How to submit invalid form via 
JavaScript  

 






Hi,

I want to validate form and submit it via JavaScript even if it isn't
valid, and don't do it if the submit button is pressed

$(document).ready(function() {
  validator = $(#editUserForm).validate(
{
focusInvalid: false,
ignoreTitle: true,
onkeyup: false
});
  ...
});

And then I'm trying to submit form after onclick on some control

$(#someControl).click(function() {
   // do something
$(#filterForm).submit();
});

Unfortunately, form doesn't via JS submit if validation failed

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: blockUI over flash content

2009-02-17 Thread Michael Lawson

There is a param to add to the object called wmode, which needs to be set
to transparent, as well as to the embed tag as an attribute

param name=wmode value=transparent/
embed    wmode=transparent/

Try those and see if it helps.  It should be noted that they aren't
supported in all browsers, but I've tested these in all the major ones and
it works fine.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   tw.gene...@gmail.com tw.gene...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/17/2009 08:17 AM  
   
  Subject:[jQuery] blockUI over flash content  
   






Hi,
is it possible to execute blockUI over flash content? Right now,
default call $.blockUI() makes that overlay surface appera over html
entries, but under flash content.

I've been testing few basez paramteres - no success.

Is it possible, that the only one solution t to hide flash content
manually before executing $.blockUI() ?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: blockUI over flash content

2009-02-17 Thread Michael Lawson

Sure np

I'm glad it worked :)
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   tw.gene...@gmail.com tw.gene...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/17/2009 09:22 AM  
   
  Subject:[jQuery] Re: blockUI over flash content  
   







 param name=wmode value=transparent/
 embed    wmode=transparent/

that's it - thanks a lot.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: jQuery with mod_rewrite

2009-02-16 Thread Michael Lawson

your question might be better directed at a mod_rewrite group but I'll do
my best here.

And a few suggestions right off the bat.  I would use a framework like
codeigniter if you're going to work with URI's like that.  It already has
built in functionality to work with those sorts of things.  another
suggestion would be to use === or strcmp() to enforce some sort of type
checking on your variable to rule out any inconsistencies there.

Can you post your jQuery code as well so that we can check for any possible
bugs there?

Also, here is a good tutorial on mod_rewrite that might help:

http://www.sitepoint.com/article/guide-url-rewriting/

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   startail ander...@sonic2000.org
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/16/2009 09:12 AM  
   
  Subject:[jQuery] jQuery with mod_rewrite 
   






Hi,

I'm having problems with jQuery and mod_rewrite. I read someone here
before that had problems with it but I couldn't figure out what was
wrong with my code.

What I do is this,

RewriteBase /
RewriteRule ^([^.]+)$ /index.php [L]

In index.php I then split all / to sepperate variables.
For example,

/member/edit will tell index.php to include the page member.php, that
I do with include member.php, and that variable $_URI['type'] is
edit.

So now we have  $_URI['page'] = member.php, $_URI['type'] = edit

In member.php I check what type of function the page should load, here
we want to do edit. So I hve this in my code,

if($_URI['type'] == edit)
{
  // Do this
}

But my jQuery code does not work with this. What can I do to make my
jQuery code to work?
If I change everything and load the page with just member.php?
type=edit my code works perfectly, it's my mod_rewrite code that seems
to be screwing things up.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: class weirdness in loaded XML?!?

2009-02-16 Thread Michael Lawson

You should wrap your string in '?
so your code would be
$('span[class*='mycategory'],xml).length

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   ml1 tsummer...@gmail.com   
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/16/2009 11:08 AM  
   
  Subject:[jQuery] class weirdness in loaded XML?!?  
   






I have something very strange going on trying to create a wrapped set
of elements from an xml file loaded via jquery's xmlhttprequest.   The
xml has a number of entries with class attributes that have multiple
values, ie span class=mycategory mychoice ../span

When I use this selector:

   $('span[class*=mycategory],xml).length

jquery returns zero.  Weirdly if I do exactly the same thing but use a
different attribute name from class in the xml and the query, it
works perfectly.

If I use this method I get the expected result:

   $('span').attr('class')

It returns mycategory mychoice

Is there something special about the class attribute in xml that is
causing this?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: class weirdness in loaded XML?!?

2009-02-16 Thread Michael Lawson

I didn't notice the quotation discrepancy, good catch!  Also, I know
they're not required, but it's good practice IMHO.
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   Karl Swedberg k...@englishrules.com
   
  To: jquery-en@googlegroups.com   
   
  Date:   02/16/2009 11:31 AM  
   
  Subject:[jQuery] Re: class weirdness in loaded XML?!?  
   





The string does not need to be wrapped in single quotation marks. Also, why
does the selector begin with a single quotation mark and end with a double?
Are these just typos in the emails?

Try this:

$('span[class*=mycategory]',xml).length

Just one set of single quotation marks, and the closing mark is to the
right of the closing bracket.

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Feb 16, 2009, at 11:15 AM, Michael Lawson wrote:



  You should wrap your string in '
  so your code would be
  $('span[class*='mycategory'],xml).length

  cheers

  Michael Lawson
  Content Tools Developer, Global Solutions, ibm.com
  Phone: 1-919-517-1568 Tieline: 255-1568
  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.'

  graycol.gifml1 ---02/16/2009 11:08:46 AM---I have something very
  strange going on trying to create a wrapped set
   
 ecblank.gifecblank.gif
 From:ml1 ?tsummer...@gmail.com  
   
 ecblank.gifecblank.gif
 To:  jQuery (English) jquery-en@googlegroups.com  
   
 ecblank.gifecblank.gif
 Date:02/16/2009 11:08 AM  
   
 ecblank.gifecblank.gif
 Subject: [jQuery] class weirdness in loaded XML?!?  
   








  I have something very strange going on trying to create a wrapped set
  of elements from an xml file loaded via jquery's xmlhttprequest.
  The
  xml has a number of entries with class attributes that have multiple
  values, ie span class=mycategory mychoice ../span

  When I use this selector:

$('span[class*=mycategory],xml).length

  jquery returns zero.  Weirdly if I do exactly the same thing but use
  a
  different attribute name from class in the xml and the query, it
  works perfectly.

  If I use this method I get the expected result:

$('span').attr('class')

  It returns mycategory mychoice

  Is there something special about the class attribute in xml that is
  causing this?



inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Pass form as argument into its submit event

2009-02-16 Thread Michael Lawson

Is there a reason you can just use the onsubmit event?

form id=blah action=blah onsubmit=canSubmit(this)

something like that

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   stretch clive.wick...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/16/2009 02:15 PM  
   
  Subject:[jQuery] Pass form as argument into its submit event 
   






What I'm trying to do should be very simple. I would like to assign a
submit handler to a form and pass that form into the handler (I then
wish to interrogate the id of the form argument and perform
appropriate validation according to which form it is). The following
code doesn't achieve the desired result. Inside the canSubmit
function, according to firebug, the form argument seems to be of type
form#[object HTMLInputElement] and form.id is undefined.

// in domready event handler
$('form').submit(function() { return canSubmit(this); });
...
function canSubmit(form) {
  switch(form.id) {
case enhancementForm:
...
case newitemForm:
...
  }
  return true;
}

Any pointers would be much appreciated.

Clive

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: cant get jquery to work

2009-02-12 Thread Michael Lawson

What are you trying to do exactly, then maybe I can help?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   DHall daquan.h...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/12/2009 03:58 PM  
   
  Subject:[jQuery] cant get jquery to work 
   






i cant even get the example tutorialson the jquery website to work
when i try to use it can somebody help?

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: using :has with selector

2009-02-11 Thread Michael Lawson

If mytext is a string, make sure it's quoted as said before.  Your jquery
selector looks ok (I did something similar recently and it works great)

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   SteelRing steelr...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/10/2009 05:51 PM  
   
  Subject:[jQuery] Re: using :has with selector
   






This is going to select the td, whereas I need to select the tr.

On Feb 10, 4:41 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 TD is a TR children so use the CSS descendant selector tr td.

 $(#tableid tbody tr td.someclass:contains('mytext'))).dosomething();

 PS: mytext is a string and should be quoted.

 Maurício

 -Mensagem Original-
 De: SteelRing steelr...@gmail.com
 Para: jQuery (English) jquery-en@googlegroups.com
 Enviada em: terça-feira, 10 de fevereiro de 2009 19:57
 Assunto: [jQuery] using :has with selector



  Anyone can think of a reason why this shouldn't work? I'm trying to
  select the Row (tr) where the cell of td with class someclass
  contains mytext. Since I want to work on the row (tr) itself, I need
  to use :has because I don't need to select the td itself. Am I wrong
  or am I wrong?

  $(#tableid tbody tr:has(td.someclass:contains(mytext))).dosomething
  ();

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Intercept links from flash

2009-02-11 Thread Michael Lawson

You could also use the ExternalInterface package.  There is a method in
there called call() where you just pass in the name of the javascript
function, followed by any pramaters.  Easiest thing to do here would have
some setter functions for the vars you want to set so

function setLink(link)
{
  var myLink = link;
}


on flash

import the package;

ExternalInterface.call('setLink','www.google.com');


Hope that helps a little!

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   Liam Potter radioactiv...@gmail.com
   
  To: jquery-en@googlegroups.com   
   
  Date:   02/11/2009 05:44 AM  
   
  Subject:[jQuery] Re: Intercept links from flash  
   






no examples, but something like this should work.

*flash:*
on(release) {
getUrl(javascript:var flashLink = 'http://google.com')
}

*jQuery:*
$(function () {
var jsLink = flashLink;
});

then you can do what you want to the link in jQuery, as it is held as a
string


adexcube wrote:
 Thanks for your response.
 have you got any example or link to check?

 Thanks

 On 11 Feb, 09:55, Liam Potter radioactiv...@gmail.com wrote:

 in the flash rather then using getUrl, you could just send the url to a
 javascript var.

 adexcube wrote:

 Hi, I've got a flash object who loads pdf's and there's a lot of links
 on the pdf. Is there a way to catch or intercept all links with
 jquery? I want to stop the link redirection, I just want the link
 itself.
 I tried livequery with no result. :(

 Thanks


inline: graycol.gifinline: ecblank.gif

[jQuery] Re: Question about jQuery.load()

2009-02-11 Thread Michael Lawson

There is a jQuery function that works specifically on javascript files:
jQuery.getScript( url, callback )
is that what you're looking for?)
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   M.A.R.C.O yin_gr...@yahoo.com.hk 
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/11/2009 09:26 AM  
   
  Subject:[jQuery] Question about jQuery.load()
   






can anybody teach me how i can use jQuery.load() to attach javascript
files.

Thanks for your times.

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: input file and val()

2009-02-10 Thread Michael Lawson

I totally missed the fact it was a file and not a text type, my bad _-_
cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   ezod pured...@gmail.com
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/10/2009 06:52 AM  
   
  Subject:[jQuery] Re: input file and val()
   






Great idea Adrian, but you can´t change the type property ;)

Well, you could also remove the element from the DOM and then add it
again...



On 10 Feb., 11:48, Adrian Lynch adely...@googlemail.com wrote:
 Maybe recreate the input and replace the existing one?

 Or turn it into text type, clear the value then back to file?

 Just guessing mind!

 Adrian

 On Feb 10, 8:45 am, ezod pured...@gmail.com wrote:

  Hi Michael,

  unfortunately that doesn´t work either (except FF ;))

  On 9 Feb., 17:44, Michael Lawson mjlaw...@us.ibm.com wrote:

   Have you tried using the attr() function?
   $(#input1).attr(value,);)

   cheers

   Michael Lawson
   Content Tools Developer, Global Solutions, ibm.com
   Phone:  1-919-517-1568 Tieline:  255-1568
   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:       ezod pured...@gmail.com


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


     Date:       02/09/2009 11:40 AM


     Subject:    [jQuery] input file and val()


   Hi there,

   I tried to reset a file input element by using val().

   html
                head
                            titleFooBar/title
                /head
                script src=jquery.js/script
                script
                            $(document).ready(function() {

                                        $(#resetMe).click(function ()
{
                                                    $(#input1).val
('');
                                        });
                            });
                /script
                body

                form name=foo
                            input id=input1 type=file
name=foobar
                            brbr
                            input id=resetMe type=button
   value=ResetMe!
                /form

                /body
   /html

   This works fine for FF, but IE doesn´t (re)set the value.

   Any hints?

   TIA
   ezod

    graycol.gif
1 KBAnzeigenHerunterladen

    ecblank.gif
1 KBAnzeigenHerunterladen



inline: graycol.gifinline: ecblank.gif

[jQuery] Re: load page which includes swf and js functions

2009-02-10 Thread Michael Lawson

Are the functions actually being called?  Which function are you trying to
use?

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   adexcube alfonsoenci...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/10/2009 10:50 AM  
   
  Subject:[jQuery] load page which includes swf and js functions   
   






Hi, I'm trying to load a remote page using load function

$('#middle').load(test.php);

that page (test.php) has javascript functions that embed an swf using
swf plugin.
The problem is that it only loads html content and doesn't execute any
javascript function.

Any ideas?

Thanks

inline: graycol.gifinline: ecblank.gif

[jQuery] Re: load page which includes swf and js functions

2009-02-10 Thread Michael Lawson

I do have somewhat limited experience with this but the documentation says

Load HTML from a remote file and inject it into the DOM.

in reference to the load function, so I would think it's working as
intended in only loading the html, not doing anything with it.

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-919-517-1568 Tieline:  255-1568
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:   adexcube alfonsoenci...@gmail.com  
   
  To: jQuery (English) jquery-en@googlegroups.com  
   
  Date:   02/10/2009 11:12 AM  
   
  Subject:[jQuery] Re: load page which includes swf and js functions
   






Well a simple test is to put an onload function in the body, it just
simple doesn't work :(

test.php
...
body onload=alert('loaded')
...

On 10 Feb, 16:01, Michael Lawson mjlaw...@us.ibm.com wrote:
 Are the functions actually being called?  Which function are you trying
to
 use?

 cheers

 Michael Lawson
 Content Tools Developer, Global Solutions, ibm.com
 Phone:  1-919-517-1568 Tieline:  255-1568
 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:       adexcube alfonsoenci...@gmail.com


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


   Date:       02/10/2009 10:50 AM


   Subject:    [jQuery] load page which includes swf and js functions


 Hi, I'm trying to load a remote page using load function

 $('#middle').load(test.php);

 that page (test.php) has javascript functions that embed an swf using
 swf plugin.
 The problem is that it only loads html content and doesn't execute any
 javascript function.

 Any ideas?

 Thanks

  graycol.gif
  1KViewDownload

  ecblank.gif
  1KViewDownload

inline: graycol.gifinline: ecblank.gif

  1   2   >