[jQuery] Re: Realtime ajax response

2009-08-25 Thread Josip Lazic

On 24 kol, 15:22, Michael Lawson mjlaw...@us.ibm.com wrote:
 http://sourceforge.net/projects/easyshoutbox/files/easyshoutbox/Easy_...

I don't think this is solution for my problem.

After form is submited server must copyresize some pictures.
Sometimes it'll last several seconds, but sometimes much longer, so I
want user to know that script is not dead.

If I post response to iframe I can use something like this in post.php

ob_start();
foreach ($foo as $bar) {
resizeImage();
echo Resizing image  $bar;
ob_flush;
flush();
}

This way user will get response everytime image get resized. Can I
achive this with ajax and div?


[jQuery] Re: jQuery lightbox

2009-08-25 Thread Conrad Cheng
Did you declare the path correctly for jquery.js and lightbox.js?

On Tue, Aug 25, 2009 at 1:32 PM, Ram... c.ramanjaney...@gmail.com wrote:


 Hi,

 Lightbox is not showing on prod site, but its working  on local box
 and internet.

 Any idea what may be the problem?

 Thank you,
 Ramanjaneyulu


[jQuery] Re: Superfish menu help!

2009-08-25 Thread Steven Yang
hi
sorry, please correct me if i am wrong or if i over looked at something

i didnt see anything superfish includes or event jquery includes
but instead i see mootools

is the link a demo to your problem?


