[jQuery] Sortable treeview

2008-09-25 Thread pedramphp

Dear folks,
does any one know how could we have a nested sortable treeview  , as
what jorn has did !!
Regards Pedram


[jQuery] jQuery lightbox not working in safari

2008-09-25 Thread tlob

http://www.ginasong.ch/kinderhilfe/chosica.html

the lightbox plugin on
iMac Intel, OS X 10.4.11, OS X 10.5.4, 10.5.5 on Safari  3.1.2
is not working. I dont have a clue why, because I dont see any
errors...

thx
thomas


[jQuery] Re: howto integrate callback into a plugin

2008-09-25 Thread casavecchio

ok, i found it:

$.isFunction(callback)  callback();

thats all!

On 24 Sep., 16:55, casavecchio [EMAIL PROTECTED] wrote:
 Hello jquery-Group,

 i would like to integrate a callback into the lightbox-plugin. May
 somebody can give me a hint how to do that? I dont need all the image-
 stuff from the plugin, but want to use the overlay-method and load
 forms via ajax into the overlay by a callback.

 Thx in advance
 Boris


[jQuery] ajax post to ruby script

2008-09-25 Thread [EMAIL PROTECTED]

Hello!

Sorry for the n00b post, but i've come to a dead end. I'm trying to
write an ajax callback to a Ruby script that does a simple database
update. I'm having trouble with the syntax I think. Here's what I've
been trying:

$(#jLink).click(function() {

$.ajax({
type: POST,
url: testing.rb,
data: name=ryan,
success: function(msg){
alert( Data Saved:  + msg );
}
});
 });

Does anyone have any examples I can take a look at?

Thanks!


[jQuery] Callback to home page from 2nd page

2008-09-25 Thread Reddy

Could somebody help me in this issue.

 when I am on landing page I have two questions to be answered . When
I click on 2nd ques which is radio button i will be shown with other
remaining questions.

So from 2nd page when i click on link which takes me to  homepage  I
want that exact page which i will be prompted when i try to access my
application.



[jQuery] Jquery/Tabbed interface only working in FF, broken in IE, Chrome, Opera

2008-09-25 Thread GoDsGiMp


Hi. My name is Craig and I am a copywriter for an African travel company
based in Cape Town, South Africa. I have no web development background,
however my girlfriend is a photographer and after seeing how much developers
wanted to charge her for a simple gallery based site, I decided to give it a
go myself.

Turns out, it's not that easy

First I used a Jquery based script called stepCarousel from
dynamicdrive.com. That was to make a sliding image gallery and also for the
thumbnails.

http://www.tessaholding.co.za/home.html www.tessaholding.co.za/home.html 

After getting that to work (I believe it may not function in Chrome) I moved
on to trying to make a tabbed interface for the four separate galleries.

http://www.tessaholding.co.za/testing/home.html
www.tessaholding.co.za/testing/home.html 

Somehow it works perfectly in FF. But since it is the most lenient of
browsers, the code is probably all wrong. It does not function in Chrome,
Opera or IE (6/7). Be aware that the three galleries are all the same (for
testing and building purposes) and that the links on the left are simply
text links with no styling (also only until I get it working, then I will
make pretty..)

I am aware that posting an entire page link here is not the best way to get
help, but since I lack the necessary knowledge to pinpoint the problem, that
is all I can do.

Any help, even pointing in the right direction, will be greatly appreciated.
-- 
View this message in context: 
http://www.nabble.com/Jquery-Tabbed-interface-only-working-in-FF%2C-broken-in-IE%2C-Chrome%2C-Opera-tp19664310s27240p19664310.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: superfish image buttons

2008-09-25 Thread tuffcode

Thanks so much for taking the time to respond. I'll create a link and
post. I've just created a working version using background colors...

http://www.mauihospitalfoundation.org/beta/ci/

... site is beta and all that blah blah.

The main page (url above) is superfish. All the pages linked from this
main page use quickmenu code from opencube. Sorry about that. The main
nav item behavior in the opencube code is what I'd like to duplicate.
The client prefers the images with the gradient (opencube example) on
hover. They love the tabbed navigation capability with superfish.

Aloha,
Colin


On Sep 22, 4:04 pm, Joel Birch [EMAIL PROTECTED] wrote:
 Hi Colin,

 If you still need help with this (sorry for my very late response)
 could you provide a link to your attempt so we can hone in on where
 you have gone wrong? Thanks.

 Joel Birch.


[jQuery] Re: Click event for anchor tag goes to url in href attribute

2008-09-25 Thread Henson

Yeah
It's right!
Haha


[jQuery] jQuery animate function + IE

2008-09-25 Thread weidc

Hi,

I got some buttons to show the prev/next image or to close it 'cause
it is allready big, in front of the others and draggable.

This code works in every browser except for IE. IE doesn't go through
the function of animate(). so he doesn't remove the div and the first
image doesn't get visible. I don't get why.

maybe someone can see the mistake or whatever. I'll be thankful about
every help or ideas.

The code of my close button (all 3 buttons got this code):

$(.close-button).one(click,(function()
{
//remove array for this image
imageindex.splice(j);
j--;

if (!$.browser.msie  !$.browser.opera)
{
canvas_stop();
}
//image in the background

$(this).parent(div).parent(div).css(zIndex,900);

//text

$(this).parent(div).prev(div).css({display:none});

//button

$(this).parent(div).css({display:none});

//animate image to original height/width

$(this).parent(div).parent(div).animate({width:originalwidth,
height:originalheight, left:positionleft, top:positiontop,
padding:0px}, slow, (function()
{
//cloned image visible

$(this).next().css({visibility:visible});

//remove div bildkasten
$(this).remove();

e=0;
z=0;
}));
}));


[jQuery] Click function only invoked after second click in IE6 IE7

2008-09-25 Thread RLR

I am having difficulties with IE6 and IE7 not invoking the click
function correctly. I have to click twice to get it to fire.

test case:
http://dev.dreimorgen.com/test.html

with IE6 or IE7 click on item1 once then on the Item 1 content
link. Repeat the process once more and it should toogle the content
beneath. Safari and FireFox do not exhibit this behavior.

What can I do to make this work for IE6/IE7 right away?

Thanks!



[jQuery] Validation plug-in - how to set russian messages for all

2008-09-25 Thread matma

Hi,
I'm using validation plug-in in our application for customers from
Russia. I need to set russian messages for all customers from all
places in the world. How can i do that? Messages are in localzation/
messages_ru.js.

Regards
Mateusz Wolsza


[jQuery] frames['results'].location.href jQuery

2008-09-25 Thread __marcus__

Hi,

I have this line

frames['results'].location.href =

in my code.

Can someone perhaps tell what this line would look like when I want to
use jQuery to change the src of an iframe-element?


[jQuery] Re: Superfish image buttons for main menu items only

2008-09-25 Thread tuffcode

Excellent example thanks so much for this. I'll hopefully be able to
glean what I need from this.

Aloha,
Colin

On Sep 22, 3:39 pm, Joel Birch [EMAIL PROTECTED] wrote:
 This sort of thing requires a good knowledge of CSS and althoughSuperfishis 
 well suited for powering these menus, it is out of the
 scope of the plugin to implement this for you. Here is an example of
 something similar, whereby background images are swapped to provide
 tabs with 'hover' and 'current' states.

 http://www.strathcona.vic.edu.au/

 Joel Birch.


[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread Stinhambo

I am having some problems with that bit of code.

Basically I am launching a popup window and this is my js file -

$('a[rel=email_page]').click(function(){
 
window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
return false;
});

// This passes along the URL of the parent opener when clicking Email
this page
$(#message).get(0).value += window.opener.location.href;

but it seems to be causing a conflict in the rest of my code.

My Firebug console log says -
$(#message).get(0) is undefined

If I comment out the line, everything works nicely.

Any idea if I can get rid of this error and still retain the
functionality?



[jQuery] Re: Superfish v1.4.8 using two menus one under another

2008-09-25 Thread Ilya

Hi Rick,

I have tried to to set z-index: 99 to the top menu and 0 to the bottom
but still have the same effect...

Thank you.

On Sep 24, 8:11 pm, Rick Faircloth [EMAIL PROTECTED] wrote:
 Hi,Ilya...

 Trying increasing the z-index on the top menu and see if that helps.

 Rick

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf OfIlya
  Sent: Wednesday, September 24, 2008 3:44 PM
  To: jQuery (English)
  Subject: [jQuery]Superfishv1.4.8 using two menus one under another

  Hello,

  I'm trying to useSuperfishv1.4.8 with two menus located one under
  another. Everything looks almost great except for IE6 -- the dropdowns
  from the top menu open behind the bottom menu items. Does anyone know
  if there is a fix for this issue?

  Thank you.


[jQuery] Re: no callback for css/addClass?

2008-09-25 Thread Alex Weber

Thanks Eric about the fadeIn() params that was careless of me but it
doesn't seem to have made a difference... :(
btw the div has no padding and ive tried resizing it down to 50px and
it still doesnt fit

man i really hate IE sometimes...

On Sep 25, 12:43 am, Eric [EMAIL PROTECTED] wrote:
 Does #produtos_contato have any padding added to it?  If so, IE could
 be calculating the width of the overall element as more than 350px,
 causing it to get bumped to the next line.

 On Sep 24, 5:05 pm, Alex Weber [EMAIL PROTECTED] wrote:

  sorry i just took a look at the code and its a fadeIn() not a show()
  but really it doesn't change anything.. here's the code:

  $('#produtos_contato').css('width','350px');
  $('#produtos_links').fadeIn(resize);

  where resize() is a function that stretches the left menu panel as far
  down or up as the content goes (completely unrelated to the divs in
  the js)

  in firefox, opera, etc it works ok but in IE #produtos_contato
  doesn't seem to resize in time because its supposed to fit in
  alongside the div that fades in but instead sits under it...

  On Sep 24, 5:48 pm, ricardobeat [EMAIL PROTECTED] wrote:

   There is no way a css() and show() could happen in the wrong order, as
   the second one only executes after the first one returns the object.
   Is it an animated resize?

   On Sep 24, 3:59 pm, Alex Weber [EMAIL PROTECTED] wrote:

yeah bud thats a given i just wanted to confirm that there wasn't a
callback and why not.

thanks for all the replies!

ajpiano wrote:
 that sounds like an issue that needs debugging, not a (superfluous)
 change to the library core...

 On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
  i realize that... i just needed this in a rare case where jquery is
  showing an element before resizing it, even though the resize
  statement (css) is before the show()...

  On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:

   Yeah, it's just like doing

   $('color','red'); alert('color changed');

   On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

Callbacks are used to know when asynchronous events are 
complete...
setting the css or class doesn't happen asynchronously


[jQuery] Re: no callback for css/addClass?

2008-09-25 Thread Alex Weber

and by sometimes i mean all the time :)

On Sep 25, 10:18 am, Alex Weber [EMAIL PROTECTED] wrote:
 Thanks Eric about the fadeIn() params that was careless of me but it
 doesn't seem to have made a difference... :(
 btw the div has no padding and ive tried resizing it down to 50px and
 it still doesnt fit

 man i really hate IE sometimes...

 On Sep 25, 12:43 am, Eric [EMAIL PROTECTED] wrote:

  Does #produtos_contato have any padding added to it?  If so, IE could
  be calculating the width of the overall element as more than 350px,
  causing it to get bumped to the next line.

  On Sep 24, 5:05 pm, Alex Weber [EMAIL PROTECTED] wrote:

   sorry i just took a look at the code and its a fadeIn() not a show()
   but really it doesn't change anything.. here's the code:

   $('#produtos_contato').css('width','350px');
   $('#produtos_links').fadeIn(resize);

   where resize() is a function that stretches the left menu panel as far
   down or up as the content goes (completely unrelated to the divs in
   the js)

   in firefox, opera, etc it works ok but in IE #produtos_contato
   doesn't seem to resize in time because its supposed to fit in
   alongside the div that fades in but instead sits under it...

   On Sep 24, 5:48 pm, ricardobeat [EMAIL PROTECTED] wrote:

There is no way a css() and show() could happen in the wrong order, as
the second one only executes after the first one returns the object.
Is it an animated resize?

On Sep 24, 3:59 pm, Alex Weber [EMAIL PROTECTED] wrote:

 yeah bud thats a given i just wanted to confirm that there wasn't a
 callback and why not.

 thanks for all the replies!

 ajpiano wrote:
  that sounds like an issue that needs debugging, not a (superfluous)
  change to the library core...

  On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
   i realize that... i just needed this in a rare case where jquery 
   is
   showing an element before resizing it, even though the resize
   statement (css) is before the show()...

   On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:

Yeah, it's just like doing

$('color','red'); alert('color changed');

On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

 Callbacks are used to know when asynchronous events are 
 complete...
 setting the css or class doesn't happen asynchronously


[jQuery] Re: ajax post to ruby script

2008-09-25 Thread [EMAIL PROTECTED]

The alert just shows the contents of the Ruby script. I've updated the
script to be just:

  #!/usr/local/bin/ruby

  unless ARGV.length  0
puts you must provide a valid value
exit
  end

  return ARGV[0]


but that is all that is returned. It returns the script contents
instead of the ARGV[0].

Maybe I need to post this in a Ruby forum since that's where my
n00bness lies?

On Sep 25, 6:30 am, BB [EMAIL PROTECTED] wrote:
 I can't see any problems with that script.
 What do you think is wrong with it?

 On 25 Sep., 06:02, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:

  Hello!

  Sorry for the n00b post, but i've come to a dead end. I'm trying to
  write an ajax callback to a Ruby script that does a simple database
  update. I'm having trouble with the syntax I think. Here's what I've
  been trying:

          $(#jLink).click(function() {

                          $.ajax({
                                  type: POST,
                                  url: testing.rb,
                                  data: name=ryan,
                                  success: function(msg){
                                      alert( Data Saved:  + msg );
                                  }
                          });
           });

  Does anyone have any examples I can take a look at?

  Thanks!


[jQuery] Tablesorter - How to detect which header cell was clicked? (in sortStart/sortEnd callbacks)

2008-09-25 Thread George Adamson

Hi there,

When using the excellent tablesorter plugin, I need to intercept the
click event to remove irrelevent rows from the table before the
columns are sorted (and put some back after sorting).

The sortStart/sortEnd callbacks are called at the right time but how
do I find out which cell (column header) was clicked?

(More info: The irrelevent rows I mentioned are actually headings
for groups of associated rows. I need to remove those headings just
before a sort starts, then put them back afterwards (using a sortEnd
callback).  The new group headings are be based on the sort column and
generated dynamically. This tableGrouper code will eventually become a
plugin to work with the table sorter)

Many thanks,

George Adamson


[jQuery] Re: Validation plug-in - how to set russian messages for all

2008-09-25 Thread Justin Kozuch

Hey Mateusz,

I've worked with the validation plugin a bit (I'm implementing it for
a bank), so I may be able to assist you.

