[jQuery] Re: [validate] - Multi-lingual Error Messages

2008-11-20 Thread Jörn Zaefferer
The current approach is to include one of the localized files based on
the user preference:
http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/localization/

Jörn

On Thu, Nov 20, 2008 at 1:00 AM, MojoMark [EMAIL PROTECTED] wrote:

 Is there a way to change the text of the error messages? I'm doing a
 multi-lingual app and want to change the text based on the language
 preference of the user.



[jQuery] Re: jQuery select all vs conventional javascript

2008-11-20 Thread Michael Geary

It's no surprise that the jQuery code is slower: you can always outperform
jQuery with a custom-tuned loop. After all, jQuery has to do everything that
your custom loop does, plus much more. For one thing, jQuery has to first
build an array of all the items and then traverse that array. Your custom
code doesn't have to build an array at all.

You may be able to pick up a tiny bit more speed in your loop. First, make
sure to var your i variable. If you don't var it, i is actually a
property of the window object, and if this code is inside a function, that
will make it slower to access the variable.

Also, don't look up myListBox.length every time through the loop; you can
either look it up once at the beginning or not at all.

I would try these three variations on your loop and see if any of them comes
up faster:

for( var i = 0, n = myListBox.length;  i  n; )
myListBox[i++].selected = true;

for( var i = myListBox.length;  i  0; )
myListBox[--i].selected = true;

for( var i = -1, option; option = myListBox[++i]; )
option.selected = true;

I'll be curious to know the result.

My guess is that one of those may be a bit faster, but still too slow to be
acceptable. If that's the case, there may be nothing to be done for it
except to do the selecting in batches of, say, 1000 elements with a short
timeout between each batch. That way the browser will remain responsive
while you run the loop.

-Mike

 From: JQueryProgrammer
 
 I have been using jQuery for quite some time now. For one of 
 my projects, I needed to select all the options in the 
 listbox which were 10,000+. I tried to do a comparison 
 between using jQuery and conventional javascript and here are 
 my findings:
 
 1. With jQuery:
 Code:  $(#myListBox *).attr(selected,selected);
 Time taken: 7+ milliseconds
 
 2. With JavaScript:
 Code:  for( i=0; i  myListBox.length; i++) { myListBox
 [i].selected = true; }
 Time taken: 21000+ milliseconds
 
 Can anyone provide with some better code or justify why is 
 jQuery taking so much time.



[jQuery] Re: jQuery select all vs conventional javascript

2008-11-20 Thread JQueryProgrammer

Ok got it and understood that the conventional javascript would be
faster than jQuery in this case. But what I have seen is that just by
pressing SHIFT+END, all the options in the listbox get selected. Is
there some way we can fire that event to select all options.

On Nov 20, 1:10 pm, Michael Geary [EMAIL PROTECTED] wrote:
 It's no surprise that the jQuery code is slower: you can always outperform
 jQuery with a custom-tuned loop. After all, jQuery has to do everything that
 your custom loop does, plus much more. For one thing, jQuery has to first
 build an array of all the items and then traverse that array. Your custom
 code doesn't have to build an array at all.

 You may be able to pick up a tiny bit more speed in your loop. First, make
 sure to var your i variable. If you don't var it, i is actually a
 property of the window object, and if this code is inside a function, that
 will make it slower to access the variable.

 Also, don't look up myListBox.length every time through the loop; you can
 either look it up once at the beginning or not at all.

 I would try these three variations on your loop and see if any of them comes
 up faster:

     for( var i = 0, n = myListBox.length;  i  n; )
         myListBox[i++].selected = true;

     for( var i = myListBox.length;  i  0; )
         myListBox[--i].selected = true;

     for( var i = -1, option; option = myListBox[++i]; )
         option.selected = true;

 I'll be curious to know the result.

 My guess is that one of those may be a bit faster, but still too slow to be
 acceptable. If that's the case, there may be nothing to be done for it
 except to do the selecting in batches of, say, 1000 elements with a short
 timeout between each batch. That way the browser will remain responsive
 while you run the loop.

 -Mike

  From: JQueryProgrammer

  I have been using jQuery for quite some time now. For one of
  my projects, I needed to select all the options in the
  listbox which were 10,000+. I tried to do a comparison
  between using jQuery and conventional javascript and here are
  my findings:

  1. With jQuery:
      Code:          $(#myListBox *).attr(selected,selected);
      Time taken: 7+ milliseconds

  2. With JavaScript:
      Code:          for( i=0; i  myListBox.length; i++) { myListBox
  [i].selected = true; }
      Time taken: 21000+ milliseconds

  Can anyone provide with some better code or justify why is
  jQuery taking so much time.


[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter


is the div necessary?
Try taking it out.
vani wrote:

Thanks for replying, but I'm still having trouble making it work. I
tried to set the table to relative and img to absolute but it didn't
work as intended.
This is the layout of the table:
table
tr
tddivimg //div/td
tddivimg //div/td
tddivimg //div/td
/tr
/table

...I'm trying to resize the img elements.

On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED] wrote:
  

use absolute positioning and set the parent element to relative.



vani wrote:


Is it possible to create an animated resize of an element without
affecting the layout of the parent element table?
I'm using jQuery 1.2.6 and possibly personalized jQuery UI, if
necessary.
  




[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread vani

I've taken out the div, but it doesn't matter because as soon as I
change the images positioning to absolute they change their top/left
coordinates to the center of the cell, like this: http://tinyurl.com/5vmb42

On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED] wrote:
 is the div necessary?
 Try taking it out.



 vani wrote:
  Thanks for replying, but I'm still having trouble making it work. I
  tried to set the table to relative and img to absolute but it didn't
  work as intended.
  This is the layout of the table:
  table
  tr
  tddivimg //div/td
  tddivimg //div/td
  tddivimg //div/td
  /tr
  /table

  ...I'm trying to resize the img elements.

  On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED] wrote:

  use absolute positioning and set the parent element to relative.

  vani wrote:

  Is it possible to create an animated resize of an element without
  affecting the layout of the parent element table?
  I'm using jQuery 1.2.6 and possibly personalized jQuery UI, if
  necessary.


[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter


set the css on them to this

position:absolute;
top:0;
left:0;

vani wrote:

I've taken out the div, but it doesn't matter because as soon as I
change the images positioning to absolute they change their top/left
coordinates to the center of the cell, like this: http://tinyurl.com/5vmb42

On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED] wrote:
  

is the div necessary?
Try taking it out.



vani wrote:


Thanks for replying, but I'm still having trouble making it work. I
tried to set the table to relative and img to absolute but it didn't
work as intended.
This is the layout of the table:
table
tr
tddivimg //div/td
tddivimg //div/td
tddivimg //div/td
/tr
/table
  
...I'm trying to resize the img elements.
  
On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED] wrote:
  

use absolute positioning and set the parent element to relative.

vani wrote:


Is it possible to create an animated resize of an element without
affecting the layout of the parent element table?
I'm using jQuery 1.2.6 and possibly personalized jQuery UI, if
necessary.
  




[jQuery] Re: jQuery Uploader Flash player 10 fix

2008-11-20 Thread Crazy-Achmet

Hmmm, guess it didn't work so well, right?


[jQuery] Re: jQuery Uploader Flash player 10 fix

2008-11-20 Thread Josip Lazic

I found this jQuery+Flash uploader, as author say - I'ts quick and
dirty, but it gets job done.

http://www.prodevtips.com/2008/10/31/flash-10-and-jquery-multi-file-uploader/


And, yes it works with Flash10.


[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Ivan Svaljek
If I do that, they all pile up on each other at the top/left corner of the
table, like this: http://tinyurl.com/5tdmgm

On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter [EMAIL PROTECTED]wrote:


 set the css on them to this

 position:absolute;
 top:0;
 left:0;

 vani wrote:
  I've taken out the div, but it doesn't matter because as soon as I
  change the images positioning to absolute they change their top/left
  coordinates to the center of the cell, like this:
 http://tinyurl.com/5vmb42
 
  On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED] wrote:
 
  is the div necessary?
  Try taking it out.
 
 
 
  vani wrote:
 
  Thanks for replying, but I'm still having trouble making it work. I
  tried to set the table to relative and img to absolute but it didn't
  work as intended.
  This is the layout of the table:
  table
  tr
  tddivimg //div/td
  tddivimg //div/td
  tddivimg //div/td
  /tr
  /table
 
  ...I'm trying to resize the img elements.
 
  On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED] wrote:
 
  use absolute positioning and set the parent element to relative.
 
  vani wrote:
 
  Is it possible to create an animated resize of an element without
  affecting the layout of the parent element table?
  I'm using jQuery 1.2.6 and possibly personalized jQuery UI, if
  necessary.
 


 