[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-25 Thread Nick Fitzsimons

2009/8/24 Alexander Cabezas alexcabez...@gmail.com:
 When i try to make an ajax request like:
 $.get( http:localhost:3001/account/create.json, SignUp.onComplete );

 I get the following error in the firebug ( Net ):
 OPTIONS - 405 Method Not Allowed

 Is it related to cross-domain request?.


Probably not, assuming you aren't making a cross-domain request. That
error is the server tellling you that you aren't allowed to use GET to
access the resource at that URL [1]. Looking at it, it probably only
allows POST.

[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.6

Regards,

Nick.
-- 
Nick Fitzsimons
http://www.nickfitz.co.uk/


[jQuery] IE as native droptarget

2009-08-25 Thread Mika Tuupola


You used to be able to use textarea as native droptarget even with IE.  
You could drag a link over textarea and the URL appeared when  
dropping. It seems during some point in last two months there has been  
an update to IE which prohibits this. Textarea is not a valid drop   
target for links anymore. When you try to drag an link to all you get  
is the denied mouse cursor (circle which line through it).


Anyone know a workaround for this?

--
Mika Tuupola
http://www.appelsiini.net/



[jQuery] Re: Problem with js redirect when using getJSON

2009-08-25 Thread Grimori

Wonder if anyone tried to replicate this problem...
It's pretty simple to and a great deal of bug if I'm not missing
something.

Thanks.

On Aug 17, 6:14 pm, Grimori mihaigrig...@gmail.com wrote:
 Yes, I have tried that - nothing changes though...

 I'd really appreciate any other ideas.. Thanks!

 On Aug 13, 2:40 am, James james.gp@gmail.com wrote:

  Have you tried:
  window.location = 'http://site2.example.com/';

  On Aug 12, 1:36 pm, Grimori mihaigrig...@gmail.com wrote:

   The problem only exists in firefox. Has anyone had this problem
   before?

   Thanks.

   On Aug 12, 9:14 pm, Grimori mihaigrig...@gmail.com wrote:

Hi everyone,

The problem I'm facing is as follows. I'm using a JSON call to check
some data before doing a JS redirect to a different page. The redirect
works but it's impossible to get back to the initial page using the
browser's back button. The initial location is not being stored in the
browser's history.

This is the script simplified. If placed onhttp://site1.example.com/
when it's executed it redirects tohttp://site2.example.com/but
there's no way to go back tohttp://site1.example.com/usingthe
browser's back button.

code
$(document).ready(function(){
    $('#click').click(function(){
        $.getJSON('index.php?jsoncallback=?', function(msg){
            location.href='http://site2.example.com/';
        });
    });})

/code

Any help is appreciated.


[jQuery] Chaining jQuery AJAX

2009-08-25 Thread pascal.nauj...@googlemail.com

Hi Group,

is there a possibility to chain AJAX Requests?

By now i have 5 AJAX Functions where one calls the next (Button Click -
 1 - 2 - 3 - 4 - 5 - Finish)



My main problem is that i have to wait about 10 seconds before the 3.
function calls the 4. When i use
sT1 = window.setTimeout(function(){ function_4() }, 1); in
function 3 my result gets mixed up. eg the dom manipulation of
function 1 is reverted (strange - i know).


I also tried the pause the Cookbook wait function (http://
docs.jquery.com/Cookbook/wait) but i can't get them to run with my
ajax statements. I tryed something like $.wait(10).ajax({url:
smtpCheck.php,  data: .


Thanks in advance
Pascal


[jQuery] Re: Problem with js redirect when using getJSON

2009-08-25 Thread Liam Potter


What about

window.location.href='http://site2.example.com/';



Grimori wrote:

Wonder if anyone tried to replicate this problem...
It's pretty simple to and a great deal of bug if I'm not missing
something.

Thanks.

On Aug 17, 6:14 pm, Grimori mihaigrig...@gmail.com wrote:
  

Yes, I have tried that - nothing changes though...

I'd really appreciate any other ideas.. Thanks!

On Aug 13, 2:40 am, James james.gp@gmail.com wrote:



Have you tried:
window.location = 'http://site2.example.com/';
  
On Aug 12, 1:36 pm, Grimori mihaigrig...@gmail.com wrote:
  

The problem only exists in firefox. Has anyone had this problem
before?

Thanks.

On Aug 12, 9:14 pm, Grimori mihaigrig...@gmail.com wrote:


Hi everyone,
  
The problem I'm facing is as follows. I'm using a JSON call to check

some data before doing a JS redirect to a different page. The redirect
works but it's impossible to get back to the initial page using the
browser's back button. The initial location is not being stored in the
browser's history.
  
This is the script simplified. If placed onhttp://site1.example.com/

when it's executed it redirects tohttp://site2.example.com/but
there's no way to go back tohttp://site1.example.com/usingthe
browser's back button.
  
code

$(document).ready(function(){
$('#click').click(function(){
$.getJSON('index.php?jsoncallback=?', function(msg){
location.href='http://site2.example.com/';
});
});})
  
/code
  
Any help is appreciated.
  




[jQuery] Re: Chaining jQuery AJAX

2009-08-25 Thread Liam Potter


A simple way of doing it would be to use the success callback of each 
request.


pascal.nauj...@googlemail.com wrote:

Hi Group,

is there a possibility to chain AJAX Requests?

By now i have 5 AJAX Functions where one calls the next (Button Click -
  

1 - 2 - 3 - 4 - 5 - Finish)





My main problem is that i have to wait about 10 seconds before the 3.
function calls the 4. When i use
sT1 = window.setTimeout(function(){ function_4() }, 1); in
function 3 my result gets mixed up. eg the dom manipulation of
function 1 is reverted (strange - i know).


I also tried the pause the Cookbook wait function (http://
docs.jquery.com/Cookbook/wait) but i can't get them to run with my
ajax statements. I tryed something like $.wait(10).ajax({url:
smtpCheck.php,  data: .


Thanks in advance
Pascal
  




[jQuery] Getting XML info problem

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



  

[jQuery] Re: Getting XML info problem

2009-08-25 Thread Dhruva Sagar
In your code, did you try and do an alert(xml) inside the success handler
function (xml) to see if its getting the right content?
Thanks  Regards,
Dhruva Sagar.


Pablo Picassohttp://www.brainyquote.com/quotes/authors/p/pablo_picasso.html
- Computers are useless. They can only give you answers.

On Tue, Aug 25, 2009 at 3:21 PM, ximo wallas igguan...@yahoo.com wrote:

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




[jQuery] AJAX and ampersand

2009-08-25 Thread Julijan Andjelic

Is there any was to prevent ampersand from splitting up the passed
data?

For example if my data looks like:


This is some textblah blah

If I pass it as data it will get split up at :

This is some text
blah blah

Any solutions?


[jQuery] AJAX and ampersand

2009-08-25 Thread Julijan Andjelic

Is there any way to prevent ampersand from splitting up the passed
data?

For example if my data looks like:

This is some textblah blah

If I pass it as data it will get split up at :

This is some text
blah blah

Any solutions?


[jQuery] Re: AJAX and ampersand

2009-08-25 Thread Dhruva Sagar
Perhaps you should use amp; instead of a plain .You can always replace it
back with  after you have got the data if you really need.

Thanks  Regards,
Dhruva Sagar.


Samuel Goldwynhttp://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html
- I'm willing to admit that I may not always be right, but I am never
wrong.

On Tue, Aug 25, 2009 at 3:42 PM, Julijan Andjelic 
julijan.andje...@gmail.com wrote:


 Is there any was to prevent ampersand from splitting up the passed
 data?

 For example if my data looks like:


 This is some textblah blah

 If I pass it as data it will get split up at :

 This is some text
 blah blah

 Any solutions?


[jQuery] Re: AJAX and ampersand

2009-08-25 Thread Liam Potter


You need to url encode it, or just replace it with %26

Julijan Andjelic wrote:

Is there any was to prevent ampersand from splitting up the passed
data?

For example if my data looks like:


This is some textblah blah

If I pass it as data it will get split up at :

This is some text
blah blah

Any solutions?
  




[jQuery] Re: AJAX and ampersand

2009-08-25 Thread Julijan Andjelic

It will again split up the data at  since amp; also contains the
ampersand...
In that case I would get:
This is some text
amp;blah blah

On Aug 25, 12:13 pm, Dhruva Sagar dhruva.sa...@gmail.com wrote:
 Perhaps you should use amp; instead of a plain .You can always replace it
 back with  after you have got the data if you really need.

 Thanks  Regards,
 Dhruva Sagar.

 Samuel 
 Goldwynhttp://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html
 - I'm willing to admit that I may not always be right, but I am never
 wrong.

 On Tue, Aug 25, 2009 at 3:42 PM, Julijan Andjelic 

 julijan.andje...@gmail.com wrote:

  Is there any was to prevent ampersand from splitting up the passed
  data?

  For example if my data looks like:

  This is some textblah blah

  If I pass it as data it will get split up at :

  This is some text
  blah blah

  Any solutions?


[jQuery] Re: AJAX and ampersand

2009-08-25 Thread Dhruva Sagar
Your right, its my mistake, I realized only after I saw Liam Potter's mail.You
need to url encode it just as he said or replace it with %26, again just as
Liam Potter said.

Thanks  Regards,
Dhruva Sagar.


Joan Crawfordhttp://www.brainyquote.com/quotes/authors/j/joan_crawford.html
- I, Joan Crawford, I believe in the dollar. Everything I earn, I
spend.

On Tue, Aug 25, 2009 at 3:47 PM, Julijan Andjelic 
julijan.andje...@gmail.com wrote:


 It will again split up the data at  since amp; also contains the
 ampersand...
 In that case I would get:
 This is some text
 amp;blah blah

 On Aug 25, 12:13 pm, Dhruva Sagar dhruva.sa...@gmail.com wrote:
  Perhaps you should use amp; instead of a plain .You can always replace
 it
  back with  after you have got the data if you really need.
 
  Thanks  Regards,
  Dhruva Sagar.
 
  Samuel Goldwyn
 http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html
  - I'm willing to admit that I may not always be right, but I am never
  wrong.
 
  On Tue, Aug 25, 2009 at 3:42 PM, Julijan Andjelic 
 
  julijan.andje...@gmail.com wrote:
 
   Is there any was to prevent ampersand from splitting up the passed
   data?
 
   For example if my data looks like:
 
   This is some textblah blah
 
   If I pass it as data it will get split up at :
 
   This is some text
   blah blah
 
   Any solutions?



[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-25 Thread Liam Byrne


Shouldn't it be

http://localhost ?

i.e. http[slash][slash]localhost

L

Alexander Cabezas wrote:

Hi.

When i try to make an ajax request like:
$.get( http:localhost:3001/account/create.json, SignUp.onComplete );

I get the following error in the firebug ( Net ):
OPTIONS - 405 Method Not Allowed

Is it related to cross-domain request?.



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.409 / Virus Database: 270.13.66/2325 - Release Date: 08/25/09 06:08:00


  




[jQuery] Re: Problem with Ajax Cross-Domain

2009-08-25 Thread Dhruva Sagar
LOL! I never saw that
Thanks  Regards,
Dhruva Sagar.


Ogden Nash http://www.brainyquote.com/quotes/authors/o/ogden_nash.html  -
The trouble with a kitten is that when it grows up, it's always a cat.

On Tue, Aug 25, 2009 at 3:51 PM, Liam Byrne l...@onsight.ie wrote:


 Shouldn't it be

 http://localhost ?

 i.e. http[slash][slash]localhost

 L

 Alexander Cabezas wrote:

 Hi.

 When i try to make an ajax request like:
 $.get( http:localhost:3001/account/create.json, SignUp.onComplete );

 I get the following error in the firebug ( Net ):
 OPTIONS - 405 Method Not Allowed

 Is it related to cross-domain request?.
 


 No virus found in this incoming message.
 Checked by AVG - www.avg.com Version: 8.5.409 / Virus Database:
 270.13.66/2325 - Release Date: 08/25/09 06:08:00







[jQuery] Re: Flash effect with show/hide

2009-08-25 Thread Liam Byrne


Use hoverIntent instead of hover - it's child-friendly in this regard

L

guidebook wrote:

Hello,

(Sorry for my english, it isn't my native language.)

I would want to show a div (the information about the song) when the
visitor hover on a cover art on a radio website but this div overlap
the cover art with an opacity of 0.7

You can see an example here: http://www.cestici.info/test.jpg

The problem is that when the information div appears, the mouse
pointer isn't on the cover art div anymore for the navigator so the
information div disappears, and so on... resulting in a flash effect.

How can I do this without the flash effect?

Thanks for your help :)



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.409 / Virus Database: 270.13.66/2325 - Release Date: 08/25/09 06:08:00


  




[jQuery] Re: Advice clone and live

2009-08-25 Thread Julien

On 25 août, 01:56, James james.gp@gmail.com wrote:
 clone(true) should do the trick. Though before there was a bug with
 this function where the events would not be cloned (in IE, I think). I
 don't know if that issues still exists, but try it out.
 Documentation:http://docs.jquery.com/Manipulation/clone#bool

Thanks, but it seems it does the trick only for event declared. For
instance if you try to clone an input with the autocomplete plugin
wich does not seem to use the event in the same place it doesnt work :

if(jQuery().autocomplete){
  $(.users).autocomplete('/contactSearch.html', {
  width: 300
  });
}
$(.addUser).click(function(){
  $(#usersTable tr:last).clone(true).appendTo(#usersTable);
});

Is there a way around this? We're very close to what should be done!


[jQuery] Re: Getting XML info problem

2009-08-25 Thread Peter Edwards


Your code suffers from asynchronousitis. You call the ajax request, but 
alert the total before the response can alter the variable. Try doing it 
in the success callback as the previous poster suggested and you will 
get the correct value:


 var total = 0;
 function readXML(section) {
  $.ajax({
 type: GET,
 url : xmldata/picslist.xml,
 dataType: xml,
 success: function(xml){
alert(xml.getElementsByTagName(pic).length); // alerts 4
total = xml.getElementsByTagName(pic).length; // sets total to 4
 }
  });
  alert(total); // alerts 0 - executed as soon as the ajax request is 
sent - before the response

 };


on 25/08/2009 10:51 ximo wallas said::

I find it really sad that jquery doesn't have a oficial forum out there...
My question is posted in this one, I can't post it here cause the HTML 
inside will blow the e-mail:

http://www.jqueryhelp.com/viewtopic.php?t=3616
Can somebody help me with this, I'm really stuck...




[jQuery] Re: Flash effect with show/hide

2009-08-25 Thread guidebook

Thanks for your help:)

I have another problem though. The event is only fired twice. You can
view the page here : http://www.best-radio.net/index.php
The caption must appear for five seconds when you hover a cover art
and then disappear. But it only works twice.

Anyone have an idea?

On Aug 25, 12:23 pm, Liam Byrne l...@onsight.ie wrote:
 Use hoverIntent instead of hover - it's child-friendly in this regard

 L

 guidebook wrote:
  Hello,

  (Sorry for my english, it isn't my native language.)

  I would want to show a div (the information about the song) when the
  visitor hover on a cover art on a radio website but this div overlap
  the cover art with an opacity of 0.7

  You can see an example here:http://www.cestici.info/test.jpg

  The problem is that when the information div appears, the mouse
  pointer isn't on the cover art div anymore for the navigator so the
  information div disappears, and so on... resulting in a flash effect.

  How can I do this without the flash effect?

  Thanks for your help :)
  

  No virus found in this incoming message.
  Checked by AVG -www.avg.com
  Version: 8.5.409 / Virus Database: 270.13.66/2325 - Release Date: 08/25/09 
  06:08:00


[jQuery] Re: App like hangman

2009-08-25 Thread Boris Trivic

Yeah, sure, it imposible to convert object to string, object has
methods and properties for that what I want.
Wheathever, thanks a lot Brett one more time, you saved me.

I finished a main part of project, there is still some little stufs to
fix and correct. You can take a look on next link, if you want:

http://caraudio-rs.info/nal_7/

On Aug 25, 12:17 am, Brett Ritter swift...@swiftone.org wrote:
 On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivictrivu...@gmail.com wrote:
  I can success print ui.draggable to console, but how to convert it to
  string?
  I need to write it into some element with .innerHTML and I will
  probably use it in for loop...

 I think you are trying the hard way.

 ui.draggable is not a string, but a jQuery element.  Use that as you see fit.

 For Hangman you're probably looking to copy either the text  (
 ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
 you need to clone the source you want ui.draggable.clone() (note that
 any events bound to the original are not bound to the clone unless you
 use live() )

 Trying to convert a jQuery element to a string doesn't make sense
 unless you say what string you want - the text, the html, the id,
 these are all different strings.

 --
 Brett Ritter / SwiftOne
 swift...@swiftone.org


[jQuery] Re: App like hangman

2009-08-25 Thread Boris Trivic

omg!
I just opened it in Opera (Linux) and there is some kind of bug or
what? Instead revert to original location, chars returns about
100-150px right... Can someone take a look and check if same problem
occurs?

Maybe I shoult report it to jQuery dev team?

On Aug 25, 7:00 pm, Boris Trivic trivu...@gmail.com wrote:
 Yeah, sure, it imposible to convert object to string, object has
 methods and properties for that what I want.
 Wheathever, thanks a lot Brett one more time, you saved me.

 I finished a main part of project, there is still some little stufs to
 fix and correct. You can take a look on next link, if you want:

 http://caraudio-rs.info/nal_7/

 On Aug 25, 12:17 am, Brett Ritter swift...@swiftone.org wrote:

  On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivictrivu...@gmail.com wrote:
   I can success print ui.draggable to console, but how to convert it to
   string?
   I need to write it into some element with .innerHTML and I will
   probably use it in for loop...

  I think you are trying the hard way.

  ui.draggable is not a string, but a jQuery element.  Use that as you see 
  fit.

  For Hangman you're probably looking to copy either the text  (
  ui.draggable.text() ) or the html itself ( ui.draggable.html() ).  If
  you need to clone the source you want ui.draggable.clone() (note that
  any events bound to the original are not bound to the clone unless you
  use live() )

  Trying to convert a jQuery element to a string doesn't make sense
  unless you say what string you want - the text, the html, the id,
  these are all different strings.

  --
  Brett Ritter / SwiftOne
  swift...@swiftone.org


[jQuery] [Validate]: Help with groups of checkboxes

2009-08-25 Thread Gordon

I've been struggling with this for a couple of days now.  I'm building
pages with tables containing checkboxes.  Each row of the table
represents a grouping of checkboxes,  The rows are generated in a PHP
loop and have the format:

trtdinput type=checkbox name=question[row_number]
[checkbox_number] //td/tr

So a small table with 3 rows and 3 checkboxes would go:

[1][1], [1][2], [1][3]
[2][1], [2][2], [2][3]
[3][1], [3][2], [3][3]

I need to be able to validate each row of checkboxes as a single
entity, ie no particular checkboxes have to be checked, but at least 1
checkbox on each row must be.  The minlength function says that it can
do a group of checkboxes but I can't figure out how to get this to
work.

Most of my rules are built inline, with metadata in the classes of the
inputs I want to validate.  I don't think that would be possible for
the checkboxes though.  I'm trying the following code instead:

$(function ()
{
var checkRows   = $('.checkRow');

$('.cmsSurvey:first').validate ({debug:true});
if (checkRows)
{
checkRows.each (function ()
{
$(':checkbox', this).rules ('add',
{
required: true,
minlength   : 1
});
});
}
});

Each tr in the table gets the class of checkrow.  I grab the rows,
iterate over them and for each one, try and add a rule.  This rule
doesn't work, however, and seems to cause every checkbox in the table
to become required.  If I set required to false, I can submit the form
with no checkboxed checked.


[jQuery] Converting rows into columns

2009-08-25 Thread Anush Shetty

I am displaying a few fields in a table as below

table
  trtdfield1/td/tr
  trtdfield2/td/tr
   trtdfield3/td/tr
trtdfield4/td/tr
trtdfield5/td/tr
/table

I have a link to append a new table with the same fields. What I would
like to do is when I click on Append new table link, I would like to
convert all the existing fields in the table in a single row instead
of displaying them by columns. Can somebody give me some inputs on how
I could go about implementing it

-
Anush


[jQuery] Re: Superfish menu help!

2009-08-25 Thread Charlie





took a quick look but there is no superfish related script ( the plugin
file or call to initiate )or css file in head of page so you've either
disabled in Joomla, or not installed it properly as joomla extension

can't offer much help for either of above

Dinney wrote:

  Hi,

I am trying to use this menu on my website - i bought this template
and im trying to implement the superfish menu on it, but its giving me
major problems. I can see there is a drop down there that shows up on
hover BUT its hidden and cut because of the table? i dont know - i
tried to fix it with z-index solutions but maybe im not putting that
property in the right place? any help would be GREAT - please help!

http://www.dinzign.com/mace/  (its the menu on top with the red
background)


  






[jQuery] Re: jCarousel Appears Vertical then Horizontal

2009-08-25 Thread Charlie





very likely something's wrong in css, further guessing would be futile,


link?

Sparky12 wrote:

  Still got this problem ? Anyone else had any luck with it ?

  






[jQuery] Re: Passing variables to .click

2009-08-25 Thread AMP

Good one,
Thanks

On Aug 24, 4:02 pm, James james.gp@gmail.com wrote:
 Since region is not a valid HTML attribute, other ways is to set an
 ID on the element and use that as a reference to data stored elsewhere
 (e.g. a Javascript array or object).
 Depending on whether you have a lot of data or not. Assuming you have
 many onclicks on your page, here's another way to do it.

 script
 // JS object
 var myData = {id1:'US', id2:'Europe', id3:'Antarctica'};

 $(div.clickme).click(function() {
    var id = this.id;  // 'id1' or 'id2' or 'id3'
    alert(myData.id);  // 'US' or 'Europe' or 'Antarctica'
    // alert(myData[id]);  // same as above});

 /script

 div id=id1 class=clickmeText 1/div
 div id=id2 class=clickmeText 2/div
 div id=id3 class=clickmeText 3/div

 On Aug 23, 2:40 pm, AMP ampel...@gmail.com wrote:



  This is the way I was thinking so could you give me another example
  without attributes (Just so I could learn a different way).
  Thnaks

  On Aug 23, 8:05 pm, MorningZ morni...@gmail.com wrote:

   MANY ways to do this, with this being one of them

   button id=parsetablebutton region=?php echo $Region ?Some
   Text/button

   then

   $(#parsetablebutton).click(function() {
           var region = $(this).attr(region);  //-- the value from
   PHP

   });

   again, that's just one way of many

   On Aug 23, 6:04 pm, AMP ampel...@gmail.com wrote:

Hello,
I was using this:
onClick=parsetable('?php echo $Region ?')

but now I want to use the JQuery:
$(#parsetablebutton).click( function() {

How do I pass the parameter to the function?
Would I set an attribute and read it with[att=XXX] where the attribute
is the echo'd $Region or is there a better way?
Thanks- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: get the hover color of a link

2009-08-25 Thread Satyakaran

I think you need to change your approach.
:hover is not set-able by jquery .

I tried this

script

function hover1() {


var h = $(':hover', '.test');

$.each(
h,
function( intIndex, intVal ){
  alert($(this).css('color'))
}
)

}



/script


div class=test
a href='http://www.w3schools.com/' onclick=alert($('.test
a:hover').css('color'));return false;W3Schools1/a
a href='http://www.w3schools.com/' onclick=alert($('a:hover').css
('color'));return false;W3Schools2/a

a href='http://www.w3schools.com/' onclick=javascript:hover1
();return false;W3Schools3/a
/div


Here on link 1 and  2 , I am getting the right output but not through
a function I have tried in 3 link.

On Aug 25, 4:57 am, Dale Larsen dalelarse...@gmail.com wrote:
 I need to get the css hover color of an element. Since hover is a
 pseudo class of a class or id, I do not see a way of returning the
 color.

 I tried:

 $('.contentArea a:hover').css('color');

 but it does not return the hover color.

 I understand that jQuery probably traverses the inline styles and
 there is no way to set the hover  pseudo class inline, hence the
 reason for the .hover function.

 Is it possible to find and return the hover color with jQuery. If so
 how?


[jQuery] Re: [treeview] Can I apply classes to async trees??

2009-08-25 Thread nsbk

Thanks!! got it working...

On 24 ago, 13:49, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 You can use the classes property in the JSON response. These are
 added to each node.

 Jörn

 On Mon, Aug 24, 2009 at 12:12 PM, nsbkpedro...@gmail.com wrote:

  Hi!

  I'm currently working on a project in wich I use a pair of trees. The
  thing is that one of them is too big and IE6 (it needs to be
  supported :s ) takes forever to process the tree so I want to load it
  asynchronously branch by branch using the async version of the tree.

  The problem is that I want the tree to be a filetree, but when created
  as async it displays with default style. Is it possible to create an
  async filetree (without applying the classes manually)??

  Here's my code:

  //js
         $(document).ready(function(){
                 $(#tree).treeview({
                         url: MenuTree.aspx,animated: fast,collapsed: 
  true, unique: true
                 })
         });
  //html

         ul id=tree class=filetree
         /ul

  Thanks in advance!

  -- nsbk




[jQuery] Re: how to query for words with special (UTF-8 encoded) characters?

2009-08-25 Thread Adriano Varoli Piazza

On 24 ago, 17:46, Adriano Varoli Piazza mora...@gmail.com wrote:
 I'd like to bump this up. I'm trying to implement a dynamic form, and
 I need to query for words containing (in this particular case) ñ.

 Example:
 I want to query for the city 'Añatuya'.
 - typing in 'aña' doesn't find it.
 - typing in 'ana' displays the word, but without the 'aña' sequence
 highlighted. (other returned strings that do contain 'ana' are
 properly highlighted).

 - firebug tells me the query string sent 
 ishttp://localhost/alabern/autocomplete/prov.php?q=a%C3%B1alimit=1000;...

I was able to solve this simply by using utf8_decode() (php here, if
you didn't notice) on the q string passed to the action. Simpler than
it appeared.

--
Saludos
Adriano


[jQuery] Re: Converting rows into columns

2009-08-25 Thread Mauricio (Maujor) Samy Silva
I've provided a possible solution. It is hosted at:
http://jsbin.com/avowa/
http://jsbin.com/avowa/edit

Maurício
  -Mensagem Original- 
  De: Anush Shetty 
  Para: jquery-en@googlegroups.com 
  Enviada em: terça-feira, 25 de agosto de 2009 08:39
  Assunto: [jQuery] Converting rows into columns



  I am displaying a few fields in a table as below

  table
trtdfield1/td/tr
trtdfield2/td/tr
 trtdfield3/td/tr
  trtdfield4/td/tr
  trtdfield5/td/tr
  /table

  I have a link to append a new table with the same fields. What I would
  like to do is when I click on Append new table link, I would like to
  convert all the existing fields in the table in a single row instead
  of displaying them by columns. Can somebody give me some inputs on how
  I could go about implementing it

  -
  Anush

[jQuery] Re: Callback Not Working

2009-08-25 Thread GLSmyth

Aaron -

Thanks so much, that works like a champ.  I never thought of the fact
that the this pointer was changing context.  Thanks so much for the
code and the explanation, that knowledge is very helpful.

Cheers -

george


On Aug 24, 7:00 pm, Aaron Gundel aaron.gun...@gmail.com wrote:
 Hi George,

 It appears that your code isn't working because the context of your
 this pointer changes in the callback inside of your fadeout effect.
 it becomes your section title.  So when you do a find on it, you find
 only children of the section title that are of the class explanation
 -- which don't exist, hence your problem.  Using siblings should
 solve the issue.  Try the following code.  Note that I've changed your
 mouseove to a mouseleave, since mouseover appears to fire too
 frequently.  Hope this helps, or at least gets you on your way

 function() {
     $('li').mouseover(
       function() {
         $(this).find('div.SectionTitle').fadeOut('fast', function() {
           $(this).siblings('div.Explanation').fadeIn('slow');
         });
     });
     $('li').mouseleave(
       function() {
                 $(this).find('div.Explanation').fadeOut('fast', function () {
                         $(this).siblings('div.SectionTitle').fadeIn('slow'); 
 });
                 });
   }

 Aaron

 On Mon, Aug 24, 2009 at 5:16 AM, GLSmythgeorge.sm...@gmail.com wrote:

  I am looking to fade text out when the mouse passes over it and
  replace it with text that is faded in. My understanding is that this
  needs to be done through a callback, as the text needs to fade out
  completely before fading in. However, when I try to implement this
  idea the content does not fade in, so I must be doing something wrong.

  My code is:

     script type=text/javascript
     var Tips = {
       ready: function() {
         $('ul#SiteNav li').mouseover(
           function() {
             $(this).find('div.SectionTitle').fadeOut('fast', function
  () {
               $(this).find('div.Explanation').fadeIn('slow');
             });
         });
         $('ul#SiteNav li').mouseout(
           function() {
             $(this).find('div.Explanation').hide();
             $(this).find('div.SectionTitle').show();
         })
       }
     };
     $(document).ready(Tips.ready);
     /script

  I left the mouseout part unchanged, as that is an example of what I am
  changing from. What happens is that the mouseover text fades out, but
  the replaced text does not fade back in. Additionally, the shown text
  flashes before fading out if the mouse rolls over the text (as opposed
  to the containing box), which is not really a problem, but I am not
  understanding why that is happening. All works fine with hide/show.

  Full code can be found athttp://dripinvesting.org/Default_test.asp.

  I am apparently missing something basic, so a pointer to a beginner
  would be appreciated.

  Cheers -

  george


[jQuery] Re: jCarousel Appears Vertical then Horizontal

2009-08-25 Thread amuhlou

Assuming your carousel container name is something like div
id=carousel

Try setting something in your main CSS like:

#carousel ul li {
float: left;
width: 75px; /*or whatever the width of your items is*/
height:75px; /*or whatever the height of your items is*/
}


On Aug 25, 11:55 am, Charlie charlie...@gmail.com wrote:
 very likely something's wrong in css, further guessing would be futile,
 link?
 Sparky12 wrote:Still got this problem ? Anyone else had any luck with it ?


[jQuery] Re: not working in IE6

2009-08-25 Thread MorningZ

Can you elaborate on what part doesn't work?

Assigning the title tag?
The wiring up of the tool tip?

And you realize the the tooltip plugin goes after the selected
object's title parameter, right?  Your each() loop assigns the title
to the option's, but your .tooltip() call is on the select, two
totally different DOM objects



On Aug 25, 9:00 am, Nitin Gautam gautam.ni...@gmail.com wrote:
 Hi,

 I am trying this in IE6 and found not working. In Firefox it is
 working as expected

 html
 head
  script type=text/javascript src=jquery-1.3.1.js/script
  script type=text/javascript src=jquery.tooltip.js/script
  style type=text/css
  select{
    width: 60;
  }
  option{
    width: 60;
  }
 /style
 !-- Include custom code to handle the tooltip --
 script type=text/javascript
 $(document).ready(function(){

   //After loading the page insert the title attribute.
   $(function(){
     $(select option).attr( title, Nits );
     $(select option).each(function(i){
       this.title = this.text;
     })
   });

   //Attach a tooltip to select elements
   $(select).tooltip({left: 70});

 });

 /script
 body

 !-- When moving the mouse over the below options --
 select
    optionvery long option text 1/option
    optionvery long option text 2/option
    optionvery long option text 3/option
    optionvery long option text 4/option
    optionvery long option text 5/option
    optionvery long option text 6/option
 /select
 /body
 /html

 Please HELP!


[jQuery] Re: not working in IE6

2009-08-25 Thread Nitin Gautam

Then how this working in Firefox ? and how to call on options?

On Aug 25, 6:13 pm, MorningZ morni...@gmail.com wrote:
 Can you elaborate on what part doesn't work?

 Assigning the title tag?
 The wiring up of the tool tip?

 And you realize the the tooltip plugin goes after the selected
 object's title parameter, right?  Your each() loop assigns the title
 to the option's, but your .tooltip() call is on the select, two
 totally different DOM objects

 On Aug 25, 9:00 am, Nitin Gautam gautam.ni...@gmail.com wrote:

  Hi,

  I am trying this in IE6 and found not working. In Firefox it is
  working as expected

  html
  head
   script type=text/javascript src=jquery-1.3.1.js/script
   script type=text/javascript src=jquery.tooltip.js/script
   style type=text/css
   select{
 width: 60;
   }
   option{
 width: 60;
   }
  /style
  !-- Include custom code to handle the tooltip --
  script type=text/javascript
  $(document).ready(function(){

//After loading the page insert the title attribute.
$(function(){
  $(select option).attr( title, Nits );
  $(select option).each(function(i){
this.title = this.text;
  })
});

//Attach a tooltip to select elements
$(select).tooltip({left: 70});

  });

  /script
  body

  !-- When moving the mouse over the below options --
  select
 optionvery long option text 1/option
 optionvery long option text 2/option
 optionvery long option text 3/option
 optionvery long option text 4/option
 optionvery long option text 5/option
 optionvery long option text 6/option
  /select
  /body
  /html

  Please HELP!


[jQuery] Re: not working in IE6

2009-08-25 Thread MorningZ

You're fighting a big uphill battle thinking it works in FF, it
should work in IE.x

More than likely, IE6 has zero support/knowledge of what to do with a
title attribute on an option tag


On Aug 25, 9:33 am, Nitin Gautam gautam.ni...@gmail.com wrote:
 Then how this working in Firefox ? and how to call on options?

 On Aug 25, 6:13 pm, MorningZ morni...@gmail.com wrote:

  Can you elaborate on what part doesn't work?

  Assigning the title tag?
  The wiring up of the tool tip?

  And you realize the the tooltip plugin goes after the selected
  object's title parameter, right?  Your each() loop assigns the title
  to the option's, but your .tooltip() call is on the select, two
  totally different DOM objects

  On Aug 25, 9:00 am, Nitin Gautam gautam.ni...@gmail.com wrote:

   Hi,

   I am trying this in IE6 and found not working. In Firefox it is
   working as expected

   html
   head
    script type=text/javascript src=jquery-1.3.1.js/script
    script type=text/javascript src=jquery.tooltip.js/script
    style type=text/css
    select{
      width: 60;
    }
    option{
      width: 60;
    }
   /style
   !-- Include custom code to handle the tooltip --
   script type=text/javascript
   $(document).ready(function(){

     //After loading the page insert the title attribute.
     $(function(){
       $(select option).attr( title, Nits );
       $(select option).each(function(i){
         this.title = this.text;
       })
     });

     //Attach a tooltip to select elements
     $(select).tooltip({left: 70});

   });

   /script
   body

   !-- When moving the mouse over the below options --
   select
      optionvery long option text 1/option
      optionvery long option text 2/option
      optionvery long option text 3/option
      optionvery long option text 4/option
      optionvery long option text 5/option
      optionvery long option text 6/option
   /select
   /body
   /html

   Please HELP!


[jQuery] Re: Realtime ajax response

2009-08-25 Thread bram

 ob_start();
 foreach ($foo as $bar) {
 resizeImage();
 echo Resizing image  $bar;
 ob_flush;
 flush();

 }

 This way user will get response everytime image get resized. Can I
 achive this with ajax and div?

A more 'ajax approach' would be to resize your images individually as
they are requested by the browser. ie: get rid of the loop in php and
apply it in html/js.


[jQuery] Re: Jquery treeview jquery accordion

2009-08-25 Thread andrerav

On Aug 23, 4:02 pm, serdartu serda...@gmail.com wrote:
 When i used jquery treeview plugin inside accordion plugin treeview
 styles not working?

 Best Regards



I'm having the same problem. Anyone know any workarounds for this?

-Andreas



[jQuery] Get the input value of ANY element p tag

2009-08-25 Thread arysal...@hotmail.com

Hi Guys,

I am having difficulty getting the value of a specific value contained
in a p tag. What is happening is that it retrieves the value of the
first p tag value and not the on the user clicks.

What I need is to retieve the value from the p tag the user click.

Snippet code [BEGIN]:

$(document).ready(function() {

   $(p).click(function () {
   var prop = $(#property_links).val();
   $.post(n10-shortlist-connector.html, { web_AGENT_REF: prop});
 var htmlStr = Added to Compare Tool;
   $(this).text(htmlStr);
 });

  });


pa style=cursor:pointer; color: #900  Add to Compare Tool input
type=hidden id=property_links value=? echo $AGENT_REF; ?//
a/p  //many of these tags on the page

Snippet code [END]:

view page: http://nwbeta.itproz.co.uk/residenti...tion=Liverpool
If viewing the site when you click add to compare list it will
change to Added to compare list

All help appreciated,
Thanks in advance.


[jQuery] Re: [validate] problem of defining custom rules

2009-08-25 Thread Raju
try this ,


input id=firstname name=firstname
minlength=2 /

Warm Regards,

Mari Raj K,
Bangalore
+91 9740765135


On Tue, Aug 25, 2009 at 11:26 AM, david michaelg...@gmail.com wrote:


 i played with the example.html from jquery.validate 1.55 and wanted to
 make a custom rule firstname that is required, with the message please
 enter a firstname.
 My changes were in the validate :
 $(#commentForm).validate({
   rules: {
   firstname: required
   },
   messages: {
   firstname: Enter your firstname
   }
   });

 and theninput id=cname name=name class=firstname
 minlength=2 /
 my problem is that it is shown as valid, even i don't enter nothing.
 i don't know what i am making wrong

 Thanks,
 David

 This is the code
 !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
 meta http-equiv=Content-Type content=text/html;
 charset=ISO-8859-1 /
 titlejQuery validation plug-in - comment form example/title

 link rel=stylesheet type=text/css media=screen href=css/
 screen.css /

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

 !-- for styling the form --
 script src=js/cmxforms.js type=text/javascript/script

 script type=text/javascript
 $(document).ready(function() {
   $(#commentForm).validate({
   rules: {
   firstname: required
   },
   messages: {
   firstname: Enter your firstname
   }
   });
 });
 /script

 style type=text/css
 #commentForm { width: 500px; }
 #commentForm label { width: 250px; }
 #commentForm label.error, #commentForm input.submit { margin-left:
 253px; }
 /style

 /head
 body

 form class=cmxform id=commentForm method=post action=
   fieldset
   legendPlease provide your name, email address (won't
 be published)
 and a comment/legend
   p
   label for=cnameName (required, at least 2
 characters)/label
   input id=cname name=name class=firstname
 minlength=2 /
   p
   label for=cemailE-Mail (required)/label
   input id=cemail name=email class=required
 email /
   /p
   p
   label for=curlURL (optional)/label
   input id=curl name=url class=url
 value= /
   /p
   p
   label for=ccommentYour comment (required)/
 label
   textarea id=ccomment name=comment
 class=required/textarea
   /p
   p
   input class=submit type=submit
 value=Submit/
   /p
   /fieldset
 /form

 /body
 /html


[jQuery] [autocomplete 1.1] extend callback

2009-08-25 Thread steki

hi,

i use the extraParams function to retrieve information from the
current autocomplete control

/* tabellenname aus input.name ermitteln, z.b. edit0_kontakt_id-
kontakte */
extraParams: {
tbl: function(elem) {
var tbl = elem.id.split('-')[1];
return tbl;
   }
}


therefore i had to modify the orginal sources in line 363

// sk
// + extraParams[key] = typeof param == function ? 
param(input) :
param;
// - extraParams[key] = typeof param == function ? 
param() :
param;

could this be done without patching the original source, or would it
be possible to add then param(input) to the autocomplete sources?

regards stefan


[jQuery] Re: Using jQuery Validation (validate), are there any events when a remote validation call is made

2009-08-25 Thread MrBuBBLs

Hi andypike,

I'm on the same stuff, and I don't know but this might help :
http://enricofoschi.wordpress.com/2009/07/04/twitter-style-suggestion-and-validation-boxes-for-jquery/


On 13 août, 00:42, andypike andy.pike.m...@googlemail.com wrote:
 Hi all,

 I am preparing a form and would like to mimic the functionality of the
 Twitter sign up form here:https://twitter.com/signup

 Here are my basic requirements, is this possible with the jQuery
 validation plugin (http://docs.jquery.com/Plugins/Validation):

 1. When an input has focus, display a hint (I guess I can do this
 independently of the plugin)
 2. If the input is invalid show a message (I know this can be done)
 3. When using a remote ajax validation, show a checking... wait
 message - not sure about this
 4. If the input is valid show an ok message - not sure about this

 Any hints, tips or ideas would be great.

 Thanks in advance

 Andy


[jQuery] how to use jcarousel and fancybox

2009-08-25 Thread dough

I can't use both plugins.

I have:


$(document).ready(function(){
   $('#mycarousel').jcarousel({
itemLoadCallback: mycarousel_itemLoadCallback
});

$(.photos).fancybox({
//call via menu
'frameWidth': 450,
'frameHeight': 300,
'hideOnContentClick': true,
'zoomSpeedIn': 300,
'zoomSpeedOut': 300,
'overlayShow': false,
'overlayOpacity': 0.10
});
});

and this

function mycarousel_getItemHTML(url)
{
var url_p = url;
var url_g = url_p.replace(/_p.jpg/g, '.jpg');
return 'a class=photos rel=gallery1 href=' + url_g + 'img
src=' + url_p + ' width=75 height=75 alt= title=//a';
};

if I put a photo with the attribut claass=photos it works, but the
photos inside the jCarousel didn't work at all.

How can I solve it? or is it posible to call directly the fancybox
function trought the a href link in each jcarousel image?

Thanks!

dough


[jQuery] lost events

2009-08-25 Thread paolochiodi

I would like to know if is there some jquery known behaviour that
cause the lost of events handlers (in particular in iframes)?

I've a strange kind of problem. I've built a webapp composed of two
iframe. First i load content in the first iframe. I add some event
event handler using jquery to first iframe content dom. Everything
works. On user input i load a page in the second iframe. Here too, I
add some event handlers using jquery. Then the strange thing happens:
jquery lost the event handlers in the first iframe. I said 'jquery
lost' because if I add an event listener old way, it is still present.

Thanks,
Paolo


[jQuery] Re: $.inArray optimisation

2009-08-25 Thread MorningZ

IMO, it doesn't belong in the core

I think I read somewhere that a check for that usage will be in 1.3.3
core, but damned if I can find where I saw that stated




On Aug 25, 9:59 am, KeeganWatkins mkeeganwatk...@gmail.com wrote:
 it does not work in every browser. the purpose of jQuery and similar
 libraries is to streamline development and create a (mostly)
 consistent foundation to build on, regardless of browser. if you're
 interested in gaining some performance, or just using the latest JS
 features, i'd suggest implementing this yourself. IMO, it doesn't
 belong in the core, but it would be easy to add.

 something like this:
 if (Array.prototype.indexOf) {
     $.inArray = function(elem, array) {
         return array.indexOf(elem);

 }

 because $.inArray is already a part of the core, you'd just be
 replacing it where the native indexOf method exists on Arrays.
 otherwise, you'd just be using the standard implementation. hope that
 helps.

 On Aug 24, 12:28 pm, Cesar Sanz the.email.tr...@gmail.com wrote:

  Does it works for every browser?

  - Original Message -
  From: gurdiga gurd...@gmail.com
  To: jQuery (English) jquery-en@googlegroups.com
  Sent: Sunday, August 23, 2009 1:07 PM
  Subject: [jQuery] $.inArray optimisation

   Hello,

   The $.inArray function is defined in
  http://jqueryjs.googlecode.com/svn/trunk/jquery/src/core.js
   as:

   inArray: function( elem, array ) {
   for ( var i = 0, length = array.length; i  length; i++ ) {
   if ( array[ i ] === elem ) {
   return i;
   }
   }

   return -1;
   },

   I'm wondering: would it be possible to take advantage of the built-in
   indexOf method of the Array present in FF Javascript engines? Im
   thinking of something like:

      if (typeof Array.prototype.indexOf === 'function') {
          return array.indexOf(elem);
      }

   What do you think?


[jQuery] [autocomplete]

2009-08-25 Thread Mahmoud wagdy

we need to add a virtual keyboard to the same textbox which uses yours
autocomplete plugin.
is this applicable with your autocomplete plugin


[jQuery] Re: $.inArray optimisation

2009-08-25 Thread KeeganWatkins

it does not work in every browser. the purpose of jQuery and similar
libraries is to streamline development and create a (mostly)
consistent foundation to build on, regardless of browser. if you're
interested in gaining some performance, or just using the latest JS
features, i'd suggest implementing this yourself. IMO, it doesn't
belong in the core, but it would be easy to add.

something like this:
if (Array.prototype.indexOf) {
$.inArray = function(elem, array) {
return array.indexOf(elem);
}

because $.inArray is already a part of the core, you'd just be
replacing it where the native indexOf method exists on Arrays.
otherwise, you'd just be using the standard implementation. hope that
helps.

On Aug 24, 12:28 pm, Cesar Sanz the.email.tr...@gmail.com wrote:
 Does it works for every browser?

 - Original Message -
 From: gurdiga gurd...@gmail.com
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Sunday, August 23, 2009 1:07 PM
 Subject: [jQuery] $.inArray optimisation

  Hello,

  The $.inArray function is defined in
 http://jqueryjs.googlecode.com/svn/trunk/jquery/src/core.js
  as:

  inArray: function( elem, array ) {
  for ( var i = 0, length = array.length; i  length; i++ ) {
  if ( array[ i ] === elem ) {
  return i;
  }
  }

  return -1;
  },

  I'm wondering: would it be possible to take advantage of the built-in
  indexOf method of the Array present in FF Javascript engines? Im
  thinking of something like:

     if (typeof Array.prototype.indexOf === 'function') {
         return array.indexOf(elem);
     }

  What do you think?


[jQuery] Hover Area - Change image

2009-08-25 Thread wheatstraw

What I want to have happen is when you hover over the li it:
1) allows you to click the who area (this works)
2) The image swap.

Right now the image will only swap when hovering over the image not
the rest of the li.

Any help would be appreciated!

$(document).ready(function(){
$('li.clickable').css('cursor', 'pointer').click(function() {
window.location = $('a', this).attr('href');
});


$(li.clickable img).hover(function() {
$(this).attr(src, $(this).attr(src).split(_off).join
(_over));
}, function() {
$(this).attr(src, $(this).attr(src).split(_over).join
(_off));
});
});



[jQuery] Re: There is no group named jquery-ui.

2009-08-25 Thread Fontzter

Yes, it is down.  I just found this thread:

http://groups.google.com/group/jquery-ui-dev/browse_thread/thread/3e12d8836f6879a2?hl=en



On Aug 25, 10:42 am, Fontzter dmfo...@gmail.com wrote:
 Anyone else getting this when they try to visit the google group for
 jQueryUI?


[jQuery] Re: setData and extraParams problem

2009-08-25 Thread pankaj sharma

Thanks Jorn for your response. I have recently working on this. I
could not found the exact version from the file jquery.autocomplete.js
. At the top of the .js its as follows. What is the way to get the
version?

/*
 * jQuery UI Autocomplete @VERSION
 *
 * Copyright (c) 2007, 2008 Dylan Verheul, Dan G. Switzer, Anjesh
Tuladhar, Jörnn
 Zaefferer
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 *
 * http://docs.jquery.com/UI/Autocomplete
 *
 * Depends:
 *  ui.core.js
 */

Yes i have already tried this option autocomplete(option,
extraParams, ...) instead of setData. But that also does not solve
my issue.

Thanks

On Fri, Aug 21, 2009 at 12:51 AM, Jörn
Zaeffererjoern.zaeffe...@googlemail.com wrote:

 What exact version of the autocomplete plugin are you using?

 Have you tried autocomplete(option, extraParams, ...) instead of setData?

 Jörn

 On Sat, Aug 8, 2009 at 6:19 PM, pankajpankaj1...@gmail.com wrote:

 Actually this part was working previously.I found one difference here,
 maybe that help us to find out the actual root cause. Please let me
 know if any of you are aware of this issue.

 Here is OLD and NEW difference of calling auto-completion.
 =
 OLD:
  // Pass along field dependency values to filter auto-completion
 list.
  $textbox.focus(function() {
    var fieldname = this.id;
    $(this).flushCache();
    params = { fname:fieldname };
    $(this).setOptions({ extraParams:add_deps(autocomplete_drilldowns,
                         fieldname, params) });
  });
 
 NEW:
  // Pass along field dependency values to filter auto-completion
 list.
  $textbox.focus(function() {
    var fieldname = this.id.replace(/([{}])/g, '\\$1');
    $(this).autocomplete('flushCache');
    params = { fname:fieldname };
    $(this).autocomplete('setData',
                         { extraParams:add_deps
 (autocomplete_drilldowns,
                           fieldname, params) });
  });
 ===

 Is this causing any issue?

 Thanks


 On Aug 8, 2:19 pm, pankaj pankaj1...@gmail.com wrote:
 Hi All,

 When I do focus is on the autocompletion textbox, that triggers the
 function right below where the autocompletion plugin is initialized ,
 which is supposed to add the key=value values to form the remote
 url. Based on this remote url I am getting the filtered output, which
 will list out in the  autocompletion textbox but its not adding
 key=value. So I am getting all the list. I think  the setData is
 not setting the extraParams.
 help?

 For example:
 If i select one field in the Html form say product xyz and based on
 this the release field should 3 values 1.1 | 1.2 | 1.3, but it
 displays all the list (almost 300 values). Its because when i select
 something in the autocompletion textbox then the url format should be
 something like this:

 http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}product=mmm

 Instead of the above it is formating as. Here product field is
 missing, due to which it displays all the release value.

 http://mdx.lt.com/xyz/abc/ac-list?q=1.limit=300timestamp=1249677100...{1}.

 This is my autocomplete call:

     $field.autocomplete({
       url:ac_url,
       cacheLength:1,
       matchContains:true,
       max:300,
       width:'50%',
       scrollHeight:320,
       minChars:1,
       extraParams:{ fname:fieldname },
       formatItem: function(data, i, max, value, term) {
         // data will be an array of value, description
         return 'span class=ui-autocomplete-value' + value +
           '/spanspan class=ui-autocomplete-info' + data[1] + '/
 span';
       }
     });
     $field.autocomplete('result', function() {
       $field.change(); // Notify mass edit that the field's value has
 changed.
       $field.blur(); // Trigger auto-set.
     });
   });

   // Pass along field dependency values to filter auto-completion
 list.
   $textbox.focus(function() {
     var fieldname = this.id.replace(/([{}])/g, '\\$1');
     $(this).autocomplete('flushCache');
     params = { fname:fieldname };
     $(this).autocomplete('setData',
                          { extraParams:add_deps
 (autocomplete_drilldowns,
                            fieldname, params) });
   });

 What is the right way to see what the above function (add_deps) is
 returning?

 Any help will be greatly appreciated.

 Thanks,



[jQuery] Re: Get the input value of ANY element p tag

2009-08-25 Thread Paolo Chiodi

Your code don't work because with $(#property_links) you retreive
every hidden input with that id, then val() return value only for the
first. You have to access only the correct hidden input: you can use a
find that search for a query in all the children of the clicked p

You have to replace

var prop = $(#property_links).val();

with

var prop = $(this).find(#property_links).val();

By the way, it is not reccomanded to have more then one element with same id

Paolo

On Tue, Aug 25, 2009 at 3:30 PM,
arysal...@hotmail.comarysal...@hotmail.com wrote:

 Hi Guys,

 I am having difficulty getting the value of a specific value contained
 in a p tag. What is happening is that it retrieves the value of the
 first p tag value and not the on the user clicks.

 What I need is to retieve the value from the p tag the user click.

 Snippet code [BEGIN]:

 $(document).ready(function() {

   $(p).click(function () {
   var prop = $(#property_links).val();
   $.post(n10-shortlist-connector.html, { web_AGENT_REF: prop});
         var htmlStr = Added to Compare Tool;
       $(this).text(htmlStr);
                     });

                  });


 pa style=cursor:pointer; color: #900  Add to Compare Tool input
 type=hidden id=property_links value=? echo $AGENT_REF; ?//
 a/p      //    many of these tags on the page

 Snippet code [END]:

 view page: http://nwbeta.itproz.co.uk/residenti...tion=Liverpool
 If viewing the site when you click add to compare list it will
 change to Added to compare list

 All help appreciated,
 Thanks in advance.



[jQuery] There is no group named jquery-ui.

2009-08-25 Thread Fontzter

Anyone else getting this when they try to visit the google group for
jQueryUI?


[jQuery] Re: $.ajax calls in firefox doesn't work

2009-08-25 Thread Ashley

I think what James suggested is the right way to go: switch to GET. It
looks like you're sending no data in your POST. That is a security
violation under some server set-ups and might just cause an error
under others. Otherwise try at least a dummy marker { data:1 } or
something into your POST request.

-Ashley

On Aug 24, 3:58 pm, hosemaria hosema...@gmail.com wrote:
 Clearing Cookies doesn't work

 I am newbee with analyzing headers responses. This are info taken from
 Fiddler debuger (FX responses). If you could help me to find something
 odd I will be grateful.

 Request Header:

 POST /manager/www/admin/parking_cfg.php HTTP/1.1
 Host:www.somedomain.com
 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.13)
 Gecko/2009073022 Firefox/3.0.13
 Accept: application/json, text/javascript, */*
 Accept-Language: pl,en-us;q=0.7,en;q=0.3
 Accept-Encoding: gzip,deflate
 Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
 Keep-Alive: 300
 Connection: keep-alive
 X-Requested-With: XMLHttpRequest
 Referer:http://www.somedomain.com/manager/www/admin/index2.php?page=parking
 Cookie: PHPSESSID=86cd59b9c6377608ca601713e53e357b
 Pragma: no-cache
 Cache-Control: no-cache

 Response header:
 HTTP/1.1 400 Bad Request
 Server: IdeaWebServer/v0.60
 Date: Mon, 24 Aug 2009 22:48:12 GMT
 Content-Type: text/html
 Content-Length: 191
 Connection: close

 HTML
 HEAD

         TITLE400 Bad Request/TITLE

 /HEAD
 BODY BGCOLOR=#FF

         H1400 Bad Request/H1
         Your browser sent a request that this server could not understand.

 /BODY
 /HTML

 parking_cfg.php returns JSON correctly if you type into FX browser
 address  http://www.somedomain.com/manager/www/admin/parking_cfg.php

 Greetings


[jQuery] Re: Hover Area - Change image

2009-08-25 Thread Liam Potter


It's because you have targeted the image as the hover area rather then 
the li, use this instead


$(li.clickable).hover(function() {
$(this).children(img).attr(src, 
$(this).attr(src).split(_off).join(_over));
}, function() {
$(this).children(img).attr(src, 
$(this).attr(src).split(_over).join(_off));
});

Hover over the li, then get the child element within the context of 
'this' to perform the actions to it.


wheatstraw wrote:

What I want to have happen is when you hover over the li it:
1) allows you to click the who area (this works)
2) The image swap.

Right now the image will only swap when hovering over the image not
the rest of the li.

Any help would be appreciated!

$(document).ready(function(){
$('li.clickable').css('cursor', 'pointer').click(function() {
window.location = $('a', this).attr('href');
});


$(li.clickable img).hover(function() {
$(this).attr(src, $(this).attr(src).split(_off).join
(_over));
}, function() {
$(this).attr(src, $(this).attr(src).split(_over).join
(_off));
});
});

  




[jQuery] how to pass php variable with load?

2009-08-25 Thread Enoch

I am trying to load a php page into DIV B when DIV A is dropped on it.

My question is:
how do I pass a variable with my jquery load.

this is what I have:

.bind( drop, function( event  ){
  $( this ).load(somefile.php?rec=+event.dragDiv.title+);
}

everything works fine when I remove the +event.dragDiv.title+


[jQuery] Re: Loading jQuery - Need a black screen while it loads

2009-08-25 Thread Nathan Bubna

On Mon, Aug 24, 2009 at 10:21 PM,
scotthaslehurstscotthaslehu...@gmail.com wrote:

 Hi,

 That's perfect. Thanks.

 Just to follow up. Is it enough to use just the jquery.loading.js? Or
 must I also source the other scripts below that the demo uses? The
 documentation is not clear

well, i'll have to make that clear.  you only need jquery.1.3.2 and
jquery.loading.js, the others are just for the demo.

    script type=text/javascript src=../../jquery.1.3.2.js/
 script
    script type=text/javascript src=../../trunk/
 jquery.values.js/script
    script type=text/javascript src=../log/log.js/script



 On Aug 25, 11:25 am, Nathan Bubna nbu...@gmail.com wrote:
 if you used the loading plugin:  http://plugins.jquery.com/project/loading

 $.loading(true, {mask:true, maskCss:{background:'#000', opacity:1}});

 and when all is ready:

 $.loading(false);

 See the demo page for the project to get a feel for more options and
 also some nice CSS you can use to make the loading message prettier.

 On Mon, Aug 24, 2009 at 9:13 PM,

 scotthaslehurstscotthaslehu...@gmail.com wrote:

  I am designing a site that is jquery heavy.

  When the site loads it takes a while for all the scripts to load and
  then the images to settle down - more so in IE, naturally.

  I would ideally like to display a black screen or cover everything
  with a div while it settles down. I have tried a few Timeout scripts
  but they appear to be conflicting and don't work.

  Any body got any ideas how I can either display a blank screen while
  it all settles down or just avoid the problem all together.

  The site I'm talking about is here:

 http://www.mintinnovation.com/draft2/


[jQuery] [validate] Help with groups of checkboxes

2009-08-25 Thread Gordon

Sorry, incorrect title


[jQuery] Re: loop/count

2009-08-25 Thread bombaru

OK... I figured something out to achieve the functionality I'm after.
This will set the first span to active and then add/remove the active
class when the user cycles through using the previous and next
buttons.  Since the carousel is a circular loop, I am then addressing
the case when the user is on the first item and hits the previous
button or on the last item and hits the next button.  Here's the code
I fudged together:

$('.item-list ul li').each(function(i) {
  $('.visual-cue p').append(span/span);
});
$('.visual-cue p span:first').addClass('active');
$('#carousel-next').click(function() {
if($('.visual-cue p span:last.active').length  0) {
$('.visual-cue p 
span:last').removeClass('active');
$('.visual-cue p 
span:first').addClass('active');
  } else {
$('.visual-cue p 
span.active').removeClass('active').next().addClass
('active');
}
});
$('#carousel-prev').click(function() {
if($('.visual-cue p span:first.active').length  0) {
$('.visual-cue p 
span:first').removeClass('active');
$('.visual-cue p span:last').addClass('active');
  } else {
$('.visual-cue p 
span.active').removeClass('active').prev().addClass
('active');
}
});

Surely there's got to be a better/cleaner way to achieve this.  Thanks
for any help/assistance you can provide.



On Aug 24, 5:15 pm, bombaru bomb...@gmail.com wrote:
 Thanks James...

 Here's what I've got working:

 $('.item-list ul li').each(function(i) {
       $('.visual-cue p').append(span/span);
         });
         $('.visual-cue p span:first').addClass('active');
         $('#carousel-next').click(function () {
                 $('.visual-cue p 
 span.active').removeClass('active').next().addClass
 ('active');
         });
         $('#carousel-prev').click(function () {
                 $('.visual-cue p 
 span.active').removeClass('active').prev().addClass
 ('active');
         });

 I'm sure there is a more efficient way of writing this, but for now,
 at least it's working the way I envisioned it.  It's going through,
 counting the number of li tags that are returned, and then appending
 the same number of span tags.  I'm then adding an active class to
 the first span tag and changing that with the click function.

 The problem I am now having is looping through the results correctly.
 The carousel loops, but the above function does not.  I need this to
 start over at the beginning when it reaches the last one if the user
 is clicking the next button, and vice-versa if the user is using the
 previous button action.

 Thanks again for your help.

 On Aug 24, 5:04 pm, James james.gp@gmail.com wrote:

  So basically you just want to know how many span tags there are?
  If so, something like this could work (untested):

  var count = $(div.visual-cue span).length;

  On Aug 24, 10:31 am, bombaru bomb...@gmail.com wrote:

   I'm trying to add a navigational aid to a carousel that I'm working
   on. Basically, I want to visually display the number of results in the
   carousel and then highlight the result that is currently in the first
   position as the user scrolls through the result set - providing a
   visual cue to the user as to where they are in the result set. I've
   seen this before on other carousels and it's sort of the same concept
   that Apple uses in the iPhone and iPod screens. I know this can be
   done rather easily with a bit of jQuery, but my brain is fried. You
   can see a mock-up of what I'm trying to achieve here:

  http://rule13.com/development/carousel.gif

   I'm trying to loop through the result set and count how many items are
   returned... then display something like the image above.  As a user
   navigates through the carousel, an active state is added to the visual
   cue.  The code I am working with for the visual cue section is
   currently just a bunch of span tags (I'm open to alternate
   approaches).  The number of span tags returned would be the same
   number of results returned in the carousel.

   div class=visual-cue
           pspan/spanspan/spanspan class=active/
   spanspan/spanspan/spanspan/spanspan/spanspan/
   spanspan/spanspan/span/p
         /div

   Here's the CSS:

   /* visual cue */
   #accessorize div.visual-cue {height:16px; line-height:16px;
   position:absolute; right:0; width:266px; top:-40px;}
   #accessorize div.visual-cue p {text-align:right; line-height:16px;
   float:right;}
   #accessorize div.visual-cue p span {display:block; background:#fff;
   width:10px; height:10px; border:2px solid #EFEFEF; margin-left:2px;
   float:left;}
   #accessorize div.visual-cue p span.active {background:#D3D3D3; border:
   2px solid #D3D3D3;}

   Does anyone know how I can achieve this or can someone steer me in the
   right 

[jQuery] JCarousellite: How do I alert the carousel's position?

2009-08-25 Thread noahT

Is there a way to echo the position of the carousel? I'd like to send
it to a cookie, and use that to remember of the position of it so the
user can back page to the place they left off, as someone on this list
mentioned before.


[jQuery] Re: loop/count

2009-08-25 Thread bombaru

For some reason, jQuery 1.3 does not like the if statement in the code
sample - else will never fire.  This works fine as is in 1.2.6.
Does anybody know what could be the culprit here?  I'm assuming the if
is always returning true, so the else never gets fired... I'm just not
sure how to get around this though.

Thanks

On Aug 25, 11:57 am, bombaru bomb...@gmail.com wrote:
 OK... I figured something out to achieve the functionality I'm after.
 This will set the first span to active and then add/remove the active
 class when the user cycles through using the previous and next
 buttons.  Since the carousel is a circular loop, I am then addressing
 the case when the user is on the first item and hits the previous
 button or on the last item and hits the next button.  Here's the code
 I fudged together:

 $('.item-list ul li').each(function(i) {
       $('.visual-cue p').append(span/span);
         });
         $('.visual-cue p span:first').addClass('active');
         $('#carousel-next').click(function() {
                 if($('.visual-cue p span:last.active').length  0) {
                                 $('.visual-cue p 
 span:last').removeClass('active');
                                 $('.visual-cue p 
 span:first').addClass('active');
           } else {
                 $('.visual-cue p 
 span.active').removeClass('active').next().addClass
 ('active');
                 }
         });
         $('#carousel-prev').click(function() {
                 if($('.visual-cue p span:first.active').length  0) {
                                 $('.visual-cue p 
 span:first').removeClass('active');
                                 $('.visual-cue p 
 span:last').addClass('active');
           } else {
                 $('.visual-cue p 
 span.active').removeClass('active').prev().addClass
 ('active');
                 }
         });

 Surely there's got to be a better/cleaner way to achieve this.  Thanks
 for any help/assistance you can provide.

 On Aug 24, 5:15 pm, bombaru bomb...@gmail.com wrote:

  Thanks James...

  Here's what I've got working:

  $('.item-list ul li').each(function(i) {
        $('.visual-cue p').append(span/span);
          });
          $('.visual-cue p span:first').addClass('active');
          $('#carousel-next').click(function () {
                  $('.visual-cue p 
  span.active').removeClass('active').next().addClass
  ('active');
          });
          $('#carousel-prev').click(function () {
                  $('.visual-cue p 
  span.active').removeClass('active').prev().addClass
  ('active');
          });

  I'm sure there is a more efficient way of writing this, but for now,
  at least it's working the way I envisioned it.  It's going through,
  counting the number of li tags that are returned, and then appending
  the same number of span tags.  I'm then adding an active class to
  the first span tag and changing that with the click function.

  The problem I am now having is looping through the results correctly.
  The carousel loops, but the above function does not.  I need this to
  start over at the beginning when it reaches the last one if the user
  is clicking the next button, and vice-versa if the user is using the
  previous button action.

  Thanks again for your help.

  On Aug 24, 5:04 pm, James james.gp@gmail.com wrote:

   So basically you just want to know how many span tags there are?
   If so, something like this could work (untested):

   var count = $(div.visual-cue span).length;

   On Aug 24, 10:31 am, bombaru bomb...@gmail.com wrote:

I'm trying to add a navigational aid to a carousel that I'm working
on. Basically, I want to visually display the number of results in the
carousel and then highlight the result that is currently in the first
position as the user scrolls through the result set - providing a
visual cue to the user as to where they are in the result set. I've
seen this before on other carousels and it's sort of the same concept
that Apple uses in the iPhone and iPod screens. I know this can be
done rather easily with a bit of jQuery, but my brain is fried. You
can see a mock-up of what I'm trying to achieve here:

   http://rule13.com/development/carousel.gif

I'm trying to loop through the result set and count how many items are
returned... then display something like the image above.  As a user
navigates through the carousel, an active state is added to the visual
cue.  The code I am working with for the visual cue section is
currently just a bunch of span tags (I'm open to alternate
approaches).  The number of span tags returned would be the same
number of results returned in the carousel.

div class=visual-cue
        pspan/spanspan/spanspan class=active/
spanspan/spanspan/spanspan/spanspan/spanspan/
spanspan/spanspan/span/p
      /div

Here's the CSS:

/* visual cue */
#accessorize div.visual-cue {height:16px; line-height:16px;

[jQuery] Re: Get the input value of ANY element p tag

2009-08-25 Thread ArySal

Hi Paolo,

Thanks for the advice.

I tried what you mentioned still it does not work, the error is
slightly different but the result is pretty much the same.

What do you mean By the way, it is not reccomanded to have more then
one element with same id , could you recommend a tutorial or pointers
where I can get this function working please

Thanks Ary

On Aug 25, 3:20 pm, Paolo Chiodi chiod...@gmail.com wrote:
 Your code don't work because with $(#property_links) you retreive
 every hidden input with that id, then val() return value only for the
 first. You have to access only the correct hidden input: you can use a
 find that search for a query in all the children of the clicked p

 You have to replace

 var prop = $(#property_links).val();

 with

 var prop = $(this).find(#property_links).val();

 By the way, it is not reccomanded to have more then one element with same id

 Paolo

 On Tue, Aug 25, 2009 at 3:30 PM,



 arysal...@hotmail.comarysal...@hotmail.com wrote:

  Hi Guys,

  I am having difficulty getting the value of a specific value contained
  in a p tag. What is happening is that it retrieves the value of the
  first p tag value and not the on the user clicks.

  What I need is to retieve the value from the p tag the user click.

  Snippet code [BEGIN]:

  $(document).ready(function() {

    $(p).click(function () {
    var prop = $(#property_links).val();
    $.post(n10-shortlist-connector.html, { web_AGENT_REF: prop});
          var htmlStr = Added to Compare Tool;
        $(this).text(htmlStr);
                      });

                   });

  pa style=cursor:pointer; color: #900  Add to Compare Tool input
  type=hidden id=property_links value=? echo $AGENT_REF; ?//
  a/p      //    many of these tags on the page

  Snippet code [END]:

  view page:http://nwbeta.itproz.co.uk/residenti...tion=Liverpool
  If viewing the site when you click add to compare list it will
  change to Added to compare list

  All help appreciated,
  Thanks in advance.


[jQuery] JQuery with Crystal Reports .Net 2.0

2009-08-25 Thread ND

Hello,

Has anyone attempted using JQuery dialog to display crystal reports
in .Net 2.0? Also, the crystal report viewer is within and AJAX update
panel. We are trying to implement that and having nightmarish issues
with printing and exporting the reports. If I use full postbacks from
the report viewer, it closes the JQuery dialog. If I use async
postbacks, there is no event to trigger the printing. Has anyone
experienced this?

Any help is greatly appreciated.

Thanks,
ND


[jQuery] Re: Get the input value of ANY element p tag

2009-08-25 Thread ArySal

Thanks Brett I will look into this

On Aug 25, 6:41 pm, Brett Ritter swift...@swiftone.org wrote:
 On Tue, Aug 25, 2009 at 11:49 AM, ArySalaresh...@gmail.com wrote:
  What do you mean By the way, it is not reccomanded to have more then
  one element with same id , could you recommend a tutorial or pointers
  where I can get this function working please

 HTML elements can have id attributes and class attributes to identify 
 them.
 id attributes should be unique within the document, while many
 elements can share class attributes.

 Searching for id vs class should get you some useful links on the topic:

 http://www.google.com/search?q=id+vs+class

 I don't know if this issue is related to your problem, but it is a
 good idea to fix this regardless.
 --
 Brett Ritter / SwiftOne
 swift...@swiftone.org


[jQuery] Re: loop/count

2009-08-25 Thread Rick DeNatale

On Tue, Aug 25, 2009 at 12:53 PM, bombarubomb...@gmail.com wrote:

 For some reason, jQuery 1.3 does not like the if statement in the code
 sample - else will never fire.  This works fine as is in 1.2.6.
 Does anybody know what could be the culprit here?  I'm assuming the if
 is always returning true, so the else never gets fired... I'm just not
 sure how to get around this though.

Interesting, I've got a similar, although it seems opposite problem.
In this code:

  $.entityFinder.find = function(q) {
var t = $(q);
if (t.length  0) {
  quarry = null;
  $.scrollTo(t);
} else {
  var inc = incomplete
  if (incomplete) {
quarry = q;
$.scrollTo($('#footer'));
  }
};
  };

The true leg never seems to execute, even if a dom element IS found.

In debugging I changed this to:

  $.entityFinder.find = function(q) {
var t = $(q);
var l = t.length;
var test = (t.length  0);
if (test) {
  quarry = null;
  $.scrollTo(t);
} else {
  var inc = incomplete
  if (incomplete) {
quarry = q;
$.scrollTo($('#footer'));
  }
};
  };

And it does work.

But I can't for the life of me figure out why it doesn't work in the first case.




-- 
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale


[jQuery] Authentication issue with ColdFusion and SiteMinder with SWFObject and jQuery

2009-08-25 Thread pixelwiz

Hello,

I built a pretty cool admin tool which uses SWFUpload to do AJAX file
uploading.  However, while everything worked great in Development,
once we added security to it, the file uploader doesn't work anymore.
We use SiteMinder here, and it looks like somehow because the request
is coming from Flash it requires authentication even though the user
is already in an authenticated area.  So the SiteMinder catches the
request and sends back it's own response instead of the response that
is supposed to come back from the server with upload details.

So I have to find a way to fix it, or re-implement it with another
product.   I see a few different jQuery file uploaders but are they
all Flash based too?  Will it have the same problems with
authentication?

Thanks,
-Roman


[jQuery] Re: Get the input value of ANY element p tag

2009-08-25 Thread Brett Ritter

On Tue, Aug 25, 2009 at 11:49 AM, ArySalaresh...@gmail.com wrote:
 What do you mean By the way, it is not reccomanded to have more then
 one element with same id , could you recommend a tutorial or pointers
 where I can get this function working please

HTML elements can have id attributes and class attributes to identify them.
id attributes should be unique within the document, while many
elements can share class attributes.

Searching for id vs class should get you some useful links on the topic:

http://www.google.com/search?q=id+vs+class

I don't know if this issue is related to your problem, but it is a
good idea to fix this regardless.
-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: Get the input value of ANY element p tag

2009-08-25 Thread Paolo Chiodi

What kind of error have you now? Have you tried to do alert(prop) to
see if the value is correct?

Paolo

On Tue, Aug 25, 2009 at 5:49 PM, ArySalaresh...@gmail.com wrote:

 Hi Paolo,

 Thanks for the advice.

 I tried what you mentioned still it does not work, the error is
 slightly different but the result is pretty much the same.

 What do you mean By the way, it is not reccomanded to have more then
 one element with same id , could you recommend a tutorial or pointers
 where I can get this function working please

 Thanks Ary



[jQuery] Re: Get the input value of ANY element p tag

2009-08-25 Thread Paolo Chiodi

Another way is to alert($(this).find(#property_links).size()) to see
how many dom elements you get with that selector

Have you tried to use firebug to see the value of the hidden inputs?
maybe also that the error was server side...

Paolo

On Tue, Aug 25, 2009 at 8:09 PM, Paolo Chiodichiod...@gmail.com wrote:
 What kind of error have you now? Have you tried to do alert(prop) to
 see if the value is correct?

 Paolo

 On Tue, Aug 25, 2009 at 5:49 PM, ArySalaresh...@gmail.com wrote:

 Hi Paolo,

 Thanks for the advice.

 I tried what you mentioned still it does not work, the error is
 slightly different but the result is pretty much the same.

 What do you mean By the way, it is not reccomanded to have more then
 one element with same id , could you recommend a tutorial or pointers
 where I can get this function working please

 Thanks Ary




[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread Mauricio (Maujor) Samy Silva
Sintax for the selector is:

$('img[style=overflow: auto; width: 356px; height: 100px;]')

Maurício
  -Mensagem Original- 
  De: John 
  Para: jQuery (English) 
  Enviada em: terça-feira, 25 de agosto de 2009 14:36
  Assunto: [jQuery] jQuery selector for style attribute



  Hi,

  I want to select the following image using jQuery selector to see if I
  could use the style attribute,

  img id=ext-gen439 class=x-form-trigger x-form-arrow-trigger
  style=overflow: auto; width: 356px; height: 100px; src=images/
  s.gif/

  but seems the selector

  img[style=overflow: auto; width: 356px; height: 100px;]

  does not work at all. What would be the correct selector for the style
  attribute?

  Thanks in advance,

  John

[jQuery] Re: jQuery AJAX pulling styles

2009-08-25 Thread James

Can you grab the page in other non-styled data formats, such as XML or
JSON?

Otherwise, if HTML is your only option, you can use some kind of
Javascript replace or regular expression to remove any STYLE and CLASS
attributes.

On Aug 25, 8:49 am, Donnie La Curan don.lacu...@gmail.com wrote:
 I'm using the $.ajax() function to grab a page and parse it ... but
 when I do, any styles on the page I pulled are applied to my page.
 Obviously this isn't what I want, I just want the data to parse.  How
 can I avoid this?


[jQuery] Re: .load() doesn't work on first call in FF3 and IE (But works in FF3.5)?

2009-08-25 Thread D A

 All I can see is you're missing a closing single-quote (') after
 locatorResults.cfm.

Oops. That's a typo on my part in the example.

We found out that it's maybe not jQuery that's the issue here.

When we run it on the server where we're actually returning content
based on the value we're passing it, it's 'one load' behind.

For instance:

what we enter | what is returned
--
1 | nothing
2 | 1
3 | 2

etc.

So it's probably a logic issue on our part...

-DA


[jQuery] Re: .load() doesn't work on first call in FF3 and IE (But works in FF3.5)?

2009-08-25 Thread D A
 Here's the bit of jQuery we're using:

 $('#LocatorGoLink').fancybox({
                        'hideOnContentClick': false,
                        frameWidth: 660,
                        frameHeight: 700,
                        overlayOpacity: .6,
                        padding: 0,
                        callbackOnShow:
 function(){$('div#resultsDataContainer').load('locatorResults.cfm,{'zip':$('#branchLookup').val()});}
                });

Well, it turns out that the likely culprit is FancyBox.

If we .load() our content onto a div not manipulated by fancybox, it
works fine. If we try to load it into fancybox, we get that odd 'one
load behind' issue.

So, we've got it narrowed down now...

-DA


[jQuery] (validate) hide label when empty

2009-08-25 Thread jckos

I'm trying to find the option that hides the default label tag if
there is no message displayed in it.   Can someone help?


I want to display a message at the top of the form when the input
fields are empty, but display no text message.  Only specific fields
have messages associated with them which I have defined.

The issue is that the defualt errorElement is adding space to my form
even when the label tag is empty.



here's what I have


SCRIPT
//Sets main rules for validation
$(document).ready(function(){

jQuery.validator.setDefaults({
debug: true,
success: valid
});
$(#checkoutGuestDynForm).validate({
focusCleanup: true, //hides error on focus

rules: {
firstname: required,
lastname: required,
streetAddress: required,
city: required,
state: required,
cardNo: {creditcard: true},
cvv2: {digits:true}
  },
  messages: {
 cvv2: {
   digits: cvv2 only contains numbers
 }
   },

  //show error messages in div
   errorLabelContainer: .errorContainer,
   wrapper: 'span class=errorSpan',

 //Displays the main error message at top of page
   invalidHandler: function(form, validator) {
  var errors = validator.numberOfInvalids();
  if (errors) {
var message = errors == 1
  ? 'Please correct the highlighted field below.'
  : 'You missed ' + errors + ' fields. Please correct the
fields highlighted below.';
$(#errorMsg).text(message);
$(#errorMsg).show();

  } else {
$(#errorMsg).hide();
  }
}



  });



  });
/SCRIPT


[jQuery] JQuery Unable to Read Margins When Set to Auto?

2009-08-25 Thread phpn1b

I have a simple test page with a div where the left and right margins
are set to auto. The div has a width and when viewed it's centered on
the page. When I try to read the left or right margin with jQuery it's
returned as 0px instead of auto. I'm trying to add a div to a page
and set the new div's margin to match an existing div's margin, but
without being able to read auto, it's failing. My tests using alert($
('#container').css('margin-left')); and alert($('#container').css
('marginLeft')); yielded the same results.


[jQuery] How to cancel an AJAX request?

2009-08-25 Thread Hector Virgen
Hello,
Is there a way to stop or cancel an ajax request on demand, similar to
pressing stop in the browser? I would like to provide the user with a
cancel button on a loading dialog that, when clicked, closes the dialog
and cancels the ajax request. I have the dialog working (thanks to
jQuery-UI) but pressing cancel only closes the it.

I do not want simply ignore the response because I have a success callback
that does some heavy manipulation of the response HTML that I'd like to
prevent from running when the user cancels.

Any help would be appreciated. Thanks!

--
Hector


[jQuery] Re: not working in IE6

2009-08-25 Thread James

And if the title attribute on the options tag is really the problem,
you should consider using jQuery's data() functions instead.
http://docs.jquery.com/Core/data

On Aug 25, 3:56 am, MorningZ morni...@gmail.com wrote:
 You're fighting a big uphill battle thinking it works in FF, it
 should work in IE.x

 More than likely, IE6 has zero support/knowledge of what to do with a
 title attribute on an option tag

 On Aug 25, 9:33 am, Nitin Gautam gautam.ni...@gmail.com wrote:

  Then how this working in Firefox ? and how to call on options?

  On Aug 25, 6:13 pm, MorningZ morni...@gmail.com wrote:

   Can you elaborate on what part doesn't work?

   Assigning the title tag?
   The wiring up of the tool tip?

   And you realize the the tooltip plugin goes after the selected
   object's title parameter, right?  Your each() loop assigns the title
   to the option's, but your .tooltip() call is on the select, two
   totally different DOM objects

   On Aug 25, 9:00 am, Nitin Gautam gautam.ni...@gmail.com wrote:

Hi,

I am trying this in IE6 and found not working. In Firefox it is
working as expected

html
head
 script type=text/javascript src=jquery-1.3.1.js/script
 script type=text/javascript src=jquery.tooltip.js/script
 style type=text/css
 select{
   width: 60;
 }
 option{
   width: 60;
 }
/style
!-- Include custom code to handle the tooltip --
script type=text/javascript
$(document).ready(function(){

  //After loading the page insert the title attribute.
  $(function(){
    $(select option).attr( title, Nits );
    $(select option).each(function(i){
      this.title = this.text;
    })
  });

  //Attach a tooltip to select elements
  $(select).tooltip({left: 70});

});

/script
body

!-- When moving the mouse over the below options --
select
   optionvery long option text 1/option
   optionvery long option text 2/option
   optionvery long option text 3/option
   optionvery long option text 4/option
   optionvery long option text 5/option
   optionvery long option text 6/option
/select
/body
/html

Please HELP!




[jQuery] Re: Hover Area - Change image

2009-08-25 Thread wheatstraw

Thanks but it doesn't seem to work...

li class=clickableimg src=http://localhost/wrt-demo/images/
projects/boxes/13_off.jpg  alt=Abuja Master Plan /  p
class=entryTexta href=http://localhost/wrt-demo/projects/detail/
Abuja-Master-Plan/13Abuja Master Plan/a/p/li

$(.clickable).hover(function() {
$(this).children(img).attr(src, $(this).attr(src).split
(_off).join(_over));
}, function() {
$(this).children(img).attr(src, $(this).attr(src).split
(_over).join(_off));
});


This works but not what I was trying to achieve:
$(.clickable img).hover(function() {
$(this).attr(src, $(this).attr(src).split(_off).join
(_over));
}, function() {
$(this).attr(src, $(this).attr(src).split(_over).join
(_off));
});



On Aug 25, 10:52 am, Liam Potter radioactiv...@gmail.com wrote:
 It's because you have targeted the image as the hover area rather then
 the li, use this instead

 $(li.clickable).hover(function() {
         $(this).children(img).attr(src, 
 $(this).attr(src).split(_off).join(_over));}, function() {

         $(this).children(img).attr(src, 
 $(this).attr(src).split(_over).join(_off));

 });

 Hover over the li, then get the child element within the context of
 'this' to perform the actions to it.

 wheatstraw wrote:
  What I want to have happen is when you hover over the li it:
  1) allows you to click the who area (this works)
  2) The image swap.

  Right now the image will only swap when hovering over the image not
  the rest of the li.

  Any help would be appreciated!

  $(document).ready(function(){
     $('li.clickable').css('cursor', 'pointer').click(function() {
             window.location = $('a', this).attr('href');
     });

     $(li.clickable img).hover(function() {
             $(this).attr(src, $(this).attr(src).split(_off).join
  (_over));
     }, function() {
             $(this).attr(src, $(this).attr(src).split(_over).join
  (_off));
     });
  });


[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread John

Thanks Maurício for your quick response.

I have a program to automatically generate jQuery selectors based on
some UI element attributes and seems your syntax is not always
working. For example,

1) working:  $('div:has(input[type=text][readonly=true], img
[style=overflow: auto; width: 356px; height: 100px;]) img')

2) Not working: $('div:has(input[type=text][readonly=true]
[style=width: 343px;], img[style=overflow: auto; width: 356px;
height: 100px;]) img')

3) Not working:  $('div:has(input[type=text][readonly=true], img
[style=overflow: auto; width: 356px; height: 100px;]) img
[style=overflow: auto; width: 356px; height: 100px;]')

4) Not working:  $('div:has(input[type=text][readonly=true]
[style=width: 343px;], img[style=overflow: auto; width: 356px;
height: 100px;]) img[style=overflow: auto; width: 356px; height:
100px;]')

Here not working means it returns empty object where it should
return non-empty object.

Do you know what is wrong?

Thanks again,

John

On Aug 25, 2:50 pm, Mauricio \(Maujor\) Samy Silva
css.mau...@gmail.com wrote:
 Sintax for the selector is:

 $('img[style=overflow: auto; width: 356px; height: 100px;]')

 Maurício
   -Mensagem Original-
   De: John
   Para: jQuery (English)
   Enviada em: terça-feira, 25 de agosto de 2009 14:36
   Assunto: [jQuery] jQuery selector for style attribute

   Hi,

   I want to select the following image using jQuery selector to see if I
   could use the style attribute,

   img id=ext-gen439 class=x-form-trigger x-form-arrow-trigger
   style=overflow: auto; width: 356px; height: 100px; src=images/
   s.gif/

   but seems the selector

   img[style=overflow: auto; width: 356px; height: 100px;]

   does not work at all. What would be the correct selector for the style
   attribute?

   Thanks in advance,

   John


[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread James

Couldn't you just set another class for where you have that long style
attribute? That'll make it so much nicer and less error prone for what
you're trying to achieve. I'm not telling you that you need to remove
the inline style, but just added another class on the element where
you have the inline style. It'll make the jQuery selection easier.

On Aug 25, 11:22 am, John jian.fang.subscr...@gmail.com wrote:
 Thanks Maurício for your quick response.

 I have a program to automatically generate jQuery selectors based on
 some UI element attributes and seems your syntax is not always
 working. For example,

 1) working:  $('div:has(input[type=text][readonly=true], img
 [style=overflow: auto; width: 356px; height: 100px;]) img')

 2) Not working: $('div:has(input[type=text][readonly=true]
 [style=width: 343px;], img[style=overflow: auto; width: 356px;
 height: 100px;]) img')

 3) Not working:  $('div:has(input[type=text][readonly=true], img
 [style=overflow: auto; width: 356px; height: 100px;]) img
 [style=overflow: auto; width: 356px; height: 100px;]')

 4) Not working:  $('div:has(input[type=text][readonly=true]
 [style=width: 343px;], img[style=overflow: auto; width: 356px;
 height: 100px;]) img[style=overflow: auto; width: 356px; height:
 100px;]')

 Here not working means it returns empty object where it should
 return non-empty object.

 Do you know what is wrong?

 Thanks again,

 John

 On Aug 25, 2:50 pm, Mauricio \(Maujor\) Samy Silva

 css.mau...@gmail.com wrote:
  Sintax for the selector is:

  $('img[style=overflow: auto; width: 356px; height: 100px;]')

  Maurício
    -Mensagem Original-
    De: John
    Para: jQuery (English)
    Enviada em: terça-feira, 25 de agosto de 2009 14:36
    Assunto: [jQuery] jQuery selector for style attribute

    Hi,

    I want to select the following image using jQuery selector to see if I
    could use the style attribute,

    img id=ext-gen439 class=x-form-trigger x-form-arrow-trigger
    style=overflow: auto; width: 356px; height: 100px; src=images/
    s.gif/

    but seems the selector

    img[style=overflow: auto; width: 356px; height: 100px;]

    does not work at all. What would be the correct selector for the style
    attribute?

    Thanks in advance,

    John




[jQuery] Re: JQuery with Crystal Reports .Net 2.0

2009-08-25 Thread Jules

On the server side (CR XI), export the report to PDF and stream it to
the client, much less problem than using CR viewer.

On Aug 26, 3:06 am, ND desaid...@gmail.com wrote:
 Hello,

 Has anyone attempted using JQuery dialog to display crystal reports
 in .Net 2.0? Also, the crystal report viewer is within and AJAX update
 panel. We are trying to implement that and having nightmarish issues
 with printing and exporting the reports. If I use full postbacks from
 the report viewer, it closes the JQuery dialog. If I use async
 postbacks, there is no event to trigger the printing. Has anyone
 experienced this?

 Any help is greatly appreciated.

 Thanks,
 ND


[jQuery] Re: Variable in :eq() with jquery.calculation

2009-08-25 Thread Charlie





I might be off base here but your recalc function code looks like you
are expecting a loop to occur through all of the
$("input[name^=module-]")

I don't think this will occur without using $.each or a "for" loop
therefore you won't get any incrementation in "i". Also I've never seen
"i=++", more common syntax is "i++" for incrementing "i"

starting with something like :

$("input[name^=module-]").each( function(i) {
  $(this).bind("keyup".

will loop through each and add increment to "i" on each loop


betweenbrain wrote:

  Hi All,

I'm trying to use jquery.calculation to calculate some text inputs
versus a selected field. I'm running into an issue with using
variables to select information from the same row. Here's what I have
so far. Any help would be greatly appreciated:

script type="text/_javascript_"
	$(document).ready(
		function (){
			$("input[name^=module-]").bind("keyup", recalc);
			$("input[name='input-positions']").bind("click", recalc);
			recalc();
		}
	);

	function recalc(){
	var i = $(this)[0].rowIndex;
		$("[id=total-positions-left]").calc("avail - (used * qty)",
			{	avail: $("[name='input-positions']:checked").val(),
used: $("[td.item-qty-pos-reqd'].eq(i)"),
qty: $("input[id^='module-qty'].eq(i)")
			}),
		i = ++
			$("#total-positions-left").text($this.sum()
);
			}
	/script

  






[jQuery] Re: [autocomplete]

2009-08-25 Thread Jörn Zaefferer

What is a virtual keyboard?

Jörn

On Tue, Aug 25, 2009 at 2:43 PM, Mahmoud
wagdyeng.mahmoud.wa...@gmail.com wrote:

 we need to add a virtual keyboard to the same textbox which uses yours
 autocomplete plugin.
 is this applicable with your autocomplete plugin



[jQuery] Re: Hover Area - Change image

2009-08-25 Thread amuhlou

children() only works for direct children of an element, so if your
img is wrapped in an a, it won't find the right element.


Try using find() instead:

$(li.clickable).hover(function() {
$(this).find(img).attr(src, $(this).attr(src).split
(_off).join(_over));
}, function() {

$(this).find(img).attr(src, $(this).attr(src).split
(_over).join(_off));

});


On Aug 25, 5:05 pm, wheatstraw psurr...@gmail.com wrote:
 Thanks but it doesn't seem to work...

 li class=clickableimg src=http://localhost/wrt-demo/images/
 projects/boxes/13_off.jpg  alt=Abuja Master Plan /                        
 p
 class=entryTexta href=http://localhost/wrt-demo/projects/detail/
 Abuja-Master-Plan/13Abuja Master Plan/a/p/li

 $(.clickable).hover(function() {
         $(this).children(img).attr(src, $(this).attr(src).split
 (_off).join(_over));}, function() {

         $(this).children(img).attr(src, $(this).attr(src).split
 (_over).join(_off));

 });

 This works but not what I was trying to achieve:
 $(.clickable img).hover(function() {
         $(this).attr(src, $(this).attr(src).split(_off).join
 (_over));}, function() {

         $(this).attr(src, $(this).attr(src).split(_over).join
 (_off));

 });

 On Aug 25, 10:52 am, Liam Potter radioactiv...@gmail.com wrote:

  It's because you have targeted the image as the hover area rather then
  the li, use this instead

  $(li.clickable).hover(function() {
          $(this).children(img).attr(src, 
  $(this).attr(src).split(_off).join(_over));}, function() {

          $(this).children(img).attr(src, 
  $(this).attr(src).split(_over).join(_off));

  });

  Hover over the li, then get the child element within the context of
  'this' to perform the actions to it.

  wheatstraw wrote:
   What I want to have happen is when you hover over the li it:
   1) allows you to click the who area (this works)
   2) The image swap.

   Right now the image will only swap when hovering over the image not
   the rest of the li.

   Any help would be appreciated!

   $(document).ready(function(){
      $('li.clickable').css('cursor', 'pointer').click(function() {
              window.location = $('a', this).attr('href');
      });

      $(li.clickable img).hover(function() {
              $(this).attr(src, $(this).attr(src).split(_off).join
   (_over));
      }, function() {
              $(this).attr(src, $(this).attr(src).split(_over).join
   (_off));
      });
   });


[jQuery] Re: jQuery selector for style attribute

2009-08-25 Thread John

That may not be an option, at least now. The reason is that the jQuery
selector is automatically generated by a framework, which may be
rather random and difficult to set another class.

The first thing is to get it work. As long as the syntax is correct,
it
should work fine, right?  I care more about the correctness of the
syntax.

Thanks,

John

On Aug 25, 5:36 pm, James james.gp@gmail.com wrote:
 Couldn't you just set another class for where you have that long style
 attribute? That'll make it so much nicer and less error prone for what
 you're trying to achieve. I'm not telling you that you need to remove
 the inline style, but just added another class on the element where
 you have the inline style. It'll make the jQuery selection easier.

 On Aug 25, 11:22 am, John jian.fang.subscr...@gmail.com wrote:

  Thanks Maurício for your quick response.

  I have a program to automatically generate jQuery selectors based on
  some UI element attributes and seems your syntax is not always
  working. For example,

  1) working:  $('div:has(input[type=text][readonly=true], img
  [style=overflow: auto; width: 356px; height: 100px;]) img')

  2) Not working: $('div:has(input[type=text][readonly=true]
  [style=width: 343px;], img[style=overflow: auto; width: 356px;
  height: 100px;]) img')

  3) Not working:  $('div:has(input[type=text][readonly=true], img
  [style=overflow: auto; width: 356px; height: 100px;]) img
  [style=overflow: auto; width: 356px; height: 100px;]')

  4) Not working:  $('div:has(input[type=text][readonly=true]
  [style=width: 343px;], img[style=overflow: auto; width: 356px;
  height: 100px;]) img[style=overflow: auto; width: 356px; height:
  100px;]')

  Here not working means it returns empty object where it should
  return non-empty object.

  Do you know what is wrong?

  Thanks again,

  John

  On Aug 25, 2:50 pm, Mauricio \(Maujor\) Samy Silva

  css.mau...@gmail.com wrote:
   Sintax for the selector is:

   $('img[style=overflow: auto; width: 356px; height: 100px;]')

   Maurício
     -Mensagem Original-
     De: John
     Para: jQuery (English)
     Enviada em: terça-feira, 25 de agosto de 2009 14:36
     Assunto: [jQuery] jQuery selector for style attribute

     Hi,

     I want to select the following image using jQuery selector to see if I
     could use the style attribute,

     img id=ext-gen439 class=x-form-trigger x-form-arrow-trigger
     style=overflow: auto; width: 356px; height: 100px; src=images/
     s.gif/

     but seems the selector

     img[style=overflow: auto; width: 356px; height: 100px;]

     does not work at all. What would be the correct selector for the style
     attribute?

     Thanks in advance,

     John


[jQuery] validate classbased via ajax request

2009-08-25 Thread Jan Limpens
Hello,

my forms are all css class based validated. Now I need to check some on them
serverside, so I overload the regular validation methods (or is there a
better way?).

jQuery.validator.addMethod(date, function(value, element) {
var preValid = this.optional(element) ||
/^\d\d?\/\d\d?\/\d\d\d?\d?$/.test(value);
if (!preValid)
return false;
$.getJSON(urlDefs.validateDate + ?date= + value, function(data) {
var result = data.Data;
// what can I do with this result?
// how can I set element valid?
});
}, jQuery.validator.messages['date']);

I might be doing something wrong...
I know there is a remote({}) method, but how could I use it from there? It
might work less asynchronously, thus easier...
-- 
Jan


[jQuery] pagination plugin

2009-08-25 Thread finneycanhelp

Hi,

http://plugins.jquery.com/project/pagination mentions an IE 7 issue.
Are people successfully using IE7 with this plugin?

Thanks.

--
Michael Finney - Always Striving To Serve You Better Every Day
http://www.SmilingSoftwareSolutions.com



[jQuery] Event Not Triggering On External JS Files

2009-08-25 Thread Greg

I built a small JavaScript file that does some HTML and CSS
manipulation when you hover over any tag with a certain class.  It
works great when running on the same server, but if I try to use the
JS as an external script, the hover event isn't triggering.

Here is my external JS file code:

$(document).ready(function() {
  alert('i work inside');
  $(.start).hover(
function (e) {
$(.button).css( { 'display':'none', 'position':'relative',
'left':'150px', 'top':'-10' } );
$(.button).fadeIn(500);
},
function (e) {
  $(.button).remove();
});
});
alert('i work outside');

Here is my include code on the HTML page:
div
  span class=startbuttonYes/button/span
/div
script type=text/javascript src=http://ajax.googleapis.com/ajax/
libs/jquery/1.3.2/jquery.min.js/script
script type=text/javascript src=http://mydomain.com/js/
button.js/script

When I hover over that span, it does not trigger the code in
button.js,  Any ideas?

Thanks in advance.


[jQuery] Re: Post PHP object via AJAX

2009-08-25 Thread James

What do you mean a PHP object? You can't pass a PHP object in
Javascript...Javascript is Javascript, not PHP.
You can pass in a Javascript object (JSON format) to jQuery's ajax()
and it'll convert accordingly for you depending on whether you're
doing a GET or POST.

This below, is the same way to write what you have but using a
Javascript object for the request data.

$.ajax({
   type: POST,
   url: some.php,
   data: {name:'John', location:'Boston'},
   success: function(msg){
 alert( Data Saved:  + msg );
   }
 });

On Aug 25, 9:08 am, Stefanos grbo...@gmail.com wrote:
 Hello everyone!

 By writing this:
 $.ajax({
    type: POST,
    url: some.php,
    data: name=Johnlocation=Boston,
    success: function(msg){
      alert( Data Saved:  + msg );
    }
  });

 we pass variables 'name' and 'location' to the file 'some.php'. How
 can we pass a PHP object

 Thank you in advance!


[jQuery] Re: Event Not Triggering On External JS Files

2009-08-25 Thread James

Does it work if you put your jquery library at the top? (In the
head)

On Aug 25, 12:31 pm, Greg greg.heid...@gmail.com wrote:
 I built a small JavaScript file that does some HTML and CSS
 manipulation when you hover over any tag with a certain class.  It
 works great when running on the same server, but if I try to use the
 JS as an external script, the hover event isn't triggering.

 Here is my external JS file code:

 $(document).ready(function() {
   alert('i work inside');
   $(.start).hover(
     function (e) {
             $(.button).css( { 'display':'none', 'position':'relative',
 'left':'150px', 'top':'-10' } );
             $(.button).fadeIn(500);
         },
         function (e) {
           $(.button).remove();
         });});

 alert('i work outside');

 Here is my include code on the HTML page:
 div
   span class=startbuttonYes/button/span
 /div
 script type=text/javascript src=http://ajax.googleapis.com/ajax/
 libs/jquery/1.3.2/jquery.min.js/script
 script type=text/javascript src=http://mydomain.com/js/
 button.js/script

 When I hover over that span, it does not trigger the code in
 button.js,  Any ideas?

 Thanks in advance.


[jQuery] Re: $.inArray optimisation

2009-08-25 Thread KeeganWatkins

@morningz - it wouldn't surprise me. Nonetheless, if it were up to me,
(which it's not), jQuery wouldn't use it until it becomes
standardized. Prototype, MooTools and other competitors all augment
native data types, and it drives me nuts. Respect for the environment
is one of the features of jQuery that I enjoy the most. My point is
this: the only benefit of checking for indexOf would be to add it if
needed, which jQuery *generally* doesn't do. I can't see forking the
code for $.inArray being worthwhile unless it brought serious speed
improvements.

On Aug 25, 9:15 am, MorningZ morni...@gmail.com wrote:
 IMO, it doesn't belong in the core

 I think I read somewhere that a check for that usage will be in 1.3.3
 core, but damned if I can find where I saw that stated

 On Aug 25, 9:59 am, KeeganWatkins mkeeganwatk...@gmail.com wrote:



  it does not work in every browser. the purpose of jQuery and similar
  libraries is to streamline development and create a (mostly)
  consistent foundation to build on, regardless of browser. if you're
  interested in gaining some performance, or just using the latest JS
  features, i'd suggest implementing this yourself. IMO, it doesn't
  belong in the core, but it would be easy to add.

  something like this:
  if (Array.prototype.indexOf) {
      $.inArray = function(elem, array) {
          return array.indexOf(elem);

  }

  because $.inArray is already a part of the core, you'd just be
  replacing it where the native indexOf method exists on Arrays.
  otherwise, you'd just be using the standard implementation. hope that
  helps.

  On Aug 24, 12:28 pm, Cesar Sanz the.email.tr...@gmail.com wrote:

   Does it works for every browser?

   - Original Message -
   From: gurdiga gurd...@gmail.com
   To: jQuery (English) jquery-en@googlegroups.com
   Sent: Sunday, August 23, 2009 1:07 PM
   Subject: [jQuery] $.inArray optimisation

Hello,

The $.inArray function is defined in
   http://jqueryjs.googlecode.com/svn/trunk/jquery/src/core.js
as:

inArray: function( elem, array ) {
for ( var i = 0, length = array.length; i  length; i++ ) {
if ( array[ i ] === elem ) {
return i;
}
}

return -1;
},

I'm wondering: would it be possible to take advantage of the built-in
indexOf method of the Array present in FF Javascript engines? Im
thinking of something like:

   if (typeof Array.prototype.indexOf === 'function') {
       return array.indexOf(elem);
   }

What do you think?


[jQuery] Re: not working in IE6

2009-08-25 Thread Nitin Gautam

I tried replacing attr with data but still not working with IE :(( in
FF this is working fine
 $(select option).attr( title,  );  with   $(select
option).data( title,  );

For IE i also tried the following
$(select option).tooltip({left: 25}); instead of $(select).tooltip
({left: 25}); but still not work in IE
and it distorted the tooltip in FF.

Don't any one have a working example of this that show how to work
with SELECT OPTION element?

On Aug 26, 1:20 am, James james.gp@gmail.com wrote:
 And if the title attribute on the options tag is really the problem,
 you should consider using jQuery's data() functions 
 instead.http://docs.jquery.com/Core/data

 On Aug 25, 3:56 am, MorningZ morni...@gmail.com wrote:

  You're fighting a big uphill battle thinking it works in FF, it
  should work in IE.x

  More than likely, IE6 has zero support/knowledge of what to do with a
  title attribute on an option tag

  On Aug 25, 9:33 am, Nitin Gautam gautam.ni...@gmail.com wrote:

   Then how this working in Firefox ? and how to call on options?

   On Aug 25, 6:13 pm, MorningZ morni...@gmail.com wrote:

Can you elaborate on what part doesn't work?

Assigning the title tag?
The wiring up of the tool tip?

And you realize the the tooltip plugin goes after the selected
object's title parameter, right?  Your each() loop assigns the title
to the option's, but your .tooltip() call is on the select, two
totally different DOM objects

On Aug 25, 9:00 am, Nitin Gautam gautam.ni...@gmail.com wrote:

 Hi,

 I am trying this in IE6 and found not working. In Firefox it is
 working as expected

 html
 head
  script type=text/javascript src=jquery-1.3.1.js/script
  script type=text/javascript src=jquery.tooltip.js/script
  style type=text/css
  select{
width: 60;
  }
  option{
width: 60;
  }
 /style
 !-- Include custom code to handle the tooltip --
 script type=text/javascript
 $(document).ready(function(){

   //After loading the page insert the title attribute.
   $(function(){
 $(select option).attr( title, Nits );
 $(select option).each(function(i){
   this.title = this.text;
 })
   });

   //Attach a tooltip to select elements
   $(select).tooltip({left: 70});

 });

 /script
 body

 !-- When moving the mouse over the below options --
 select
optionvery long option text 1/option
optionvery long option text 2/option
optionvery long option text 3/option
optionvery long option text 4/option
optionvery long option text 5/option
optionvery long option text 6/option
 /select
 /body
 /html

 Please HELP!


[jQuery] Re: Event Not Triggering On External JS Files

2009-08-25 Thread Greg

@Meroe:  That was kind of pseudo-code so I checked anyway and there's
no spaces in the actual code.

@James:  No, it doesn't work if I put the jQuery script tag in the
head.

I was wondering if it had something to do with preventing XSS?  There
is an ajax call to the button.js's domain (which could be the reason).

On Aug 25, 9:44 pm, James james.gp@gmail.com wrote:
 Does it work if you put your jquery library at the top? (In the
 head)

 On Aug 25, 12:31 pm, Greg greg.heid...@gmail.com wrote:

  I built a small JavaScript file that does some HTML and CSS
  manipulation when you hover over any tag with a certain class.  It
  works great when running on the same server, but if I try to use the
  JS as an external script, the hover event isn't triggering.

  Here is my external JS file code:

  $(document).ready(function() {
    alert('i work inside');
    $(.start).hover(
      function (e) {
              $(.button).css( { 'display':'none', 'position':'relative',
  'left':'150px', 'top':'-10' } );
              $(.button).fadeIn(500);
          },
          function (e) {
            $(.button).remove();
          });});

  alert('i work outside');

  Here is my include code on the HTML page:
  div
    span class=startbuttonYes/button/span
  /div
  script type=text/javascript src=http://ajax.googleapis.com/ajax/
  libs/jquery/1.3.2/jquery.min.js/script
  script type=text/javascript src=http://mydomain.com/js/
  button.js/script

  When I hover over that span, it does not trigger the code in
  button.js,  Any ideas?

  Thanks in advance.


[jQuery] Re: How to cancel an AJAX request?

2009-08-25 Thread rupak mandal
Hi Hector,
you have to use abort function.

go through this link http://www.protofunc.com/scripts/jquery/ajaxManager/


Thanks
Rupak

On Wed, Aug 26, 2009 at 2:25 AM, Hector Virgen djvir...@gmail.com wrote:

 Hello,
 Is there a way to stop or cancel an ajax request on demand, similar to
 pressing stop in the browser? I would like to provide the user with a
 cancel button on a loading dialog that, when clicked, closes the dialog
 and cancels the ajax request. I have the dialog working (thanks to
 jQuery-UI) but pressing cancel only closes the it.

 I do not want simply ignore the response because I have a success
 callback that does some heavy manipulation of the response HTML that I'd
 like to prevent from running when the user cancels.

 Any help would be appreciated. Thanks!

 --
 Hector



[jQuery] Is there a jQuery way to sort span-elements?

2009-08-25 Thread Audrey Lee

Hello,

Assume I have 3 span-elements:

div id=names
  span id=s1Fred/span
  span id=s2Alan/span
  span id=s3Sally/span
/div

Is there a jQuery way to sort them so I get this:

div id=names
  span id=s2Alan/span
  span id=s1Fred/span
  span id=s3Sally/span
/div

??

-Audrey


[jQuery] Image inside script

2009-08-25 Thread Fabio

Hi all ,

This is my first post . please help me on one thing :)

{$(.+errId).attr(style,display: inline; color: red);$
(.+errId).attr()$(.+errId).html(nbsp;Invalid Character.
Numerals only.);}


Now i want to add a image at the beginning of this. Its a small close
button how do i append . please help me.

Thanks
Fabio


[jQuery] This will cause an infinite loop. Aborting. on carousels that are initialized as hidden

2009-08-25 Thread Nicholas

To see the issue:
Create a horizontal carousel inside a display: none container.
Make sure it has zero margins if you want to see the issue in browsers
other than Safari.
Don't worry about the zero margins in Safari, it'll break anyway.

The pos method will check the dimensions of the elements in the line
var d = this.dimension(e);

Unfortunately, if the parent container is set display:none, the
dimension method's reliance on offsetWidth when calculating old will
cause it to report back zero width for the elements. They may well
have a CSS width property, they may have padding... but offsetWidth
can't see it as it returns zero on hidden elements.

Once d is zero, we get the error message:
jCarousel: No width/height set for items. This will cause an infinite
loop. Aborting...

dimension also checks the margins. You can somewhat dodge this problem
(though it's hardly ideal) by giving your carousel items a left or
right margin of one or greater. As it adds the margins to the zero
offsetWidth, you get a non zero value and pos doesn't bail on you.

The challenge is, even this doesn't fully fix it as dimension uses the
$jc.margin method. $jc.margin returns the $(el).css('margin-right')
for right margins just fine for everything *except* Safari. For
Safari, it does a separate trick, calculating margins based on the
difference between two offsetWidth values. As the element's hidden,
they're both zero. Difference between zero and zero is zero, it
returns zero for the right margin on hidden elements in Safari.

So, with zero margins being reported, along with zero width, Safari
*always* throws the alert when you run pos on a currently hidden
carousel - while other browsers only throw the alert when the margins
are also zero.

It's kind of a deep one to even find - you have to be doing something
with the carousel that triggers pos (i.e. initializing) while it's
inside a hidden container. Plus, if you have margins, you'll never see
it in anything other than Safari. Still, when it does come up, it's a
major pain to figure out what it's doing and work around.

I hope all of that made sense. Like I said, it's kind of buried.