Do you have a URL I can look at?

- Justin

On Sep 25, 5:12 am, matma [EMAIL PROTECTED] wrote:
 Hi,
 I'm using validation plug-in in our application for customers from
 Russia. I need to set russian messages for all customers from all
 places in the world. How can i do that? Messages are in localzation/
 messages_ru.js.

 Regards
 Mateusz Wolsza


[jQuery] Problem jQuery Selecting Input field

2008-09-25 Thread Faisal Basra

Hi, I am unable to select the input filed based on ID, i am using JSF
and that append form id with the input id automatically.

like this and

input type=text id=test:name  how to select input
id(test:name) in jQuery the input field whose id is test:name

The, complete code is given below. Please anyone can help, will be
thankful.

jQuery.noConflict();(function($) {
  $(function() {
  jQuery.mask.addPlaceholder('~','[+-]');
$('#date').mask('99/99/');
  });
})(jQuery);

form id=test
input type=text id=test:name
/form


[jQuery] Toggle Issue - Firefox/Safari Mac

2008-09-25 Thread Justin Kozuch

Hi All,

I have a maddening issue that I cannot seem to get my head around.

I have written a form in which, if you select a certain radio button,
it will toggle additional fields. The code I've written is:

//form40 coapp yes/no toggle function
$(document).ready(function() {
  // hide on DOM load
  $(tr.coapp).hide();

 // shows co-app tr's on YES click
  $(input#COAPPYES).bind(click, function(e) {
$(tr.coapp).toggle();
  });

 // hides co-app tr's on NO click
  $('input#COAPPNO').bind(click, function(e) {
$('tr.coapp').toggle();
  });
});

For some reason that I cannot yet understand, this code only works on
Windows browsers (Firefox, Safari, IE, etc). Thinking that I may have
disabled JavaScript in the Mac browsers, I checked to ensure they were
enabled, and they were in both Firefox and Safari.

This is the second time in less than 12 hours I have seen this issue;
last night, I was working on a POC that only worked in Safari, Firefox
3.0 was behaving VERY oddly. In that case, deleting the jQuery
completely removed the HTML elements from the browser, which is
something that I have NEVER seen before.

Am I the only who is having this problem, or is there something here
that I have overlooked?

Any advice would be greatly appreciated.

Cheers,

justin



[jQuery] Re: Tablesorter - How to detect which header cell was clicked? (in sortStart/sortEnd callbacks)

2008-09-25 Thread MorningZ

In the sortStart and sortEnd events, this is a reference right
to the table cell itself, so you know which was clicked





[jQuery] Re: ajax post to ruby script

2008-09-25 Thread BB

I can't see any problems with that script.
What do you think is wrong with it?


On 25 Sep., 06:02, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hello!

 Sorry for the n00b post, but i've come to a dead end. I'm trying to
 write an ajax callback to a Ruby script that does a simple database
 update. I'm having trouble with the syntax I think. Here's what I've
 been trying:

         $(#jLink).click(function() {

                         $.ajax({
                                 type: POST,
                                 url: testing.rb,
                                 data: name=ryan,
                                 success: function(msg){
                                     alert( Data Saved:  + msg );
                                 }
                         });
          });

 Does anyone have any examples I can take a look at?

 Thanks!


[jQuery] Re: Toggle Only the dd below the dt on click

2008-09-25 Thread Stinhambo

I didn't realise .nextAll existed!

I was using this -

$(dt.solution).click(function() { // This is for toggling multiple
dd elements
var obj = $(this).next();   // when you click 
dt.solution
while (obj.is(dd)) {  // it captures the next 
element (dd) as a
variable
obj.toggle();   // then until the next 
element ceases to be a dd
obj = obj.next();   // it toggles the 
element contained in the
variable (dd)
}   // then it 
flips onto the next one!
return false;
});


On Sep 19, 6:58 pm, tobaco [EMAIL PROTECTED] wrote:
 try it this way:

 script type=text/javascript
 $(function(){
         $('[EMAIL PROTECTED]http://;]').attr('target', '_blank');
         $('[EMAIL PROTECTED]https://;]').attr('target', '_blank');
         $(.stripes dd).hide();
         $(.stripes dt).click(function(){$
 (this).nextAll(dd).toggle(slow);
         });

 });

 /script

 On 19 Sep., 05:24, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:

  This is probably a noob question but...

  I have a bunch of definition lists on a page with the same class so
  that I can stripe every other dd in the list. What I want to do is
  hide the dd elements and when I click on the dt toggle the dd
  elements to visible. I want this to happen only on the dd elements
  in the same definition list as the title I am clicking, not all the
  dd elements on the entire page. What is happening now is that all of
  the dd in all of my definition lists are being toggled when I click
  on any of the dt elements on the page.

  I am sure this is a simple solution, but I can't seem to wrap my head
  around it. The code is below.

  script type=text/javascript
  $(function(){
          $('[EMAIL PROTECTED]http://;]').attr('target', '_blank');
          $('[EMAIL PROTECTED]https://;]').attr('target', '_blank');
          $(.stripes dd).hide();
          $(.stripes dt).click(function(){$(.stripes dd).toggle(slow);
          });});

  /script

  Thanks for your help!
  -Paul


[jQuery] Re: Problem jQuery Selecting Input field

2008-09-25 Thread Stinhambo

Try an underscore in the ID instead.

Looks like jQuery is getting confused with the colon being a selector.