[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter


make sure you have made the td position:relative

Ivan Svaljek wrote:
If I do that, they all pile up on each other at the top/left corner of 
the table, like this: http://tinyurl.com/5tdmgm


On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



set the css on them to this

position:absolute;
top:0;
left:0;

vani wrote:
 I've taken out the div, but it doesn't matter because as soon as I
 change the images positioning to absolute they change their top/left
 coordinates to the center of the cell, like this:
http://tinyurl.com/5vmb42

 On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

 is the div necessary?
 Try taking it out.



 vani wrote:

 Thanks for replying, but I'm still having trouble making it
work. I
 tried to set the table to relative and img to absolute but it
didn't
 work as intended.
 This is the layout of the table:
 table
 tr
 tddivimg //div/td
 tddivimg //div/td
 tddivimg //div/td
 /tr
 /table

 ...I'm trying to resize the img elements.

 On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

 use absolute positioning and set the parent element to relative.

 vani wrote:

 Is it possible to create an animated resize of an element
without
 affecting the layout of the parent element table?
 I'm using jQuery 1.2.6 and possibly personalized jQuery UI, if
 necessary.









[jQuery] [New plug-in] magicpreview

2008-11-20 Thread lomas . rik

Hi guys,

I've just finished my new plug-in called magicpreview:

http://rikrikrik.com/jquery/magicpreview/

It's for use in forms and it automagically updates selected elements
on your page based on your form fields. Perfect for letting your users
see what they're doing when filling in forms. There's a couple of
demos on my site too.

I'd love to hear your feedback and comments on my plug-in.

Thanks,
Rik


[jQuery] Re: Firefox problems ( with input reg. exp. verification).

2008-11-20 Thread Jsbeginner


Your code is alot better than mine and the use of test instead of match is
better too. However I still have the same problem, even with your code with
Firefox after 16 characters even typed slowley, Firefox becomes slow and
after 20-25 characters it even blocks... Is this a bug with firefox or with
my code ? How can I fix this problem ?

Is it my RegExp ? I can't see how it could be the code as yours is very
simple

Rik Lomas wrote:
 
 
 I've simplified your code for you and sped up your testing by using
 the regular expression test() method
 
 $(document).ready(function(){
   $('input#domain').keyup(function(){
 var domain = $(this).val();
 var reg = /^([a-z0-9]+(\-?\.?[a-z0-9]*)){2,63}\.([a-z]){2,4}$/i ;
 if (reg.test(domain)) {
   $(#ok).html(Correct format ...);
 } else {
   $(#ok).html(Wrong format .../p);
}
   });
 });
 
 
 
 2008/11/19 Jsbeginner [EMAIL PROTECTED]:


 Hello, this is my first topic here, so I hope that I'm doing the right.
 I've
 done a search on google and on this forum without finding anyone with the
 same problem as me, but maybe I'm not looking for the right keywords.

 Here is my problem : I've created a very simple script that checks if a
 domain is in a valid format or not, however with Firefox 3 it does not
 like
 domains that are more than 20 characters long and firefox slows down and
 then completly blocks.

 Here is my code :

 test.js :
 function domchk() {
   var domain = $(input#domain).val();
   var reg = /^([a-z0-9]+(\-?\.?[a-z0-9]*)){2,63}\.([a-z]){2,4}$/i ;
   if (domain.match(reg)) {
  $(#ok).html(Correct format ...);
   } else {
  $(#ok).html(Wrong format .../p);
   }
 }

 function simple_chk(target_items){
  $(target_items).each(function(){
  $(this).keyup(function(){
 domchk();
  });
 });
 }


 $(document).ready(function(){
   simple_chk(input);
 });


 test.html :
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
 titleTest page/title
 script type=text/javascript src=jquery-1.2.6.min.js/script
 script type=text/javascript src=test.js/script
 /head

 body
 h1 Javascript domain check .../h1
 form
 p
 input id=domain type=text //p
 p id=okNot changed yet.../p
 /form
 /body
 /html

 --
 View this message in context:
 http://www.nabble.com/Firefox-problems-%28-with-input-reg.-exp.-verification%29.-tp20580852s27240p20580852.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.


 
 
 
 -- 
 Rik Lomas
 http://rikrikrik.com
 
 

-- 
View this message in context: 
http://www.nabble.com/Firefox-problems-%28-with-input-reg.-exp.-verification%29.-tp20580852s27240p20598552.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Js traditional to jquery syntax.... how?

2008-11-20 Thread Andrea - Aosta

thank you: but this only set the selected value, and not the set the
selected index

On 19 Nov, 19:19, aquaone [EMAIL PROTECTED] wrote:
 $(select).val(value); // for simple select
 $(select).val([value1,value2]); // for select multiple

 stephen

 On Wed, Nov 19, 2008 at 10:15, Andrea - Aosta [EMAIL PROTECTED] wrote:



  i Have this traditional style js script

  function Select_Value_Set(SelectName, Value) {
   eval('SelectObject = document.' +  SelectName + ';');
   for(index = 0;  index  SelectObject.length;    index++) {
    if(SelectObject[index].value == Value)
      SelectObject.selectedIndex = index;
    }
  }

  simply set the index of a select  to value choosed.
  In jquery it is possible to do this? How? Thank you


[jQuery] Problem in Jquery History with IE7

2008-11-20 Thread bentalay

I'm using this plugin JQuerry  http://plugins.jquery.com/node/2472 to
manage
history
in Ajax
I've changed the line code
$([EMAIL PROTECTED]'history']).click(function(){
by
$j('body').intercept('click', [EMAIL PROTECTED]'history'], function(e){
it works perfectly in Firefox i still have the problem using IE7 it
seems that pageload function doesn't excute under IE when press back
button on the explorer

could you Help please!

 thinks


[jQuery] dialog on the fly

2008-11-20 Thread [EMAIL PROTECTED]

Hi,

In my ready function I create a div on the fly and try to create a
dialog box out of it :

 $(document).append('div id=main class=flora/div');
 $(#main).dialog();

But nothing happens. Is it at all possible to do this or should the
div exists when the page is created ?

Thanks


[jQuery] Re: Firefox problems ( with input reg. exp. verification).

2008-11-20 Thread Rik Lomas

Hey, the problem seems to be with the {2,63} bit, so I've rewritten
your code (again), it's not as strict as before but it's a lot faster
now because it tests string length rather than regex lengths:

$(document).ready(function(){
  var reg = /^[a-z0-9]+[a-z0-9\-\.]*\.[a-z]{2,4}$/i;
  $('input#domain').keyup(function(){
var domain = $(this).val();
if (reg.test(domain)  domain.length = 5  domain.length = 68) {
  $(#ok).html(Correct format...);
} else {
  $(#ok).html(Wrong format...);
}
  });
});

Rik


2008/11/20 Jsbeginner [EMAIL PROTECTED]:


 Your code is alot better than mine and the use of test instead of match is
 better too. However I still have the same problem, even with your code with
 Firefox after 16 characters even typed slowley, Firefox becomes slow and
 after 20-25 characters it even blocks... Is this a bug with firefox or with
 my code ? How can I fix this problem ?

 Is it my RegExp ? I can't see how it could be the code as yours is very
 simple

 Rik Lomas wrote:


 I've simplified your code for you and sped up your testing by using
 the regular expression test() method

 $(document).ready(function(){
   $('input#domain').keyup(function(){
 var domain = $(this).val();
 var reg = /^([a-z0-9]+(\-?\.?[a-z0-9]*)){2,63}\.([a-z]){2,4}$/i ;
 if (reg.test(domain)) {
   $(#ok).html(Correct format ...);
 } else {
   $(#ok).html(Wrong format .../p);
}
   });
 });



 2008/11/19 Jsbeginner [EMAIL PROTECTED]:


 Hello, this is my first topic here, so I hope that I'm doing the right.
 I've
 done a search on google and on this forum without finding anyone with the
 same problem as me, but maybe I'm not looking for the right keywords.

 Here is my problem : I've created a very simple script that checks if a
 domain is in a valid format or not, however with Firefox 3 it does not
 like
 domains that are more than 20 characters long and firefox slows down and
 then completly blocks.

 Here is my code :

 test.js :
 function domchk() {
   var domain = $(input#domain).val();
   var reg = /^([a-z0-9]+(\-?\.?[a-z0-9]*)){2,63}\.([a-z]){2,4}$/i ;
   if (domain.match(reg)) {
  $(#ok).html(Correct format ...);
   } else {
  $(#ok).html(Wrong format .../p);
   }
 }

 function simple_chk(target_items){
  $(target_items).each(function(){
  $(this).keyup(function(){
 domchk();
  });
 });
 }


 $(document).ready(function(){
   simple_chk(input);
 });


 test.html :
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 head
 meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
 titleTest page/title
 script type=text/javascript src=jquery-1.2.6.min.js/script
 script type=text/javascript src=test.js/script
 /head

 body
 h1 Javascript domain check .../h1
 form
 p
 input id=domain type=text //p
 p id=okNot changed yet.../p
 /form
 /body
 /html

 --
 View this message in context:
 http://www.nabble.com/Firefox-problems-%28-with-input-reg.-exp.-verification%29.-tp20580852s27240p20580852.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.





 --
 Rik Lomas
 http://rikrikrik.com



 --
 View this message in context: 
 http://www.nabble.com/Firefox-problems-%28-with-input-reg.-exp.-verification%29.-tp20580852s27240p20598552.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.





-- 
Rik Lomas
http://rikrikrik.com


[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread vani

That made it work in IE, but firefox and opera exhibit serious
problems with it. Firefox sets the top/left to document top/left, and
opera sets it to table top/left, only IE sets it to cell's top/left.

On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED] wrote:
 make sure you have made the td position:relative



 Ivan Svaljek wrote:
  If I do that, they all pile up on each other at the top/left corner of
  the table, like this:http://tinyurl.com/5tdmgm

  On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:

      set the css on them to this

      position:absolute;
      top:0;
      left:0;

      vani wrote:
       I've taken out the div, but it doesn't matter because as soon as I
       change the images positioning to absolute they change their top/left
       coordinates to the center of the cell, like this:
     http://tinyurl.com/5vmb42

       On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

       is the div necessary?
       Try taking it out.

       vani wrote:

       Thanks for replying, but I'm still having trouble making it
      work. I
       tried to set the table to relative and img to absolute but it
      didn't
       work as intended.
       This is the layout of the table:
       table
       tr
       tddivimg //div/td
       tddivimg //div/td
       tddivimg //div/td
       /tr
       /table

       ...I'm trying to resize the img elements.

       On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

       use absolute positioning and set the parent element to relative.

       vani wrote:

       Is it possible to create an animated resize of an element
      without
       affecting the layout of the parent element table?
       I'm using jQuery 1.2.6 and possibly personalized jQuery UI, if
       necessary.


[jQuery] Re: dialog on the fly

2008-11-20 Thread [EMAIL PROTECTED]

actually it works if  i append the div to the body 

$(body).append('div id=main class=flora/div')



On 20 nov, 11:00, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 In my ready function I create a div on the fly and try to create a
 dialog box out of it :

  $(document).append('div id=main class=flora/div');
  $(#main).dialog();

 But nothing happens. Is it at all possible to do this or should the
 div exists when the page is created ?

 Thanks


[jQuery] Window.open and jquery

2008-11-20 Thread Tolis Christomanos
Hi all,

I am using window.open to open a new window to display a form.

The form uses jquery for validation but i get the following error

$ is not defined

though i include jquery in the head

Any ideas?


[jQuery] Re: Window.open and jquery

2008-11-20 Thread Liam Potter


show us code, give us a link.


Tolis Christomanos wrote:

Hi all,

I am using window.open to open a new window to display a form.

The form uses jquery for validation but i get the following error

$ is not defined

though i include jquery in the head

Any ideas? 




[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Ivan Svaljek
Here is the link, but it changes often: http://tinyurl.com/634p9s

On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED]wrote:


 do you have a live example I can see?

 vani wrote:
  That made it work in IE, but firefox and opera exhibit serious
  problems with it. Firefox sets the top/left to document top/left, and
  opera sets it to table top/left, only IE sets it to cell's top/left.
 
  On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED] wrote:
 
  make sure you have made the td position:relative
 
 
 
  Ivan Svaljek wrote:
 
  If I do that, they all pile up on each other at the top/left corner of
  the table, like this:http://tinyurl.com/5tdmgm
 
  On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  set the css on them to this
 
  position:absolute;
  top:0;
  left:0;
 
  vani wrote:
   I've taken out the div, but it doesn't matter because as soon as
 I
   change the images positioning to absolute they change their
 top/left
   coordinates to the center of the cell, like this:
 http://tinyurl.com/5vmb42
 
   On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
   is the div necessary?
   Try taking it out.
 
   vani wrote:
 
   Thanks for replying, but I'm still having trouble making it
  work. I
   tried to set the table to relative and img to absolute but it
  didn't
   work as intended.
   This is the layout of the table:
   table
   tr
   tddivimg //div/td
   tddivimg //div/td
   tddivimg //div/td
   /tr
   /table
 
   ...I'm trying to resize the img elements.
 
   On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
   use absolute positioning and set the parent element to
 relative.
 
   vani wrote:
 
   Is it possible to create an animated resize of an element
  without
   affecting the layout of the parent element table?
   I'm using jQuery 1.2.6 and possibly personalized jQuery UI,
 if
   necessary.
 


 



[jQuery] Re: Window.open and jquery

2008-11-20 Thread Tolis Christomanos
ok sorry

The following link from the page file_editor.php which includes jquery

a class=popupwindow rel=windowCenter
 href=components/com_highlights/lib/upload_form.php?uid=?php echo $row-id;
 ? title= rel=File Upload/a


opens a window with this code

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
   head
 meta http-equiv=Content-Type content=text/html; charset=utf-8 /
 link rel=stylesheet href=?php echo $mosConfig_live_site;
 ?/administrator/templates/onnup_admin_final/css/main.css
 media=screen,projection type=text/css /
 script type=text/javascript scr=?php echo $mosConfig_live_site;
 ?/administrator/components/com_highlights/js/jquery.js/script
 script type=text/javascript scr=?php echo $mosConfig_live_site;
 ?/administrator/components/com_highlights/js/jquery.form.js/script
 script type=text/javascript

 // prepare the form when the DOM is ready
 $(document).ready(function() {
 var options = {
 target:'#results',   // target element(s) to be updated
 with server response
 beforeSubmit:  showRequest,  // pre-submit callback
 success:   showResponse  // post-submit callback

 // other available options:
 //url:   url // override for form's 'action' attribute
 //type:  type// 'get' or 'post', override for form's
 'method' attribute
 //dataType:  null// 'xml', 'script', or 'json' (expected
 server response type)
 //clearForm: true// clear all form fields after successful
 submit
 //resetForm: true// reset the form after successful submit

 // $.ajax options can be used here too, for example:
 //timeout:   3000
 };

 // bind to the form's submit event
 $('#fileform').submit(function() {
 // inside event callbacks 'this' is the DOM element so we first
 // wrap it in a jQuery object and then invoke ajaxSubmit
 $(this).ajaxSubmit(options);

 // !!! Important !!!
 // always return false to prevent standard browser submit and page
 navigation
 return false;
 });
 });

 // pre-submit callback
 function showRequest(formData, jqForm, options) {
 // formData is an array; here we use $.param to convert it to a string
 to display it
 // but the form plugin does this for you automatically when it submits
 the data
 var queryString = $.param(formData);

 // jqForm is a jQuery object encapsulating the form element.  To access
 the
 // DOM element for the form do this:
 // var formElement = jqForm[0];

 alert('About to submit: \n\n' + queryString);

 // here we could return false to prevent the form from being submitted;

 // returning anything other than false will allow the form submit to
 continue
 return true;
 }

 // post-submit callback
 function showResponse(responseText, statusText)  {
 // for normal html responses, the first argument to the success
 callback
 // is the XMLHttpRequest object's responseText property

 // if the ajaxSubmit method was passed an Options Object with the
 dataType
 // property set to 'xml' then the first argument to the success
 callback
 // is the XMLHttpRequest object's responseXML property

 // if the ajaxSubmit method was passed an Options Object with the
 dataType
 // property set to 'json' then the first argument to the success
 callback
 // is the json data object returned by the server

 alert('status: ' + statusText + '\n\nresponseText: \n' + responseText +

 '\n\nThe output div should have already been updated with the
 responseText.');
 }

 /script
   /head
 body

 h1?php echo $titletext; ?/h1

 div id=results/div

 form id=fileform class=adminform enctype=multipart/form-data
 method=post action= 

 label for=file?php echo $filetext; ?/label
 input type=file name=file /
 input type=submit name=submit value=?php echo $uploadtext;
 ? /
 input type=submit name=done value=?php echo $savetext; ?/
 /form

 /body
 /html



The error is for the $(document).ready(); which i think means that jquery is
not loaded but the path to jquery.js is correct...



On Thu, Nov 20, 2008 at 1:30 PM, Liam Potter [EMAIL PROTECTED]wrote:


 show us code, give us a link.



 Tolis Christomanos wrote:

 Hi all,

 I am using window.open to open a new window to display a form.

 The form uses jquery for validation but i get the following error

 $ is not defined

 though i include jquery in the head

 Any ideas?





[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter


ok, got it.
Un comment the div in the td, and apply the position relative to that.
for some reason position relative doesn't seem to work on a table cell.

Ivan Svaljek wrote:

Here is the link, but it changes often: http://tinyurl.com/634p9s

On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:



do you have a live example I can see?

vani wrote:
 That made it work in IE, but firefox and opera exhibit serious
 problems with it. Firefox sets the top/left to document
top/left, and
 opera sets it to table top/left, only IE sets it to cell's top/left.

 On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

 make sure you have made the td position:relative



 Ivan Svaljek wrote:

 If I do that, they all pile up on each other at the top/left
corner of
 the table, like this:http://tinyurl.com/5tdmgm

 On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

 set the css on them to this

 position:absolute;
 top:0;
 left:0;

 vani wrote:
  I've taken out the div, but it doesn't matter because as
soon as I
  change the images positioning to absolute they change
their top/left
  coordinates to the center of the cell, like this:
http://tinyurl.com/5vmb42

  On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

  is the div necessary?
  Try taking it out.

  vani wrote:

  Thanks for replying, but I'm still having trouble
making it
 work. I
  tried to set the table to relative and img to absolute
but it
 didn't
  work as intended.
  This is the layout of the table:
  table
  tr
  tddivimg //div/td
  tddivimg //div/td
  tddivimg //div/td
  /tr
  /table

  ...I'm trying to resize the img elements.

  On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:

  use absolute positioning and set the parent element
to relative.

  vani wrote:

  Is it possible to create an animated resize of an
element
 without
  affecting the layout of the parent element table?
  I'm using jQuery 1.2.6 and possibly personalized
jQuery UI, if
  necessary.









[jQuery] how to get onchange select id

2008-11-20 Thread mohan

Hi,

in my web page, i have 4 dropdowns
When onchange event occurs, i want to know that dropdown id.
How can i get that usng jquery.
Help me.

Thanks,
Mohan


[jQuery] Re: jsonp to WCF problem

2008-11-20 Thread [EMAIL PROTECTED]

Hi,

Could you make the JsonModule and JsonStream objects available? That
would save me a couple of hours making them myself. Your help is realy
appreciated.

Thanks,
Edwin Vermeer


[jQuery] Hi all. How to define Chrome browser?

2008-11-20 Thread mtest

How possible to define Chrome browser like other, for example Safafri:
if ($.browser.safari) {
alert('This is Safari')
}

it intersting that chrome browser do same Alert
This is Safari'


Question.
How to define only CHROME browser?


[jQuery] Validate: calling validate() from within a function

2008-11-20 Thread Arpan Dhandhania

Hi,
I am using jQuery's validate plugin. I followed the examples and
have defined $(#signup-form).validate(...) inside $(document).ready
(...). This works for me.

What this does is that when I submit the form, it calls validate().
What I want to do is call validate() from within a function. When the
form is submited, I want to call a function which in turn calls
validate (after processing some of the fields).

I was wondering if this is supported, or if there is a work around for
this problem.

thanks in advance,
Arpan D


[jQuery] Image uploader / manager

2008-11-20 Thread netvibe

What do you think about

http://netvibe.nl/imagemanager/

It's all jquery / php based.. U can upload multiple files at once (swf
upload) and edit the files, rename, remove, etc, etc..






[jQuery] 2 Form Fields

2008-11-20 Thread lunet4

How would i refer to an element in a form if i have at least 2 forms
in a page?

For example, llet's say i have the following:

form id=form1
   input id=input1 /
/form

form id=form2
   input id=input1 /
/form

How would i refer to the input1 in form1?

I've tried $('#form1#input1') or something similar but it doesn't
work. What is the correct syntax? Thanks!


[jQuery] need advise to create layer slide down menu

2008-11-20 Thread AlecTee

Hi,

i'm new to JQuery, I wish to have a slide down effect as below link.

www.digi.com.my

I have tried the slide effect for JQuery, but it always start the
animation from top but not bottom.
My description may confusing, please visit above link as example.

Thanks in advance.


[jQuery] Re: 2 Form Fields

2008-11-20 Thread fa fa
similar to document.forms, what is the jquery equivalent?

On Thu, Nov 20, 2008 at 2:05 AM, lunet4 [EMAIL PROTECTED] wrote:

 How would i refer to an element in a form if i have at least 2 forms
 in a page?

 For example, llet's say i have the following:

 form id=form1
   input id=input1 /
 /form

 form id=form2
   input id=input1 /
 /form

 How would i refer to the input1 in form1?

 I've tried $('#form1#input1') or something similar but it doesn't
 work. What is the correct syntax? Thanks!


[jQuery] Reg: jsf support jQuery?

2008-11-20 Thread jaga

Dear All,

We are Developing an Web Application using JSF1.2,Spring 2.5, and
Hibernate3.0.

   We would like to know whether we can use jquery Integrated with JSF
Framework, If it work kindly provide some Samples or supported links

Thanks  Regards
Jagan R


[jQuery] Re: Window.open and jquery

2008-11-20 Thread Rik Lomas

In your script tags, you have scr=jquery.js instead of src=jquery.js

Rik


2008/11/20 Tolis Christomanos [EMAIL PROTECTED]:
 ok sorry

 The following link from the page file_editor.php which includes jquery

 a class=popupwindow rel=windowCenter
 href=components/com_highlights/lib/upload_form.php?uid=?php echo $row-id;
 ? title= rel=File Upload/a

 opens a window with this code

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
 Strict//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
   head
 meta http-equiv=Content-Type content=text/html; charset=utf-8 /
 link rel=stylesheet href=?php echo $mosConfig_live_site;
 ?/administrator/templates/onnup_admin_final/css/main.css
 media=screen,projection type=text/css /
 script type=text/javascript scr=?php echo $mosConfig_live_site;
 ?/administrator/components/com_highlights/js/jquery.js/script
 script type=text/javascript scr=?php echo $mosConfig_live_site;
 ?/administrator/components/com_highlights/js/jquery.form.js/script
 script type=text/javascript

 // prepare the form when the DOM is ready
 $(document).ready(function() {
 var options = {
 target:'#results',   // target element(s) to be updated
 with server response
 beforeSubmit:  showRequest,  // pre-submit callback
 success:   showResponse  // post-submit callback

 // other available options:
 //url:   url // override for form's 'action' attribute
 //type:  type// 'get' or 'post', override for form's
 'method' attribute
 //dataType:  null// 'xml', 'script', or 'json' (expected
 server response type)
 //clearForm: true// clear all form fields after successful
 submit
 //resetForm: true// reset the form after successful submit

 // $.ajax options can be used here too, for example:
 //timeout:   3000
 };

 // bind to the form's submit event
 $('#fileform').submit(function() {
 // inside event callbacks 'this' is the DOM element so we first
 // wrap it in a jQuery object and then invoke ajaxSubmit
 $(this).ajaxSubmit(options);

 // !!! Important !!!
 // always return false to prevent standard browser submit and page
 navigation
 return false;
 });
 });

 // pre-submit callback
 function showRequest(formData, jqForm, options) {
 // formData is an array; here we use $.param to convert it to a string
 to display it
 // but the form plugin does this for you automatically when it submits
 the data
 var queryString = $.param(formData);

 // jqForm is a jQuery object encapsulating the form element.  To
 access the
 // DOM element for the form do this:
 // var formElement = jqForm[0];

 alert('About to submit: \n\n' + queryString);

 // here we could return false to prevent the form from being
 submitted;
 // returning anything other than false will allow the form submit to
 continue
 return true;
 }

 // post-submit callback
 function showResponse(responseText, statusText)  {
 // for normal html responses, the first argument to the success
 callback
 // is the XMLHttpRequest object's responseText property

 // if the ajaxSubmit method was passed an Options Object with the
 dataType
 // property set to 'xml' then the first argument to the success
 callback
 // is the XMLHttpRequest object's responseXML property

 // if the ajaxSubmit method was passed an Options Object with the
 dataType
 // property set to 'json' then the first argument to the success
 callback
 // is the json data object returned by the server

 alert('status: ' + statusText + '\n\nresponseText: \n' + responseText
 +
 '\n\nThe output div should have already been updated with the
 responseText.');
 }

 /script
   /head
 body

 h1?php echo $titletext; ?/h1

 div id=results/div

 form id=fileform class=adminform enctype=multipart/form-data
 method=post action= 

 label for=file?php echo $filetext; ?/label
 input type=file name=file /
 input type=submit name=submit value=?php echo $uploadtext;
 ? /
 input type=submit name=done value=?php echo $savetext;
 ?/
 /form

 /body
 /html


 The error is for the $(document).ready(); which i think means that jquery is
 not loaded but the path to jquery.js is correct...



 On Thu, Nov 20, 2008 at 1:30 PM, Liam Potter [EMAIL PROTECTED]
 wrote:

 show us code, give us a link.


 Tolis Christomanos wrote:

 Hi all,

 I am using window.open to open a new window to display a form.

 The form uses jquery for validation but i get the following error

 $ is not defined

 though i include jquery in the head

 Any ideas?






-- 
Rik Lomas
http://rikrikrik.com


[jQuery] Re: Window.open and jquery

2008-11-20 Thread Tolis Christomanos
OMG!!!

Yes i am blind

Thank you so much!!!

On Thu, Nov 20, 2008 at 1:48 PM, Rik Lomas [EMAIL PROTECTED] wrote:


 In your script tags, you have scr=jquery.js instead of src=jquery.js

 Rik


 2008/11/20 Tolis Christomanos [EMAIL PROTECTED]:
  ok sorry
 
  The following link from the page file_editor.php which includes jquery
 
  a class=popupwindow rel=windowCenter
  href=components/com_highlights/lib/upload_form.php?uid=?php echo
 $row-id;
  ? title= rel=File Upload/a
 
  opens a window with this code
 
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
  Strict//ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
  html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
  meta http-equiv=Content-Type content=text/html; charset=utf-8
 /
  link rel=stylesheet href=?php echo $mosConfig_live_site;
  ?/administrator/templates/onnup_admin_final/css/main.css
  media=screen,projection type=text/css /
  script type=text/javascript scr=?php echo $mosConfig_live_site;
  ?/administrator/components/com_highlights/js/jquery.js/script
  script type=text/javascript scr=?php echo $mosConfig_live_site;
  ?/administrator/components/com_highlights/js/jquery.form.js/script
  script type=text/javascript
 
  // prepare the form when the DOM is ready
  $(document).ready(function() {
  var options = {
  target:'#results',   // target element(s) to be updated
  with server response
  beforeSubmit:  showRequest,  // pre-submit callback
  success:   showResponse  // post-submit callback
 
  // other available options:
  //url:   url // override for form's 'action'
 attribute
  //type:  type// 'get' or 'post', override for form's
  'method' attribute
  //dataType:  null// 'xml', 'script', or 'json' (expected
  server response type)
  //clearForm: true// clear all form fields after
 successful
  submit
  //resetForm: true// reset the form after successful
 submit
 
  // $.ajax options can be used here too, for example:
  //timeout:   3000
  };
 
  // bind to the form's submit event
  $('#fileform').submit(function() {
  // inside event callbacks 'this' is the DOM element so we first
  // wrap it in a jQuery object and then invoke ajaxSubmit
  $(this).ajaxSubmit(options);
 
  // !!! Important !!!
  // always return false to prevent standard browser submit and
 page
  navigation
  return false;
  });
  });
 
  // pre-submit callback
  function showRequest(formData, jqForm, options) {
  // formData is an array; here we use $.param to convert it to a
 string
  to display it
  // but the form plugin does this for you automatically when it
 submits
  the data
  var queryString = $.param(formData);
 
  // jqForm is a jQuery object encapsulating the form element.  To
  access the
  // DOM element for the form do this:
  // var formElement = jqForm[0];
 
  alert('About to submit: \n\n' + queryString);
 
  // here we could return false to prevent the form from being
  submitted;
  // returning anything other than false will allow the form submit to
  continue
  return true;
  }
 
  // post-submit callback
  function showResponse(responseText, statusText)  {
  // for normal html responses, the first argument to the success
  callback
  // is the XMLHttpRequest object's responseText property
 
  // if the ajaxSubmit method was passed an Options Object with the
  dataType
  // property set to 'xml' then the first argument to the success
  callback
  // is the XMLHttpRequest object's responseXML property
 
  // if the ajaxSubmit method was passed an Options Object with the
  dataType
  // property set to 'json' then the first argument to the success
  callback
  // is the json data object returned by the server
 
  alert('status: ' + statusText + '\n\nresponseText: \n' +
 responseText
  +
  '\n\nThe output div should have already been updated with the
  responseText.');
  }
 
  /script
/head
  body
 
  h1?php echo $titletext; ?/h1
 
  div id=results/div
 
  form id=fileform class=adminform enctype=multipart/form-data
  method=post action= 
 
  label for=file?php echo $filetext; ?/label
  input type=file name=file /
  input type=submit name=submit value=?php echo
 $uploadtext;
  ? /
  input type=submit name=done value=?php echo $savetext;
  ?/
  /form
 
  /body
  /html
 
 
  The error is for the $(document).ready(); which i think means that jquery
 is
  not loaded but the path to jquery.js is correct...
 
 
 
  On Thu, Nov 20, 2008 at 1:30 PM, Liam Potter [EMAIL PROTECTED]
  wrote:
 
  show us code, give us a link.
 
 
  Tolis Christomanos wrote:
 
  Hi all,
 
  I am using window.open to open a new window to display a form.
 
  The form uses jquery for 

[jQuery] Re: Hi all. How to define Chrome browser?

2008-11-20 Thread Liam Potter


That's because they both use the same rendering engine, WebKit.
I'm not sure right now if you can single one from the other.

mtest wrote:

How possible to define Chrome browser like other, for example Safafri:
if ($.browser.safari) {
alert('This is Safari')
}

it intersting that chrome browser do same Alert
This is Safari'


Question.
How to define only CHROME browser?
  




[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread vani

That's it, weehee! Now if only I could somehow position the center of
the images to coincide with the center of parent cell? Any ideas on
that one, and perhaps compatible with jquery animated resize?

On 20 stu, 12:43, Liam Potter [EMAIL PROTECTED] wrote:
 ok, got it.
 Un comment the div in the td, and apply the position relative to that.
 for some reason position relative doesn't seem to work on a table cell.



 Ivan Svaljek wrote:
  Here is the link, but it changes often:http://tinyurl.com/634p9s

  On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:

      do you have a live example I can see?

      vani wrote:
       That made it work in IE, but firefox and opera exhibit serious
       problems with it. Firefox sets the top/left to document
      top/left, and
       opera sets it to table top/left, only IE sets it to cell's top/left.

       On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

       make sure you have made the td position:relative

       Ivan Svaljek wrote:

       If I do that, they all pile up on each other at the top/left
      corner of
       the table, like this:http://tinyurl.com/5tdmgm

       On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter
      [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
       mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

           set the css on them to this

           position:absolute;
           top:0;
           left:0;

           vani wrote:
            I've taken out the div, but it doesn't matter because as
      soon as I
            change the images positioning to absolute they change
      their top/left
            coordinates to the center of the cell, like this:
          http://tinyurl.com/5vmb42

            On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED]
           mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

            is the div necessary?
            Try taking it out.

            vani wrote:

            Thanks for replying, but I'm still having trouble
      making it
           work. I
            tried to set the table to relative and img to absolute
      but it
           didn't
            work as intended.
            This is the layout of the table:
            table
            tr
            tddivimg //div/td
            tddivimg //div/td
            tddivimg //div/td
            /tr
            /table

            ...I'm trying toresizethe img elements.

            On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED]
           mailto:[EMAIL PROTECTED]
      mailto:[EMAIL PROTECTED] wrote:

            use absolute positioning and set the parent element
      to relative.

            vani wrote:

            Is it possible to create an animatedresizeof an
      element
           without
            affecting the layout of the parent element table?
            I'm usingjQuery1.2.6 and possibly personalized
     jQueryUI, if
            necessary.


[jQuery] Re: Hi all. How to define Chrome browser?

2008-11-20 Thread Mike Alsup

 How possible to define Chrome browser like other, for example Safafri:
 if ($.browser.safari) {
         alert('This is Safari')
     }

 it intersting that chrome browser do same Alert
     This is Safari'

 Question.
 How to define only CHROME browser?


$.browser.chrome = /Chrome/.test(userAgent);




[jQuery] Re: 2 Form Fields

2008-11-20 Thread Mike Alsup

 I've tried $('#form1#input1') or something similar but it doesn't
 work. What is the correct syntax? Thanks!

The correct syntax is CSS, so you need a space between the two:

$('#form1 #input1');

or, since the input you want has an ID you can simply use that:

$('#input1');



[jQuery] Re: Resize an element without affecting the layout

2008-11-20 Thread Liam Potter


erm, best way to explain is to show an example.

lets say the image is 400x400 to get it in the center you will need to 
set top and left to half that.


top:-200px;
left:-200px;

If I'm right this should work, and you can use this in jquery animate.

vani wrote:

That's it, weehee! Now if only I could somehow position the center of
the images to coincide with the center of parent cell? Any ideas on
that one, and perhaps compatible with jquery animated resize?

On 20 stu, 12:43, Liam Potter [EMAIL PROTECTED] wrote:
  

ok, got it.
Un comment the div in the td, and apply the position relative to that.
for some reason position relative doesn't seem to work on a table cell.



Ivan Svaljek wrote:


Here is the link, but it changes often:http://tinyurl.com/634p9s
  
On Thu, Nov 20, 2008 at 12:20 PM, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED] wrote:
  
do you have a live example I can see?
  
vani wrote:

 That made it work in IE, but firefox and opera exhibit serious
 problems with it. Firefox sets the top/left to document
top/left, and
 opera sets it to table top/left, only IE sets it to cell's top/left.
  
 On 20 stu, 11:03, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED] wrote:
  
 make sure you have made the td position:relative
  
 Ivan Svaljek wrote:
  
 If I do that, they all pile up on each other at the top/left

corner of
 the table, like this:http://tinyurl.com/5tdmgm
  
 On Thu, Nov 20, 2008 at 10:21 AM, Liam Potter

[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
 set the css on them to this
  
 position:absolute;

 top:0;
 left:0;
  
 vani wrote:

  I've taken out the div, but it doesn't matter because as
soon as I
  change the images positioning to absolute they change
their top/left
  coordinates to the center of the cell, like this:
http://tinyurl.com/5vmb42
  
  On 20 stu, 09:57, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
  is the div necessary?

  Try taking it out.
  
  vani wrote:
  
  Thanks for replying, but I'm still having trouble

making it
 work. I
  tried to set the table to relative and img to absolute
but it
 didn't
  work as intended.
  This is the layout of the table:
  table
  tr
  tddivimg //div/td
  tddivimg //div/td
  tddivimg //div/td
  /tr
  /table
  
  ...I'm trying toresizethe img elements.
  
  On 19 stu, 18:15, Liam Potter [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
  
  use absolute positioning and set the parent element

to relative.
  
  vani wrote:
  
  Is it possible to create an animatedresizeof an

element
 without
  affecting the layout of the parent element table?
  I'm usingjQuery1.2.6 and possibly personalized
   jQueryUI, if
  necessary.
  




[jQuery] Re: Validate: calling validate() from within a function

2008-11-20 Thread Jörn Zaefferer
You could bind a submit event handler before calling validate. That
way your handler should be executed before the validation.

$(#myform).submit(myHandler).validate();

Jörn

On Thu, Nov 20, 2008 at 10:02 AM, Arpan Dhandhania [EMAIL PROTECTED] wrote:

 Hi,
I am using jQuery's validate plugin. I followed the examples and
 have defined $(#signup-form).validate(...) inside $(document).ready
 (...). This works for me.

 What this does is that when I submit the form, it calls validate().
 What I want to do is call validate() from within a function. When the
 form is submited, I want to call a function which in turn calls
 validate (after processing some of the fields).

 I was wondering if this is supported, or if there is a work around for
 this problem.

 thanks in advance,
 Arpan D



[jQuery] Re: jsonp to WCF problem

2008-11-20 Thread [EMAIL PROTECTED]

Hi,

I am trying to implement a HttpModule but can't get it to work. Can
you please post the code plus config changes?
In the documentation it looks like a HttpModule can not work with WCF.
When you look at http://msdn.microsoft.com/en-us/library/aa702682.aspx
then you will see the folowing sentence:
HttpModule extensibility: The WCF hosting infrastructure intercepts
WCF requests when the PostAuthenticateRequest event is raised and does
not return processing to the ASP.NET HTTP pipeline. Modules that are
coded to intercept requests at later stages of the pipeline do not
intercept WCF requests.


On 20 nov, 08:06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi,

 Could you make the JsonModule and JsonStream objects available? That
 would save me a couple of hours making them myself. Your help is realy
 appreciated.

 Thanks,
 Edwin Vermeer


[jQuery] loading css in the ready() function

2008-11-20 Thread [EMAIL PROTECTED]

Hi,

I want to load the flora css on the fly in the ready() function :

$(document).ready(function(){

 $(head).append('link rel=stylesheet href=http://dev.jquery.com/
view/tags/ui/latest/themes/flora/flora.all.css type=text/css
media=screen title=Flora (Default)');

  $(body).append('div id=main class=flora/div');
  $(#main).dialog();

});


When the dialog is created I get an exception in the jquery file in
the attr function : invalid argument.

At this line : elem[ name ] = value;  It's trying to assign NaNpx to
the attribute 'height'.

If I load the css directly by adding the link in the html page, it
works fine, but for reasons too long to explain I want to load it
dynamically.

Any idea what the problem could be ?

Thanks


[jQuery] Re: jsonp to WCF problem

2008-11-20 Thread [EMAIL PROTECTED]

Ah, i found it. You have to set the aspNetCompatibility

Config file:
system.serviceModel
serviceHostingEnvironment aspNetCompatibilityEnabled=true /

Service class:
[AspNetCompatibilityRequirements(RequirementsMode =
AspNetCompatibilityRequirementsMode.Required),
System.Runtime.InteropServices.GuidAttribute(09A4A7FA-97AC-4CF8-
B264-305EB987AC5F)]
public class myService : ImyService



On 20 nov, 13:15, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi,

 I am trying to implement a HttpModule but can't get it to work. Can
 you please post the code plus config changes?
 In the documentation it looks like a HttpModule can not work with WCF.
 When you look athttp://msdn.microsoft.com/en-us/library/aa702682.aspx
 then you will see the folowing sentence:
 HttpModule extensibility: The WCF hosting infrastructure intercepts
 WCF requests when the PostAuthenticateRequest event is raised and does
 not return processing to the ASP.NET HTTP pipeline. Modules that are
 coded to intercept requests at later stages of the pipeline do not
 intercept WCF requests.

 On 20 nov, 08:06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  Hi,

  Could you make the JsonModule and JsonStream objects available? That
  would save me a couple of hours making them myself. Your help is realy
  appreciated.

  Thanks,
  Edwin Vermeer


[jQuery] Re: Show and hide a list of divs according to anchored ID

2008-11-20 Thread Paul Collins

For anyone who finds this in the future, it's called the tabs
plugin. Can be found here:
http://stilbuero.de/jquery/tabs_3/

One question on this for anyone who may know, does the tabs plugin
only work for links in a list? So, you need to target them via the UL.
All my links are in a Table/TD, was wondering if anyone has made it
work this way?

Thanks for any help.

2008/11/19 Paul Collins [EMAIL PROTECTED]:
 Hi all,

 I'm trying to find a reference here and having troubles. Would really
 appreciate if someone can point me to a tutorial.

 Basically, I have a list of anchored links that point to content with
 matching ID's on the same page. With Javascript on, I want to hide all
 except the first when you come into the page, then when people click
 on a link it would show the matching ID.

 I guess the JQuery would grab the anchored links and put them in an
 array when the page loads? Maybe it doesn't need to be that complex.
 Any help would be great.

 An example of the code:

 !--anchored links--
ul id=anchoredLinks
lia href=#architectsArchitects/a/li
lia href=#designersstrongDesigners/strong/a/li
/ul
 !--content to show and hide--
div id=architects
blah, blah, blah
/div
div id=designers
blah, blah, blah
/div

 Thanks for any help.



[jQuery] Re: Show and hide a list of divs according to anchored ID

2008-11-20 Thread jrutter

I almost have this working, check it out:

 I was able to use an alert to show the id of what was clicked! But Im
trying to show/hide elements based on what is clicked.

So for example, if you click link 1 (id=1) - all div's with id=1
will show, but div's with id=2 will be hidden. I can get everything
to show, but not just id=1.

Here is my code, what am I doing wrong?

$(event.target.id)show(); $(event.target.id:not).hide();

Here is the full code:

//grab values from attributes assigned in xsl
var qtID = $(this).attr(id);

// make id to show comment (#23453-3djis-im37vk9-fkifhf7)
var ccID = '#' + qtID;


//show only comments of matching ccID that were clicked
$(#item-comments-listing).show();
$(event.target.id)show();
$(event.target.id:not).hide();

Any ideas?

On Nov 19, 1:16 pm, Paul Collins [EMAIL PROTECTED] wrote:
 Hi all,

 I'm trying to find a reference here and having troubles. Would really
 appreciate if someone can point me to a tutorial.

 Basically, I have a list of anchored links that point to content with
 matching ID's on the same page. With Javascript on, I want to hide all
 except the first when you come into the page, then when people click
 on a link it would show the matching ID.

 I guess the JQuery would grab the anchored links and put them in an
 array when the page loads? Maybe it doesn't need to be that complex.
 Any help would be great.

 An example of the code:

 !--anchored links--
         ul id=anchoredLinks
                 lia href=#architectsArchitects/a/li
                 lia href=#designersstrongDesigners/strong/a/li  
                     
         /ul
 !--content to show and hide--
         div id=architects
                 blah, blah, blah                                              
   
         /div
         div id=designers
                 blah, blah, blah                                              
   
         /div            

 Thanks for any help.


[jQuery] Re: Image uploader / manager

2008-11-20 Thread Alexandre Plennevaux
works well !


On Thu, Nov 20, 2008 at 10:36 AM, netvibe [EMAIL PROTECTED] wrote:


 What do you think about

 http://netvibe.nl/imagemanager/

 It's all jquery / php based.. U can upload multiple files at once (swf
 upload) and edit the files, rename, remove, etc, etc..







[jQuery] Use event.target.id to show div's based off what id was clicked

2008-11-20 Thread jrutter

 I was able to use an alert to show the id of what was clicked! But Im
trying to show/hide elements based on what is clicked.

So for example, if you click link 1 (id=1) - all div's with id=1
will show, but div's with id=2 will be hidden. I can get everything
to show, but not just id=1.

Here is my code, what am I doing wrong?

$(event.target.id)show(); $(event.target.id:not).hide();

Here is the full code:

//grab values from attributes assigned in xsl
var qtID = $(this).attr(id);

// make id to show comment (#23453-3djis-im37vk9-fkifhf7)
var ccID = '#' + qtID;


//show only comments of matching ccID that were clicked
$(#item-comments-listing).show();
$(event.target.id)show();
$(event.target.id:not).hide();

Any ideas?


[jQuery] Re: Validate: calling validate() from within a function

2008-11-20 Thread Arpan Dhandhania

Thanks Jorn. But if 'myHandler' returned false? What I want is that if
'myHandler' returns false, it should not go ahead with the validate().
I am handling that case separately. If 'myHandler' returned true, it
should proceed.

Arpan D

On Nov 20, 5:09 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 You could bind a submit event handler before calling validate. That
 way your handler should be executed before the validation.

 $(#myform).submit(myHandler).validate();

 Jörn


[jQuery] Re: $('#id').width()

2008-11-20 Thread CodingCyb.org

I'm still trying to picture the site in my mind. So it has three tabs
that you can switch between, but the default can be different? And
when the default isn't the first one, the image appears in tab one,
but stays underneath the input box because the width isn't updated?

On Nov 20, 12:11 am, Lee Mc [EMAIL PROTECTED] wrote:
 The example HTML only has a single text input, it's this input I'm
 having issues with. Apologies, the example HTML gave the field a
 different ID than the JS contained. Im copying the code from an in
 process project so it's stripped down for readability.

 Therefore the different ID in my HTML is just a typo.

 Cheers, Lee.

 On Nov 20, 4:14 am, CodingCyb.org [EMAIL PROTECTED] wrote:

  Sorry it took so long for a reply...

  Where in the html is #test_field ? That's what the field_img goes
  after, but I'm not sure where that is...

  On Nov 19, 9:39 am, Lee Mc [EMAIL PROTECTED] wrote:

   Hi, yes I think you've misunderstood my problem.

   In a nutshell, there is an input type=text on tab 1. On load of
   the form, I'm trying to make this input less wide and place an image
   next to it.  When tab 1 is the default tab, it works fine.  When any
   other tab is the default, it inserts the image but doesn't update the
   width of the field.

   This is an example of my markup:

   div class=tab_container

   !--insert tabs--
   ul class=tabs
   lia href=my_form#tab_1 class=tab title=content_1Tab 1/a/
   li
   lia href=my_form#tab_2 class=tab title=content_2Tab 2/a/
   li
   lia href=my_form#tab_3 class=tab title=content_3Tab 3/a/
   li
   /ul

   !--insert tab 1--
   div id=content_1 class=tab_content
   a name=tab_1/a
   label for=field_idMy Test Field:/labelinput type=text
   id=field_id value=
   /div!--close content_1--

   !--insert tab 2--
   div id=content_2 class=tab_content
   a name=tab_2/a
   !--tab 2 content--
   /div!--close content 2--

   !--insert tab 3--
   div id=content_3 class=tab_content
   a name=tab_3/a
   !--tab 3 content--
   /div!--close content 3--

   /div!--close tab container--

   Any thoughts would be much appreciated.

   Cheers,
   Lee

   On Nov 18, 3:47 pm, CodingCyborg [EMAIL PROTECTED] wrote:

That all seems like it would work fine. I went back and re-read your
original post. I found that I may have misunderstood the problem.

In your original post is #field_id within the content of the first
tab, or is it the content warpper of the first tab?

If it is the wrapper, then you are putting the image outside of what
is hidden, if not then changing that field width shouldn't affect any
other tabs.

From what I now understand you don't want the image there unless you
are on the first tab? So placing it within the content of that tab may
be the solution?

On Nov 18, 9:30 am, Lee Mc [EMAIL PROTECTED] wrote:

 Here is the code which sets the tabs up:

 /*
  * JS to handle the building of tabs within forms
  * Pre-requisites:
  * - jQuery
  * - tab links i.e. a tags to have a class of 'tab'
  * - the title attribute of the a.tab links and the id attribute
 of the div containing that tab's content to be called content_n
 where n is the number representing the tab
  */
 var form_tabs = {
     build: function(){
         // Define what happens when a tab is clicked
         $(a.tab).click(function(event){
             event.preventDefault();
             // switch all tabs off
             $(.active).removeClass(active);

             // switch this tab on
             $(this).addClass(active).blur();

             // hide all elements with the class 'content' up
             $(.tab_content).hide();

             // Now figure out what the 'title' attribute value is and
 find the element with that id. Then display that.
             var content_show = $(this).attr(title);
             $(# + content_show).show();
         });
         // Get the global settings object and figure out which tab
 should be displaying, show it and hide the rest
         var tab_display = '';
         if (settings) {
             // We have found the settings object, get the
 'tab_display' property
             tab_display = settings.tab_display;
         }
         else {
             tab_display = '1';
         }
         // tab_display has been set so set the class for the active
 tab
         $('a.tab').each(function(){
             // 'this' now represents the tab
             if ($(this).attr('title').substr(8) == tab_display) {
                 // we have the correct tab so apply the 'active' class
                 $(this).addClass(active);
             }
         })
         $('.tab_content').each(function(){
             // 'this' now represents the div container.  Test for the
 id and see if we should hide this div
             

[jQuery] Make window.open and page communicate

2008-11-20 Thread Tolis Christomanos
I have a link where i open a new window with window.open();

Then i change some values in the new window and i want to update the page
the new window was invoked with the new values.

How can i do this?


[jQuery] Re: Make window.open and page communicate

2008-11-20 Thread Dirceu Barquette
Search for opener object. but you can use dialog plugin from ui.jquery.
this is more flexible!
Dirceu

2008/11/20 Tolis Christomanos [EMAIL PROTECTED]

 I have a link where i open a new window with window.open();

 Then i change some values in the new window and i want to update the page
 the new window was invoked with the new values.

 How can i do this?



[jQuery] ajax image upload

2008-11-20 Thread maui

I am using http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
It work very well, but I run into a problem i have it return the value
of the new uploaded image after it rename in the server, I found my
display problem but i have no clue how to get around it.

the element on the page ajax return is $('#preview').attr(src,
data);
but data instead of being
/maui/members/members_998_28.jpg
it show up as
/maui/members/members_998_28.jpg
and that why it can't be found on the server. my page use utf-8 (a
const for multi-language web site)

Sincerely for your help !-)


[jQuery] Re: ajaxform validation submission probs

2008-11-20 Thread juk

Hi Joern,

thanks for posting that link. The example works, but there's one more
thing to sort out: It does not submit the submit button's value.

Can you please explain how I get this value across?

Thanks!

On Nov 11, 7:24 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Check this 
 example:http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-de...

 Use ajaxSubmit instead of ajaxForm and put that into the submitHandler.

 Jörn



[jQuery] Re: jQuery Uploader Flash player 10 fix

2008-11-20 Thread Olivier Percebois-Garve
mmh they confirm that swfupload is currently broken. I also experienced that
its the case.

On Thu, Nov 20, 2008 at 10:47 AM, Josip Lazic [EMAIL PROTECTED] wrote:


 I found this jQuery+Flash uploader, as author say - I'ts quick and
 dirty, but it gets job done.


 http://www.prodevtips.com/2008/10/31/flash-10-and-jquery-multi-file-uploader/


 And, yes it works with Flash10.


[jQuery] Re: Validate: calling validate() from within a function

2008-11-20 Thread Jörn Zaefferer
Did you just try that?

Jörn

On Thu, Nov 20, 2008 at 2:14 PM, Arpan Dhandhania [EMAIL PROTECTED] wrote:

 Thanks Jorn. But if 'myHandler' returned false? What I want is that if
 'myHandler' returns false, it should not go ahead with the validate().
 I am handling that case separately. If 'myHandler' returned true, it
 should proceed.

 Arpan D

 On Nov 20, 5:09 pm, Jörn Zaefferer [EMAIL PROTECTED]
 wrote:
 You could bind a submit event handler before calling validate. That
 way your handler should be executed before the validation.

 $(#myform).submit(myHandler).validate();

 Jörn


[jQuery] Re: Make window.open and page communicate

2008-11-20 Thread Tolis Christomanos
Thanks Dirceu

I used the window.opener and it works fine! The ui.jquery seems promising
too...

On Thu, Nov 20, 2008 at 3:26 PM, Dirceu Barquette 
[EMAIL PROTECTED] wrote:

 Search for opener object. but you can use dialog plugin from ui.jquery.
 this is more flexible!
 Dirceu

 2008/11/20 Tolis Christomanos [EMAIL PROTECTED]

 I have a link where i open a new window with window.open();

 Then i change some values in the new window and i want to update the page
 the new window was invoked with the new values.

 How can i do this?





[jQuery] edit an onclick attribute to create a php query string

2008-11-20 Thread edzah

Should really do more reading but at the moment I haven't got the time
so I would appreciate any help I can get.

Overview:

I have a form (with the default submit turned off) that takes user
input and adds each form entry into a table below the form. The user
will then review the list of entries to be uploaded and then clicks an
upload button to upload it to the mysql dbase.

My problem:

The button I am using is an anchor tag, with the attribute onclick. I
want to take all the entries in the table and then create a php query
string so that when the anchor tag is click it will pass this data to
a php file which will do the mysql insert.

a id=upload onclick=parent.location='upload.php?item='
target=_blankupload/a

But I cannot seem to access/update the onlick attribute.
I hoped this would work:

$(a).attr({ onclick : parent.location='upload.php?item=2' });




[jQuery] Re: linkselect plugin problem (related hover gets deactivated) -- help please

2008-11-20 Thread Dan Switzer

Carl,

 I'm using the linkselect plugin to replace select objects in forms
 with a custom look... The issue I'm having is that when these occur in
 navigation menus/panels that appear on hover, hovering down onto the
 replaced select object listing causes the actual navigation menu to
 disappear, as if the hover behavior that turns it on stops registering
 as still being hovered.

 I've posted a test page here:
 http://www.cement-site.com/selecttest/test.html
 (mouse over the news  events item to display the menu, then click
 on the Area Name 1 and mouse down over the list that displays..).

 There's one linkselect object in the menu, and another, just for
 comparison, in the content area of the page.

 What causes the menu hover to deactivate? Is there any way to tweak
 this so that the menu will persist when the replaced select object is
 open?

The problem is HTML elements created for the linkselect are located as
children of the body / tag. So, when you hover over these elements,
you're no longer hovering over the element with the form.

You can probably fix this by moving the container object into your
hover element, but I'm not sure what the reprecusions of this will be
(it might mean the placement of the dropdown no longer appears in the
correct location.)

To move the container into your hover element, do this:

$('select').linkselect({
fixedWidth: true
, init: function ($select, $input, $am $container){
$(#navNewsSearch).append($container);
}
});

This should move the container so it's a child element of your form.
This should at least make the container element so it's a child of the
hover over menu.

-Dan


[jQuery] Re: edit an onclick attribute to create a php query string

2008-11-20 Thread edzah

Ok I've got this working, dunno if it was a syntax issue or what, but
I did this:

$(a).click(function() { parent.location='upload.php?item=2'   });

Although it behaves slightly strange. It opens the upload.php?item=2
as a tab in FF, then opens the original page in a new tab and focuses
on that. My a tag:

diva href= id=upload target=_blankupload/a /div

I would still be interested in any comments regarding this method of
uploading to a mysql dbase...

thanks

On Nov 20, 2:16 pm, edzah [EMAIL PROTECTED] wrote:
 Should really do more reading but at the moment I haven't got the time
 so I would appreciate any help I can get.

 Overview:

 I have a form (with the default submit turned off) that takes user
 input and adds each form entry into a table below the form. The user
 will then review the list of entries to be uploaded and then clicks an
 upload button to upload it to the mysql dbase.

 My problem:

 The button I am using is an anchor tag, with the attribute onclick. I
 want to take all the entries in the table and then create a php query
 string so that when the anchor tag is click it will pass this data to
 a php file which will do the mysql insert.

 a id=upload onclick=parent.location='upload.php?item='
 target=_blankupload/a

 But I cannot seem to access/update the onlick attribute.
 I hoped this would work:

 $(a).attr({ onclick : parent.location='upload.php?item=2' });


[jQuery] Re: edit an onclick attribute to create a php query string

2008-11-20 Thread edzah

Ok I've got this working, dunno if it was a syntax issue or what, but
I did this:

$(a).click(function() { parent.location='upload.php?item=2'   });

Although it behaves slightly strange. It opens the upload.php?item=2
as a tab in FF, then opens the original page in a new tab and focuses
on that. My a tag:

diva href= id=upload target=_blankupload/a /div

I would still be interested in any comments regarding this method of
uploading to a mysql dbase...

thanks

On Nov 20, 2:16 pm, edzah [EMAIL PROTECTED] wrote:
 Should really do more reading but at the moment I haven't got the time
 so I would appreciate any help I can get.

 Overview:

 I have a form (with the default submit turned off) that takes user
 input and adds each form entry into a table below the form. The user
 will then review the list of entries to be uploaded and then clicks an
 upload button to upload it to the mysql dbase.

 My problem:

 The button I am using is an anchor tag, with the attribute onclick. I
 want to take all the entries in the table and then create a php query
 string so that when the anchor tag is click it will pass this data to
 a php file which will do the mysql insert.

 a id=upload onclick=parent.location='upload.php?item='
 target=_blankupload/a

 But I cannot seem to access/update the onlick attribute.
 I hoped this would work:

 $(a).attr({ onclick : parent.location='upload.php?item=2' });


[jQuery] Re: Validate: calling validate() from within a function

2008-11-20 Thread Arpan Dhandhania

Ya, it worked, but even if I return false in the myHandler function,
validation is still going happening.

Arpan D

On Nov 20, 7:11 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 Did you just try that?

 Jörn

 On Thu, Nov 20, 2008 at 2:14 PM, Arpan Dhandhania [EMAIL PROTECTED] wrote:

  Thanks Jorn. But if 'myHandler' returned false? What I want is that if
  'myHandler' returns false, it should not go ahead with the validate().
  I am handling that case separately. If 'myHandler' returned true, it
  should proceed.

  Arpan D

  On Nov 20, 5:09 pm, Jörn Zaefferer [EMAIL PROTECTED]
  wrote:
  You could bind a submit event handler before calling validate. That
  way your handler should be executed before the validation.

  $(#myform).submit(myHandler).validate();

  Jörn


[jQuery] Re: jQuery Uploader Flash player 10 fix

2008-11-20 Thread Jörg Battermann

Let's just give him some time... good things just need that ;)

@Gilles: In case you do need help (coding/testing/whatsoever).. let us
know.. I am sure everyone would love to hop in and give you a hand

-J

On Nov 20, 10:27 am, Crazy-Achmet [EMAIL PROTECTED] wrote:
 Hmmm, guess it didn't work so well, right?


[jQuery] Re: Appending text works; appending element doesn't

2008-11-20 Thread Rodent of Unusual Size

I can't see anything I'm doing wrong here, but it still won't work.
I've tried this:

code
var span = $('spanElem/span');
span.appendTo(this);
/code

but then Firebug says:

code
Node cannot be inserted at the specified point in the hierarchy code:
3
  this.appendChild( elem ); [jquery.js line 238]
/code

I'm lost here..


[jQuery] Re: Appending text works; appending element doesn't

2008-11-20 Thread Rodent of Unusual Size

Sorry about the markup; forgot this group/forum doesn't like it..


[jQuery] Re: $('#id').width()

2008-11-20 Thread Lee Mc

Yes that's exactly right.

Any ideas would be greatly appreciated!


On Nov 20, 1:18 pm, CodingCyb.org [EMAIL PROTECTED] wrote:
 I'm still trying to picture the site in my mind. So it has three tabs
 that you can switch between, but the default can be different? And
 when the default isn't the first one, the image appears in tab one,
 but stays underneath the input box because the width isn't updated?

 On Nov 20, 12:11 am, Lee Mc [EMAIL PROTECTED] wrote:

  The example HTML only has a single text input, it's this input I'm
  having issues with. Apologies, the example HTML gave the field a
  different ID than the JS contained. Im copying the code from an in
  process project so it's stripped down for readability.

  Therefore the different ID in my HTML is just a typo.

  Cheers, Lee.

  On Nov 20, 4:14 am, CodingCyb.org [EMAIL PROTECTED] wrote:

   Sorry it took so long for a reply...

   Where in the html is #test_field ? That's what the field_img goes
   after, but I'm not sure where that is...

   On Nov 19, 9:39 am, Lee Mc [EMAIL PROTECTED] wrote:

Hi, yes I think you've misunderstood my problem.

In a nutshell, there is an input type=text on tab 1. On load of
the form, I'm trying to make this input less wide and place an image
next to it.  When tab 1 is the default tab, it works fine.  When any
other tab is the default, it inserts the image but doesn't update the
width of the field.

This is an example of my markup:

div class=tab_container

!--insert tabs--
ul class=tabs
lia href=my_form#tab_1 class=tab title=content_1Tab 1/a/
li
lia href=my_form#tab_2 class=tab title=content_2Tab 2/a/
li
lia href=my_form#tab_3 class=tab title=content_3Tab 3/a/
li
/ul

!--insert tab 1--
div id=content_1 class=tab_content
a name=tab_1/a
label for=field_idMy Test Field:/labelinput type=text
id=field_id value=
/div!--close content_1--

!--insert tab 2--
div id=content_2 class=tab_content
a name=tab_2/a
!--tab 2 content--
/div!--close content 2--

!--insert tab 3--
div id=content_3 class=tab_content
a name=tab_3/a
!--tab 3 content--
/div!--close content 3--

/div!--close tab container--

Any thoughts would be much appreciated.

Cheers,
Lee

On Nov 18, 3:47 pm, CodingCyborg [EMAIL PROTECTED] wrote:

 That all seems like it would work fine. I went back and re-read your
 original post. I found that I may have misunderstood the problem.

 In your original post is #field_id within the content of the first
 tab, or is it the content warpper of the first tab?

 If it is the wrapper, then you are putting the image outside of what
 is hidden, if not then changing that field width shouldn't affect any
 other tabs.

 From what I now understand you don't want the image there unless you
 are on the first tab? So placing it within the content of that tab may
 be the solution?

 On Nov 18, 9:30 am, Lee Mc [EMAIL PROTECTED] wrote:

  Here is the code which sets the tabs up:

  /*
   * JS to handle the building of tabs within forms
   * Pre-requisites:
   * - jQuery
   * - tab links i.e. a tags to have a class of 'tab'
   * - the title attribute of the a.tab links and the id 
  attribute
  of the div containing that tab's content to be called content_n
  where n is the number representing the tab
   */
  var form_tabs = {
      build: function(){
          // Define what happens when a tab is clicked
          $(a.tab).click(function(event){
              event.preventDefault();
              // switch all tabs off
              $(.active).removeClass(active);

              // switch this tab on
              $(this).addClass(active).blur();

              // hide all elements with the class 'content' up
              $(.tab_content).hide();

              // Now figure out what the 'title' attribute value is 
  and
  find the element with that id. Then display that.
              var content_show = $(this).attr(title);
              $(# + content_show).show();
          });
          // Get the global settings object and figure out which tab
  should be displaying, show it and hide the rest
          var tab_display = '';
          if (settings) {
              // We have found the settings object, get the
  'tab_display' property
              tab_display = settings.tab_display;
          }
          else {
              tab_display = '1';
          }
          // tab_display has been set so set the class for the active
  tab
          $('a.tab').each(function(){
              // 'this' now represents the tab
              if ($(this).attr('title').substr(8) == tab_display) {
                  // we have the correct tab so apply the 'active' 
  class
     

[jQuery] Re: Firefox problems ( with input reg. exp. verification).

2008-11-20 Thread Jsbeginner


The length check = 5 does not do anything rearly as with a .com you 
already have 4 characters so it allows b.com which is not possible. But 
if you change the 5 to 6 it stops two letter domains for two letter 
extensions. As for the 62 maximum size I've solved this problem with 
html setting the maximum number of characters allowed.


So I've used your code without the length checkup and have used PHP's 
Regular expressions check to catch any domains with only one character 
before the extension.


I guess the only solution would be to use javascript to split the domain 
into hostname and extension and then to check the individually... but 
this would be a pain.


I find it strange that Firefox can not seem to handle such a simple Reg 
Exp ... :(


Rik Lomas wrote:

Hey, the problem seems to be with the {2,63} bit, so I've rewritten
your code (again), it's not as strict as before but it's a lot faster
now because it tests string length rather than regex lengths:

$(document).ready(function(){
  var reg = /^[a-z0-9]+[a-z0-9\-\.]*\.[a-z]{2,4}$/i;
  $('input#domain').keyup(function(){
var domain = $(this).val();
if (reg.test(domain)  domain.length = 5  domain.length = 68) {
  $(#ok).html(Correct format...);
} else {
  $(#ok).html(Wrong format...);
}
  });
});

Rik


2008/11/20 Jsbeginner [EMAIL PROTECTED]:
  

Your code is alot better than mine and the use of test instead of match is
better too. However I still have the same problem, even with your code with
Firefox after 16 characters even typed slowley, Firefox becomes slow and
after 20-25 characters it even blocks... Is this a bug with firefox or with
my code ? How can I fix this problem ?

Is it my RegExp ? I can't see how it could be the code as yours is very
simple

Rik Lomas wrote:


I've simplified your code for you and sped up your testing by using
the regular expression test() method

$(document).ready(function(){
  $('input#domain').keyup(function(){
var domain = $(this).val();
var reg = /^([a-z0-9]+(\-?\.?[a-z0-9]*)){2,63}\.([a-z]){2,4}$/i ;
if (reg.test(domain)) {
  $(#ok).html(Correct format ...);
} else {
  $(#ok).html(Wrong format .../p);
   }
  });
});



2008/11/19 Jsbeginner [EMAIL PROTECTED]:
  

Hello, this is my first topic here, so I hope that I'm doing the right.
I've
done a search on google and on this forum without finding anyone with the
same problem as me, but maybe I'm not looking for the right keywords.

Here is my problem : I've created a very simple script that checks if a
domain is in a valid format or not, however with Firefox 3 it does not
like
domains that are more than 20 characters long and firefox slows down and
then completly blocks.

Here is my code :

test.js :
function domchk() {
  var domain = $(input#domain).val();
  var reg = /^([a-z0-9]+(\-?\.?[a-z0-9]*)){2,63}\.([a-z]){2,4}$/i ;
  if (domain.match(reg)) {
 $(#ok).html(Correct format ...);
  } else {
 $(#ok).html(Wrong format .../p);
  }
}

function simple_chk(target_items){
 $(target_items).each(function(){
 $(this).keyup(function(){
domchk();
 });
});
}


$(document).ready(function(){
  simple_chk(input);
});


test.html :
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html; charset=UTF-8 /
titleTest page/title
script type=text/javascript src=jquery-1.2.6.min.js/script
script type=text/javascript src=test.js/script
/head

body
h1 Javascript domain check .../h1
form
p
input id=domain type=text //p
p id=okNot changed yet.../p
/form
/body
/html

--
View this message in context:
http://www.nabble.com/Firefox-problems-%28-with-input-reg.-exp.-verification%29.-tp20580852s27240p20580852.html
Sent from the jQuery General Discussion mailing list archive at
Nabble.com.





--
Rik Lomas
http://rikrikrik.com


  

--
View this message in context: 
http://www.nabble.com/Firefox-problems-%28-with-input-reg.-exp.-verification%29.-tp20580852s27240p20598552.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.







  





[jQuery] Re: $('#id').width()

2008-11-20 Thread CodingCyb.org

Is the original width of the text field set in css? Or is it just the
width it gets when page loads?

On Nov 20, 9:09 am, Lee Mc [EMAIL PROTECTED] wrote:
 Yes that's exactly right.

 Any ideas would be greatly appreciated!

 On Nov 20, 1:18 pm, CodingCyb.org [EMAIL PROTECTED] wrote:

  I'm still trying to picture the site in my mind. So it has three tabs
  that you can switch between, but the default can be different? And
  when the default isn't the first one, the image appears in tab one,
  but stays underneath the input box because the width isn't updated?

  On Nov 20, 12:11 am, Lee Mc [EMAIL PROTECTED] wrote:

   The example HTML only has a single text input, it's this input I'm
   having issues with. Apologies, the example HTML gave the field a
   different ID than the JS contained. Im copying the code from an in
   process project so it's stripped down for readability.

   Therefore the different ID in my HTML is just a typo.

   Cheers, Lee.

   On Nov 20, 4:14 am, CodingCyb.org [EMAIL PROTECTED] wrote:

Sorry it took so long for a reply...

Where in the html is #test_field ? That's what the field_img goes
after, but I'm not sure where that is...

On Nov 19, 9:39 am, Lee Mc [EMAIL PROTECTED] wrote:

 Hi, yes I think you've misunderstood my problem.

 In a nutshell, there is an input type=text on tab 1. On load of
 the form, I'm trying to make this input less wide and place an image
 next to it.  When tab 1 is the default tab, it works fine.  When any
 other tab is the default, it inserts the image but doesn't update the
 width of the field.

 This is an example of my markup:

 div class=tab_container

 !--insert tabs--
 ul class=tabs
 lia href=my_form#tab_1 class=tab title=content_1Tab 1/a/
 li
 lia href=my_form#tab_2 class=tab title=content_2Tab 2/a/
 li
 lia href=my_form#tab_3 class=tab title=content_3Tab 3/a/
 li
 /ul

 !--insert tab 1--
 div id=content_1 class=tab_content
 a name=tab_1/a
 label for=field_idMy Test Field:/labelinput type=text
 id=field_id value=
 /div!--close content_1--

 !--insert tab 2--
 div id=content_2 class=tab_content
 a name=tab_2/a
 !--tab 2 content--
 /div!--close content 2--

 !--insert tab 3--
 div id=content_3 class=tab_content
 a name=tab_3/a
 !--tab 3 content--
 /div!--close content 3--

 /div!--close tab container--

 Any thoughts would be much appreciated.

 Cheers,
 Lee

 On Nov 18, 3:47 pm, CodingCyborg [EMAIL PROTECTED] wrote:

  That all seems like it would work fine. I went back and re-read your
  original post. I found that I may have misunderstood the problem.

  In your original post is #field_id within the content of the first
  tab, or is it the content warpper of the first tab?

  If it is the wrapper, then you are putting the image outside of what
  is hidden, if not then changing that field width shouldn't affect 
  any
  other tabs.

  From what I now understand you don't want the image there unless you
  are on the first tab? So placing it within the content of that tab 
  may
  be the solution?

  On Nov 18, 9:30 am, Lee Mc [EMAIL PROTECTED] wrote:

   Here is the code which sets the tabs up:

   /*
    * JS to handle the building of tabs within forms
    * Pre-requisites:
    * - jQuery
    * - tab links i.e. a tags to have a class of 'tab'
    * - the title attribute of the a.tab links and the id 
   attribute
   of the div containing that tab's content to be called content_n
   where n is the number representing the tab
    */
   var form_tabs = {
       build: function(){
           // Define what happens when a tab is clicked
           $(a.tab).click(function(event){
               event.preventDefault();
               // switch all tabs off
               $(.active).removeClass(active);

               // switch this tab on
               $(this).addClass(active).blur();

               // hide all elements with the class 'content' up
               $(.tab_content).hide();

               // Now figure out what the 'title' attribute value is 
   and
   find the element with that id. Then display that.
               var content_show = $(this).attr(title);
               $(# + content_show).show();
           });
           // Get the global settings object and figure out which tab
   should be displaying, show it and hide the rest
           var tab_display = '';
           if (settings) {
               // We have found the settings object, get the
   'tab_display' property
               tab_display = settings.tab_display;
           }
           else {
               tab_display = '1';
           }
           // tab_display has been set so set the class for 

[jQuery] Re: $('#id').width()

2008-11-20 Thread Lee Mc

The width of the field gets set by a stylesheet which is pulled
through.



On Nov 20, 3:22 pm, CodingCyb.org [EMAIL PROTECTED] wrote:
 Is the original width of the text field set in css? Or is it just the
 width it gets when page loads?

 On Nov 20, 9:09 am, Lee Mc [EMAIL PROTECTED] wrote:

  Yes that's exactly right.

  Any ideas would be greatly appreciated!

  On Nov 20, 1:18 pm, CodingCyb.org [EMAIL PROTECTED] wrote:

   I'm still trying to picture the site in my mind. So it has three tabs
   that you can switch between, but the default can be different? And
   when the default isn't the first one, the image appears in tab one,
   but stays underneath the input box because the width isn't updated?

   On Nov 20, 12:11 am, Lee Mc [EMAIL PROTECTED] wrote:

The example HTML only has a single text input, it's this input I'm
having issues with. Apologies, the example HTML gave the field a
different ID than the JS contained. Im copying the code from an in
process project so it's stripped down for readability.

Therefore the different ID in my HTML is just a typo.

Cheers, Lee.

On Nov 20, 4:14 am, CodingCyb.org [EMAIL PROTECTED] wrote:

 Sorry it took so long for a reply...

 Where in the html is #test_field ? That's what the field_img goes
 after, but I'm not sure where that is...

 On Nov 19, 9:39 am, Lee Mc [EMAIL PROTECTED] wrote:

  Hi, yes I think you've misunderstood my problem.

  In a nutshell, there is an input type=text on tab 1. On load of
  the form, I'm trying to make this input less wide and place an image
  next to it.  When tab 1 is the default tab, it works fine.  When any
  other tab is the default, it inserts the image but doesn't update 
  the
  width of the field.

  This is an example of my markup:

  div class=tab_container

  !--insert tabs--
  ul class=tabs
  lia href=my_form#tab_1 class=tab title=content_1Tab 
  1/a/
  li
  lia href=my_form#tab_2 class=tab title=content_2Tab 
  2/a/
  li
  lia href=my_form#tab_3 class=tab title=content_3Tab 
  3/a/
  li
  /ul

  !--insert tab 1--
  div id=content_1 class=tab_content
  a name=tab_1/a
  label for=field_idMy Test Field:/labelinput type=text
  id=field_id value=
  /div!--close content_1--

  !--insert tab 2--
  div id=content_2 class=tab_content
  a name=tab_2/a
  !--tab 2 content--
  /div!--close content 2--

  !--insert tab 3--
  div id=content_3 class=tab_content
  a name=tab_3/a
  !--tab 3 content--
  /div!--close content 3--

  /div!--close tab container--

  Any thoughts would be much appreciated.

  Cheers,
  Lee

  On Nov 18, 3:47 pm, CodingCyborg [EMAIL PROTECTED] wrote:

   That all seems like it would work fine. I went back and re-read 
   your
   original post. I found that I may have misunderstood the problem.

   In your original post is #field_id within the content of the 
   first
   tab, or is it the content warpper of the first tab?

   If it is the wrapper, then you are putting the image outside of 
   what
   is hidden, if not then changing that field width shouldn't affect 
   any
   other tabs.

   From what I now understand you don't want the image there unless 
   you
   are on the first tab? So placing it within the content of that 
   tab may
   be the solution?

   On Nov 18, 9:30 am, Lee Mc [EMAIL PROTECTED] wrote:

Here is the code which sets the tabs up:

/*
 * JS to handle the building of tabs within forms
 * Pre-requisites:
 * - jQuery
 * - tab links i.e. a tags to have a class of 'tab'
 * - the title attribute of the a.tab links and the id 
attribute
of the div containing that tab's content to be called 
content_n
where n is the number representing the tab
 */
var form_tabs = {
    build: function(){
        // Define what happens when a tab is clicked
        $(a.tab).click(function(event){
            event.preventDefault();
            // switch all tabs off
            $(.active).removeClass(active);

            // switch this tab on
            $(this).addClass(active).blur();

            // hide all elements with the class 'content' up
            $(.tab_content).hide();

            // Now figure out what the 'title' attribute value 
is and
find the element with that id. Then display that.
            var content_show = $(this).attr(title);
            $(# + content_show).show();
        });
        // Get the global settings object and figure out which 
tab
should be displaying, show it and hide the rest
        var tab_display = '';
        if 

[jQuery] IE 7 ajaxSubmit problem

2008-11-20 Thread Tolis Christomanos
Hi all,

I am using jQuery Form plugin http://malsup.com/jquery/form/ to upload my
files. The problem is tha in IE 7 it doesn't allow me to upload any image!!

This is my source

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
   head
 meta http-equiv=Content-Type content=text/html; charset=utf-8 /
 link rel=stylesheet href=?php echo $mosConfig_live_site;
 ?/administrator/templates/onnup_admin_final/css/main.css
 media=screen,projection type=text/css /
 script type=text/javascript src=?php echo $mosConfig_live_site;
 ?/administrator/components/com_highlights/js/jquery.js/script
 script type=text/javascript src=?php echo $mosConfig_live_site;
 ?/administrator/components/com_highlights/js/jquery.form.js/script
 script type=text/javascript

 // prepare the form when the DOM is ready
 $(document).ready(function() {
 var options = {
 target:'#results',   // target element(s) to be updated
 with server response
 //beforeSubmit:  showRequest,  // pre-submit callback
 success:   showResponse,  // post-submit callback

 // other available options:
 //url:   url // override for form's 'action' attribute
 //type:  type// 'get' or 'post', override for form's
 'method' attribute
 dataType:  'json'// 'xml', 'script', or 'json' (expected
 server response type)
 //clearForm: true// clear all form fields after successful
 submit
 //resetForm: true// reset the form after successful submit

 // $.ajax options can be used here too, for example:
 //timeout:   3000
 };

 // bind to the form's submit event
 $('#fileform').submit(function() {
 // inside event callbacks 'this' is the DOM element so we first
 // wrap it in a jQuery object and then invoke ajaxSubmit
 $(this).ajaxSubmit(options);

 // !!! Important !!!
 // always return false to prevent standard browser submit and page
 navigation
 return false;
 });


 });

 // pre-submit callback
 function showRequest(formData, jqForm, options) {
 // formData is an array; here we use $.param to convert it to a string
 to display it
 // but the form plugin does this for you automatically when it submits
 the data
 var queryString = $.param(formData);

 // jqForm is a jQuery object encapsulating the form element.  To access
 the
 // DOM element for the form do this:
 // var formElement = jqForm[0];

 alert('About to submit: \n\n' + queryString);

 // here we could return false to prevent the form from being submitted;

 // returning anything other than false will allow the form submit to
 continue
 return true;
 }

 // post-submit callback
 function showResponse(data)  {
 // for normal html responses, the first argument to the success
 callback
 // is the XMLHttpRequest object's responseText property

 // if the ajaxSubmit method was passed an Options Object with the
 dataType
 // property set to 'xml' then the first argument to the success
 callback
 // is the XMLHttpRequest object's responseXML property

 // if the ajaxSubmit method was passed an Options Object with the
 dataType
 // property set to 'json' then the first argument to the success
 callback
 // is the json data object returned by the server

$('#results').html(data.name+ uploaded successfully!);

?php if($_GET[type] == 'image') {

   ?

$('#save').click(function() {

 window.opener.$d('#slideimage').attr(src,?php echo
 $mosConfig_live_site; ?/images/stories/+data.name);
 window.opener.$d('#thumb').attr(value,?php echo
 $mosConfig_live_site; ?/images/stories/+data.name);
 window.close();

 return false;

 });

 ?php } else if($_GET[type] == 'file') {
 ?
 $('#save').click(function() {

 //window.opener.$d('#slidefile').attr(src,?php echo
 $mosConfig_live_site; ?/images/stories/+responseText);
 window.opener.$d('#uploadedfile').attr(value,?php echo
 $mosConfig_live_site; ?/images/stories/+data.name);
 window.opener.$d('#path_type').attr(value,data.type);
 window.close();

 return false;

 });

 ?php } ?
 }

 /script
 style type=text/css
 #results {
 float:left;
 width:100%;
 }

 form {
 float:left;
 width:240px;
 }
 /style
   /head
 body

 h1?php echo $titletext; ?/h1

 div id=results/div

 form id=fileform class=adminform enctype=multipart/form-data
 method=post action=?php echo $mosConfig_live_site;
 ?/administrator/components/com_highlights/lib/file_upload.php 

 label for=file?php echo $filetext; ?/label
 input type=hidden value=?php echo $_GET[maxfilesize]; ?
 

[jQuery] exclude children from selected elements

2008-11-20 Thread [EMAIL PROTECTED]

Hi,

I want to apply a mouseover event on all elements but one and its
children. I can't use class name to filter. How can I do it ?  I've
tried unsuccessfully :

$(*:not(#main)).not($(#main).children()).mouseover(function() {

});

thanks


[jQuery] IE Issue - Argument not valid - Creating a Jquery Magnifier

2008-11-20 Thread Anyul Rivas
Hi guys, i'm creating a *Jquery Gallery* with a mouseover *Magnifier*, using
*Jquery Cycle*. The thing is when I try this script with *IE 7 *and
everytime I mouseover the current image it displays an *argument not valid*
alert.

This is the page http://www.aonewebdesign.com/anyulled/jquery_gallery.htm

Also, I think the zoomed image shows a bit to the left and to the bottom,
anything I can do to fix this?

thanks a lot for all your help.

-- 
Anyul Rivas
δοῦλος Ἰησοῦ Χριστοῦ
Los Teques, Venezuela.
» http://anyulled.blogspot.com « | Cel. 0412-599.87.80
ὁ δὲ πνευματικὸς ἀνακρίνει μὲν πάντα, αὐτὸς δὲ ὑπ᾽ οὐδενὸς ἀνακρίνεται. 1º
Co 2:15


[jQuery] treeview pluging issues - .find(.hitarea)

2008-11-20 Thread alextait

I am fairly new to jquery and I am trying to create a product/category
browser/tree using the treeview plugin and ajax.

My first simple issue is this peice of code i am trying to understand.

.find(.hitarea)

what is happening here ? I understand the find functino but not sure
about the chevron usage ?

the overall problem is this.

On viewing my list. if i click on one of the initial categories the
second sub categories show up fine. I can then contract this sub list
if i wish. If i leave this open and click on one of the sub categories
for some reason i cannot then contract it again.

I have looked into the treeview plugin code and found that the
toggler method which would normaly just contract the list branch
fires twice causing it to hide again.

If anyone has any idea on thie general problem that would be great.

thanks for any help in advance


[jQuery] blockUI - Cannot convert undefined or null to Object

2008-11-20 Thread wlo

Hi,

I'm using jQuery 1.26 and blockui 2.10. Occured on Opera 9.61.

Problem listed below. My function in javascript:

function doRegister()
{
try
{
$.blockUI(
{
overlayCSS :
{
opacity : '0.5',
filter : 'alpha(opacity=50)'
},
message: $('#ajaxIndicator'),
css:
{
'border' : '1px solid #fff',
'font-family' : 'Tahoma',
'font-size' : '11px',
'font-weight' : 'bolder',
color : '#e0e0e0',
height : '120px',
width: '380px',
'background-color': '#303030'
}
});

$.ajax(
{
type: POST,
url: ./action/doRegister.php,
data:
{
email: ...
pwd: .
},
success: function(data)
{
  ..
}
});

$.unblockUI();

}
catch(e)
{
$.unblockUI();
alert(e);
}

}

After few calls of this function (completed with success) I receive
the following error each time I call doRegister():

localhost

[Error:
name: TypeError
message: Statement on line 133: Cannot convert undefined or null to
Object
Backtrace:
  Line 133 of linked script 
http://localhost/wepps/www2b/jquery/jquery.blockui.js:
In function install
data.parent = node.parentNode;
  Line 23 of linked script http://localhost/wepps/www2b/jquery/jquery.blockui.js
function(opts) { install(window, opts); }
  Line 6 of linked script http://localhost/wepps/www2b/js/register.js:
In function doRegister
$.blockUI(
  Line 1 of function script
doRegister();
  ...
]


What can I do with this? Is this Opera bug or blockUI?

Thanks a lot in advance,
Best regards


[jQuery] jQuery Validation

2008-11-20 Thread Gal

Hi,
I'm trying to add new rule to the validation plug in, so far with a
little success.
I want to use the validation against 2 text boxes, and compare them to
each other.
The values must be numbers only and the first textbox value number
should by smaller than the other one.
How can I accomplish it?


[jQuery] Selector for visited/active pseudo class

2008-11-20 Thread c0d3m0n3k3y

Hi,

I'm relatively new to jquery.  I'd like to know if I can accomplish
setting the color for visited/hover/active state of an anchor using
something like

$(a:link).css({color:#cc})
$(a:visited).css({color:#cc})
$(a:hover).css({color:#cc})
$(a:active).css({color:#cc})

Thanks
CM


[jQuery] Find and remove attribute

2008-11-20 Thread Sibran

I am having a problem with a sharepoint site...
I want to remove a style from an div. The problem is I don't have an
ID on the div.

Example:
div style=overflow: scroll; width: 143px; height: 125px;
pdf jqsfklm qsjdfklmsjdfkdjf skfjqsk dfjksdfqs /p
pdf jqsfklm qsjdfklmsjdfkdjf skfjqsk dfjksdfqs /p
pdf jqsfklm qsjdfklmsjdfkdjf skfjqsk dfjksdfqs /p
pdf jqsfklm qsjdfklmsjdfkdjf skfjqsk dfjksdfqs /p
pdf jqsfklm qsjdfklmsjdfkdjf skfjqsk
dfjksdfqsdsfqfqsdfsdfqsdfsdfsdfsfsdfsdf /p
/div

I want to remove style=overflow: scroll; width: 143px; height:
125px; but without adding an id on the div.

Is that possible?

Grtz,
Sibran


[jQuery] HP Pavilion dv5t- Intel(R) Core(TM)2 Duo Processor P8600 (2.4 GHz) , 15.4

2008-11-20 Thread windchen1214

7*24 hour On-line service:
MSN/Email:[EMAIL PROTECTED]
Our website: http://www.elec-bestseller.cn

Product Features and Technical Details
Product Features

* Intel(R) Core(TM)2 Duo Processor P8600 (2.4 GHz) , 15.4
diagonal WXGA High-Definition HP BrightView Widescreen Display
* 4GB DDR2 RAM, Intel(R) Graphics Media Accelerator X4500
* 250GB SATA HD, Webcam + Fingerprint Reader , Intel(R) WiFi Link
5100AGN and Bluetooth(TM)
* LightScribe SuperMulti 8X DVD+/-RW with Double Layer Support
* Microsoft(R) Works 9.0 , Windows Vista Home Premium

Processor, Memory, and Motherboard

* Hardware Platform: PC
* Processor: 2.4 Intel Core 2 Duo
* Number of Processors: 1
* RAM: 4 GB
* RAM Type: DDR2 SDRAM

Hard Drive

* Size: 250 GB
* Type: Serial ATA

Product Description
Product Description
HP Pavilion dv5t- Intel(R) Core(TM)2 Duo Processor P8600 (2.4 GHz) ,
15.4 diagonal WXGA High-Definition HP BrightView Widescreen Display,
4GB DDR2 RAM, Intel(R) Graphics Media Accelerator X4500, 250GB SATA
HD, Webcam + Fingerprint Reader , Intel(R) WiFi Link 5100AGN and
Bluetooth(TM) , LightScribe SuperMulti 8X DVD+/-RW with Double Layer
Support , Microsoft(R) Works 9.0 , Windows Vista Home Premium

http://www.elec-bestseller.cn/products.asp?id=1309


[jQuery] Superfish does not work in IE6. Including Superfish's actual site.

2008-11-20 Thread kgosser

Hey John,

I downloaded Superfish the other day and have been using it. It seems
like the right kind of tool for the project I'm tackling, and I'm
excited about it!

It's been working like a charm so far, but today, I began to start
evaluating it in IE6. I've ran into two very large issues:

(1) It seems like this CSS on the anchors:

.sf-menu a { float: left; }

Crashes the browser. I couldn't find a work around for it.

(2) When viewing a superfish menu in IE6, the drop downs would never
work. This includes my personal project I'm working on, and your
actual site for Superfish, http://users.tpg.com.au/j_birch/plugins/superfish/.

First, the system I'm running is Parallels on OSX10.5, with Windows XP
SP1, IE6 from Multiple IE. I will acknowledge that it could be an
issue with the actual build of the browser in my Parallels, but it is
something important enough to pass along.


So, are these issues specific to my browser build? Did I miss some
sort of extra conditional include or something for IE6? Any help would
be greatly appreciated!


[jQuery] Re: treeview pluging issues - .find(.hitarea)

2008-11-20 Thread Dirceu Barquette
Hi,
see http://sourceforge.net/projects/jqtreevial/

I've been developing this plugin. Not complete yet, but is functional.
Dirceu

2008/11/20 alextait [EMAIL PROTECTED]


 I am fairly new to jquery and I am trying to create a product/category
 browser/tree using the treeview plugin and ajax.

 My first simple issue is this peice of code i am trying to understand.

 .find(.hitarea)

 what is happening here ? I understand the find functino but not sure
 about the chevron usage ?

 the overall problem is this.

 On viewing my list. if i click on one of the initial categories the
 second sub categories show up fine. I can then contract this sub list
 if i wish. If i leave this open and click on one of the sub categories
 for some reason i cannot then contract it again.

 I have looked into the treeview plugin code and found that the
 toggler method which would normaly just contract the list branch
 fires twice causing it to hide again.

 If anyone has any idea on thie general problem that would be great.

 thanks for any help in advance



[jQuery] Re: linkselect plugin problem (related hover gets deactivated) -- help please

2008-11-20 Thread clorentzen

Dan --

Thanks. I'm attempting what you suggested, but maybe my syntax is
incorrect? Firebug tells me missing ) after formal parameters.

Can you point me in the right direction?


// replace select objects in the main content
$(document).ready(function (){
$('#container select').linkselect({fixedWidth: true});
});

// replace select objects in the header navigation
$(document).ready(function (){
$('#header select').linkselect({
 fixedWidth: true
 , init: function ($select, $input, $am $container){
 $('#navNewsSearch').append($container);
 }
});
});

Thanks much.

--Carl.


[jQuery] Re: loading css in the ready() function

2008-11-20 Thread ricardobeat

Your code worked for me exactly as it this. Are you loading any other
JS libraries in the same page?

On Nov 20, 10:25 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hi,

 I want to load the flora css on the fly in the ready() function :

 $(document).ready(function(){

  $(head).append('link rel=stylesheet href=http://dev.jquery.com/
 view/tags/ui/latest/themes/flora/flora.all.css type=text/css
 media=screen title=Flora (Default)');

   $(body).append('div id=main class=flora/div');
   $(#main).dialog();

 });

 When the dialog is created I get an exception in the jquery file in
 the attr function : invalid argument.

 At this line : elem[ name ] = value;  It's trying to assign NaNpx to
 the attribute 'height'.

 If I load the css directly by adding the link in the html page, it
 works fine, but for reasons too long to explain I want to load it
 dynamically.

 Any idea what the problem could be ?

 Thanks


[jQuery] Re: treeview pluging issues - .find(.hitarea)

2008-11-20 Thread Andy Matthews

Without seeing the rest of the code, the  .hitarea is a CSS selector for
direct descendants. There's generally something on the left of the angle
bracket such as :

body  .hitarea

Which would apply ONLY to those objects with a class of hitarea directly
inside the body tag.

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of alextait
Sent: Thursday, November 20, 2008 9:00 AM
To: jQuery (English)
Subject: [jQuery] treeview pluging issues - .find(.hitarea)


I am fairly new to jquery and I am trying to create a product/category
browser/tree using the treeview plugin and ajax.

My first simple issue is this peice of code i am trying to understand.

.find(.hitarea)

what is happening here ? I understand the find functino but not sure
about the chevron usage ?

the overall problem is this.

On viewing my list. if i click on one of the initial categories the
second sub categories show up fine. I can then contract this sub list
if i wish. If i leave this open and click on one of the sub categories
for some reason i cannot then contract it again.

I have looked into the treeview plugin code and found that the
toggler method which would normaly just contract the list branch
fires twice causing it to hide again.

If anyone has any idea on thie general problem that would be great.

thanks for any help in advance




[jQuery] Re: jQuery Uploader Flash player 10 fix

2008-11-20 Thread netvibe

The swfupload I use, is working very well?

http://netvibe.nl/imagemanager/



On Nov 20, 4:04 pm, Olivier Percebois-Garve [EMAIL PROTECTED]
wrote:
 mmh they confirm that swfupload is currently broken. I also experienced that
 its the case.

 On Thu, Nov 20, 2008 at 10:47 AM, Josip Lazic [EMAIL PROTECTED] wrote:

  I found this jQuery+Flash uploader, as author say - I'ts quick and
  dirty, but it gets job done.

 http://www.prodevtips.com/2008/10/31/flash-10-and-jquery-multi-file-u...

  And, yes it works with Flash10.


[jQuery] Re: linkselect plugin problem (related hover gets deactivated) -- help please

2008-11-20 Thread Dan G. Switzer, II

Carl,

Thanks. I'm attempting what you suggested, but maybe my syntax is
incorrect? Firebug tells me missing ) after formal parameters.

Can you point me in the right direction?


// replace select objects in the main content
   $(document).ready(function (){
   $('#container select').linkselect({fixedWidth: true});
   });

// replace select objects in the header navigation
   $(document).ready(function (){
   $('#header select').linkselect({
 fixedWidth: true
 , init: function ($select, $input, $am $container){
 $('#navNewsSearch').append($container);
 }
});
   });

I suspect somewhere in your code you've missing a closing parentheses.

-Dan



[jQuery] Re: Use event.target.id to show div's based off what id was clicked

2008-11-20 Thread ricardobeat

IDs are unique identifiers, you can use classes instead (both can't
start with a number) or use an attribute selector:

div id=some1/div
div id=some2/div

div id=thing1/div
div id=thing2/div

$('div').click(function(){
var idtext = this.id.match(/\D*/); //exclude numbers
$([id*=+ idtext +]).show();
});

If you click #some1, it will show all DIVs whose ID's have 'some' in
it.

It's easier with classes, but you have to be sure there is only one
class:


div class=class1/div
div class=class1/div

div class=class2/div
div class=class2/div

$('div').click(function(){
$('.'+this.className).show();
});

On Nov 20, 10:37 am, jrutter [EMAIL PROTECTED] wrote:
  I was able to use an alert to show the id of what was clicked! But Im
 trying to show/hide elements based on what is clicked.

 So for example, if you click link 1 (id=1) - all div's with id=1
 will show, but div's with id=2 will be hidden. I can get everything
 to show, but not just id=1.

 Here is my code, what am I doing wrong?

 $(event.target.id)show(); $(event.target.id:not).hide();

 Here is the full code:

         //grab values from attributes assigned in xsl
         var qtID = $(this).attr(id);

         // make id to show comment (#23453-3djis-im37vk9-fkifhf7)
         var ccID = '#' + qtID;

         //show only comments of matching ccID that were clicked
         $(#item-comments-listing).show();
         $(event.target.id)show();
         $(event.target.id:not).hide();

 Any ideas?


[jQuery] Re: edit an onclick attribute to create a php query string

2008-11-20 Thread ricardobeat

It is opening a new tab because it is executing the default action.
href= equals the current URL, so it's opening that in a blank
window. Return false to avoid that.

$(a).click(function(){
parent.location='upload.php?item=2';
return false;
});

On Nov 20, 12:33 pm, edzah [EMAIL PROTECTED] wrote:
 Ok I've got this working, dunno if it was a syntax issue or what, but
 I did this:

 $(a).click(function() { parent.location='upload.php?item=2' });

 Although it behaves slightly strange. It opens the upload.php?item=2
 as a tab in FF, then opens the original page in a new tab and focuses
 on that. My a tag:

 diva href= id=upload target=_blankupload/a /div

 I would still be interested in any comments regarding this method of
 uploading to a mysql dbase...

 thanks

 On Nov 20, 2:16 pm, edzah [EMAIL PROTECTED] wrote:

  Should really do more reading but at the moment I haven't got the time
  so I would appreciate any help I can get.

  Overview:

  I have a form (with the default submit turned off) that takes user
  input and adds each form entry into a table below the form. The user
  will then review the list of entries to be uploaded and then clicks an
  upload button to upload it to the mysql dbase.

  My problem:

  The button I am using is an anchor tag, with the attribute onclick. I
  want to take all the entries in the table and then create a php query
  string so that when the anchor tag is click it will pass this data to
  a php file which will do the mysql insert.

  a id=upload onclick=parent.location='upload.php?item='
  target=_blankupload/a

  But I cannot seem to access/update the onlick attribute.
  I hoped this would work:

  $(a).attr({ onclick : parent.location='upload.php?item=2' });


[jQuery] Re: exclude children from selected elements

2008-11-20 Thread Hector Virgen
This might work better with filter() (untested):

$('*').filter('#main, #main *').mouseover(function() {

});

-Hector


On Thu, Nov 20, 2008 at 8:07 AM, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:


 Hi,

 I want to apply a mouseover event on all elements but one and its
 children. I can't use class name to filter. How can I do it ?  I've
 tried unsuccessfully :

 $(*:not(#main)).not($(#main).children()).mouseover(function() {

 });

 thanks


[jQuery] Selector don't work when adding html to page

2008-11-20 Thread jetm

Hi people:

The Selector work fine in the page however when a load data from HTML
archive the Selector don't apply for this.

TIA,
JETM

The Code:

In tag head:

$(document).ready(function() {

   // Change attr to _blank for open in new Windows
$([EMAIL PROTECTED]'http']).attr('target','_blank');

$(#action).click(function() {
   $.ajax({
url: update.html,
success: function(data) {
$(#text).html(data);
 },
error: function(rhx, err, e) {
  $(#text).html(rhx.responseText);
}
}); //END .ajax
}); //END click

}); //END Ready

In tag body:

a href=http://www.google.com;CLICK HERE!!!/a
p id=actionLoad Data/p
p id=text/p

In update.html:
a href=http://www.yahoo.com; Open in New Windows/a


[jQuery] [QUnit] how to test fadeOut is applied

2008-11-20 Thread todd

I have this super simple method that I'm trying to test.

$.fn.updateWaitState = function(message, callback) {
return this.css('color', 
'red').html(message).show().fadeOut(1000,
callback);
}

I want to make sure that the fadeOut is called. Here's what I've
tried:

with(jqUnit) {
test(updateWaitState shows and fades element, function() {
var wasCalled = false;

$(div.mydiv).updateWaitState(This is a message, function
(wasCalled) {
wasCalled = true;
alert(Called  + wasCalled);
start();
});

equals($(div.mydiv).css('visibility'), 'visible', Sets 
element to
visible);

//Wait for callback function
stop();

ok(wasCalled, fadeOut was called);
alert(Done  + wasCalled);

});
});

I'm sure the problem is not understanding the stop and start
methods. The order of popups confirms that Done is encountered
before the Called alert is triggered in the callback function.
Obviously, this causes the ok test to fail.

How do I get the script to stop until the callback function is fired?
Or is there a better way to test that fadeOut is applied?

Thanks in advance,

Todd


[jQuery] Re: asp.net and jquery - reactions to this letter

2008-11-20 Thread rolfsf

Perhaps as jQuery gets incorporated into VS, more resources
specifically for ASP.net + jQuery will appear, and that will help with
the 'mindset' issue that George speaks of. I appreciate all of these
comments

On Nov 19, 1:48 pm, Berke [EMAIL PROTECTED] wrote:
 I have been the sole developer for the last 9 months on a site that
 was using ASP.Net Web Forms,  Component Art's Controls when I
 inherited it since then I have added many of the controls from their
 Ajax toolkit and within the last month have started using jquery. So
 far I have had zero clashes, and now have a wide variety of tools to
 solve the problems, I'm faced. I'm also starting to go back and clean
 out my older pre jquery javascript.

 I've also had success using jquery to call wcf services  page methods
 which a lot of success (there were some blog posts out there but I
 don't have the links anymore). I am using all of these technologies
 together in some of my more complex pages.

 On Nov 19, 12:34 pm, George Adamson [EMAIL PROTECTED]
 wrote:

  I'm very surprised by his comments. We always rely on jQuery to get
  grips with the monster that is ASP.Net+AJAX.Net, regardless of project
  size.

  jQuery's extraordiary convenience requires a slightly different
  mindset from conventional .net languages (one that I miss on the
  server side!) so perhaps the author could use some help to learn more
  about it.

  On Nov 18, 9:52 pm, rolfsf [EMAIL PROTECTED] wrote:

   is it truly a monster?
  http://reddevnews.com/response/response.aspx?rdnid=1189-Hide quoted text -

  - Show quoted text -


[jQuery] Re: Executing Dynamic Javascript

2008-11-20 Thread ricardobeat

Dynamically inserted scripts are only executed when appended to the
head, I bet it works like this (maybe not):

$(document).ready(function(){
vSrc = external.js;
$(#target).attr(src, vSrc).appendTo('head');
});

On Nov 18, 6:25 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I have an issue that I initially thought was a jQuery problem, but
 after simplifying things in preparation for posting my question, I see
 that it's a fundamental javascript matter.
 I don't understand why this works:http://pastebin.com/m3a767745
 but this doesn't:http://pastebin.com/m346451b4
 Note that the external.js file is just a single alert statement.

 What I'm trying to do (with javascript) is create a script element,
 place it inside a particular element and execute it.
 Thanks,
 -Rob


[jQuery] Re: Selector don't work when adding html to page

2008-11-20 Thread Hector Virgen
This is a common problem with ajax requests. What's happening is the
selector only applies to elements that exist on the page at the time the
selector was called.
Once your ajax request has updated the page with more elements, they won't
have click events because they didn't exist when the selector was going
through the dom. So you'll have to assign the click events again after the
ajax request, but only to the new elements.

So your success callback needs to look more like this:

success: function(data) {
$(#text).html(data);
$(#text).find([EMAIL PROTECTED]'http']).attr('target','_blank');
},


-Hector


On Thu, Nov 20, 2008 at 9:08 AM, jetm [EMAIL PROTECTED] wrote:


 Hi people:

 The Selector work fine in the page however when a load data from HTML
 archive the Selector don't apply for this.

 TIA,
 JETM

 The Code:

 In tag head:

 $(document).ready(function() {

   // Change attr to _blank for open in new Windows
$([EMAIL PROTECTED]'http']).attr('target','_blank');

$(#action).click(function() {
   $.ajax({
url: update.html,
success: function(data) {
$(#text).html(data);
 },
error: function(rhx, err, e) {
  $(#text).html(rhx.responseText);
}
}); //END .ajax
}); //END click

 }); //END Ready

 In tag body:

 a href=http://www.google.com;CLICK HERE!!!/a
 p id=actionLoad Data/p
 p id=text/p

 In update.html:
 a href=http://www.yahoo.com; Open in New Windows/a


[jQuery] Re: Selector don't work when adding html to page

2008-11-20 Thread Hector Virgen
Oops, i meant they won't have target='_blank'
:)

-Hector


On Thu, Nov 20, 2008 at 9:18 AM, Hector Virgen [EMAIL PROTECTED] wrote:

 This is a common problem with ajax requests. What's happening is the
 selector only applies to elements that exist on the page at the time the
 selector was called.
 Once your ajax request has updated the page with more elements, they won't
 have click events because they didn't exist when the selector was going
 through the dom. So you'll have to assign the click events again after the
 ajax request, but only to the new elements.

 So your success callback needs to look more like this:

 success: function(data) {
 $(#text).html(data);
 $(#text).find([EMAIL PROTECTED]'http']).attr('target','_blank');
 },


 -Hector



 On Thu, Nov 20, 2008 at 9:08 AM, jetm [EMAIL PROTECTED] wrote:


 Hi people:

 The Selector work fine in the page however when a load data from HTML
 archive the Selector don't apply for this.

 TIA,
 JETM

 The Code:

 In tag head:

 $(document).ready(function() {

   // Change attr to _blank for open in new Windows
$([EMAIL PROTECTED]'http']).attr('target','_blank');

$(#action).click(function() {
   $.ajax({
url: update.html,
success: function(data) {
$(#text).html(data);
 },
error: function(rhx, err, e) {
  $(#text).html(rhx.responseText);
}
}); //END .ajax
}); //END click

 }); //END Ready

 In tag body:

 a href=http://www.google.com;CLICK HERE!!!/a
 p id=actionLoad Data/p
 p id=text/p

 In update.html:
 a href=http://www.yahoo.com; Open in New Windows/a





[jQuery] Re: [New plug-in] magicpreview

2008-11-20 Thread Rik Lomas

Thanks Leonardo

On a different forum, it was mentioned that a user could XSS by
entering script type=text/javascriptalert('hello');/script into
a field. Should I set the default to text() instead of html() to get
around this or should I try and filter out any script tags?

Rik


2008/11/20 Leonardo K [EMAIL PROTECTED]:
 Interesting idea. Great plugin

 On Thu, Nov 20, 2008 at 08:29, [EMAIL PROTECTED] wrote:

 Hi guys,

 I've just finished my new plug-in called magicpreview:

 http://rikrikrik.com/jquery/magicpreview/

 It's for use in forms and it automagically updates selected elements
 on your page based on your form fields. Perfect for letting your users
 see what they're doing when filling in forms. There's a couple of
 demos on my site too.

 I'd love to hear your feedback and comments on my plug-in.

 Thanks,
 Rik




-- 
Rik Lomas
http://rikrikrik.com


[jQuery] Re: ajax image upload

2008-11-20 Thread bharani kumar
Thanks for providing the Ajax file upload script,. its working fine,

But am not sure this the problem or this is the issue,

when i try to upload the file, the file is uploading ,But  after uploaded
the path not remove from the file browser text,


I thing , the page not reloading , so that , the path is present after the
uploaded also,

Or is there any reasn

On Thu, Nov 20, 2008 at 6:07 PM, maui [EMAIL PROTECTED] wrote:


 I am using http://www.phpletter.com/Demo/AjaxFileUpload-Demo/
 It work very well, but I run ifinento a problem i have it return the value
 of the new uploaded image after it rename in the server, I found my
 display problem but i have no clue how to get around it.

 the element on the page ajax return is $('#preview').attr(src,
 data);
 but data instead of being
/maui/members/members_998_28.jpg
 it show up as
/maui/members/members_998_28.jpg
 and that why it can't be found on the server. my page use utf-8 (a
 const for multi-language web site)

 Sincerely for your help !-)




-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Re: Searching for the previous sibling that matches a condition

2008-11-20 Thread ricardobeat

Would that be a tbody in the way? Try putting it there yourself,
this should avoid the problem:

table cellspacing=0
tbody
  tr
td/td
  /tr
  tr
td/td
  /tr
/tbody
/table

On Nov 19, 11:57 pm, go_dores [EMAIL PROTECTED] wrote:
 First of all, I'm just getting started with jQuery so thanks in
 advance for your patience.  I have a table that I am manipulating and
 I need to remove a row under a certain condition.  I originally wrote
 the test below:

 if (theTr.previousSibling  theTr.previousSibling.className ==
 headerrow 
   (!theTr.nextSibling || theTr.nextSibling.className == headerrow))

 In English, I have a tr element stored in the variable theTr.  I am
 testing for the case where its previous and next siblings have a
 certain CSS class.

 This code works fine on IE and Safari, but does not work on Firefox.
 It look like in Firefox the tr's have extra text node siblings in
 between them.  What I would like to do to fix this is to find a jQuery
 expression that will allow me to do this in a cleaner way.  So what I
 need is an expression that will search backward for the first tr
 sibling, and forward for the first tr sibling, skipping over the extra
 gunk that seems to be there with Firefox.

 Here was my last stab at this before I gave up and decided to ask for
 help :-).  The problem with the code below is that it seems to be
 looking at the immediate previous element and checking to see if it's
 a tr, and of course that is false in Firefox.

 if ($(theTr).prev(tr).is(.departmentrow) 
   ($(theTr).next(tr).is(.departmentrow) || $(theTr).is(tr:last-
 child)))

 Long story short, what's the best way to do a search like this?  Any
 pointers would be appreciated.


[jQuery] Re: how to test fadeOut is applied

2008-11-20 Thread todd

Here's proof that I'm new to QUnit! I was trying to put the test
thread to sleep - obviously that's the wrong paradigm.

I broke the test into 2 tests, and this seems to satisfy what I'm
trying to do:


test(updateWaitState shows element, function() {
$(div.mydiv).hide();

$(div.mydiv).updateWaitState(This is a message);
equals($(div.mydiv).css('visibility'), 'visible', Sets element to
visible);
});

test(updateWaitState fades element, function() {
expect(1);

stop();
$(div.mydiv).updateWaitState(This is a message, function() {
ok(true, callback function was called);
start();
});
});



On Nov 20, 9:08 am, todd [EMAIL PROTECTED] wrote:
 I have this super simple method that I'm trying to test.

 $.fn.updateWaitState = function(message, callback) {
 return this.css('color', 
 'red').html(message).show().fadeOut(1000,
 callback);

 }

 I want to make sure that the fadeOut is called. Here's what I've
 tried:

 with(jqUnit) {
 test(updateWaitState shows and fades element, function() {
 var wasCalled = false;

 $(div.mydiv).updateWaitState(This is a message, function
 (wasCalled) {
 wasCalled = true;
 alert(Called  + wasCalled);
 start();
 });

 equals($(div.mydiv).css('visibility'), 'visible', Sets 
 element to
 visible);

 //Wait for callback function
 stop();

 ok(wasCalled, fadeOut was called);
 alert(Done  + wasCalled);

 });

 });

 I'm sure the problem is not understanding the stop and start
 methods. The order of popups confirms that Done is encountered
 before the Called alert is triggered in the callback function.
 Obviously, this causes the ok test to fail.

 How do I get the script to stop until the callback function is fired?
 Or is there a better way to test that fadeOut is applied?

 Thanks in advance,

 Todd


[jQuery] Re: asp.net and jquery - reactions to this letter

2008-11-20 Thread rolfsf

He does like to complain, but he's a very good guy and a very good
programmer. I sincerely hope he joins this conversation and that some
of these comments, ideas, and folks might coax him back for a second
look - I've never had the depth of knowledge (of either javascript,
jquery or .net) to assist him - and I know he's never touched on
jQuery's best stuff. It's been good for me, anyway, to hear from so
many ASP.net developers who are using it regularly.

On Nov 19, 8:33 pm, ajpiano [EMAIL PROTECTED] wrote:
 sounds like someone wants to complain about his lack of a clue rather
 than get one.

 --adam



[jQuery] jquery.cycle centering image

2008-11-20 Thread web_dev123

Hey,

I'm fairly new to JQuery so pardon my ignorence.  I've been working on
trying to get an image rotator that fades a number of images in an out
using the jquery.cycle plugin.

It works fine, however the images that will be displaying are
different in height and width.  I need to fade the images in and out
and ensure that they are always in the center of the div and do not
exceed a maximum height or width.

I got it rotating, however I cant get the images to stay in the middle
of the div. If I add

position: relative !important;
  top: 50%;
  left: 50%;

to the image class when being displayed it centers horizontally but
not vertically, but it also breaks the fade transition by displaying
the new image below then placing it up once the image before has been
removed.

I'm not sure if I'm explaining this correctly, but here is the html
and a link to my sample. Any help would be appreciated!!

http://john1.netfirms.com/VAM/image_test.html

Oh and dont mind the colors, for now.  I use them to find out where
everything is being positioned.


script language=javascript type=text/javascript src=js/
jquery-1.2.6.js/script
script language=javascript type=text/javascript src=js/
jquery.cycle.all.js/script

script language=javascript type=text/javascript

$(document).ready(function() {



// front image rotator
$('#s1').cycle({
fx: 'fade',
timeout: 4000,
delay: -2000,
});


});

/script
style type=text/css

#front_image_container {
text-align:center;
width: 510px;
height: 510px;
display: table-cell; vertical-align: middle; /* used to center
vertically */
background-color:#00;

}

/*.rotater_image img{ max-width:280px; width: expression(this.width 
280 ? 280: true); } */

/ css from jquery image rotator /

/*#s1 { margin: auto; height: 405px; width: 380px; text-align:center; }
*/
#s1 { position:relative; margin-left: auto; margin-right: auto; margin-
top:auto; margin-bottom:auto;  height: 415px; width: 380px; text-
align:center;  background-color:#FF33CC; }
.pics img { position: relative !important;
  top: 50%;
  left: 50%;  padding: 4px; border: 1px solid #ccc; background-color:
#eee; max-width:370px; width: expression(this.width  370 ? 370:
true);max-height:406px; height: expression(this.width  406 ? 406:
true); }
/ css from jquery image rotator /

/style
/head

body

div id=front_image_container
   div id=s1 class=pics
img src=images/front_images_rotator/algonquin-lake-
anneprior.jpg title=Artist #1 name alt=Artist #1 name /
img src=images/front_images_rotator/doreenrenner.jpg
title=Artist #1 name alt=Artist #1 name /
img src=images/front_images_rotator/elephant07.jpg
title=Artist #1 name alt=Artist #1 name /
img src=images/front_images_rotator/embossing07.jpg
title=Artist #1 name alt=Artist #1 name /
/div
/div

/body


[jQuery] Re: Superfish does not work in IE6. Including Superfish's actual site.

2008-11-20 Thread Schalk Neethling

Hi there,

I also used Superfish and it worked perfectly for me in IE6. Maybe it is 
the build. Have a look at this article, near the end:

http://css.dzone.com/news/css-and-html-two-level-menus-t-0

Regards,
Schalk

kgosser wrote:
 Hey John,
 
 I downloaded Superfish the other day and have been using it. It seems
 like the right kind of tool for the project I'm tackling, and I'm
 excited about it!
 
 It's been working like a charm so far, but today, I began to start
 evaluating it in IE6. I've ran into two very large issues:
 
 (1) It seems like this CSS on the anchors:
 
 .sf-menu a { float: left; }
 
 Crashes the browser. I couldn't find a work around for it.
 
 (2) When viewing a superfish menu in IE6, the drop downs would never
 work. This includes my personal project I'm working on, and your
 actual site for Superfish, http://users.tpg.com.au/j_birch/plugins/superfish/.
 
 First, the system I'm running is Parallels on OSX10.5, with Windows XP
 SP1, IE6 from Multiple IE. I will acknowledge that it could be an
 issue with the actual build of the browser in my Parallels, but it is
 something important enough to pass along.
 
 
 So, are these issues specific to my browser build? Did I miss some
 sort of extra conditional include or something for IE6? Any help would
 be greatly appreciated!
 


  1   2   >