$(#test_name).mask() should be good enough


On Sep 25, 11:28 pm, Faisal Basra [EMAIL PROTECTED] wrote:
 Hi, I am unable to select the input filed based on ID, i am using JSF
 and that append form id with the input id automatically.

 like this and

     input type=text id=test:name  how to select input
 id(test:name) in jQuery the input field whose id is test:name

 The, complete code is given below. Please anyone can help, will be
 thankful.

 jQuery.noConflict();(function($) {
       $(function() {
           jQuery.mask.addPlaceholder('~','[+-]');
             $('#date').mask('99/99/');
       });

 })(jQuery);

 form id=test
     input type=text id=test:name
 /form


[jQuery] Re: Problem jQuery Selecting Input field

2008-09-25 Thread MorningZ

Straight from the Docs (http://docs.jquery.com/Selectors)


Note: if you wish to use any of the meta-characters described above as
a literal part of a name, you must escape the character with two
backslashes (\). For example:

#foo\\:bar
#foo\\[bar\\]
#foo\\.bar



So to select

input type=text id=test:name

it would be:

$(input#test\\:name)



[jQuery] Re: Validation plug-in - how to set russian messages for all

2008-09-25 Thread matma

On 25 Wrz, 15:38, Justin Kozuch [EMAIL PROTECTED] wrote:
Hey Justin,

http://193.201.136.69/ecod_test_ru/InfoSeller.aspx
It's a very simple test page, with very simple validation, but it
definitely shows what i'm asking about. I guess when You'll look at
this site, and hit Send, You'll see: This field is required.
instead of Это поле необходимо заполнить. because You are using
language different than RU.
So I need to show messages in russian always for all visitators.

Regards
Mateusz Wolsza


[jQuery] - Object Oriented / PHP5 - Possible BUG with Jquery

2008-09-25 Thread Mario Moura
Object Oriented / PHP5 - Possible BUG with Jquery

Hi Folks

I was creating a simple singleton class (but I tested with others Desing
Patterns) with php like this:

class header {
   static private $instance = false;

private function js()
{
script type=text/javascript$(document).ready(function() {
$(#out).each(function(i){
$(this).bind(click, function(event){
document.form.submit();
});
});
});/script
}

private function css() {
}

private function header () {

echo $this-js().$this-css();

lia id=out href=.Logout/a /li
/ul
form method=post name=form action=.
input type=hidden value=. name=test/
/form


} // end header()

   static function instance() {
   if(!Header::$instance) {
   Header::$instance = new header();
   }
   return Header::$instance;
   }

}

My Surprise!! Jquery didnt work properly.

I tried a lot of variations and some times I changed my script adding

alert('something');

and sometimes my page received the $_POST but with the code above definitly
didnt work. (I have very similar codes in procedural style and works fine. )

Jquery didnt acept the event (click), but works with alert('something');

So I insert the Submit button input type=submit value=Submit

and with this my page receive the $_POST.

So I am new in the amazing PHP5/OOP world and I dont know if can be a bug
from PHP/Browser/JavaScript or Jquery.

So I am reporting.

My felling tell me that I am sending all this stuffs (script/) to an
Object and something is going wrong there.

Hope someone can help me.

Regards

Mario
macm


[jQuery] Re: Validation plug-in - how to set russian messages for all

2008-09-25 Thread Jörn Zaefferer
The localization files can be used by just including the script after
the main file.

script src=jquery.validate.js .../
script src=messages_ru.js .../

That should be enough.

Jörn

On Thu, Sep 25, 2008 at 4:39 PM, matma [EMAIL PROTECTED] wrote:

 On 25 Wrz, 15:38, Justin Kozuch [EMAIL PROTECTED] wrote:
 Hey Justin,

 http://193.201.136.69/ecod_test_ru/InfoSeller.aspx
 It's a very simple test page, with very simple validation, but it
 definitely shows what i'm asking about. I guess when You'll look at
 this site, and hit Send, You'll see: This field is required.
 instead of Это поле необходимо заполнить. because You are using
 language different than RU.
 So I need to show messages in russian always for all visitators.

 Regards
 Mateusz Wolsza



[jQuery] Re: Click function only invoked after second click in IE6 IE7

2008-09-25 Thread thomas peklak

Your document contains multiple same ids (info, info_link). This is
not valid (http://validator.w3.org/check?verbose=1uri=http://
dev.dreimorgen.com/test.html). Please correct this first (use classes
instead) and try again.

For me this is working.

Thomas


[jQuery] Re: Superfish v1.4.8 using two menus one under another

2008-09-25 Thread Rick Faircloth

I'm just throwing out suggestions that'd I'd try, but don't have
a definitive answer.

What about applying the z-index to a specific UL and perhaps even
each LI within and see what happens.

Changing the z-index for various elements is the only thing I can
think of at this point.

Got a URL I can view?

Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ilya
 Sent: Thursday, September 25, 2008 9:10 AM
 To: jQuery (English)
 Subject: [jQuery] Re: Superfish v1.4.8 using two menus one under another
 
 
 Hi Rick,
 
 I have tried to to set z-index: 99 to the top menu and 0 to the bottom
 but still have the same effect...
 
 Thank you.
 
 On Sep 24, 8:11 pm, Rick Faircloth [EMAIL PROTECTED] wrote:
  Hi,Ilya...
 
  Trying increasing the z-index on the top menu and see if that helps.
 
  Rick
 
   -Original Message-
   From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf 
   OfIlya
   Sent: Wednesday, September 24, 2008 3:44 PM
   To: jQuery (English)
   Subject: [jQuery]Superfishv1.4.8 using two menus one under another
 
   Hello,
 
   I'm trying to useSuperfishv1.4.8 with two menus located one under
   another. Everything looks almost great except for IE6 -- the dropdowns
   from the top menu open behind the bottom menu items. Does anyone know
   if there is a fix for this issue?
 
   Thank you.



[jQuery] Validation Plugin - How to Validate input=file

2008-09-25 Thread Adam

I'm trying to validate that someone has selected a file for upload
before submitting a form.  I set the required class on the input
element, but it's not being validated.  The regular text input is
validated, however.


form:form id=pictureform commandName=pictureCommand
action=${actionURL} method=post enctype=multipart/form-data
cssClass=update
div
label for=title
Title:
/label
form:input path=title cssClass=required /
/div

div
label for=description
Description:
/label
form:textarea path=description /
/div

label for=image
Select File:
/label
input type=file name=image cssClass=required /
input type=submit value=Add /
/form:form



[jQuery] Special characters with ajax.

2008-09-25 Thread uncleroxk

Hi, i am new to Jquery.. i have a query here.

let say that i want to pass the variable parameter parameter var
$.post.. if i have any special character in the parameter, all the
character after the special character are not been pass..


var parameter = abcdefg??abcdefg;
$.post('process.php', {'term': parameter}, function(data) {
  $('#display).html(data);
});



Is there anyway to solve it?.
Thanks in advance.. =)


[jQuery] Tabs with multiple CSS classes

2008-09-25 Thread Dan B.

Hi Folks,

I'm interested in having multiple instances of tabs on a page/pages
throughout a site and on the same page without using an iFrame.

The tabs function is cool.  I'd like to pass it a different base
class, so that basically I have tab controls of different styles on
the same page.

Specifically I'm wanting to have this set of tabs have different
widths; I'm looking for like a base-class option to pass to
jquery.tabs or something.

Any suggestions?


dan


[jQuery] Re: Case Insentitive Selectorys

2008-09-25 Thread blockedmind

So whan can I use to find attribute instead of a.textContent||
a.innerText||jQuery(a).text() ?

On Sep 23, 6:49 pm, Eric Martin [EMAIL PROTECTED] wrote:
 I recently posted about a custom jQuery selector to do a case-
 insensitive exact 
 search:http://www.ericmmartin.com/creating-a-custom-jquery-selector/

 It sounds like writing a custom selector might be your best bet. You
 should be able to do an exact, contains, and starts-with search,
 depending on your needs.

 -Eric

 On Sep 23, 7:51 am, blockedmind [EMAIL PROTECTED] wrote:

  hmmm thanks for that i'll check it out but exact search is not enough
  for me... i need *keyword* kind of searching...

  On 22 Eylül, 19:35, ricardobeat [EMAIL PROTECTED] wrote:

   my_search = sEarCh; //global var, you can't pass arguments to the
   filter function
   my_search = new RegExp(my_search,'i'); // 'i' makes the regexp case
   insensitive

   $('h1').filter(function () {
       return $(this).attr('title').match(my_search);

   });

   this might be slow if you're handling large XML files, and it's
   limited to single word searches or exact concatenated matches.

   - ricardo

   On Sep 22, 6:27 am, Erik Beeson [EMAIL PROTECTED] wrote:

Maybe try using filter and a regexp for the part that you want to be 
case
insensitive. Something like (very untested):
$(...).find('item').filter(function() { return this.name.match(new
RegExp(search, 'i')); }).each(function() {

});

I don't recall the syntax for accessing an XML attribute from 
javascript, so
the this.name part might be wrong. Maybe you need $(this).attr('name')
instead. Also, you might want to be doing more than just passing the 
search
into a RegExp, but you get the idea.

Also, maybe reconsider what you're trying to do. Maybe just return your 
xml
such that it's already been converted to lower case, then just do what 
you
were doing before except use search.toLowerCase() instead of just 
search.

Hope it helps.

--Erik

On Mon, Sep 22, 2008 at 12:35 AM, blockedmind [EMAIL PROTECTED] wrote:

 Nothing?

 On Sep 20, 5:22 pm, blockedmind [EMAIL PROTECTED] wrote:
  I am making search in an xml file, but I don't get expected results
  since jQuery selectors arecase-sensitive. I use something like

  $(returnedXml).find(item[name*='+search+']).each(function(){

  });

  How to make it INCASE-SENSITIVE?




[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-25 Thread hubbs

Well, I tried this, but again it is not working, I really must be
missing something.

All I want to do it be able to click the link inside the iframe, and
have it append some HTML into the parent, and apply a click event as
well, that is all, seems simple! :)

My test page:  http://web2.puc.edu/PUC/files/bind.html
Iframe page: http://web2.puc.edu/PUC/files/iframe.html

Thanks for all the help.

On Sep 24, 3:02 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Hi,

 This works for me (FF3) (code running in the parent frame):

 $('#test',frames[0].document).click(function(){ //bind function to
 event from element *inside iframe*
     $('bTESTE/b').appendTo('body').click(function(){ // append
 element to the *parent frame* and assing a click handler to it
          alert('test');
      });

 });

 I might not be understanding clearly what you want, a test case or
 explanation of the functionality you are looking for might help.

 cheers,
 - ricardo

 On Sep 24, 1:27 pm, hubbs [EMAIL PROTECTED] wrote:

  Hi Ricardo,

  I am not appending an iframe, it is hardcoded.  I am trying to append
  to the parent document from within the iframe, and have the event in
  the parent bound to the appended element from the iframe.

  On Sep 23, 11:49 pm, ricardobeat [EMAIL PROTECTED] wrote:

   Hi, I can't test anything right now, but are you setting up the
   ready() function after appending the iframe?

   On Sep 23, 9:11 pm, hubbs [EMAIL PROTECTED] wrote:

Yeah, this really is not working.  Could someone please help me to
understand how to make multiple frames use the same jquery instance so
I can resolve this problem?  Do I need to resort to frame ready
plugin?  I really don't want to...

On Sep 17, 7:12 pm, ricardobeat [EMAIL PROTECTED] wrote:

 Not sure but $(frames['frame'].document).ready() should work (from the
 parent window).

 On Sep 17, 8:21 pm, hubbs [EMAIL PROTECTED] wrote:

  Ok, I am realizing it has to do with the do with the 
  $(document).ready
  function.  If I just use:

  $ = window.parent.$;
   $(#hold).append('a href=#Inserted from iFrame/a br /');

  In the iframe, it correctly adds the link to the parent, and it gets
  the event from livequery!  Hooray!!

  But, obviously I need to add back a document ready function so that 
  I
  can bind events within the iframe.  How does that need to be done in
  this context?  As I said, using the normal document ready does not
  work.

  On Sep 17, 9:58 am, ricardobeat [EMAIL PROTECTED] wrote:

   using the iframe's jQuery object:

   $('.classinparentframe', parent.window.document)

   Ideally if the contents of the iframe are always known to you, you
   should use only one instance of jQuery on the parent window and 
   do all
   your stuff from it, it's simpler to debug also.

   On Sep 16, 10:29 pm, hubbs [EMAIL PROTECTED] wrote:

Thanks Ricardo.

But what if I wanted to access the parent document from WITHIN 
the
iframe?

On Sep 16, 12:27 pm, ricardobeat [EMAIL PROTECTED] wrote:

 You need to understand that a frame is another 'window' 
 instance, it
 doesn't have the same jQuery object as the parent window 
 unless you
 tell it to. So the '$' object you use in firebug console is 
 always the
 one from the parent window.

 If i'm not mistaken you can acess frame content with the 
 parent
 window's jQuery object using $('.classinsidetheframe',
 frames['name'].document).css();

 On Sep 16, 1:48 pm, hubbs [EMAIL PROTECTED] wrote:

  Ok Brandon,

  I found this in another post:

  var doc = $('#testframe')[0].contentWindow.document;
  $(doc.body).append('spantest/span');

  This seems like it would help, but I am not sure how to use 
  this,
  along with what you posted to get it working correctly.  
  Somehow
  sending the GET within the context of the contentWindow is 
  confusing
  me, and I just can't get it working.

  On Sep 15, 9:18 am, Brandon Aaron [EMAIL PROTECTED] 
  wrote:

   To see what I mean run this in Firebug:
   $('iframe')[0].contentWindow.$ = $;

   Then click on the link in the iframe and it will behave 
   as you expect.

   --
   Brandon Aaron

   On Mon, Sep 15, 2008 at 9:13 AM, Brandon Aaron [EMAIL 
   PROTECTED]wrote:

This would work if you used the frames parent instance 
of jQuery. LiveQuery
works by monitoring the DOM methods within jQuery. 
Since within the frame
you are using a new instance of jQuery, LiveQuery will 
not be monitoring its
DOM methods.
--
Brandon Aaron

On Sun, Sep 14, 2008 at 11:04 PM, 

[jQuery] Re: Callback to home page from 2nd page

2008-09-25 Thread ricardobeat

Hi!

Could you rephrase your question?

On Sep 25, 4:14 am, Reddy [EMAIL PROTECTED] wrote:
 Could somebody help me in this issue.

  when I am on landing page I have two questions to be answered . When
 I click on 2nd ques which is radio button i will be shown with other
 remaining questions.

 So from 2nd page when i click on link which takes me to  homepage  I
 want that exact page which i will be prompted when i try to access my
 application.


[jQuery] Re: Jquery/Tabbed interface only working in FF, broken in IE, Chrome, Opera

2008-09-25 Thread ricardobeat

Incorrect markup may be the cause of your issues:

1. IDs should be unique, you have many repeated IDs. CSS works
alright, but JS will certainly be confused
2. you can't have a div (block element) inside an a (inline
element)
3. you have to close your link / tags

Or let her hire a developer! ;)

- ricardo

On Sep 25, 4:23 am, GoDsGiMp [EMAIL PROTECTED] wrote:
 Hi. My name is Craig and I am a copywriter for an African travel company
 based in Cape Town, South Africa. I have no web development background,
 however my girlfriend is a photographer and after seeing how much developers
 wanted to charge her for a simple gallery based site, I decided to give it a
 go myself.

 Turns out, it's not that easy

 First I used a Jquery based script called stepCarousel from
 dynamicdrive.com. That was to make a sliding image gallery and also for the
 thumbnails.

 http://www.tessaholding.co.za/home.htmlwww.tessaholding.co.za/home.html

 After getting that to work (I believe it may not function in Chrome) I moved
 on to trying to make a tabbed interface for the four separate galleries.

 http://www.tessaholding.co.za/testing/home.htmlwww.tessaholding.co.za/testing/home.html

 Somehow it works perfectly in FF. But since it is the most lenient of
 browsers, the code is probably all wrong. It does not function in Chrome,
 Opera or IE (6/7). Be aware that the three galleries are all the same (for
 testing and building purposes) and that the links on the left are simply
 text links with no styling (also only until I get it working, then I will
 make pretty..)

 I am aware that posting an entire page link here is not the best way to get
 help, but since I lack the necessary knowledge to pinpoint the problem, that
 is all I can do.

 Any help, even pointing in the right direction, will be greatly appreciated.
 --
 View this message in 
 context:http://www.nabble.com/Jquery-Tabbed-interface-only-working-in-FF%2C-b...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: this.style is null or not an object

2008-09-25 Thread Aaron

Per my own post having to do with jQuery competing with other js
files, yes it would seem to be a known issue. Here is the link that
was provided to me for trying to solve the conflict and be able to
keep all js files on the same page:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

Aaron

On Sep 18, 10:07 am, kim [EMAIL PROTECTED] wrote:
 i've found the cause of the error. seems like jquery doesn't work well with
 scriptaculous. we are using the lightbox library, and it requires
 scriptaculous. after excluding the scriptaculous library, my jquery code
 works!

 is this a known issue?

 thanks.

 On Thu, Sep 18, 2008 at 7:01 PM, MorningZ [EMAIL PROTECTED] wrote:

  the problem is you have a div tag with the id of showError and you
  also seemingly have an event called showError

  That's not good to have and is probably the source of your issue


[jQuery] Safari Hide() - Everything I am running across fails.

2008-09-25 Thread urbolutions

This is the popular bug wherein Safari refuses to hide elements.

Environment/code setup:

- JQuery 1.2.6.min
- Hidden elements exist in root html file as:
div id=cardsContainer/div

- Hidden elements initial style is declared as:
#pageContentContainer #bodyContainer #cardsContainer {
 position: absolute;
 top: 170px;
 left: 80px;
 width: 650px;
 height: 290px;
 border: 0px solid blue;
 display:none;
}

The above should present with a hidden object and does not.

Later, there is a routine that hides objects as such:
$('#cardsContainer').hide();
OR ALTERNATELY
$('#cardsContainer').css('display','none');

All fail to hide the containers. The containers have swf objects
inside.

Any ideas?

Thanks much!


[jQuery] Plugin that offers smart tag-like functionality?

2008-09-25 Thread Rey Bango


Anyone know of a plugin that offers functionality like this?

http://en.wikipedia.org/wiki/Image:Smarttags.PNG

Rey...


[jQuery] Re: Special characters with ajax.

2008-09-25 Thread uncleroxk

i know that   .serialize will encode it to a url safe character, but
what if i decided not to use serialize, as serialize would not allow
multiple selection for Option..


[jQuery] [validate] write a metadata within group

2008-09-25 Thread Alexsandro_xpt

I wish use groups option to display a single message for multiple
elements, but with metadata behavior.

Something like that:

input type=text name=t1 class={groups: { g1: t1 t2},
requered:true, number:true,messages:{required:'Please a
text.',number:'Please only numbers!'}} /


input type=text name=t2 /




How to do right mode with metadata?



Thz!!


[jQuery] Re: Click function only invoked after second click in IE6 IE7

2008-09-25 Thread RLR

Thanks for the hint Thomas.
I revised the code so that it validates correctly now. And I stripped
it down to a minimalist version to show my point.

Click item 1
- toggle link appears
click on toggle link (IE6/IE7 do not toggle the content whereas Safari
 FF do on the first time)

Click item 1
-toggle link appears
click on toggle content link
- now it works on all browsers

What is wrong with the code?


[jQuery] Re: frames['results'].location.href jQuery

2008-09-25 Thread Michael Geary

Were you thinking that there might be a better way to do that with
jQuery? Your code looks just about perfect the way it is.

The only change I would make would be to simplify it a bit:

frames.results.location =

It would be hard for any JavaScript library to improve on that. :-)

-Mike

 I have this line

 frames['results'].location.href =

 in my code.

 Can someone perhaps tell what this line would look like when
 I want to use jQuery to change the src of an iframe-element?


[jQuery] Re: no callback for css/addClass?

2008-09-25 Thread Alex Weber

absolutely!

www.weberseguros.com/productos.php

its the div with the border on the bottom with contact details... when
you click on any product link it expands and when you click on the
Volver al Menu de Productos link its supposed to shrink back to its
original size...
im considering just refreshing the page because its in position when
the section opens if you're using IE, specially because the whole
thing just doesn't work so nicely in terms of the menu resizing to fit
the contents (in fact it doesnt work at all) but since i made this
website pretty much for free for a family member (that lives in spain
btw hence the spanish) im not gonna spend too much time on minor
details like that :)

On Sep 25, 1:03 pm, Eric [EMAIL PROTECTED] wrote:
 Hmmm...  If it's working in FF/Safari but not in IE, I'm still
 guessing that a browser rendering difference is to blame (rather than
 jQuery).  Do you have any sample pages live on the web that I could
 check out?

 On Sep 25, 9:18 am, Alex Weber [EMAIL PROTECTED] wrote:

  Thanks Eric about the fadeIn() params that was careless of me but it
  doesn't seem to have made a difference... :(
  btw the div has no padding and ive tried resizing it down to 50px and
  it still doesnt fit

  man i really hate IE sometimes...

  On Sep 25, 12:43 am, Eric [EMAIL PROTECTED] wrote:

   Does #produtos_contato have any padding added to it?  If so, IE could
   be calculating the width of the overall element as more than 350px,
   causing it to get bumped to the next line.

   On Sep 24, 5:05 pm, Alex Weber [EMAIL PROTECTED] wrote:

sorry i just took a look at the code and its a fadeIn() not a show()
but really it doesn't change anything.. here's the code:

$('#produtos_contato').css('width','350px');
$('#produtos_links').fadeIn(resize);

where resize() is a function that stretches the left menu panel as far
down or up as the content goes (completely unrelated to the divs in
the js)

in firefox, opera, etc it works ok but in IE #produtos_contato
doesn't seem to resize in time because its supposed to fit in
alongside the div that fades in but instead sits under it...

On Sep 24, 5:48 pm, ricardobeat [EMAIL PROTECTED] wrote:

 There is no way a css() and show() could happen in the wrong order, as
 the second one only executes after the first one returns the object.
 Is it an animated resize?

 On Sep 24, 3:59 pm, Alex Weber [EMAIL PROTECTED] wrote:

  yeah bud thats a given i just wanted to confirm that there wasn't a
  callback and why not.

  thanks for all the replies!

  ajpiano wrote:
   that sounds like an issue that needs debugging, not a 
   (superfluous)
   change to the library core...

   On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
i realize that... i just needed this in a rare case where 
jquery is
showing an element before resizing it, even though the resize
statement (css) is before the show()...

On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:

 Yeah, it's just like doing

 $('color','red'); alert('color changed');

 On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

  Callbacks are used to know when asynchronous events are 
  complete...
  setting the css or class doesn't happen asynchronously


[jQuery] Re: Superfish jQuery competing with other js files

2008-09-25 Thread Aaron

Unfortunately I need to continue to include the LightWindow and the
like because they are being used by other applications on the site
(and it is a work project that I don't have final say on).

As for that link, good stuff! It solved almost all my problems, but I
think I am running into another issue with it telling me in IE that
'this.style' is null or not an object and in Firefox Component
returned failure code: 0x80004005 (NS_ERROR_FAILURE). So it would
seem that there still is some competing going on, but the
functionality is now there in Firefox and IE7... IE6 is still broken
though. I will tinker around some more and post my results.

~Aaron

On Sep 23, 9:50 pm, Joel Birch [EMAIL PROTECTED] wrote:
 Hi Aaron,

 LightWindow uses the Prototype library so you need to read up about
 using jQuery with other libraries, 
 here:http://docs.jquery.com/Using_jQuery_with_Other_Libraries

 That page will tell you everything you need to know so you can use
 both libraries at the same time. However, a far better solution would
 be to swap LightWindow for an equivalent plugin that uses jQuery as
 its library, precluding the need to use Prototype at all (and saving
 you having to include so much extra code). There are many to choose
 from - Thickbox, Lightbox (jQuery version), Shadowbox, etc...

 Joel Birch.


[jQuery] tabs and form plugin integration

2008-09-25 Thread Web Specialist
Hi all. I'm building a form which contains 4 sub-forms available like tabs.
I'm looking for examples about how to integrate jquery tabs with form
validation plugin.

Cheers
Marco Antonio


[jQuery] Re: frames['results'].location.href jQuery

2008-09-25 Thread ricardobeat

Michael,

In case you need it:

$('#frameid').attr('src','http://');
or
$('iframe').attr('src','http://');

You have to access the parent's iframe element, not the iframe
document to do this. You could use $(frames['frame'])[0].location.href
but that's an absolutely unnecessary waste of resources.

- ricardo

On Sep 25, 1:27 pm, Michael Geary [EMAIL PROTECTED] wrote:
 Were you thinking that there might be a better way to do that with
 jQuery? Your code looks just about perfect the way it is.

 The only change I would make would be to simplify it a bit:

 frames.results.location =

 It would be hard for any JavaScript library to improve on that. :-)

 -Mike

  I have this line

  frames['results'].location.href =

  in my code.

  Can someone perhaps tell what this line would look like when
  I want to use jQuery to change the src of an iframe-element?


[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-25 Thread Aaron

I tried this and it did not give any of the li's a z-index. I even
placed the function inside the document.ready function. Here is what I
changed the function to read as:
jQuery('ul.sf-menu li').each(function(i){
jQuery(this).css('z-index',30-i);
});

I did also try using '#sf-menu li' (yes, I put the ID on the ul
first). I was expecting it to at least put a z-index of 30 on the
first list item but it hasn't done so. I was also wondering if this
would go down into each submenu item and place z-index's on those too
(assuming it will work on the set up I have).

~Aaron

On Sep 23, 9:38 pm, Joel Birch [EMAIL PROTECTED] wrote:
 Great stuff Ricardo! Thanks for doing this.

 Just a small warning: you said which equals the element's index in
 relation to its parent. Whilst this probably does work in most cases,
 be aware that (as far as I know) DOM elements are not guaranteed to be
 returned in the order they appear in the source (although they
 probably are most of the time). I think there was a recent jquery-dev
 thread discussing this.

 @Aaron - I'm really interested to know if this solutions works - could
 you please report back if Ricardo's code fixes your IE z-index
 problem?

 Cheers
 Joel Birch.


[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread ricardobeat

Is this line

$(#message).get(0).value += window.opener.location.href;

running from inside the popup?

On Sep 25, 8:48 am, Stinhambo [EMAIL PROTECTED] wrote:
 I am having some problems with that bit of code.

 Basically I am launching a popup window and this is my js file -

 $('a[rel=email_page]').click(function(){

 window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
         return false;

 });

 // This passes along the URL of the parent opener when clicking Email
 this page
 $(#message).get(0).value += window.opener.location.href;

 but it seems to be causing a conflict in the rest of my code.

 My Firebug console log says -
 $(#message).get(0) is undefined

 If I comment out the line, everything works nicely.

 Any idea if I can get rid of this error and still retain the
 functionality?


[jQuery] Re: no callback for css/addClass?

2008-09-25 Thread ricardobeat

Sorry for being rude and I know you didn't ask for design tips, but
why on earth is that banner image inside the first list item? This is
a clear example of misused jQuery aiding poor design, you should be
very happy it works the way it is! :D

But seriously, there is no need for the fade effects or ajax in this
page, plain old XHTML and good design would do it better.

Now for a proper technical answer: I'm really impressed it works as it
is in Firefox, for some reason it allows the img to go outside the
li bounds without affecting it's height, without a float or abs/rel
positioning. On IE your first li element extends all the way down to
the bottom of the image on the right, it's a wild guess why the
contact box is in place when you first load the page. I'd be inclined
to say that the proper positioning for it (with your code) is the
'wrong' one, when it's down after the image. The obvious solution is
to put that image in it's right place in the XHTML, a floated DIV
separate from the product list (ol).

- ricardo

On Sep 25, 1:36 pm, Alex Weber [EMAIL PROTECTED] wrote:
 absolutely!

 www.weberseguros.com/productos.php

 its the div with the border on the bottom with contact details... when
 you click on any product link it expands and when you click on the
 Volver al Menu de Productos link its supposed to shrink back to its
 original size...
 im considering just refreshing the page because its in position when
 the section opens if you're using IE, specially because the whole
 thing just doesn't work so nicely in terms of the menu resizing to fit
 the contents (in fact it doesnt work at all) but since i made this
 website pretty much for free for a family member (that lives in spain
 btw hence the spanish) im not gonna spend too much time on minor
 details like that :)

 On Sep 25, 1:03 pm, Eric [EMAIL PROTECTED] wrote:

  Hmmm...  If it's working in FF/Safari but not in IE, I'm still
  guessing that a browser rendering difference is to blame (rather than
  jQuery).  Do you have any sample pages live on the web that I could
  check out?

  On Sep 25, 9:18 am, Alex Weber [EMAIL PROTECTED] wrote:

   Thanks Eric about the fadeIn() params that was careless of me but it
   doesn't seem to have made a difference... :(
   btw the div has no padding and ive tried resizing it down to 50px and
   it still doesnt fit

   man i really hate IE sometimes...

   On Sep 25, 12:43 am, Eric [EMAIL PROTECTED] wrote:

Does #produtos_contato have any padding added to it?  If so, IE could
be calculating the width of the overall element as more than 350px,
causing it to get bumped to the next line.

On Sep 24, 5:05 pm, Alex Weber [EMAIL PROTECTED] wrote:

 sorry i just took a look at the code and its a fadeIn() not a show()
 but really it doesn't change anything.. here's the code:

 $('#produtos_contato').css('width','350px');
 $('#produtos_links').fadeIn(resize);

 where resize() is a function that stretches the left menu panel as far
 down or up as the content goes (completely unrelated to the divs in
 the js)

 in firefox, opera, etc it works ok but in IE #produtos_contato
 doesn't seem to resize in time because its supposed to fit in
 alongside the div that fades in but instead sits under it...

 On Sep 24, 5:48 pm, ricardobeat [EMAIL PROTECTED] wrote:

  There is no way a css() and show() could happen in the wrong order, 
  as
  the second one only executes after the first one returns the object.
  Is it an animated resize?

  On Sep 24, 3:59 pm, Alex Weber [EMAIL PROTECTED] wrote:

   yeah bud thats a given i just wanted to confirm that there wasn't 
   a
   callback and why not.

   thanks for all the replies!

   ajpiano wrote:
that sounds like an issue that needs debugging, not a 
(superfluous)
change to the library core...

On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
 i realize that... i just needed this in a rare case where 
 jquery is
 showing an element before resizing it, even though the resize
 statement (css) is before the show()...

 On Sep 23, 9:05 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Yeah, it's just like doing

  $('color','red'); alert('color changed');

  On Sep 23, 5:15 pm, MorningZ [EMAIL PROTECTED] wrote:

   Callbacks are used to know when asynchronous events are 
   complete...
   setting the css or class doesn't happen asynchronously


[jQuery] Re: - Object Oriented / PHP5 - Possible BUG with Jquery

2008-09-25 Thread ricardobeat

I have no clue on the PHP side of this, but try this script instead:

script type=text/javascript
$(document).ready(function() {

$(#out).click(function(){
$('form').submit();
return false;
 });

 });
/script

On Sep 25, 11:40 am, Mario Moura [EMAIL PROTECTED] wrote:
 Object Oriented / PHP5 - Possible BUG with Jquery

 Hi Folks

 I was creating a simple singleton class (but I tested with others Desing
 Patterns) with php like this:

 class header {
    static private $instance = false;

     private function js()
 {
     script type=text/javascript$(document).ready(function() {
             $(#out).each(function(i){
                 $(this).bind(click, function(event){
                 document.form.submit();
                 });
             });
     });/script

 }

     private function css() {
     }

     private function header () {
     
     echo $this-js().$this-css();
     
     lia id=out href=.Logout/a /li
     /ul
     form method=post name=form action=.
     input type=hidden value=. name=test/
     /form
         

 } // end header()

    static function instance() {
        if(!Header::$instance) {
            Header::$instance = new header();
        }
        return Header::$instance;
    }

 }

 My Surprise!! Jquery didnt work properly.

 I tried a lot of variations and some times I changed my script adding

 alert('something');

 and sometimes my page received the $_POST but with the code above definitly
 didnt work. (I have very similar codes in procedural style and works fine. )

 Jquery didnt acept the event (click), but works with alert('something');

 So I insert the Submit button input type=submit value=Submit

 and with this my page receive the $_POST.

 So I am new in the amazing PHP5/OOP world and I dont know if can be a bug
 from PHP/Browser/JavaScript or Jquery.

 So I am reporting.

 My felling tell me that I am sending all this stuffs (script/) to an
 Object and something is going wrong there.

 Hope someone can help me.

 Regards

 Mario
 macm


[jQuery] Re: Superfish v1.4.8 using two menus one under another

2008-09-25 Thread Xiqum

You can try this thread:
http://groups.google.com/group/jquery-en/browse_thread/thread/26925831a8b2b09e

On 24 sep, 21:44, Ilya [EMAIL PROTECTED] wrote:
 Hello,

 I'm trying to use Superfish v1.4.8 with two menus located one under
 another. Everything looks almost great except for IE6 -- the dropdowns
 from the top menu open behind the bottom menu items. Does anyone know
 if there is a fix for this issue?

 Thank you.


[jQuery] Backward compatibility Roadmap

2008-09-25 Thread alecs

Are the new releases of jquery backward compatible with the old code?
Are there any roadmap for jquery? I haven't found any ... For instance
will jquery 1.3 support old 1.2 or 1.1 code ?
Have you ever faced with the problem of a new browser and your written
code not working in it?
Thanks in advance!


[jQuery] jquery + openx (via ajax) problem?

2008-09-25 Thread Ditikos

Hello,

I am trying to implement a code that will load a banner zone from
openx (openx.org), AFTER the rest of the site loads. I have the
invocation code (either javascript or php) but when I am calling the
code from a local file, for example testban.php (the php version), The
page loads but when it comes to load the banner it redirects to the
banner, instead of loading the banner to a div.

My Code is as follows:

on the $(document).write(function() {}); block I have included a
setTimeout(loadBanner(),1000); function, as the last line before
bracket closing.

immediately after the block ends, I declare my function as follows:

function loadBanner()
{
 $(#banner).load(testban.php);
}


testban.php has the banner fetching code only.

The fetching banners have a script type=text/javascript/script
declaration on them. Is this responsible for the new page opening?



[jQuery] Re: Form submitted twice in IE ?

2008-09-25 Thread CoyoteRunner

I ran into something like this myself  but I can't remember if it was
with IE or Firefox . . . it ended up being the page was having an
issue with the favico not being set -- for some reason the code combo
I had was causing that page to be submitted twice.  Look into that
possibility if you don't have a favicon set.

On Sep 24, 3:24 pm, MichaelE [EMAIL PROTECTED] wrote:
 I have a fairly complex jquery-based form in a ColdFusion back-end
 app, with a tabbed interface that fires validation on each tab change,
 as well as on submit. Lots of moving parts. I don't think there's
 anything wrong here, works fine...

 The problem is that in IE, the form is getting submitted twice to my
 CF page.
 With Firefox, no problems... clicking the 'submit' button or hitting
 'enter' in any field causes the form to be submitted only one time as
 expected. However, in IE7, either clicking 'submit' or 'enter' submits
 the form twice.

 Any ideas?

 Interested in finding both a probable cause and a cure, if possible!


[jQuery] disable click on animated objects

2008-09-25 Thread Maujor

I am experiencing an undesirable behavior when click on an object
while it is sliding down.
I hosted a test case and you can see the problem at: 
http://www.maujor.com/temp/jquery/
Thanks for any help


[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-25 Thread ricardobeat

You need to put the code inside the $(document).ready function, it's
not finding the iframe because the DOM is not loaded.

- ricardo

On Sep 25, 12:36 pm, hubbs [EMAIL PROTECTED] wrote:
 Well, I tried this, but again it is not working, I really must be
 missing something.

 All I want to do it be able to click the link inside the iframe, and
 have it append some HTML into the parent, and apply a click event as
 well, that is all, seems simple! :)

 My test page:  http://web2.puc.edu/PUC/files/bind.html
 Iframe page:http://web2.puc.edu/PUC/files/iframe.html

 Thanks for all the help.

 On Sep 24, 3:02 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Hi,

  This works for me (FF3) (code running in the parent frame):

  $('#test',frames[0].document).click(function(){ //bind function to
  event from element *inside iframe*
      $('bTESTE/b').appendTo('body').click(function(){ // append
  element to the *parent frame* and assing a click handler to it
           alert('test');
       });

  });

  I might not be understanding clearly what you want, a test case or
  explanation of the functionality you are looking for might help.

  cheers,
  - ricardo

  On Sep 24, 1:27 pm, hubbs [EMAIL PROTECTED] wrote:

   Hi Ricardo,

   I am not appending an iframe, it is hardcoded.  I am trying to append
   to the parent document from within the iframe, and have the event in
   the parent bound to the appended element from the iframe.

   On Sep 23, 11:49 pm, ricardobeat [EMAIL PROTECTED] wrote:

Hi, I can't test anything right now, but are you setting up the
ready() function after appending the iframe?

On Sep 23, 9:11 pm, hubbs [EMAIL PROTECTED] wrote:

 Yeah, this really is not working.  Could someone please help me to
 understand how to make multiple frames use the same jquery instance so
 I can resolve this problem?  Do I need to resort to frame ready
 plugin?  I really don't want to...

 On Sep 17, 7:12 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Not sure but $(frames['frame'].document).ready() should work (from 
  the
  parent window).

  On Sep 17, 8:21 pm, hubbs [EMAIL PROTECTED] wrote:

   Ok, I am realizing it has to do with the do with the 
   $(document).ready
   function.  If I just use:

   $ = window.parent.$;
    $(#hold).append('a href=#Inserted from iFrame/a br /');

   In the iframe, it correctly adds the link to the parent, and it 
   gets
   the event from livequery!  Hooray!!

   But, obviously I need to add back a document ready function so 
   that I
   can bind events within the iframe.  How does that need to be done 
   in
   this context?  As I said, using the normal document ready does not
   work.

   On Sep 17, 9:58 am, ricardobeat [EMAIL PROTECTED] wrote:

using the iframe's jQuery object:

$('.classinparentframe', parent.window.document)

Ideally if the contents of the iframe are always known to you, 
you
should use only one instance of jQuery on the parent window and 
do all
your stuff from it, it's simpler to debug also.

On Sep 16, 10:29 pm, hubbs [EMAIL PROTECTED] wrote:

 Thanks Ricardo.

 But what if I wanted to access the parent document from 
 WITHIN the
 iframe?

 On Sep 16, 12:27 pm, ricardobeat [EMAIL PROTECTED] wrote:

  You need to understand that a frame is another 'window' 
  instance, it
  doesn't have the same jQuery object as the parent window 
  unless you
  tell it to. So the '$' object you use in firebug console is 
  always the
  one from the parent window.

  If i'm not mistaken you can acess frame content with the 
  parent
  window's jQuery object using $('.classinsidetheframe',
  frames['name'].document).css();

  On Sep 16, 1:48 pm, hubbs [EMAIL PROTECTED] wrote:

   Ok Brandon,

   I found this in another post:

   var doc = $('#testframe')[0].contentWindow.document;
   $(doc.body).append('spantest/span');

   This seems like it would help, but I am not sure how to 
   use this,
   along with what you posted to get it working correctly.  
   Somehow
   sending the GET within the context of the contentWindow 
   is confusing
   me, and I just can't get it working.

   On Sep 15, 9:18 am, Brandon Aaron [EMAIL PROTECTED] 
   wrote:

To see what I mean run this in Firebug:
$('iframe')[0].contentWindow.$ = $;

Then click on the link in the iframe and it will behave 
as you expect.

--
Brandon Aaron

On Mon, Sep 15, 2008 at 9:13 AM, Brandon Aaron [EMAIL 
PROTECTED]wrote:

 This would work if you used the frames parent 
 instance of jQuery. LiveQuery

[jQuery] multiple event handlers and sequence

2008-09-25 Thread chadmichael

Is there any way to control the order of multiple event handlers
registered?

If not, does anyone have an idea of how to make a form that uses
onchange to submit the form ( i.e. i don't want a submit button i just
want the form to submit when someone leaves a field, provided
everything has been filled out ), but also wants to use onchange to
validate data, and possibly do other things?


[jQuery] Re: - Object Oriented / PHP5 - Possible BUG with Jquery

2008-09-25 Thread Mario Moura
Hi Ricardo

Thanks. Works fine now!  You saved my day!

Regards

Mario

NOT A BUG!! MY FAULT!

SOLVED



2008/9/25 ricardobeat [EMAIL PROTECTED]


 I have no clue on the PHP side of this, but try this script instead:

 script type=text/javascript
 $(document).ready(function() {

 $(#out).click(function(){
$('form').submit();
return false;
 });

  });
 /script

 On Sep 25, 11:40 am, Mario Moura [EMAIL PROTECTED] wrote:
  Object Oriented / PHP5 - Possible BUG with Jquery
 
  Hi Folks
 
  I was creating a simple singleton class (but I tested with others Desing
  Patterns) with php like this:
 
  class header {
 static private $instance = false;
 
  private function js()
  {
  script type=text/javascript$(document).ready(function() {
  $(#out).each(function(i){
  $(this).bind(click, function(event){
  document.form.submit();
  });
  });
  });/script
 
  }
 
  private function css() {
  }
 
  private function header () {
  
  echo $this-js().$this-css();
  
  lia id=out href=.Logout/a /li
  /ul
  form method=post name=form action=.
  input type=hidden value=. name=test/
  /form
  
 
  } // end header()
 
 static function instance() {
 if(!Header::$instance) {
 Header::$instance = new header();
 }
 return Header::$instance;
 }
 
  }
 
  My Surprise!! Jquery didnt work properly.
 
  I tried a lot of variations and some times I changed my script adding
 
  alert('something');
 
  and sometimes my page received the $_POST but with the code above
 definitly
  didnt work. (I have very similar codes in procedural style and works
 fine. )
 
  Jquery didnt acept the event (click), but works with
 alert('something');
 
  So I insert the Submit button input type=submit value=Submit
 
  and with this my page receive the $_POST.
 
  So I am new in the amazing PHP5/OOP world and I dont know if can be a bug
  from PHP/Browser/JavaScript or Jquery.
 
  So I am reporting.
 
  My felling tell me that I am sending all this stuffs (script/) to an
  Object and something is going wrong there.
 
  Hope someone can help me.
 
  Regards
 
  Mario
  macm




-- 
Mário Alberto Chaves Moura
[EMAIL PROTECTED]
31-3264-6203
31-9157-6000


[jQuery] Re: Getting Superfish menus to overlap in IE

2008-09-25 Thread Aaron

Ok, I was wrong, it is working. I happened to be on a page where there
was another error having to do with the Superfish declaration that was
causing problems. Still working on that other issue with jQuery
conflicting with LightWindow (Joel has already responded to that
post).

As a side note, I did have to change the jQuery that you wrote ricardo
as a result of it not finding the li's for whatever reason. I changed
it to:
jQuery('ul.sf-menu').children('li').each(function(i){
  jQuery(this).css({z-index:30-i});
});
To grab the first level of children and:
jQuery('ul.sf-menu').find('li  ul  li').each(function(i){
  jQuery(this).css({z-index:100-i});
});
To grab the next level of children and so on. I also found that it
didn't reset the index if it was all one function which resulted in
getting huge negative values without setting the initial value to be
something HUGE. Suggestions for a way to easily limit that even more?

~Aaron

On Sep 25, 12:44 pm, Aaron [EMAIL PROTECTED] wrote:
 I tried this and it did not give any of the li's a z-index. I even
 placed the function inside the document.ready function. Here is what I
 changed the function to read as:
 jQuery('ul.sf-menu li').each(function(i){
         jQuery(this).css('z-index',30-i);

 });

 I did also try using '#sf-menu li' (yes, I put the ID on the ul
 first). I was expecting it to at least put a z-index of 30 on the
 first list item but it hasn't done so. I was also wondering if this
 would go down into each submenu item and place z-index's on those too
 (assuming it will work on the set up I have).

 ~Aaron

 On Sep 23, 9:38 pm, Joel Birch [EMAIL PROTECTED] wrote:

  Great stuff Ricardo! Thanks for doing this.

  Just a small warning: you said which equals the element's index in
  relation to its parent. Whilst this probably does work in most cases,
  be aware that (as far as I know) DOM elements are not guaranteed to be
  returned in the order they appear in the source (although they
  probably are most of the time). I think there was a recent jquery-dev
  thread discussing this.

  @Aaron - I'm really interested to know if this solutions works - could
  you please report back if Ricardo's code fixes your IE z-index
  problem?

  Cheers
  Joel Birch.


[jQuery] Re: no callback for css/addClass?

2008-09-25 Thread Alex Weber

hey thanks for bringing that to my attention about the image, fixed
now.
although i'd say you jumped the gun a little on screaming poor
design and misused jQuery...
like i said i did this website for close to nothing for a family
member (while having full-time job, uni and freelance on the side) so
its acceptable that its not as good as it should be...  in fact i did
it all in a weekend so im pretty happy with it.
the fade ins and outs are superfluous i know but if it makes my uncle
happy (and its friggin website) then im happy to leave them there =P

anyway i just went with the page refresh on IE and fixed the menu
resizing (another typo) all good now :)

-Alex

On Sep 25, 2:02 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Sorry for being rude and I know you didn't ask for design tips, but
 why on earth is that banner image inside the first list item? This is
 a clear example of misused jQuery aiding poor design, you should be
 very happy it works the way it is! :D

 But seriously, there is no need for the fade effects or ajax in this
 page, plain old XHTML and good design would do it better.

 Now for a proper technical answer: I'm really impressed it works as it
 is in Firefox, for some reason it allows the img to go outside the
 li bounds without affecting it's height, without a float or abs/rel
 positioning. On IE your first li element extends all the way down to
 the bottom of the image on the right, it's a wild guess why the
 contact box is in place when you first load the page. I'd be inclined
 to say that the proper positioning for it (with your code) is the
 'wrong' one, when it's down after the image. The obvious solution is
 to put that image in it's right place in the XHTML, a floated DIV
 separate from the product list (ol).

 - ricardo

 On Sep 25, 1:36 pm, Alex Weber [EMAIL PROTECTED] wrote:

  absolutely!

 www.weberseguros.com/productos.php

  its the div with the border on the bottom with contact details... when
  you click on any product link it expands and when you click on the
  Volver al Menu de Productos link its supposed to shrink back to its
  original size...
  im considering just refreshing the page because its in position when
  the section opens if you're using IE, specially because the whole
  thing just doesn't work so nicely in terms of the menu resizing to fit
  the contents (in fact it doesnt work at all) but since i made this
  website pretty much for free for a family member (that lives in spain
  btw hence the spanish) im not gonna spend too much time on minor
  details like that :)

  On Sep 25, 1:03 pm, Eric [EMAIL PROTECTED] wrote:

   Hmmm...  If it's working in FF/Safari but not in IE, I'm still
   guessing that a browser rendering difference is to blame (rather than
   jQuery).  Do you have any sample pages live on the web that I could
   check out?

   On Sep 25, 9:18 am, Alex Weber [EMAIL PROTECTED] wrote:

Thanks Eric about the fadeIn() params that was careless of me but it
doesn't seem to have made a difference... :(
btw the div has no padding and ive tried resizing it down to 50px and
it still doesnt fit

man i really hate IE sometimes...

On Sep 25, 12:43 am, Eric [EMAIL PROTECTED] wrote:

 Does #produtos_contato have any padding added to it?  If so, IE could
 be calculating the width of the overall element as more than 350px,
 causing it to get bumped to the next line.

 On Sep 24, 5:05 pm, Alex Weber [EMAIL PROTECTED] wrote:

  sorry i just took a look at the code and its a fadeIn() not a show()
  but really it doesn't change anything.. here's the code:

  $('#produtos_contato').css('width','350px');
  $('#produtos_links').fadeIn(resize);

  where resize() is a function that stretches the left menu panel as 
  far
  down or up as the content goes (completely unrelated to the divs in
  the js)

  in firefox, opera, etc it works ok but in IE #produtos_contato
  doesn't seem to resize in time because its supposed to fit in
  alongside the div that fades in but instead sits under it...

  On Sep 24, 5:48 pm, ricardobeat [EMAIL PROTECTED] wrote:

   There is no way a css() and show() could happen in the wrong 
   order, as
   the second one only executes after the first one returns the 
   object.
   Is it an animated resize?

   On Sep 24, 3:59 pm, Alex Weber [EMAIL PROTECTED] wrote:

yeah bud thats a given i just wanted to confirm that there 
wasn't a
callback and why not.

thanks for all the replies!

ajpiano wrote:
 that sounds like an issue that needs debugging, not a 
 (superfluous)
 change to the library core...

 On Sep 24, 1:06 pm, Alex Weber [EMAIL PROTECTED] wrote:
  i realize that... i just needed this in a rare case where 
  jquery is
  showing an element before resizing it, even though the 
  resize
  statement (css) is 

[jQuery] Re: Click function only invoked after second click in IE6 IE7

2008-09-25 Thread ricardobeat

When you copy the content with jQuery('#content').html(content);
you're still duplicating the #item1_content_info ID, that's the source
of your problems.

I took the liberty to duplicate your page and alter the script
(working in IE):
http://ff6600.org/j/toggle.htm

or for a more semantic solution:
http://ff6600.org/j/toggle2.htm

you could also use the 'rel' attribute to store the content IDs.

- ricardo

On Sep 25, 1:20 pm, RLR [EMAIL PROTECTED] wrote:
 Thanks for the hint Thomas.
 I revised the code so that it validates correctly now. And I stripped
 it down to a minimalist version to show my point.

 Click item 1
 - toggle link appears
 click on toggle link (IE6/IE7 do not toggle the content whereas Safari
  FF do on the first time)

 Click item 1
 -toggle link appears
 click on toggle content link
 - now it works on all browsers

 What is wrong with the code?


[jQuery] Re: frames['results'].location.href jQuery

2008-09-25 Thread ricardobeat

oops. I was going to say something to Michael but I think I quit :D

On Sep 25, 1:42 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Michael,

 In case you need it:

 $('#frameid').attr('src','http://');
 or
 $('iframe').attr('src','http://');

 You have to access the parent's iframe element, not the iframe
 document to do this. You could use $(frames['frame'])[0].location.href
 but that's an absolutely unnecessary waste of resources.

 - ricardo

 On Sep 25, 1:27 pm, Michael Geary [EMAIL PROTECTED] wrote:

  Were you thinking that there might be a better way to do that with
  jQuery? Your code looks just about perfect the way it is.

  The only change I would make would be to simplify it a bit:

  frames.results.location =

  It would be hard for any JavaScript library to improve on that. :-)

  -Mike

   I have this line

   frames['results'].location.href =

   in my code.

   Can someone perhaps tell what this line would look like when
   I want to use jQuery to change the src of an iframe-element?


[jQuery] Re: Validation Plugin - How to Validate input=file

2008-09-25 Thread Jörn Zaefferer
Could you post a testpage? Usually file inputs work just fine, see
this demo: http://jquery.bassistance.de/validate/demo/errorcontainer-demo.html

Jörn

On Thu, Sep 25, 2008 at 4:03 PM, Adam [EMAIL PROTECTED] wrote:

 I'm trying to validate that someone has selected a file for upload
 before submitting a form.  I set the required class on the input
 element, but it's not being validated.  The regular text input is
 validated, however.


 form:form id=pictureform commandName=pictureCommand
action=${actionURL} method=post enctype=multipart/form-data
cssClass=update
div
label for=title
Title:
/label
form:input path=title cssClass=required /
/div

div
label for=description
Description:
/label
form:textarea path=description /
/div

label for=image
Select File:
/label
input type=file name=image cssClass=required /
input type=submit value=Add /
 /form:form




[jQuery] get html of check box

2008-09-25 Thread c.s

i'm up against deadline and i cannot figure this out for life of me. i
know it is simple but just starting jquery/dom exploration

lilabelinput type=checkbox /hello/input/label/li

if user clicks checkbox...i need to alert the value of the label

how do i do this..i was using .html() but it also alerted input and
all i want to alert is hello


[jQuery] Re: get html of check box

2008-09-25 Thread MorningZ

To start with, that html isn't valid, as you have

lilabelinput type=checkbox /hello/input/label/li

with the checkbox input ending in /, which closes the tag, hence
the hello is not inside the input tag.  even if you take that
out, pretty sure that's not valid html anyways


[jQuery] Re: get html of check box

2008-09-25 Thread claudes


my error:

lilabelinput type=checkbox  /hello/label/li

it is just a basic example of what i have marked up



MorningZ wrote:
 
 
 To start with, that html isn't valid, as you have
 
 lilabelinput type=checkbox /hello/input/label/li
 
 with the checkbox input ending in /, which closes the tag, hence
 the hello is not inside the input tag.  even if you take that
 out, pretty sure that's not valid html anyways
 
 

-- 
View this message in context: 
http://www.nabble.com/get-html-of-check-box-tp19675962s27240p19676125.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: get html of check box

2008-09-25 Thread tlphipps

I'm guessing what you're after is just getting the value of the
checkbox.  What MorningZ said is absolutely correct.  I would suggest
you try:

liinput type=checkbox value=hello //li

Then in jQuery:

$(:checkbox).click(function(){
 alert(this.value);
});

On Sep 25, 1:53 pm, MorningZ [EMAIL PROTECTED] wrote:
 To start with, that html isn't valid, as you have

 lilabelinput type=checkbox /hello/input/label/li

 with the checkbox input ending in /, which closes the tag, hence
 the hello is not inside the input tag.  even if you take that
 out, pretty sure that's not valid html anyways


[jQuery] Re: Sort of like tabs... need to start with a random div and swap it out when clicking a link

2008-09-25 Thread illtron

I've been playing around with this, but I can't come up with a good
solution. It seems like I can only break another thing when I fix one.

On Sep 24, 4:24 pm, illtron [EMAIL PROTECTED] wrote:
 I think I'm pretty close to getting this to work, but it's not quite.
 This is essentially tab functionality, but the initially showing div
 needs to be randomly chosen.

 I can either show the random div initially, but then the links don't
 work. Alternatively, I can make the links work, but then I can't get
 the random div. The code I'm including shows working links.

 To (attempt to) show the random div, I'm using 
 thishttp://www.leftrightdesigns.com/library/jquery/randomchild/jquery.ran...
 The links use this:http://enure.net/dev/hide-all-except-one/

 I was trying to take this part, which shows the first child div of
 #toggleThis: $('#toggleThis  div:first').attr('id')
 And substitute this: $('#toggleThis').randomChild() but it doesn't
 work.

 Can anybody weigh in and tell me where I'm going wrong? Thanks!

 !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 /
 titleRandom test/title
 style type=text/css.hide { display: none; }/style
 script type=text/javascript src=http://code.jquery.com/jquery-
 latest.min.js/script
 script type=text/javascript

 $(document).ready(function() {
     var hash = window.location.hash;

     (!hash) ?
         hideAllExcept('#' + $('#toggleThis  div:first').attr('id'))
             : hideAllExcept(window.location.hash);

     $('a.toggle').click(function() {
         var href = $(this).attr('href');
         hideAllExcept(href);
     });

 });

 function hideAllExcept(el) {
     $('#toggleThis div').addClass('hide');
     $(el).removeClass('hide');

     $('a.toggle').removeClass('active');
     $('a[href=' + el + ']').addClass('active');

 }

 jQuery.fn.randomChild = function(settings) {
         return this.each(function(){
                 var c = $(this).children().length;
                 var r = Math.ceil(Math.random() * c);
                 $(this).children().hide().parent().children(':nth-child(' + r 
 +
 ')').show();
         });

 };

 /script

 /head
 body

         ul
                 lia href=#lorem class=toggleLorem ipsum/a/li
                 lia href=#ut class=toggleUt enim ad/a/li
                 lia href=#duis class=toggleDuis aute/a/li
                 lia href=#execepteur class=toggleExcepteur 
 sint/a/li
         /ul

         div id=toggleThis
                 div id=loremLorem ipsum dolor sit amet./div
                 div id=utUt enim ad minim veniam./div
                 div id=duisDuis aute irure dolor./div
                 div id=execepteurExcepteur sint occaecat./div
         /div

 /body
 /html


[jQuery] Re: [validate] write a metadata within group

2008-09-25 Thread Jörn Zaefferer
This isn't, yet, supported. You'd have to read the metadata manually
and initlize the plugin based on that.

Jörn

On Thu, Sep 25, 2008 at 5:34 PM, Alexsandro_xpt [EMAIL PROTECTED] wrote:

 I wish use groups option to display a single message for multiple
 elements, but with metadata behavior.

 Something like that:

 input type=text name=t1 class={groups: { g1: t1 t2},
 requered:true, number:true,messages:{required:'Please a
 text.',number:'Please only numbers!'}} /


 input type=text name=t2 /




 How to do right mode with metadata?



 Thz!!



[jQuery] Re: Jorn's form plugin and accordion - ajax validation how to....

2008-09-25 Thread Jörn Zaefferer
There are examples for ajax validation here
http://jquery.bassistance.de/validate/demo/milk/ (username, email) and
here: http://jquery.bassistance.de/validate/demo/marketo/ (email)

Jörn

On Thu, Sep 25, 2008 at 7:32 PM, Web Specialist
[EMAIL PROTECTED] wrote:
 Jorn makes a very good job with form and accordion plugins integration:

 http://jquery.bassistance.de/validate/demo/multipart/

 How can I make that example works with ajax validation?

 Cheers
 Marco Antonio




[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread stinhambo

Not at the moment. If I put it inside this -

$('a[rel=email_page]').click(function(){

window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
return false;

});

the popup comes up but the parent also loads the form and no URL gets
carried across.


On Sep 26, 2:46 am, ricardobeat [EMAIL PROTECTED] wrote:
 Is this line

 $(#message).get(0).value += window.opener.location.href;

 running from inside the popup?

 On Sep 25, 8:48 am, Stinhambo [EMAIL PROTECTED] wrote:

  I am having some problems with that bit of code.

  Basically I am launching a popup window and this is my js file -

  $('a[rel=email_page]').click(function(){

  window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
          return false;

  });

  // This passes along the URL of the parent opener when clicking Email
  this page
  $(#message).get(0).value += window.opener.location.href;

  but it seems to be causing a conflict in the rest of my code.

  My Firebug console log says -
  $(#message).get(0) is undefined

  If I comment out the line, everything works nicely.

  Any idea if I can get rid of this error and still retain the
  functionality?


[jQuery] Re: get html of check box

2008-09-25 Thread claudes


actually what i'm after is the label hello

so if the checkbox is checked, i'd like to alert the label, which is hello



tlphipps wrote:
 
 
 I'm guessing what you're after is just getting the value of the
 checkbox.  What MorningZ said is absolutely correct.  I would suggest
 you try:
 
 liinput type=checkbox value=hello //li
 
 Then in jQuery:
 
 $(:checkbox).click(function(){
  alert(this.value);
 });
 
 On Sep 25, 1:53 pm, MorningZ [EMAIL PROTECTED] wrote:
 To start with, that html isn't valid, as you have

 lilabelinput type=checkbox /hello/input/label/li

 with the checkbox input ending in /, which closes the tag, hence
 the hello is not inside the input tag.  even if you take that
 out, pretty sure that's not valid html anyways
 
 

-- 
View this message in context: 
http://www.nabble.com/get-html-of-check-box-tp19675962s27240p19676654.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: [validate] write a metadata within group

2008-09-25 Thread Alexsandro_xpt

Uhmmm

I ask that becouse I had a PHP framework where in your View layer I
wrote something like that:
plabelDate:/label{input type=text name=dtnasc
value=$dtnasc mask=99/99/ validate=[(required:true,
dateITA:true, messages:[(required:'Favor preencher este campo!',
dateITA:'Favor preencher com data strongválida/strong!')])]}/p


So, I never initilize the plugin within rules and messages settings.
Only by class HTML paraments where:
 validate=[(required:true, dateITA:true, messages:[(required:'Favor
preencher este campo!', dateITA:'Favor preencher com data
strongválida/strong!')])]
Will be translate to:
 class=[optional classes] {required:true, dateITA:true, messages:
{required:'Favor preencher este campo!', dateITA:'Favor preencher com
data strongválida/strong!'}}


Thank's for attention.


On 25 set, 16:25, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
 This isn't, yet, supported. You'd have to read the metadata manually
 and initlize the plugin based on that.

 Jörn

 On Thu, Sep 25, 2008 at 5:34 PM, Alexsandro_xpt [EMAIL PROTECTED] wrote:

  I wish use groups option to display a single message for multiple
  elements, but with metadata behavior.

  Something like that:

  input type=text name=t1 class={groups: { g1: t1 t2},
  requered:true, number:true,messages:{required:'Please a
  text.',number:'Please only numbers!'}} /

  input type=text name=t2 /

  How to do right mode with metadata?

  Thz!!


[jQuery] Re: get html of check box

2008-09-25 Thread MorningZ

Here's some quick and dirty (and working) code

http://paste.pocoo.org/show/86213/


[jQuery] Re: [validate] write a metadata within group

2008-09-25 Thread Jörn Zaefferer
A draft of what I was referring to:

var groups = {};
$(#myform input).each(function() {
  var metadata = $(this).metadata();
  if (metadata.group) {
groups[this.name] = metadata.group;
  }
});
$(#myform).validate({
  groups: groups
});

Untested.

Jörn

On Thu, Sep 25, 2008 at 9:36 PM, Alexsandro_xpt [EMAIL PROTECTED] wrote:

 Uhmmm

 I ask that becouse I had a PHP framework where in your View layer I
 wrote something like that:
 plabelDate:/label{input type=text name=dtnasc
 value=$dtnasc mask=99/99/ validate=[(required:true,
 dateITA:true, messages:[(required:'Favor preencher este campo!',
 dateITA:'Favor preencher com data strongválida/strong!')])]}/p


 So, I never initilize the plugin within rules and messages settings.
 Only by class HTML paraments where:
  validate=[(required:true, dateITA:true, messages:[(required:'Favor
 preencher este campo!', dateITA:'Favor preencher com data
 strongválida/strong!')])]
 Will be translate to:
  class=[optional classes] {required:true, dateITA:true, messages:
 {required:'Favor preencher este campo!', dateITA:'Favor preencher com
 data strongválida/strong!'}}


 Thank's for attention.


 On 25 set, 16:25, Jörn Zaefferer [EMAIL PROTECTED]
 wrote:
 This isn't, yet, supported. You'd have to read the metadata manually
 and initlize the plugin based on that.

 Jörn

 On Thu, Sep 25, 2008 at 5:34 PM, Alexsandro_xpt [EMAIL PROTECTED] wrote:

  I wish use groups option to display a single message for multiple
  elements, but with metadata behavior.

  Something like that:

  input type=text name=t1 class={groups: { g1: t1 t2},
  requered:true, number:true,messages:{required:'Please a
  text.',number:'Please only numbers!'}} /

  input type=text name=t2 /

  How to do right mode with metadata?

  Thz!!



[jQuery] Re: element creation using wrap behaves oddly

2008-09-25 Thread darren

sorry for the double post, not sure how that happened.

ricardo, your code is missing a closing ) at the end. it should be...
$('b').wrap($('a href=#/a').click(function(){
alert(foo);
}));

your element creation: $('a href=#/a')
is equivalent to the shorthand i used: $(a href='#'/)

in either case, the click handler does not get assigned for me, so i
am not sure how it works for you?






On Sep 24, 1:30 pm, ricardobeat [EMAIL PROTECTED] wrote:
 I believe you can't assing an event handler to an element before it is
 added to the DOM. This works for me:

 $('b').wrap($('a href=#/a').click(function(){
     alert(foo);

 });

 Or if you want the click event assigned to a and not b

 $('b').wrap($('a href=#/a').parent().click(function(){
     alert(foo);

 });

 - ricardo

 On Sep 24, 3:08 pm, darren [EMAIL PROTECTED] wrote:

  i just want to bring this up for discussion to see what people have to
  say about it and to further my understanding of how jquery works and
  why it works that way. maybe its a bug?

  imagine the base code bHello World!/b

  // fails to assign click handler:
 $(a href='#'/).click(function(){
     alert(foo);
 })

  // also fails... wrapAll, wrapInner etc

  // works as expected:
  $(b).replaceWith($(a href='#'Hello World/a).click(function(){
      alert(foo);}));

  // also works as expected: html, prepend, append, after, before,
  etc...

  i found this odd. thoughts?


[jQuery] Re: jquery + openx (via ajax) problem?

2008-09-25 Thread ricardobeat

there is no $(document).write() function, I think you mean $
(document).ready() right?


On Sep 25, 12:43 pm, Ditikos [EMAIL PROTECTED] wrote:
 Hello,

 I am trying to implement a code that will load a banner zone from
 openx (openx.org), AFTER the rest of the site loads. I have the
 invocation code (either javascript or php) but when I am calling the
 code from a local file, for example testban.php (the php version), The
 page loads but when it comes to load the banner it redirects to the
 banner, instead of loading the banner to a div.

 My Code is as follows:

 on the $(document).write(function() {}); block I have included a
 setTimeout(loadBanner(),1000); function, as the last line before
 bracket closing.

 immediately after the block ends, I declare my function as follows:

 function loadBanner()
 {
  $(#banner).load(testban.php);

 }

 testban.php has the banner fetching code only.

 The fetching banners have a script type=text/javascript/script
 declaration on them. Is this responsible for the new page opening?


[jQuery] Re: multiple event handlers and sequence

2008-09-25 Thread ricardobeat

Events are executed in the order which they are bound.

$('').click(function(){ a };
$('').click(function(){ b };

will always occur in order a,b for the same event. You could write
some code to change it but it's not a simple task.

- ricardo

On Sep 25, 2:52 pm, chadmichael [EMAIL PROTECTED] wrote:
 Is there any way to control the order of multiple event handlers
 registered?

 If not, does anyone have an idea of how to make a form that uses
 onchange to submit the form ( i.e. i don't want a submit button i just
 want the form to submit when someone leaves a field, provided
 everything has been filled out ), but also wants to use onchange to
 validate data, and possibly do other things?


[jQuery] Re: get html of check box

2008-09-25 Thread claudes


perfect. got it to integrate swimmingly. thanks

c.s


MorningZ wrote:
 
 
 Here's some quick and dirty (and working) code
 
 http://paste.pocoo.org/show/86213/
 
 

-- 
View this message in context: 
http://www.nabble.com/get-html-of-check-box-tp19675962s27240p19677870.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Bind resize of window doesn't run when in fullscreen(opening a sidebar for example)

2008-09-25 Thread ioor

here's my code:

$(document).ready(function() {

  $(window).bind(resize, function(){
iframesize();
});

function iframesize(){
   wheight = $(window).height();
   // wwidth = $(window).width();

   $('iframe').height(wheight - 30);
   // $('iframe').width(wwidth);

};

iframesize();

});

When not in fullscreen mode and opening a sidebar or firebug etc in
firefox the bind resize callback runs but when in fullscreen mode it
doesn't. How do I make it bind to resize also in fullscreen mode?


[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-25 Thread Paul Mills

The ready function fires when the iframe is ready in the DOM, not when
the contents of the iframe are ready. I think you need to use the load
function - a bit like this:

$(window).load(function () {
$('#test', 
frames['testframe'].document).click(function() {
$(#hold).append('a href=#Inserted from 
iframe/a br /');
});
});

Paul

On Sep 25, 6:37 pm, ricardobeat [EMAIL PROTECTED] wrote:
 You need to put the code inside the $(document).ready function, it's
 not finding theiframebecause the DOM is not loaded.

 - ricardo

 On Sep 25, 12:36 pm, hubbs [EMAIL PROTECTED] wrote:

  Well, I tried this, but again it is not working, I really must be
  missing something.

  All I want to do it be able to click the link inside theiframe, and
  have it append some HTML into the parent, and apply a click event as
  well, that is all, seems simple! :)

  My test page:  http://web2.puc.edu/PUC/files/bind.html
 Iframepage:http://web2.puc.edu/PUC/files/iframe.html

  Thanks for all the help.

  On Sep 24, 3:02 pm, ricardobeat [EMAIL PROTECTED] wrote:

   Hi,

   This works for me (FF3) (code running in the parent frame):

   $('#test',frames[0].document).click(function(){ //bindfunction to
   event from element *insideiframe*
       $('bTESTE/b').appendTo('body').click(function(){ // append
   element to the *parent frame* and assing a click handler to it
            alert('test');
        });

   });

   I might not be understanding clearly what you want, a test case or
   explanation of the functionality you are looking for might help.

   cheers,
   - ricardo

   On Sep 24, 1:27 pm, hubbs [EMAIL PROTECTED] wrote:

Hi Ricardo,

I am not appending aniframe, it is hardcoded.  I am trying to append
to the parent document from within theiframe, and have the event in
the parent bound to the appended element from theiframe.

On Sep 23, 11:49 pm, ricardobeat [EMAIL PROTECTED] wrote:

 Hi, I can't test anything right now, but are you setting up the
 ready() function after appending theiframe?

 On Sep 23, 9:11 pm, hubbs [EMAIL PROTECTED] wrote:

  Yeah, this really is not working.  Could someone please help me to
  understand how to make multiple frames use the same jquery instance 
  so
  I can resolve this problem?  Do I need to resort to frame ready
  plugin?  I really don't want to...

  On Sep 17, 7:12 pm, ricardobeat [EMAIL PROTECTED] wrote:

   Not sure but $(frames['frame'].document).ready() should work 
   (from the
   parent window).

   On Sep 17, 8:21 pm, hubbs [EMAIL PROTECTED] wrote:

Ok, I am realizing it has to do with the do with the 
$(document).ready
function.  If I just use:

$ = window.parent.$;
 $(#hold).append('a href=#Inserted fromiFrame/a br 
/');

In theiframe, it correctly adds the link to the parent, and it 
gets
the event from livequery!  Hooray!!

But, obviously I need to add back a document ready function so 
that I
canbindevents within theiframe.  How does that need to be done 
in
this context?  As I said, using the normal document ready does 
not
work.

On Sep 17, 9:58 am, ricardobeat [EMAIL PROTECTED] wrote:

 using theiframe'sjQuery object:

 $('.classinparentframe', parent.window.document)

 Ideally if the contents of theiframeare always known to you, 
 you
 should use only one instance of jQuery on the parent window 
 and do all
 your stuff from it, it's simpler to debug also.

 On Sep 16, 10:29 pm, hubbs [EMAIL PROTECTED] wrote:

  Thanks Ricardo.

  But what if I wanted to access the parent document from 
  WITHIN the
 iframe?

  On Sep 16, 12:27 pm, ricardobeat [EMAIL PROTECTED] wrote:

   You need to understand that a frame is another 'window' 
   instance, it
   doesn't have the same jQuery object as the parent window 
   unless you
   tell it to. So the '$' object you use in firebug console 
   is always the
   one from the parent window.

   If i'm not mistaken you can acess frame content with the 
   parent
   window's jQuery object using $('.classinsidetheframe',
   frames['name'].document).css();

   On Sep 16, 1:48 pm, hubbs [EMAIL PROTECTED] wrote:

Ok Brandon,

I found this in another post:

var doc = $('#testframe')[0].contentWindow.document;
$(doc.body).append('spantest/span');

This seems like it would help, but I am not sure how to 
use this,
along with what you posted to get it working correctly. 
 Somehow
sending the GET within the context of the 

[jQuery] Hierarchical .parents()

2008-09-25 Thread jasonkarns

Will the .parents() method always return in hierarchical order? Say I
have:

ol id=outer
  li
ol id=inner
  li
a id=target/
  /li
/ol
  /li
/ol

If I do $(#target).parents(ol).eq(0), will I *always* get #inner,
or is the order of the resulting jQuery matched elements arbitrary?

~Jason


[jQuery] [validate] Get form validation state without triggering errors

2008-09-25 Thread dl

I'm trying to check if a form has been filled out properly before
enabling the Next button.  Unfotunately, when I call the method
jQuery(#myForm).valid() the error messages are all triggered.

I want the error message in there because I want the user to be able
click the disabled next button and see what the specific problems are,
but I want the next button to be a visible indicator of when the form
is ready to go.

Is it possible to silently get the validation state of the form?


[jQuery] Unable to get the number of items in a combobox

2008-09-25 Thread Pete

I don't have a lot of experience with javascript and jquery so this
question may have an obvious answer that I missed.

I have a combo box in jquery that I need to get the number of list
items from.  I used the following syntax to get the number of items in
the list (based on some searching I did):

$('#emplist').length

The length indicated is 1, even though I know there are many items in
the list.

So I tried the standard way:

document.getElementById(emplist).length

The value here is 62

If I use Firebug to examine the $('#emplist') object, I see that under
the $('#emplist') object is a length property that is '1' but if I
inspect the object in Firebug I also see a 0 object listed
immediately below the $('#emplist') object and it has a length = 62.
So my question is, given that this 0 object has the correct value,
how do I reference that in my jquery ?  Somehow $('#emplist').length
is wrong but I can't seem to figure out how to reference the correct
value that is listed under 0 in firebug.  Any ideas? What am I doing
wrong in getting the number of items in the combobox?

Thanks,
Pete


[jQuery] Re: disable click on animated objects

2008-09-25 Thread Mauricio (Maujor) Samy Silva


Hi Ricardo,

Grato pela resposta.
Você é bem ativo na lista heim!

Sorry didn't work. :-(
The method stop(),  stops an animation.
I need disable the click event while the animation is running.

Abraço
Mauricio

-Mensagem Original- 
De: ricardobeat [EMAIL PROTECTED]

Para: jQuery (English) jquery-en@googlegroups.com
Enviada em: quinta-feira, 25 de setembro de 2008 17:21
Assunto: [jQuery] Re: disable click on animated objects



e aí cara, já vi teu site por aí :)

change the line that reads

$(this).attr({width: 100, height: 75});

to

$(this).stop().attr({width: 100, height: 75});

When you click on a thumbnail, it resizes the image and starts the
animation, but the 'click' event is still bound to it. It does
everything it has to do (including resizing the image) but you need to
tell jQuery to stop the current slideDown animation.

abraço
- ricardo

On Sep 25, 12:18 pm, Maujor [EMAIL PROTECTED] wrote:

I am experiencing an undesirable behavior when click on an object
while it is sliding down.
I hosted a test case and you can see the problem 
at:http://www.maujor.com/temp/jquery/
Thanks for any help 




[jQuery] Re: Safari Hide() - Everything I am running across fails.

2008-09-25 Thread urbolutions

Hi all, I am pretty desperate on this issue. Anyone encoutered this
before?

Thanks for anything you can offer!



On Sep 25, 10:04 am, urbolutions [EMAIL PROTECTED] wrote:
 This is the popular bug wherein Safari refuses to hide elements.

 Environment/code setup:

 - JQuery 1.2.6.min
 - Hidden elements exist in root html file as:
 div id=cardsContainer/div

 - Hidden elements initial style is declared as:
 #pageContentContainer #bodyContainer #cardsContainer {
      position: absolute;
      top: 170px;
      left: 80px;
      width: 650px;
      height: 290px;
      border: 0px solid blue;
      display:none;

 }

 The above should present with a hidden object and does not.

 Later, there is a routine that hides objects as such:
 $('#cardsContainer').hide();
 OR ALTERNATELY
 $('#cardsContainer').css('display','none');

 All fail to hide the containers. The containers have swf objects
 inside.

 Any ideas?

 Thanks much!


[jQuery] Re: Safari Hide() - Everything I am running across fails.

2008-09-25 Thread MorningZ

Gave you ruled out jQuery as the problem?

if

document.getElementById(cardsContainer).style.display = none;

doesn't work, then the problem is with Safari's dealings with your
design/layout


[jQuery] Re: Safari Hide() - Everything I am running across fails.

2008-09-25 Thread MorningZ

have you ruled out jQuery as the problem?

if

document.getElementById(cardsContainer).style.display = none;

doesn't work, then the problem is with Safari's dealings with your
design/layout


[jQuery] Re: Unable to get the number of items in a combobox

2008-09-25 Thread RobG



On Sep 26, 7:08 am, MorningZ [EMAIL PROTECTED] wrote:
 So I tried the standard way:

 document.getElementById(emplist).length

 that *should* be

 document.getElementById(emplist).options.length;

*Should*?  The HTMLSelectElement has a length property that is the
number of options in the select, so if emplist is a select element,
its length property is the number of options it has.

URL: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-5933486 

Select elements also have an options property that is an HTML
collection of the options in the select.  It also has a length
property that is the same as the select’s length property.

i.e.

  someSelect.length == someSelect.options.length;


in conforming implementations of the W3C DOM 2 HTML specification.


--
Rob


[jQuery] can't change values in appended divs

2008-09-25 Thread kredd


hello all, i'm allowing users to append and remove divs at will. the divs are
numbered. if there are 5 divs and user removes div #2 i need to subtract 1
from divs #3,4,5 so that they become divs #2,3,4. 
 
here is my appending code:
$('#schematics_main').append(div id='hotspot_ + total_hotspots + '
class='jqDnR'div class='rhs' + total_hotspots + /divdiv
class='jqHandle jqDrag'HS + (total_hotspots+1) + /divp
class=\removehs\Remove/pdiv class='jqHandle jqResize'/divinput
name='hotspot_ + total_hotspots + _co' id='hotspot_ + total_hotspots +
_co' type='text' size='25' maxlength='25' //div);
 
 
here is my remove code:
$('.removehs').click(function(){
rem_this = $(this).parent().find('div.rhs').html(); // value of clicked 
div
//$(this).parent().remove(); // remove clicked div
for (var a=0; atotal_hotspots; a++){ // total_hotspots is a number spit
out from a database
poop = $('#hotspot_'+a).find('div.rhs').html();
if(poop  rem_this){

$('#hotspot_'+a).parent().find('div.rhs').html((poop-1)); //it works
just find a way to subtract 1 from the existing value!!
}   
alert(a);
}
});
 
the problem is the for loop. my expectations for the loop is that it grabs
the value of the clicked div, and then loops through all divs checking to
see if each div is greater or smaller than the clicked div's value. if
greater, subtract 1 from that value.
 
so, my point?
problem 1: the code doesn't do any subtraction but i can alert all div info
(id's, values, etc) correctly
problem 2: if i've appended 2 new divs the for loop will run twice, if 3
divs appended it runs 3 times. i know it has something to do with the fact
that all divs have a .removehs class.
 
thanks in advance,
Kelly
-- 
View this message in context: 
http://www.nabble.com/can%27t-change-values-in-appended-divs-tp19680077s27240p19680077.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Unable to get the number of items in a combobox

2008-09-25 Thread MorningZ

Well, your W3C specifications none the less, when you get a select
element by a jQuery selector, you have a wrapper around the select
(ie/ parent) element itself, and as you are finding out,
length (http://docs.jquery.com/Core/length) or it's equivalent
size will return 1 because that's all it has in the collection

you have to select it's children like

$(select option)

or (probably slower)

$(select).find(option)

and then the length will be what you are expecting


[jQuery] Re: Callback to home page from 2nd page

2008-09-25 Thread Kavitha reddy
After submittinh home page I will be redirected to next page . So Upon
clicking Start  again I should be redirected to HomePage with only two
questions to be displayed instead of all.

On Fri, Sep 26, 2008 at 1:45 AM, ricardobeat [EMAIL PROTECTED] wrote:


 Hi!

 Could you rephrase your question?

 On Sep 25, 4:14 am, Reddy [EMAIL PROTECTED] wrote:
  Could somebody help me in this issue.
 
   when I am on landing page I have two questions to be answered . When
  I click on 2nd ques which is radio button i will be shown with other
  remaining questions.
 
  So from 2nd page when i click on link which takes me to  homepage  I
  want that exact page which i will be prompted when i try to access my
  application.



[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread ricardobeat

Now I'm completely lost. Could you post a test page?

So where exactly is $(#message).get(0).value +=
window.opener.location.href;  running?

On Sep 25, 4:29 pm, stinhambo [EMAIL PROTECTED] wrote:
 Not at the moment. If I put it inside this -

 $('a[rel=email_page]').click(function(){

 window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
         return false;

 });

 the popup comes up but the parent also loads the form and no URL gets
 carried across.

 On Sep 26, 2:46 am, ricardobeat [EMAIL PROTECTED] wrote:

  Is this line

  $(#message).get(0).value += window.opener.location.href;

  running from inside the popup?

  On Sep 25, 8:48 am, Stinhambo [EMAIL PROTECTED] wrote:

   I am having some problems with that bit of code.

   Basically I am launching a popup window and this is my js file -

   $('a[rel=email_page]').click(function(){

   window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
           return false;

   });

   // This passes along the URL of the parent opener when clicking Email
   this page
   $(#message).get(0).value += window.opener.location.href;

   but it seems to be causing a conflict in the rest of my code.

   My Firebug console log says -
   $(#message).get(0) is undefined

   If I comment out the line, everything works nicely.

   Any idea if I can get rid of this error and still retain the
   functionality?


[jQuery] Re: element creation using wrap behaves oddly

2008-09-25 Thread ricardobeat

It doesn't work for you because my code is not missing a ), actually I
made a mistake on rewriting it. I'm assigning the click handler to the
'b' element which was wrapped, it's not inside the wrap function. It
should read:

$('b').wrap('a href=#/a').click(function(){
alert(foo);
});

The second snippet I posted assigns it to the a that was created but
it's not really needed.

$('b').wrap('a href=#/a').parent().click(function(){
alert(foo);
});

As I said before, you can't attach an event handler to the element
before it is appended to the DOM. While you write the click() function
inside the wrap() it will never work.

- ricardo

On Sep 25, 4:58 pm, darren [EMAIL PROTECTED] wrote:
 sorry for the double post, not sure how that happened.

 ricardo, your code is missing a closing ) at the end. it should be...
 $('b').wrap($('a href=#/a').click(function(){
     alert(foo);

 }));

 your element creation: $('a href=#/a')
 is equivalent to the shorthand i used: $(a href='#'/)

 in either case, the click handler does not get assigned for me, so i
 am not sure how it works for you?

 On Sep 24, 1:30 pm, ricardobeat [EMAIL PROTECTED] wrote:

  I believe you can't assing an event handler to an element before it is
  added to the DOM. This works for me:

  $('b').wrap($('a href=#/a').click(function(){
      alert(foo);

  });

  Or if you want the click event assigned to a and not b

  $('b').wrap($('a href=#/a').parent().click(function(){
      alert(foo);

  });

  - ricardo

  On Sep 24, 3:08 pm, darren [EMAIL PROTECTED] wrote:

   i just want to bring this up for discussion to see what people have to
   say about it and to further my understanding of how jquery works and
   why it works that way. maybe its a bug?

   imagine the base code bHello World!/b

   // fails to assign click handler:
  $(a href='#'/).click(function(){
      alert(foo);
  })

   // also fails... wrapAll, wrapInner etc

   // works as expected:
   $(b).replaceWith($(a href='#'Hello World/a).click(function(){
       alert(foo);}));

   // also works as expected: html, prepend, append, after, before,
   etc...

   i found this odd. thoughts?


[jQuery] Re: Bind events on DOM elements inserted from other frame

2008-09-25 Thread ricardobeat

Oh, that's right.

But I think the best way would be

$(document).ready(function(){

//theother code blabla

 //now that the iframe element exists
 $(frames.testframe.document).ready(function(){



 });

});

On Sep 25, 4:56 pm, Paul Mills [EMAIL PROTECTED] wrote:
 The ready function fires when the iframe is ready in the DOM, not when
 the contents of the iframe are ready. I think you need to use the load
 function - a bit like this:

                 $(window).load(function () {
                         $('#test', 
 frames['testframe'].document).click(function() {
                                 $(#hold).append('a href=#Inserted from 
 iframe/a br /');
                         });
                 });

 Paul

 On Sep 25, 6:37 pm, ricardobeat [EMAIL PROTECTED] wrote:

  You need to put the code inside the $(document).ready function, it's
  not finding theiframebecause the DOM is not loaded.

  - ricardo

  On Sep 25, 12:36 pm, hubbs [EMAIL PROTECTED] wrote:

   Well, I tried this, but again it is not working, I really must be
   missing something.

   All I want to do it be able to click the link inside theiframe, and
   have it append some HTML into the parent, and apply a click event as
   well, that is all, seems simple! :)

   My test page:  http://web2.puc.edu/PUC/files/bind.html
  Iframepage:http://web2.puc.edu/PUC/files/iframe.html

   Thanks for all the help.

   On Sep 24, 3:02 pm, ricardobeat [EMAIL PROTECTED] wrote:

Hi,

This works for me (FF3) (code running in the parent frame):

$('#test',frames[0].document).click(function(){ //bindfunction to
event from element *insideiframe*
    $('bTESTE/b').appendTo('body').click(function(){ // append
element to the *parent frame* and assing a click handler to it
         alert('test');
     });

});

I might not be understanding clearly what you want, a test case or
explanation of the functionality you are looking for might help.

cheers,
- ricardo

On Sep 24, 1:27 pm, hubbs [EMAIL PROTECTED] wrote:

 Hi Ricardo,

 I am not appending aniframe, it is hardcoded.  I am trying to append
 to the parent document from within theiframe, and have the event in
 the parent bound to the appended element from theiframe.

 On Sep 23, 11:49 pm, ricardobeat [EMAIL PROTECTED] wrote:

  Hi, I can't test anything right now, but are you setting up the
  ready() function after appending theiframe?

  On Sep 23, 9:11 pm, hubbs [EMAIL PROTECTED] wrote:

   Yeah, this really is not working.  Could someone please help me to
   understand how to make multiple frames use the same jquery 
   instance so
   I can resolve this problem?  Do I need to resort to frame ready
   plugin?  I really don't want to...

   On Sep 17, 7:12 pm, ricardobeat [EMAIL PROTECTED] wrote:

Not sure but $(frames['frame'].document).ready() should work 
(from the
parent window).

On Sep 17, 8:21 pm, hubbs [EMAIL PROTECTED] wrote:

 Ok, I am realizing it has to do with the do with the 
 $(document).ready
 function.  If I just use:

 $ = window.parent.$;
  $(#hold).append('a href=#Inserted fromiFrame/a br 
 /');

 In theiframe, it correctly adds the link to the parent, and 
 it gets
 the event from livequery!  Hooray!!

 But, obviously I need to add back a document ready function 
 so that I
 canbindevents within theiframe.  How does that need to be 
 done in
 this context?  As I said, using the normal document ready 
 does not
 work.

 On Sep 17, 9:58 am, ricardobeat [EMAIL PROTECTED] wrote:

  using theiframe'sjQuery object:

  $('.classinparentframe', parent.window.document)

  Ideally if the contents of theiframeare always known to 
  you, you
  should use only one instance of jQuery on the parent window 
  and do all
  your stuff from it, it's simpler to debug also.

  On Sep 16, 10:29 pm, hubbs [EMAIL PROTECTED] wrote:

   Thanks Ricardo.

   But what if I wanted to access the parent document from 
   WITHIN the
  iframe?

   On Sep 16, 12:27 pm, ricardobeat [EMAIL PROTECTED] 
   wrote:

You need to understand that a frame is another 'window' 
instance, it
doesn't have the same jQuery object as the parent 
window unless you
tell it to. So the '$' object you use in firebug 
console is always the
one from the parent window.

If i'm not mistaken you can acess frame content with 
the parent
window's jQuery object using $('.classinsidetheframe',
frames['name'].document).css();

On Sep 16, 1:48 pm, hubbs [EMAIL PROTECTED] wrote:

 Ok Brandon,

 

[jQuery] Re: Hierarchical .parents()

2008-09-25 Thread Richard D. Worth
Yes, it will always be in hierarchical order. There are at least two unit
tests that cover this:

http://dev.jquery.com/view/trunk/jquery/test/unit/core.js

lines 1294,1295

- Richard

On Thu, Sep 25, 2008 at 3:54 PM, jasonkarns [EMAIL PROTECTED] wrote:


 Will the .parents() method always return in hierarchical order? Say I
 have:

 ol id=outer
  li
ol id=inner
  li
a id=target/
  /li
/ol
  /li
 /ol

 If I do $(#target).parents(ol).eq(0), will I *always* get #inner,
 or is the order of the resulting jQuery matched elements arbitrary?

 ~Jason



  1   2   >