[jQuery] jQuery vs. jQuery UI

2008-11-05 Thread ripcurlksm


What is the difference between the jQuery packed version and the UI packed
version?

For example, I want jQuery Tabs, and jQuery Table Sort to run on the same
page -- do I need to have both the jQuery and jQuery UI packed version,
along with the plugin scripts for Tabs and Table Sort?

It gets confusing to me when I have to combine the two scripts together --
usually CSS conflicts or other weird quirks come up and I dont know where to
start

Table Sorter
http://tablesorter.com/docs/

Tabs
http://docs.jquery.com/UI/Tabs
-- 
View this message in context: 
http://www.nabble.com/jQuery-vs.-jQuery-UI-tp20337905s27240p20337905.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Tabs - Preserve onclick on selected tab

2008-11-05 Thread fleabo

Thanks Klaus,

works perfectly.

ger

On Nov 4, 11:47 pm, Klaus Hartl [EMAIL PROTECTED] wrote:
 My bad. Try this instead:

 var $tabs = $('#staff-tab  ul').tabs({ cookie: { expires: 30 } });
 $('a', $tabs).click(function() {
     if ( $(this).parent().hasClass('ui-tabs-selected') ) {
         $tabs.tabs('load', $('a', $tabs).index(this));
     }

 });

 --Klaus

 On 4 Nov., 23:19, fleabo [EMAIL PROTECTED] wrote:



  I've used your code like this (maybe it's not the right way);

                  script type='text/javascript'
                  $(document).ready(function(){
                          var $tabs = $('#staff-tab  ul').tabs({
                              select: function(e, ui) {
                                  if (ui.index === 
  $tabs.data('selected.tabs')) {
                                      $tabs.tabs('load', ui.index);
                                  }
                              }
                          });
                  });
                  /script
  but nothing seems to happen (using firebug I don't see any anything
  and no errors) when I click on the selected tab. The tabs work as
  before. I'm using ui.jquery (themeroller).

  Ger

  On Nov 4, 8:24 pm, Klaus Hartl [EMAIL PROTECTED] wrote:

   Well, if the tab initially loads that form, the code I've posted
   should work.

   --Klaus

   On 4 Nov., 17:57,bogno[EMAIL PROTECTED] wrote:

Sorry, should of specified. I want to reload a blank (original load) 
form. I
am using it for a ticket system, so if someone wants to submit a second
ticket, all they have to do is click on the tab to get an empty form.

At present I use the tabs option { unselect: true } which works but 
requires
two clicks on tab, first to unselect, second to reselect.

thanks

Klaus Hartl-4 wrote:

 What does reload the form mean? Reloading the result of the formerly
 submitted form or load a blank form again? The former will be a bit
 more complicated.

 --Klaus

 On 4 Nov., 14:34,bogno[EMAIL PROTECTED] wrote:
 I can't seem to get this to work.

 I have a tab that I load a form into, submit the form via ajax and 
 return
 a
 view which replaces the form in the tab. So far everything works ok. 
 I
 would
 then like to have the possibility for the user to click on the 
 active tab
 so
 as to reload the form. My tabs are set up as such.

 script
         $(function() {
                 $('#staff-tab  ul').tabs({ cookie: { expires: 30 } 
 });
         });
 /script
 div id=staff-tab
         ul
                 li staff/get/current/ Current /li
                 li staff/get/finished/ Finished /li
                 li staff/get/register/  Register /li
         /ul
 /div

 Klaus Hartl-4 wrote:

  var $tabs = $('#example').tabs({
      select: function(e, ui) {
          if (ui.index === $tabs.data('selected.tabs')) {
              $tabs.tabs('load', ui.index);
          }
      }
  });

  --Klaus

  On 23 Okt., 16:58, fleabo [EMAIL PROTECTED] wrote:
  Is it possible to click on the selected tab so as to reload this 
  tab?

  thanks

 --
 View this message in
 context:http://www.nabble.com/Tabs---Preserve-onclick-on-selected-tab-tp20132...
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.

--
View this message in 
context:http://www.nabble.com/Tabs---Preserve-onclick-on-selected-tab-tp20132...
Sent from the jQuery General Discussion mailing list archive at 
Nabble.com.


[jQuery] Re: jQuery vs. jQuery UI

2008-11-05 Thread Richard D. Worth
Here's the long answer:

http://rdworth.org/blog/2008/10/jquery-plugins-and-jquery-ui/

The short answer is, yes, you need both jQuery and jQuery UI. With the jQuery
UI Download Builder http://ui.jquery.com/download_builder/ you can create
a custom version of jQuery UI that includes only the plugins you want. In
your case, Tabs. Tablesorter is not a jQuery UI plugin (though it once was)
so you'll have to include the script for it separately, like any other
jQuery plugin script. So your final result will look something like this

script type=text/javascript src=jquery-1.2.6.js/script
script type=text/javascript src=jquery.tablesorter.js/script
script type=text/javascript src=jquery.ui.js/script

That last one (jquery.ui.js) could be created by the download builder to
include only UI Core and UI Tabs.

- Richard

Richard D. Worth
http://rdworth.org/

On Wed, Nov 5, 2008 at 3:44 AM, ripcurlksm [EMAIL PROTECTED] wrote:



 What is the difference between the jQuery packed version and the UI packed
 version?

 For example, I want jQuery Tabs, and jQuery Table Sort to run on the same
 page -- do I need to have both the jQuery and jQuery UI packed version,
 along with the plugin scripts for Tabs and Table Sort?

 It gets confusing to me when I have to combine the two scripts together --
 usually CSS conflicts or other weird quirks come up and I dont know where
 to
 start

 Table Sorter
 http://tablesorter.com/docs/

 Tabs
 http://docs.jquery.com/UI/Tabs
 --
 View this message in context:
 http://www.nabble.com/jQuery-vs.-jQuery-UI-tp20337905s27240p20337905.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] menu with checkmark

2008-11-05 Thread [EMAIL PROTECTED]

I was wondering if there is any plugin that would allow me to have
checkmarks (and perhaps radio buttons) on the menus... Something like
what is described here: http://www.balsamiq.com/blog/?p=180

I looked through the menu plugins; but couldn't find anything
suitable...

Felix


[jQuery] Minifed jQuery not working in Safari 2

2008-11-05 Thread Nagaraj

Help!

I am using minifed version on jQuery and tablesorter plugin in my
application, and they seem not to work in Safari 2, unless I use the
non-minifed version, is this a know issue? or is there any way I can
use the minifed versions and still make it to work in Safari 2.

I am using Safari 2.0 (412.2.2)

Thanks,
Nagaraj


[jQuery] Another Jquery Reference Manual

2008-11-05 Thread alberto

Hi all,
   on my site (http://www.abspace.it/computerSpace/
JQueryCheatSheet.asp) I have put another JQuery Reference Manual
using, of course, JQuery plugins.

  -alberto-


[jQuery] Syntax for specifying size of new window with window.open

2008-11-05 Thread Wonder95

OK, I know I'm not the first one to ask this, but I'm stumped.  I'm
working on a Drupal site, and the client didn't like my nice block I
created for a little calculator, so they want a popup window instead.
So, I created a separate .htm page with the HTML for the form (four
fields plus a button to calculate), and all I want to do is open it in
a separate small window (175X250).  However, I can't seem to get the
syntax right for specifying the size  If I do this:

$(function() {
$('a[href$=.htm]').attr('target','blank').click(function () {
window.open($(this).href);
return false;
});
});

it opens in another full sized tab, but when I try to add the other
parameters to window.open, my IDE tells me something is wrong, and it
doesn't work (something like this):

$(function() {
$('a[href$=.htm]').attr('target','blank').click(function () {
window.open($(this).href,,width=200 height=200);
return false;
});
});

Is that the way to specifiy the size of the new window, or is there a
better way?

Thanks.


[jQuery] jQuery Show/Hide validation problem

2008-11-05 Thread Daniel

I am using jQuery show/hide functions on click, so when you click on
the contact link it hides that div and then shows a contact form. Once
you fill in the contact form and click submit it shows the thanks page
div.

I am using validation from here: 
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

The problem is, is that I need it so when you click on submit on the
contact form page it doesn't show and hide the div if the validation
has failed as it does now.

Is there anyway of making it so that I can only click the submit
button or show hide the divs if validation is passed?

Thanks


[jQuery] jQuery Validate and Show/Hide problems

2008-11-05 Thread Daniel

I am using jQuery show/hide functions on click, so when you click on
the contact link it hides that div and then shows a contact form. Once
you fill in the contact form and click submit it shows the thanks page
div.

I am using validation from here: 
http://bassistance.de/jquery-plugins/jquery-plugin-validation/

The problem is, is that I need it so when you click on submit on the
contact form page it doesn't show and hide the div if the validation
has failed as it does now.

Is there anyway of making it so that I can only click the submit
button or show hide the divs if validation is passed?

Thanks


[jQuery] Grouping days

2008-11-05 Thread mattis

Hello.

I'm new to javascript and jQuery.
But I have been given this task to make a vacancy calendar which shall
highlight an amount of days selected by a select option value when I
hover it.
What I would like to do:
When I hover a day which is vacant, it will also highlight the
selected amount of days following it, sort of grouping them together.
But if there is a day which is occupied or a class=b in between, it
will higlight the group with red.

The calendar is built up like this dynamically:
ul
li class=month
divspanmon/spanspantue/spanspanwed/spanspanthu/
spanspanfri/spanspansat/spanspansun/span/div
span class=aa href=#1/a/span
span class=aa href=#2/a/span
span class=aa href=#3/a/span
span class=b4/span
span5/span
span class=a6a href=#/a/span
span class=a7a href=#/a/span
..etc
/li
li class=month
divspanmon/span..etc/div
span class=none/span
span class=a1a href=#/a/span
span class=a2a href=#/a/span
span class=a3a href=#/a/span
..etc
/li
..etc
/ul
Where
span class=a = vacant
span class=b = vacant but not within the selected amount of days
span = occupied
span class=none = no day(this is for emty days in the beginning of
a month, like when if the first day in a month starts on tuesday, it
will render the previous days with this class)

Im not sure if this is the right way or if there is a better way to do
this.
Hope someone can help me out here, because i would really like this
project to use jQuery.


[jQuery] Scroll multiple elements with one scroll bar - can it be done?

2008-11-05 Thread Kabelkultur Gotland

Hello everyone, this is something I'm trying to sort out, that might
not be a very common issue:

I need to find a way to scroll multiple elements with one external
scroll bar.

The elements in question is for now tbody elements with assigned ID's,
they are lined up horizontally and have the same height.

My idea is to create a table with 3 cells in each row. 2 of these will
contain the tables with tbodies that are to be scrolled, and the third
will contain the scrolling function.(the issues with IE for fixed
table header is already solved)

Now, I need the function in the third cell to scroll the tbody
elements of the 2 tables in cell 1 and 2, and since it is tbody
elements, there can be no wrapper div append-type of function, just
something that produces a scrollbar in cell 3, that actually scrolls
the tbodies in cell 1 and 2.

I use a lot of jquery all over the project, and I believe it can be
done, I just lack the knowledge to do it. Anybody got any idea on how
to go about this I'll be very happy.

Regards, Torgil - kabelkultur.se


[jQuery] Re: filter().find() are not returning elements

2008-11-05 Thread SteveS

One problem is the XML has a syntax error - the Search, but it still
doesn't work. I corrected it below.

  var xml = SearchMyPlaceValue123/Value/MyPlace/Search;
 $(xml).filter(MyPlace).find(Value).each(function() {
 alert(this.value);
  });

Thanks again for anyone's help!



On Nov 4, 9:19 pm, SteveS [EMAIL PROTECTED] wrote:
 Hello, I'm still a newbie at jQuery and I'm having some trouble trying
 to select some nodes from XML.  I'm simply trying to display the value
 in the Value element.  For some reason, it returns zero elements.

  var xml = searchMyPlaceValue123/Value/MyPlace/Search;
 $(xml).filter(MyPlace).find(Value).each(function() {
         alert(this.value);
  });

 Also,  I would have thought this would work, but it doesn't:   $
 (xml).filter(MyPlace).children()   Do you know why?

 Thank you in advance for any help!


[jQuery] Re: Cycle Plug-in works with ajax on first call, not on subsquent calls

2008-11-05 Thread Mike Alsup

 Thanks Mike, here's the link and a description of how to get it to not
 work..

 http://zifimusic.com/cycle

I'm guessing that you're not using Firefox with Firebug.  If you were,
you could set a breakpoint and see that your 'allPops' div contains
only a single element after the ajax call, so the markup is not as you
expect when you call cycle the 2nd time.  In addition, cycle logs this
message:

[cycle] terminating; too few slides: 1

Mike


[jQuery] Re: Toggle and Nested Divs

2008-11-05 Thread ricardobeat

Try providing a test page or pasting your code at www.pastie.org or
www.jsbin.com, that way people can actually read it! :)

Can't figure out from this code what might be wrong, it's probably an
event bubbling issue.

And you have src=$content.getURI(images/icon_plus.gif) that will
cause serious parsing errors on the browser, use single quotes inside.

- ricardo

On Nov 4, 7:43 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Hi all.

 I have an outer div that contains several child divs (event search
 form that lets the user pick dates, categories, etc...). The user can
 toggle the outer div and the child divs as well. This all works for me
 AS LONG AS the outer div is visible and not able to be toggled. When I
 let the user toggle the outer div, when the outer div is toggled to
 visible and the user tries to toggle a child div, the child div opens
 and then closes again right away.

 I believe this is happening because the child div is somehow
 inheriting the parent's visibility. I debugged it and
 showHideExactDates() is being run twice. So, it seems like it is
 starting out as visible, even though it is not visible on the form.

 Here is a snippet of the code:

 pa href=javascript:void(0) id=searchFormShowHideLink_imageimg
 src=$content.getURI(images/icon_plus.gif)
 name=searchFormShowHideIcon id=searchFormShowHideIcon border=0
 align=left alt=+ //a stronga href=javascript:void(0)
 id=searchFormShowHideLink_textSearch Form/a/strong/p

 div id=eventSearchFormDiv
   pa href=javascript:void(0) id=dateExactShowHideLink_image
 title=show/hide exact date form fieldsimg
 src=$content.getURI(images/icon_plus.gif)
 name=dateExactShowHideIcon id=dateExactShowHideIcon border=0
 align=left alt=+ //a a href=javascript:void(0)
 id=dateExactShowHideLink_textSpecify Exact Dates/a/p
         div id=dateExactDiv style=display: none;
             Occurs between input type=text size=3
 name=dateRangeStartMonth id=dateRangeStartMonth title=date range
 start month value=$!dateRangeStartMonth maxlength=2/
             input type=text size=3 name=dateRangeStartDay
 id=dateRangeStartDay title=date range start day value=$!
 dateRangeStartDay maxlength=2/
             input type=text size=5 name=dateRangeStartYear
 id=dateRangeStartYear title=date range start year value=$!
 dateRangeStartYear maxlength=4a href=javascript:void(0)
 id=dateRangeStartCalendarLink title=event range start calendar date
 pickerimg src=$content.getURI(images/icon_calendar.gif)
 alt=Choose range start date border=0 align=absmiddle/anbsp;
                 and input type=text size=3 name=dateRangeEndMonth
 id=dateRangeEndMonth title=date range end month value=$!
 dateRangeEndMonth maxlength=2/
                 input type=text size=3 name=dateRangeEndDay
 id=dateRangeEndDay title=date range end day value=$!
 dateRangeEndDay maxlength=2/
                 input type=text size=5 name=dateRangeEndYear
 id=dateRangeEndYear title=date range end year value=$!
 dateRangeEndYear maxlength=4a href=javascript:void(0)
 id=dateRangeEndCalendarLink title=event range end calendar date
 pickerimg src=$content.getURI(images/icon_calendar.gif)
 alt=Choose range end date border=0 align=absmiddle/a
         /div
 /div

 function showHideSearchForm() {
         jq(#eventSearchFormDiv).toggle(blind, {}, 1000);
     }

     //add the form submit handler
     jq(document).ready(function() {
         jq(#searchFormShowHideLink_image).click(showHideSearchForm);
         jq(#searchFormShowHideLink_text).click(showHideSearchForm);
     });

 function showHideExactDates() {
         alert(running showHideExactDates());
         jq(#dateExactDiv).toggle(blind, {}, 1000);
     }

     //add the form submit handler
     jq(document).ready(function() {
         jq(#dateExactShowHideLink_image).click(showHideExactDates);
         jq(#dateExactShowHideLink_text).click(showHideExactDates);
         jq(#dateRangeStartCalendarLink).datepicker();
         jq(#dateRangeEndCalendarLink).datepicker();
     });

 Help please! I have been banging my head on this now for several
 hours!

 Thanks.


[jQuery] Re: Destroy Interval at DOM Object removal

2008-11-05 Thread ricardobeat

Being a bit more awake right now I realize that's probably one of the
stupidest things I've said on this mailgroup! :D

On Nov 4, 7:48 pm, ricardobeat [EMAIL PROTECTED] wrote:

  And you can't check for the element's
  existance anywhere within the plugin code because all event handlers
  have been removed with the element itself.

  I don't really understand this, or it isn't at all what I experience
  from testing. I have a console.log in the function fired by the timer
  created by the plugin. It outputs $(this).length, which would be 1
  since the plugin code attaches itself to each object supplied thru the
  jQuery object. If assign my rotate-plugin to for example $('#rotate')
  and then delete that same element, $(this).lenght will still output 1.
  If I however console.log($('#rotate').lenght) it would respond to the
  changes in the DOM.

 I mean it's useless to put a check inside of 'onmousemove' for example
 because that event will not be fired anymore, as it's owner element
 has been removed from the DOM.


[jQuery] Re: How to solve this

2008-11-05 Thread Johny

Thank you ALL who helped.Now it works but because the form uploads a
large file I would like to add a progress bar indicator or something
like.
Is it possible to implement   a progress uploading indicator with
jQuery?

I thought about an animated picture( as the easiest solution) but when
I start uploading the animated gif  picture stops.
Can anyone help please?
Thank you
L.


[jQuery] Re: noob question: loading dynamic content with .load()

2008-11-05 Thread ricardobeat

If the callback runs but the data isn't loaded it's almost certainly a
server error. What is in your responseText when it fails?

On Nov 4, 10:34 pm, HiddenPhoenix [EMAIL PROTECTED] wrote:
 im kinda a noob with some of this jquery stuff. esp the ajax stuff so
 any help i can get here would be greatly appreciated.

 i am using this code to try to load new content into my content div.

 $(myContentDiv).load(myScript.php?var1=xvar2=yvar3=z)

 myScript.php generates my new content to load into my Div. there can
 be anywhere from 0 to 1000 rows of data returned.

 sometimes myScript doesnt load correctly. even if i add a callback,
 the callback runs but the data doesnt load.

 Is it best for me to have myScript.php generate all the html and then
 have it loaded into myDiv or is there a better way.

 thx for helping this noob.


[jQuery] multiple select boxes with the same name submiting via ajax

2008-11-05 Thread williamstam

hi

i hope somone can help

i have a couple of records which all have (the idea anyways) have
select boxes. when a user changes the select box it submits those
changes and the record ID to another page using ajax to update the
database. so far i have

$(document).ready(function(){
$(#priority).change(function() {

jQuery.ajax({
data: prio= + $(#priority).val() + ID=1,
url: do_priority.asp,
timeout: 2000,
error: function() {
  console.log(Failed to submit);
},
success: function(r) {
  $(#priority).removeAttr(disabled);
}
  });

$(#priority).attr(disabled, disabled);

});
});

it works like a charm with 1 record... as soon as there are more
records it fails. i presume this is cause its finding multiple '$
(#priority)' select boxes in the page?

the above code when you change the value of a select box it disables
the box till ajax says that it worked then re enables it again.

regards

william


[jQuery] Re: jQuery Show/Hide validation problem

2008-11-05 Thread Jörn Zaefferer
Use the submitHandler-option to run code once the form is valid.

Jörn

On Wed, Nov 5, 2008 at 12:20 PM, Daniel [EMAIL PROTECTED] wrote:

 I am using jQuery show/hide functions on click, so when you click on
 the contact link it hides that div and then shows a contact form. Once
 you fill in the contact form and click submit it shows the thanks page
 div.

 I am using validation from here: 
 http://bassistance.de/jquery-plugins/jquery-plugin-validation/

 The problem is, is that I need it so when you click on submit on the
 contact form page it doesn't show and hide the div if the validation
 has failed as it does now.

 Is there anyway of making it so that I can only click the submit
 button or show hide the divs if validation is passed?

 Thanks



[jQuery] Re: filter().find() are not returning elements

2008-11-05 Thread ricardobeat

$(xml).filter('MyPlace') is already returning nothing, you need the
contents() function to parse the string:

$(xml).contents('MyPlace').children()

or

$(xml).contents().filter(MyPlace).children()

- ricardo

On Nov 5, 9:42 am, SteveS [EMAIL PROTECTED] wrote:
 One problem is the XML has a syntax error - the Search, but it still
 doesn't work. I corrected it below.

   var xml = SearchMyPlaceValue123/Value/MyPlace/Search;
  $(xml).filter(MyPlace).find(Value).each(function() {
          alert(this.value);
   });

 Thanks again for anyone's help!

 On Nov 4, 9:19 pm, SteveS [EMAIL PROTECTED] wrote:

  Hello, I'm still a newbie at jQuery and I'm having some trouble trying
  to select some nodes from XML.  I'm simply trying to display the value
  in the Value element.  For some reason, it returns zero elements.

   var xml = searchMyPlaceValue123/Value/MyPlace/Search;
  $(xml).filter(MyPlace).find(Value).each(function() {
          alert(this.value);
   });

  Also,  I would have thought this would work, but it doesn't:   $
  (xml).filter(MyPlace).children()   Do you know why?

  Thank you in advance for any help!


[jQuery] jCarousel, localScroll, other options?

2008-11-05 Thread genius switch

Here is my issue, I have used jCarousel to accomplish what I need...
however the markup is bothering my anal tendencies for pure
semantics.

I'm using jCarousel to scroll content blocks in a sexy way, however,
in order to use jCarousel I must have my content blocks inside a list,
each as a list item. This validates, and is functioning exactly how I
want it to, however I can't get past the fact that this markup doesn't
make sense.

LocalScroll is my other option, but it doesn't slide sexy the way
jCarousel does. Does anyone have any advice?

Here is the test page: http://www.geniusswitchstudio.com/v2/template.htm

Thanks!

- C


[jQuery] Re: order of script not right (explained inside)

2008-11-05 Thread FastNOC


My god. I cannot believe I dind't think of something so elemental.

Thank you!

ricardobeat wrote:
 
 
 CSS z-index property: http://www.w3schools.com/Css/pr_pos_z-index.asp
 
 #dropdownpanel { z-index: 1 }
 
 cheers,
 - ricardo
 
 On Nov 5, 2:00 am, FastNOC [EMAIL PROTECTED] wrote:
 I'm doing development on two sites right now. both are quite far from
 finished. I liked the panel script
 fromhttp://www.javascriptkit.com/script/script2/dropdownpanel.shtmlhere
  and it
 works. You can see it here: (no this isn't advertising. almost all links
 are
 dead, there's no content and nothing to
 buy).http://15.e-referrer.com/cms/index.php/red/tips/First Webiste (it
 works
 fine here)  (FYI it's a panel that comes down from the top when you click
 the black button that says 'member login')

 Now, I decided to add it to the next site to use just the same. It works,
 but the order is off and it's appearing underneath everything else on the
 page. I can't figure out why. At first I thought it might be the order of
 the css elements but that's not it.

 Can anyone take a guess why this is happening?

 http://e-places.net/index.phpSecond site where it's broke
 --
 View this message in
 context:http://www.nabble.com/order-of-script-not-right-%28explained-inside%2...
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/order-of-script-not-right-%28explained-inside%29-tp20335896s27240p20341371.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Ajax cross site (same domain) problems

2008-11-05 Thread ricardobeat

It should. Check your document.domain after all scripts have run to
see if it's really changed.

On Nov 4, 8:07 pm, kudu [EMAIL PROTECTED] wrote:
 I am attempting to call page through ajax accross different sites
 within the same doman.
 The error displayed is: Access to restricted URI denied code: 1012
 I have set  document.domain to reflect the shared domain

 i.e.
 calling foo.baz.com/myscript.php
 from bar.baz.com
 having set document.domain = baz.com

 My understanding is that setting document.domain should open up the
 same origin policy to allow calls between sub-domains within the same
 base domain.


[jQuery] Re: Toggle and Nested Divs

2008-11-05 Thread n8cshaw

Thanks Ricardo. I have put the code up at http://jsbin.com/atiza

As for the double quotes on the Velocity call, those are evaluated on
the server prior to being sent to the client, so no worries there.

I appreciate the help with this! It seems like this should be a very
easy thing to do (I did the exact same thing with Prototype/
Scriptaculous on another site). I am not sure what I am missing.



On Nov 5, 7:27 am, ricardobeat [EMAIL PROTECTED] wrote:
 Try providing a test page or pasting your code 
 atwww.pastie.orgorwww.jsbin.com, that way people can actually read it! :)

 Can't figure out from this code what might be wrong, it's probably an
 event bubbling issue.

 And you have src=$content.getURI(images/icon_plus.gif) that will
 cause serious parsing errors on the browser, use single quotes inside.

 - ricardo

 On Nov 4, 7:43 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  Hi all.

  I have an outer div that contains several child divs (event search
  form that lets the user pick dates, categories, etc...). The user can
  toggle the outer div and the child divs as well. This all works for me
  AS LONG AS the outer div is visible and not able to be toggled. When I
  let the user toggle the outer div, when the outer div is toggled to
  visible and the user tries to toggle a child div, the child div opens
  and then closes again right away.

  I believe this is happening because the child div is somehow
  inheriting the parent's visibility. I debugged it and
  showHideExactDates() is being run twice. So, it seems like it is
  starting out as visible, even though it is not visible on the form.

  Here is a snippet of the code:

  pa href=javascript:void(0) id=searchFormShowHideLink_imageimg
  src=$content.getURI(images/icon_plus.gif)
  name=searchFormShowHideIcon id=searchFormShowHideIcon border=0
  align=left alt=+ //a stronga href=javascript:void(0)
  id=searchFormShowHideLink_textSearch Form/a/strong/p

  div id=eventSearchFormDiv
pa href=javascript:void(0) id=dateExactShowHideLink_image
  title=show/hide exact date form fieldsimg
  src=$content.getURI(images/icon_plus.gif)
  name=dateExactShowHideIcon id=dateExactShowHideIcon border=0
  align=left alt=+ //a a href=javascript:void(0)
  id=dateExactShowHideLink_textSpecify Exact Dates/a/p
  div id=dateExactDiv style=display: none;
  Occurs between input type=text size=3
  name=dateRangeStartMonth id=dateRangeStartMonth title=date range
  start month value=$!dateRangeStartMonth maxlength=2/
  input type=text size=3 name=dateRangeStartDay
  id=dateRangeStartDay title=date range start day value=$!
  dateRangeStartDay maxlength=2/
  input type=text size=5 name=dateRangeStartYear
  id=dateRangeStartYear title=date range start year value=$!
  dateRangeStartYear maxlength=4a href=javascript:void(0)
  id=dateRangeStartCalendarLink title=event range start calendar date
  pickerimg src=$content.getURI(images/icon_calendar.gif)
  alt=Choose range start date border=0 align=absmiddle/anbsp;
  and input type=text size=3 name=dateRangeEndMonth
  id=dateRangeEndMonth title=date range end month value=$!
  dateRangeEndMonth maxlength=2/
  input type=text size=3 name=dateRangeEndDay
  id=dateRangeEndDay title=date range end day value=$!
  dateRangeEndDay maxlength=2/
  input type=text size=5 name=dateRangeEndYear
  id=dateRangeEndYear title=date range end year value=$!
  dateRangeEndYear maxlength=4a href=javascript:void(0)
  id=dateRangeEndCalendarLink title=event range end calendar date
  pickerimg src=$content.getURI(images/icon_calendar.gif)
  alt=Choose range end date border=0 align=absmiddle/a
  /div
  /div

  function showHideSearchForm() {
  jq(#eventSearchFormDiv).toggle(blind, {}, 1000);
  }

  //add the form submit handler
  jq(document).ready(function() {
  jq(#searchFormShowHideLink_image).click(showHideSearchForm);
  jq(#searchFormShowHideLink_text).click(showHideSearchForm);
  });

  function showHideExactDates() {
  alert(running showHideExactDates());
  jq(#dateExactDiv).toggle(blind, {}, 1000);
  }

  //add the form submit handler
  jq(document).ready(function() {
  jq(#dateExactShowHideLink_image).click(showHideExactDates);
  jq(#dateExactShowHideLink_text).click(showHideExactDates);
  jq(#dateRangeStartCalendarLink).datepicker();
  jq(#dateRangeEndCalendarLink).datepicker();
  });

  Help please! I have been banging my head on this now for several
  hours!

  Thanks.


[jQuery] Re: best way to pass parameters to .load()

2008-11-05 Thread Choan Gálvez


Hi.

On Nov 5, 2008, at 1:02 AM, HiddenPhoenix wrote:



is there a difference in passing parameters to .load

$(#myDiv).load(myScript.php?var=xvar2=yvar3=z)

vs

$(#myDiv).load(myScript.php, {var:x, var2:y, var3:z})


In the first case, a GET request is performed. In the latter, the  
request is POSTed.




also is there a size limit to how much .load can handle? can
myScript.php return a couple hundred rows of data without issue?


You can return as much data as you want, it won't be a problem. But,  
adding lots of nodes to the document can be time consuming.


--
Choan


[jQuery] Re: Problems with the JSON return from the jQuery.ajax() method

2008-11-05 Thread Choan Gálvez


Hi.

On Nov 4, 2008, at 10:48 PM, Augusto TMW wrote:



Hi,

I'm trying do return a JSON with a $.ajax() method.

here is my entire function:

function carregaMes(d){
 if(!(_reunioes[reg+d.month+d.year])){
$.ajax({
url: reunioes.jsp,
data: mes=+d.month+ano=+d.year,
async: false,
dataType: json,
success: function(a){
_reunioes[reg+d.month+d.year] = a;
}
});
return _reunioes[reg+d.month+d.year];
 } else {
return _reunioes[reg+d.month+d.year];
 }
}

Where _reunioes is an array in window object.

In FF its ok, but in IE its return undefined. I tried to call a
normal ajax and use the jQuery.httpData() method to covert my xhr into
a JSON, but my IE tell me that in line where jQuery tries to convert
( data = eval((+data+)); ) has an error Indentifier, sequency or
number expected.


I'd bet the input is not valid JSON. Check for extra commas at the end  
of your JSON array definition.


Best.
--
Choan


[jQuery] Re: Google Charts

2008-11-05 Thread Choan Gálvez


On Nov 5, 2008, at 5:59 AM, moscorp wrote:



gchart can't recognize series data in barVert...

can't work in
var valueArray = $('#mpngicnt').text(); //80,30,50
series: [ $.gchart.series([ valueArray ], 'red')],

but it works in
series: [ $.gchart.series([ 80,30,50 ], 'red')],

how can i solve it !


`$('selector').text()` returns a string. From what I read in your  
working code, you need to pass an array.


var valueArray = $.trim($('#mpngicnt').text()).split(','); //  
[ 80, 30, 50 ]

// I assume there is some code in the middle
series: [ $.gchart.series(valueArray, 'red')]

Now, back to jQuery related posts.
--
Choan


[jQuery] Re: Can Jquery fetch file, and display download dialog?

2008-11-05 Thread Genu

Hey, thanks for the reply. I tried the above function, and now the
link just doesn't do anything when I click on it. I don't understand
where you got '.dialogBox' from, however.


[jQuery] Re: Advice on sIEve/Drip?

2008-11-05 Thread trixta



On Nov 4, 12:20 am, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 OUCH.

 With over 25,000 lines of javascript code (full featured CMS) that's a
 nightmare to track down.

 Am I out of luck?  Are there no other alternative tools like sIEve that are
 still in development?


Hi,

there is another tool by microsoft, you can try:
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

but this tool doesn´t find all memory leaks.

this jquery-related info could be helpfull, too:
http://groups.google.com/group/jquery-dev/browse_thread/thread/4a99f6e9b2e33057/30099a04db7f87b9
http://www.outsidethediv.com/2008/10/removechild-vs-the-garbage-bin/

One last advice. You don´t have to fix all memory leaks in IE6. It
really depends on the cost-benefit-ratio (hard effort/work to fix it
vs. noticeable advancement for the enduser).

regards
alex


[jQuery] Re: order of script not right (explained inside)

2008-11-05 Thread ricardobeat

CSS z-index property: http://www.w3schools.com/Css/pr_pos_z-index.asp

#dropdownpanel { z-index: 1 }

cheers,
- ricardo

On Nov 5, 2:00 am, FastNOC [EMAIL PROTECTED] wrote:
 I'm doing development on two sites right now. both are quite far from
 finished. I liked the panel script 
 fromhttp://www.javascriptkit.com/script/script2/dropdownpanel.shtmlhere  and 
 it
 works. You can see it here: (no this isn't advertising. almost all links are
 dead, there's no content and nothing to 
 buy).http://15.e-referrer.com/cms/index.php/red/tips/First Webiste (it works
 fine here)  (FYI it's a panel that comes down from the top when you click
 the black button that says 'member login')

 Now, I decided to add it to the next site to use just the same. It works,
 but the order is off and it's appearing underneath everything else on the
 page. I can't figure out why. At first I thought it might be the order of
 the css elements but that's not it.

 Can anyone take a guess why this is happening?

 http://e-places.net/index.phpSecond site where it's broke
 --
 View this message in 
 context:http://www.nabble.com/order-of-script-not-right-%28explained-inside%2...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Ajax cross site (same domain) problems

2008-11-05 Thread kudu

Thanks for the suggestion, I have checked document.domain and it
consistently reflects the correct (i.e. base domain) value. I have
gone to the extent of seting this very early in the process before any
other javascript has loaded and the problem persists.

On Nov 5, 7:43 am, ricardobeat [EMAIL PROTECTED] wrote:
 It should. Check your document.domain after all scripts have run to
 see if it's really changed.

 On Nov 4, 8:07 pm, kudu [EMAIL PROTECTED] wrote:

  I am attempting to call page through ajax accross different sites
  within the same doman.
  The error displayed is: Access to restricted URI denied code: 1012
  I have set  document.domain to reflect the shared domain

  i.e.
  calling foo.baz.com/myscript.php
  from bar.baz.com
  having set document.domain = baz.com

  My understanding is that setting document.domain should open up the
  same origin policy to allow calls between sub-domains within the same
  base domain.


[jQuery] Re: Can Jquery fetch file, and display download dialog?

2008-11-05 Thread ricardobeat

Hi,

Return false from the function to stop de default action (opening the
file). Also you don't need to change the jQuery shortcut '$', just do
this, won't cause any conflicts:

(function($){

$(document).ready(function() {
$('.download').click(function() {
var link = $(this).attr('href');
$('.dialogBox').show().click(function(){
  window.location.href = link; //or window.open
  $(this).unbind('click');
});
   return false;
});

})(jQuery);


On Nov 4, 8:47 pm, Genu [EMAIL PROTECTED] wrote:
 Ok here is my problem:

 I have a link:

 a href=http://www.myserver.com/01-01-08-PM.mp3; class=download
 id=7Download/a

 I wrote this js:

 var $j = jQuery.noConflict();

 $j(document).ready(function() {
         $j('.download').click(function() {
                 var link = $j(this).attr('href');

         });

 });

 The idea, is that I want the script to fetch the url (href), and
 return it in the form of a download dialog. The problem that I am
 facing, is that when people click Download, it just opens up the
 file directly with the associated player. Can Jquery overcome this
 issue if it does an httprequest in the bacgkground to fetch the file?

 please let me know what my options are.


[jQuery] Re: Trying to grasp basics of scrolling a TBODY

2008-11-05 Thread Kenneth Downs

Jeffrey Kretz wrote:


Ken,

 


Do you have a test case page online somewhere I could take a look at?

 

I've successfully implemented a scrollTo-type function using offsets 
and rows, and if I can see the page you're working with I might be 
able to suggest something.




Jeffrey, thanks but I actually figured it out.  I made up a simple test, 
which I'll be happy to post probably tomorrow.


What I realized is that there were a few more steps than I thought.  I 
had figured that a TR would get an offset() automatically with respect 
to its TBODY.  Instead I found I had to get the offset()  (or position, 
I forget which one) for several items, and do a little arithmetic to get 
the position of the TR relative to its TBODY.  Once I figured that out 
the remaining arithmetic was fairly straightforward.


Also I realized I had to take into account the height of the TR, 
otherwise I would scroll to the top of it and it would still be invisible :)


 


JK

 

*From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] 
*On Behalf Of *Kenneth Downs

*Sent:* Sunday, November 02, 2008 3:58 PM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] Re: Trying to grasp basics of scrolling a TBODY

 


Dan Switzer wrote:

Ken,

 


I'm trying to grasp the basics of scrolling to a particular row in a
TABLE.

Let's say you've got a TABLE, with a TBODY that has a fixed height and
overflow: scroll.

It appears I ought to be able to use core functions like offset() and
scrollTop() to work out where a row is and scroll the TBODY to that
position, but lots of trial and error has left me lost on why these
things don't seem to work as I expect.

The particular case I am looking at involves the user using arrow keys
to navigate up and down.  Its easy enough to use .next() to highlight
the next row, but if a user keeps doing it, and the next row is below
the viewable scroll region, I need to be able to slide up the display
to show the highlighted row.

This is an educational venture, not a practical one, I'd like to
understand it myself, not find and use a plugin that does it already.


Scrolling with the TBODY tag is spotty. IE6 doesn't support it at 
all--you need to place your table in a DIV that has a fixed height and 
overflow set to scroll.



Thankfully I have no interest in IE 6 :)

I currently have the DIV system you describe.  My best construction of 
why it does not work is this:


1) There is a div that represents TBODY.  It has clear:both as a 
CSS row

2) Each row is a div inside of the TBODY div
3) Each cells must be a div, firefox does not support widths on 
spans (don't know about IE, doesn't matter if firefox won't do it)

4) The cells must be float: left
5) ...and at the end I get .offset() returning meaningless numbers for 
the row divs.  All divs in the body return 0 as the offset.
6) For good measure, the .scrollTo() extension does not work at all on 
this simulated TABLE, which I suspect is related to these bogus numbers.
7) I *think* the clear:both on the tbody div is causing this, but I 
really don't know


So I monkeyed up a TABLE by hand and found all of the .offset() and 
related functions appear to be giving real results, I just can't quite 
connect the dots on how to put it all together.


FWIW, the only reason I used the entire simulated TABLE was because IE 
7 does not support onclick() on a TR.  But I can just as well put the 
onclick on TD elements and get where I need to go using a TABLE, if 
only I could connect the dots on the scrolling stuff.




I'm not sure what browsers you're targeting, but if IE6 was one you 
were having problems with, this is why.


-Dan




--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com http://www.secdat.comwww.andromeda-project.org 
http://www.andromeda-project.org
631-689-7200   Fax: 631-689-0527
cell: 631-379-0010



--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.comwww.andromeda-project.org
631-689-7200   Fax: 631-689-0527
cell: 631-379-0010



[jQuery] Re: Can Jquery fetch file, and display download dialog?

2008-11-05 Thread tlphipps

This is not something javascript/jquery can solve.  From a web
developer standpoint, you really only have one option and that is to
create server-side code (ASP, PHP, etc.) that will force a file
download box.

The default action for handling .mp3 downloads is determined by the
user's browser and you cannot change that from your end.  But you can
create specific server-side headers that will instruct the browser to
download the file as an 'attachment' instead of trying to simply open
the document.

The specific headers you need are:
Content-Disposition: attachment; filename=01-01-08-PM.mp3

On Nov 5, 8:11 am, Genu [EMAIL PROTECTED] wrote:
 Hey, thanks for the reply. I tried the above function, and now the
 link just doesn't do anything when I click on it. I don't understand
 where you got '.dialogBox' from, however.


[jQuery] Re: multiple select boxes with the same name submiting via ajax

2008-11-05 Thread tlphipps

By using the # character in your selector, you're indicating that you
are targeting the element by ID. Having multiple items on a page with
the same ID will not work.

I would suggest you create a special class for these selects and then
target them that way.

example:

select class=priority id=someuniquevalue name=someuniquevalue
options go here
/select

 $(document).ready(function(){
 $(select.priority).change(function() {

 jQuery.ajax({
 data: prio= + $(this).val() + ID=1,
 url: do_priority.asp,
 timeout: 2000,
 error: function() {
   console.log(Failed to submit);
 },
 success: function(r) {
   $(this).removeAttr(disabled);
 }
   });

 $(this).attr(disabled, disabled);

 });

 });


On Nov 5, 6:18 am, williamstam [EMAIL PROTECTED] wrote:
 hi

 i hope somone can help

 i have a couple of records which all have (the idea anyways) have
 select boxes. when a user changes the select box it submits those
 changes and the record ID to another page using ajax to update the
 database. so far i have

 $(document).ready(function(){
         $(#priority).change(function() {

                 jQuery.ajax({
             data: prio= + $(#priority).val() + ID=1,
             url: do_priority.asp,
             timeout: 2000,
             error: function() {
               console.log(Failed to submit);
             },
             success: function(r) {
               $(#priority).removeAttr(disabled);
             }
           });

 $(#priority).attr(disabled, disabled);

         });

 });

 it works like a charm with 1 record... as soon as there are more
 records it fails. i presume this is cause its finding multiple '$
 (#priority)' select boxes in the page?

 the above code when you change the value of a select box it disables
 the box till ajax says that it worked then re enables it again.

 regards

 william


[jQuery] Re: [validate] problems with invalid-form.validate and remote rules

2008-11-05 Thread Àlex Corretgé
Hi Jörn,

it runs perfectly :-)

thanks


-- 
Atentament / Kind Regards

Àlex Corretgé
Serveis Informàtics Corretgé.com SLU
http://corretge.cat/

LinkedIn: http://www.linkedin.com/in/corretge


2008/10/31 Jörn Zaefferer [EMAIL PROTECTED]

 Thanks for tracking this down. Its now fixed in the latest revision.
 Please let me know if it works for you.

 Jörn

 On Wed, Oct 29, 2008 at 10:01 PM, Àlex Corretgé [EMAIL PROTECTED] wrote:
  Hi Jörn,
 
  puting these files in the /validate/demo folder you can recreate the
  problem:
 
  - the field is filled when the form is loaded
  - the first submit, the form is cancel·led and the error is showed, but
 in
  $('#commentForm').bind('invalid-form.validate', function(e, validator)
  validator is undefined
  - the second submit, the form is cancel·led, the error is showed and the
  invalid-form.validate validator parm is a validator object.
 
  thanks for all
 
 
 
  --
  Atentament / Kind Regards
 
  Àlex Corretgé
  Serveis Informàtics Corretgé.com SLU
  http://corretge.cat/
 
  LinkedIn: http://www.linkedin.com/in/corretge
 
 
  2008/10/27 Jörn Zaefferer [EMAIL PROTECTED]
 
  Can you provide a running example that I can look at? The more
 simplified
  it is, the easier to debug.
 
  Jörn
 
  On Mon, Oct 27, 2008 at 12:39 PM, Àlex Corretgé [EMAIL PROTECTED]
 wrote:
 
  Hi Jörn,
 
  thanks for the quick answer.
 
 
  I fill the form with database data.
 
  If the data controled with a remote rule is erroneous and I never
 focused
  the field, when I submit the form, the form is cancelled but errorMap
 lenght
  is zero.
 
  the seccond time that I submit the form, errorMap has the errors
  correctly.
 
  $('#bpwcForm').bind('invalid-form.validate', function(e, lVal)
  {
  /**
   * procedim a deixar els tabs amb el color normal
   */
  for (var i in aTabs)
  {
  if (i  0)
  {
  ajtabbar.setCustomStyle('ajt_'+aTabs[i],'#F4F3EE');
  }
  }
 
 
  var jjError = \ERRORES en el FORMULARIO:\\n\;
  var jFirstTab = '';
  var jFirstField = '';
 
  //alert(gaValMsg.toString());
 
  for (var i in lVal.errorMap)
  {
  jCamp = i;
  jErrorMsg = lVal.errorMap[i];
  /**
   * controlem el tema de que sigui un error de
   * de formulari bpwc_jsForm
   */
  if (i == 'bpwc_jsForm'  jErrorMsg.substring(0,1) == '|')
  {
  jaMsg = jErrorMsg.split('|');
  //alert(jaMsg.toString());
  jCamp = jaMsg[1];
  jErrorMsg = jaMsg[2];
  }
 
  /**
   * carreguem el missatge d'error
   * i ens guardem a quin tab i quin
   * camp es el primer.
   */
  jjError = jjError + jErrorMsg + \\\n\;
  ajtabbar.setCustomStyle('ajt_'+aFldTabs[jCamp],'red');
  if (jFirstTab == '')
  {
  jFirstTab = 'ajt_'+aFldTabs[jCamp];
  jFirstField = jCamp;
  }
 
  }
  ajtabbar.setTabActive(jFirstTab,true);
  document.getElementById(jFirstField).focus();
  ajtabbar.setCustomStyle(jFirstTab,'red');
  alert(jjError);
 
   });
 
 
  Thanks for all
 
 
  --
  Atentament / Kind Regards
 
  Àlex Corretgé
  Serveis Informàtics Corretgé.com SLU
  http://corretge.cat/
 
  LinkedIn: http://www.linkedin.com/in/corretge
 
 
  2008/10/24 Jörn Zaefferer [EMAIL PROTECTED]
 
  Fixed!
 
  You're welcome to test it before the next release, you can find the
  latest revision here:
  http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/
 
  Jörn
 
  On Thu, Oct 23, 2008 at 10:49 PM, Àlex Corretgé [EMAIL PROTECTED]
  wrote:
   Ok Jörn,
  
   issue created
  
   http://dev.jquery.com/ticket/3516
  
   thanks for all
  
  
  
   --
   Atentament / Kind Regards
  
   Àlex Corretgé
   Serveis Informàtics Corretgé.com SLU
   http://corretge.cat/
  
   LinkedIn: http://www.linkedin.com/in/corretge
  
  
  
   2008/10/22 Jörn Zaefferer [EMAIL PROTECTED]
  
   Apart from the fact that this event needs to get exposed as an
   option,
   its also a bug that it isn't triggered by the remote method. Could
   you
   file a ticket for this? http://dev.jquery.com/newticket (requires
   registration)
  
   Thanks!
  
   Jörn
  
   On Wed, Oct 22, 2008 at 10:47 AM, corretge [EMAIL PROTECTED]
 wrote:
   
Hi, I try to show a list of errors in an alert box when the form
 is
cancelled by jQuery Validator.
   
Surfing the web I see that I can use invalid-form.validate like
this:
   
   
   $('#bpwcForm').bind('invalid-form.validate',
function(e,
validator)
   {
   var errors = validator.numberOfInvalids();
   alert('ERR ' + errors);
   
});
   
   

[jQuery] Re: Remove() xml nodes doesnt work in ie

2008-11-05 Thread ngjgf

Yeah seems its a bug, http://dev.jquery.com/ticket/3521

As a work around I just used removeChild. For example:

var elementToRemove = $(this.xmlDoc).find(gd  cd  uid);
elementToRemove .parentNode.removeChild(elementToRemove );


[jQuery] Re: jquery ui tabs - screen jumps to top when clicked

2008-11-05 Thread Klaus Hartl

I've also just committed a fix that handles the jumping - as long as
you're not using a slide effect for tabs on a scrolled down page. The
reason is that the height of the page is changed by the slide, thus
affecting the scrollbar which is not put back into its former state
after the animation is completed.

The workaround described above will still apply in that case.

--Klaus


On 2 Nov., 22:20, Ed [EMAIL PROTECTED] wrote:
 XS emailed me a solution. It worked!!!

 How to stop screen from jumping up when tab is clicked:

 Wrap the div that contains the tabs in a div with a fixed height.

 See example here:http://5bosses.com/examples/tabs/sample_tabs.html

 On Nov 1, 10:25 am, Ed [EMAIL PROTECTED] wrote:

  Klaus,

  Do you see any errors in my example? I added your code and double
  checked everything (w/ firebug).

  Clicking the tabs still causes the page to jump to top.

  Can you take a look?  What am I doing wrong?

 http://5bosses.com/examples/tabs/sample_tabs.html

  -Ed

  On Oct 31, 8:13 am, Klaus Hartl [EMAIL PROTECTED] wrote:

   Well, you copied that stuff into the wrong place producing a syntax
   error, thus the tabs don't work at all. Just append what I posted to
   the end of the ui.tabs.js file or paste it into a separate file and
   include it after the ui.tabs.js.

   You should use Firebug - or at least the error console - to get
   informed of such JavaScript errors.

   --Klaus

   On 31 Okt., 10:11, Nicky [EMAIL PROTECTED] wrote:

Thanks Klaus!

It didn't fix the problem for me, my example still jumps to the 
top:http://www.sandstream.se/tabs_test3.html

As you say one solution might be to make the tabs the same hight by
putting content of the same size in them.

If you find another solution please let me know.

//Sandstream


[jQuery] please help with accordion

2008-11-05 Thread powrtoch


sorry to repost, but i'm really stumped on this one. what ive got is a very
basic accordion menu, but it performs really strangely in IE 7, shifting the
entire document below it and just looking terrible. you can see the problem
at

http://www.bulldogbucks.uga.edu/index2.html

and a basically-identical, but not integrated into any page, working version
at

http://www.bulldogbucks.uga.edu/accordion/jquery.accordion/jquery-accordion/demo/

any advice you can give me would be really appreciated, thanks!
-- 
View this message in context: 
http://www.nabble.com/please-help-with-accordion-tp20343174s27240p20343174.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: JQuery Countdown

2008-11-05 Thread ricardobeat

That code works straight away.

All you need is

html
head
script etc etc
script type=text/javascript
$(document).ready(function(){
  $('#count').countdown({until: liftoffTime, format: 'yODHMS',
layout: 'ul%Yli%n %l/li%Y%Oli%n %l/li%O%Dli%n %l/li
%D' + '%Hli%n %l/li%H%Mli%n %l/li%M%Sli%n %l/li%S/ul'});

});
/script
/head
body

   div id=count/div

/body
/html

On Nov 5, 12:49 am, ami'n [EMAIL PROTECTED] wrote:
 Is there any workaround for this

 i wonder why i'm still unable to make it work?

 $(function(){
         $('#countdown2').countdown({until: '+7D +7H +22M +56S ', format:
 'yODHMS', layout: '%S%n %l%S, %M%n %l%M, %H%n %l%H, and %D%n %l%D'});

 });

 there's still an error

 On Oct 29, 5:17 pm, B3 [EMAIL PROTECTED] wrote:

  I'm trying to get thecountdownfromhttp://keith-wood.name/countdown.html
  working but i just dont understand the directions. is you scroll down
  some to the Usage section step 3 is where I get confused.  Could
  someone explain what the directions mean by Connect thecountdown
  functionality to your divs and also where I put the javascript, what
  I put on the HTML side?

  The type ofcountdownI'm trying to get to work is the Unordered List
  which is
  $('#listLayout').countdown({until: liftoffTime, format: 'yODHMS',
      layout: 'ul%Yli%n %l/li%Y%Oli%n %l/li%O%Dli%n %l/li
  %D' +
      '%Hli%n %l/li%H%Mli%n %l/li%M%Sli%n %l/li%S/ul'});

  but just confused where everything goes and how to get it to work.


[jQuery] Re: jCarousel, localScroll, other options?

2008-11-05 Thread Ariel Flesler

Maybe SerialScroll ?

--
Ariel Flesler
http://flesler.blogspot.com

On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote:
 Here is my issue, I have used jCarousel to accomplish what I need...
 however the markup is bothering my anal tendencies for pure
 semantics.

 I'm using jCarousel to scroll content blocks in a sexy way, however,
 in order to use jCarousel I must have my content blocks inside a list,
 each as a list item. This validates, and is functioning exactly how I
 want it to, however I can't get past the fact that this markup doesn't
 make sense.

 LocalScroll is my other option, but it doesn't slide sexy the way
 jCarousel does. Does anyone have any advice?

 Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm

 Thanks!

 - C


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread brian


 It's not a failure to run a query and find nothing - that's a
 perfectly valid use case.

I understand where you are coming from on the querying side, but
shouldn't calling a method on an empty object fail?  How can I fade
in...nothing?

I'm going to still think of this as a huge design flaw.

There needs to be a way to specify that it should fail on empty
results.  /s for strict or whatever.

This post is for 1) bitching purposes and 2) indexing purposes so that
future searchers find definitive proof that jquery fails silently and
that this is not considered a bug, despite obvious appearances.


[jQuery] [validate] remote issue

2008-11-05 Thread Alexsandro_xpt

Why validate at http://www.assessoriatecnica.com.br fire submit event
before remote is valid?


[jQuery] Re: Can Jquery fetch file, and display download dialog?

2008-11-05 Thread Bil Corry

tlphipps wrote on 11/5/2008 8:45 AM: 
 The default action for handling .mp3 downloads is determined by the
 user's browser and you cannot change that from your end.  But you can
 create specific server-side headers that will instruct the browser to
 download the file as an 'attachment' instead of trying to simply open
 the document.
 
 The specific headers you need are:
 Content-Disposition: attachment; filename=01-01-08-PM.mp3

There are a couple of new header options recognized by IE8 that improve 
security for IE and tell it to force download.  They look like this:

Content-Type: audio/mpeg; authoritative=true;
X-Download-Options: noopen

You can read about authoritative=true; and X-Download-Options here:


http://blogs.msdn.com/ie/archive/2008/07/02/ie8-security-part-v-comprehensive-protection.aspx


- Bil



[jQuery] Re: remote issue

2008-11-05 Thread Alexsandro_xpt

P.S.

I am mean about NewsLetter Form, find it on middle of the page in the
next text Receba nosso informativo por e-mail:


Thz.



On 5 nov, 13:17, Alexsandro_xpt [EMAIL PROTECTED] wrote:
 Inhttp://jquery.bassistance.de/validate/demo/milk/valid on key down
 events, how is it work?

 On 5 nov, 13:15, Alexsandro_xpt [EMAIL PROTECTED] wrote:

  Why validate athttp://www.assessoriatecnica.com.brfiresubmit event
  before remote is valid?


[jQuery] Re: Advice on sIEve/Drip?

2008-11-05 Thread Josh Nathanson


An important aspect of this is to focus on what happens when you reload the 
page or navigate away.  If the memory drops back down to its original state, 
you have helped the end user by not leaving them a legacy of used memory. 
It's much more difficult to try and keep memory from climbing in the first 
place.  If you can make it so the memory is reclaimed when you unload the 
page, you have gone a long way in helping the user.


-- Josh



- Original Message - 
From: trixta [EMAIL PROTECTED]

To: jQuery (English) jquery-en@googlegroups.com
Sent: Wednesday, November 05, 2008 6:14 AM
Subject: [jQuery] Re: Advice on sIEve/Drip?





On Nov 4, 12:20 am, Jeffrey Kretz [EMAIL PROTECTED] wrote:

OUCH.

With over 25,000 lines of javascript code (full featured CMS) that's a
nightmare to track down.

Am I out of luck? Are there no other alternative tools like sIEve that are
still in development?



Hi,

there is another tool by microsoft, you can try:
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

but this tool doesn´t find all memory leaks.

this jquery-related info could be helpfull, too:
http://groups.google.com/group/jquery-dev/browse_thread/thread/4a99f6e9b2e33057/30099a04db7f87b9
http://www.outsidethediv.com/2008/10/removechild-vs-the-garbage-bin/

One last advice. You don´t have to fix all memory leaks in IE6. It
really depends on the cost-benefit-ratio (hard effort/work to fix it
vs. noticeable advancement for the enduser).

regards
alex 



[jQuery] Re: remote issue

2008-11-05 Thread Alexsandro_xpt

In http://jquery.bassistance.de/validate/demo/milk/ valid on key down
events, how is it work?




On 5 nov, 13:15, Alexsandro_xpt [EMAIL PROTECTED] wrote:
 Why validate athttp://www.assessoriatecnica.com.brfire submit event
 before remote is valid?


[jQuery] Best event for changing the content of a div?

2008-11-05 Thread the_woodsman

Hi,

I want to change the content of a div asap.

I know about document.ready, but if possible I'd rather do this
earlier. I'd also rather do it as an event instead of loading a script
file after the div appears in the page.

I tried the load() event, but this didn't seem to fire at all.

Anyone got any tips on this?


[jQuery] Re: Best event for changing the content of a div?

2008-11-05 Thread Klaus Hartl

If you don't want to put a script after the div it won't get any
faster then DOM ready.

You could although poll for that element. Say it had an id of
'asap' (untested):

(function() {
var f = function() {
var div = document.getElementById('asap');
if (div) {
// alter content here...
} else {
setTimeout(f, 30);
}
};
f();
})();


--Klaus


On 5 Nov., 16:30, the_woodsman [EMAIL PROTECTED] wrote:
 Hi,

 I want to change the content of a div asap.

 I know about document.ready, but if possible I'd rather do this
 earlier. I'd also rather do it as an event instead of loading a script
 file after the div appears in the page.

 I tried the load() event, but this didn't seem to fire at all.

 Anyone got any tips on this?


[jQuery] [datepicker] 26 october occuring two times: datepicker bug?

2008-11-05 Thread Gauthier Segay

Hello,

I've weird thing with datepicker, my dates are offset by one day (13
november 2008 is friday), when checking where the inconsistency come,
I've find that 26 october is occuring twice.

Here is how I instanciate datepicker :

$('myselector').datepicker({dateFormat:'dd/mm/yy'});

Does the fact that the UTC offset changed (daylight saving time) at
this very date is a reason for such bug? any idea how can I workaround
it?

Thanks


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Richard D. Worth
On Wed, Nov 5, 2008 at 10:08 AM, brian [EMAIL PROTECTED]wrote:



  It's not a failure to run a query and find nothing - that's a
  perfectly valid use case.

 I understand where you are coming from on the querying side, but
 shouldn't calling a method on an empty object fail?  How can I fade
 in...nothing?


The same way you can write a for-loop to loop over every item in an array of
integers and sum their values all together. If the array you provide to the
loop has a length 0, your sum is zero. Does that mean your loop should fail
because it went through 0 iterations?

You can read it as Fade in any elements that match this query at this
time.



 I'm going to still think of this as a huge design flaw.


I have to disagree on this being a design flaw. This is one of my favorite
design features of jQuery. I often think of it like SQL. You might construct
a SQL statement like

DELETE FROM tblUsers WHERE userid = 18

or

UPDATE tblUsers SET age=5 WHERE age=4

If no records match the query, nothing happens. But that doesn't make the
query or the statement invalid. Neither do you get an exception/warning. So
the $(selector) part of jQuery is like the WHERE clause, and the method you
call is like the DELETE, or UPDATE, SET.

Wouldn't the alternative be that you would have to check the length of the
jQuery object before every single method call?

- Richard


[jQuery] Re: Cycle Plug-in works with ajax on first call, not on subsquent calls

2008-11-05 Thread pedalpete

My apologies Mike,

I am using firebug with Firefox, and hadn't seen that error in quite a
while, I then realized that from my first post on this subject to when
you re-requested the url, I had re-introduced the error on the testing
site.

Now combining the fix with stopping and emptying the cycle, it all
seems to be working.

Thanks Mike, this plug-in is awesome!

On Nov 5, 4:14 am, Mike Alsup [EMAIL PROTECTED] wrote:
  Thanks Mike, here's the link and a description of how to get it to not
  work..

 http://zifimusic.com/cycle

 I'm guessing that you're not using Firefox with Firebug.  If you were,
 you could set a breakpoint and see that your 'allPops' div contains
 only a single element after the ajax call, so the markup is not as you
 expect when you callcyclethe 2nd time.  In addition,cyclelogs this
 message:

 [cycle] terminating; too few slides: 1

 Mike


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Jeffrey Kretz

Richard is exactly correct IMO.

The separation of HTML and Javascript allows you do write more general
javascript in attached scripts that can be applied to any page.

$('img.ihover').hover( /* Do stuff */ );

Any pages with image class=ihover will get the hover function.

Nothing will happen on pages with NO images that fit that criteria.

At any time you MUST have a result, you can do something like this:

var imgs = $('img.ihover');
if (!imgs.length)
{
   alert('No hover images found!');
}

It leaves it up to the developer to decide which selections are required and
which aren’t.

This isn't a flaw at all, it is part-and-parcel to the jquery philosophy:

1. Grab some elements
2. Do something to them.

JK




From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard D. Worth
Sent: Wednesday, November 05, 2008 8:22 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Can I make jquery not fail silently??


On Wed, Nov 5, 2008 at 10:08 AM, brian [EMAIL PROTECTED]
wrote:


 It's not a failure to run a query and find nothing - that's a
 perfectly valid use case.
I understand where you are coming from on the querying side, but
shouldn't calling a method on an empty object fail?  How can I fade
in...nothing?

The same way you can write a for-loop to loop over every item in an array of
integers and sum their values all together. If the array you provide to the
loop has a length 0, your sum is zero. Does that mean your loop should fail
because it went through 0 iterations?

You can read it as Fade in any elements that match this query at this
time.
 

I'm going to still think of this as a huge design flaw.

I have to disagree on this being a design flaw. This is one of my favorite
design features of jQuery. I often think of it like SQL. You might construct
a SQL statement like

DELETE FROM tblUsers WHERE userid = 18

or

UPDATE tblUsers SET age=5 WHERE age=4

If no records match the query, nothing happens. But that doesn't make the
query or the statement invalid. Neither do you get an exception/warning. So
the $(selector) part of jQuery is like the WHERE clause, and the method you
call is like the DELETE, or UPDATE, SET.

Wouldn't the alternative be that you would have to check the length of the
jQuery object before every single method call?

- Richard



[jQuery] Re: Trying to grasp basics of scrolling a TBODY

2008-11-05 Thread Jeffrey Kretz
Cool,

 

Glad you got it sorted out.

 

JK

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kenneth Downs
Sent: Wednesday, November 05, 2008 5:06 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Trying to grasp basics of scrolling a TBODY

 

Jeffrey Kretz wrote: 

Ken,

 

Do you have a test case page online somewhere I could take a look at?

 

I've successfully implemented a scrollTo-type function using offsets and
rows, and if I can see the page you're working with I might be able to
suggest something.


Jeffrey, thanks but I actually figured it out.  I made up a simple test,
which I'll be happy to post probably tomorrow.

What I realized is that there were a few more steps than I thought.  I had
figured that a TR would get an offset() automatically with respect to its
TBODY.  Instead I found I had to get the offset()  (or position, I forget
which one) for several items, and do a little arithmetic to get the position
of the TR relative to its TBODY.  Once I figured that out the remaining
arithmetic was fairly straightforward.

Also I realized I had to take into account the height of the TR, otherwise I
would scroll to the top of it and it would still be invisible :)




 

JK

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Kenneth Downs
Sent: Sunday, November 02, 2008 3:58 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Trying to grasp basics of scrolling a TBODY

 

Dan Switzer wrote: 

Ken,

 

I'm trying to grasp the basics of scrolling to a particular row in a
TABLE.

Let's say you've got a TABLE, with a TBODY that has a fixed height and
overflow: scroll.

It appears I ought to be able to use core functions like offset() and
scrollTop() to work out where a row is and scroll the TBODY to that
position, but lots of trial and error has left me lost on why these
things don't seem to work as I expect.

The particular case I am looking at involves the user using arrow keys
to navigate up and down.  Its easy enough to use .next() to highlight
the next row, but if a user keeps doing it, and the next row is below
the viewable scroll region, I need to be able to slide up the display
to show the highlighted row.

This is an educational venture, not a practical one, I'd like to
understand it myself, not find and use a plugin that does it already.


Scrolling with the TBODY tag is spotty. IE6 doesn't support it at all--you
need to place your table in a DIV that has a fixed height and overflow set
to scroll.


Thankfully I have no interest in IE 6 :)

I currently have the DIV system you describe.  My best construction of why
it does not work is this:

1) There is a div that represents TBODY.  It has clear:both as a CSS row
2) Each row is a div inside of the TBODY div
3) Each cells must be a div, firefox does not support widths on spans
(don't know about IE, doesn't matter if firefox won't do it)
4) The cells must be float: left
5) ...and at the end I get .offset() returning meaningless numbers for the
row divs.  All divs in the body return 0 as the offset.
6) For good measure, the .scrollTo() extension does not work at all on this
simulated TABLE, which I suspect is related to these bogus numbers.
7) I *think* the clear:both on the tbody div is causing this, but I really
don't know

So I monkeyed up a TABLE by hand and found all of the .offset() and related
functions appear to be giving real results, I just can't quite connect the
dots on how to put it all together.

FWIW, the only reason I used the entire simulated TABLE was because IE 7
does not support onclick() on a TR.  But I can just as well put the onclick
on TD elements and get where I need to go using a TABLE, if only I could
connect the dots on the scrolling stuff.






I'm not sure what browsers you're targeting, but if IE6 was one you were
having problems with, this is why.

-Dan







-- 
Kenneth Downs
Secure Data Software, Inc.
www.secdat.comwww.andromeda-project.org
631-689-7200   Fax: 631-689-0527
cell: 631-379-0010






-- 
Kenneth Downs
Secure Data Software, Inc.
www.secdat.comwww.andromeda-project.org
631-689-7200   Fax: 631-689-0527
cell: 631-379-0010


[jQuery] Accordion activate not working

2008-11-05 Thread KCWebMonkey

I have an accordion which i am trying to activate on page load, and
the .activate function doesn't appear to be working. can someone show
me how i'm implementing it incorrectly?

JavaScript:

$(document).ready(function() {
$('#childnav').accordion({
autoheight: false,
header: '.toggle',
event: 'click',
alwaysOpen: true,
active: false
});

$(.toggle).activate(0);
});

HTML:

ul id=childnav
li id=childnav_about
div style=width:277px;height:5px;background:#014F75;/div
a href=# class=togglespanAbout Us/span/a
ul class=childnav_sub
lia href=#Link 1/a/li
lia href=#Link 2/a/li
/ul
/li
li id=childnav_homes
img src=/images/childnav_spacer.jpg alt= /
a href=# class=togglespanNew Homes/span/a
ul class=childnav_sub
lia href=#another link/a/li
lia href=#another link/a/li
/ul
/li
li id=childnav_community
img src=/images/childnav_spacer.jpg alt= /
a href=# class=togglespanThe Community/span/a
ul class=childnav_sub
lia href=#Arial PhotoGraph/a/li
lia href=#Amenities/a/li
lia href=#Schools/a/li
lia href=#Utilities/a/li
/ul
/li
li id=childnav_news
img src=/images/childnav_spacer.jpg alt= /
a href=# class=togglespanNews amp; Events/span/a
ul class=childnav_sub
lia href=#Link 1/a/li
lia href=#Link 2/a/li
lia href=#Link 1/a/li
lia href=#Link 2/a/li
lia href=#Link 1/a/li
lia href=#Link 2/a/li
/ul
/li
li id=childnav_contact
img src=/images/childnav_spacer.jpg alt= /
a href=# class=togglespanContact Us/span/a
ul class=childnav_sub
lia href=#Link 1/a/li
lia href=#Link 2/a/li
lia href=#Link 1/a/li
/ul
/li
/ul


[jQuery] on click doesn't work!

2008-11-05 Thread Miri

Hi everyone!
I've been trying to find the problem in the code below, but I have no
idea what it is.
The problem is with the on click option - it just doesn't work..
Can anyone please help me?!?!
Thanks very much in advance..
Miri.

The code:
#
div id=myform
#
  h3Do you want to subscribe to our newsletter?/h3
#

#
  form
#
input onclick=javascript: $('#email').show('slow');
type=radio name=subscribe value=1 /
#
labelYes, I want to subscribe/label
#
br /
#

#
input onclick=javascript: $('#email').hide('slow');
type=radio name=subscribe value=0 /
#
labelNo, thanks/label
#
br /
#

#
div id=email
#
  labelEmail Address: /label
#
  input name=email type=text /
#
/div
#
  /form
#
/div


[jQuery] Day and Month Picker

2008-11-05 Thread Rob Bazinet

Hello;

I am new here, sorry if this may have been covered before but my
searching on the group did not return anything useful.

I need to be able to allow entry of just the month and day of a date,
no year.  I am aware of DatePicker but it doesn't seem to allow this.
Is there a way, using jQuery or a plugin, to accomplish this?

Right now I have two drop down lists, one for Month and the other for
Day but no validation is implemented for an invalid number of days in
a month if the user chooses Sept, they can choose 31 as the day.  I am
looking for the recommended best approach for this.

Thank you,
   Rob Bazinet


[jQuery] [validate] Issues using requred:#radio:checked with custom AddMethid validator

2008-11-05 Thread Pezza

Hi

Using JQuery + Validate plugin. When I create a new custom rule using
a call to addMethod then use required:myradio:checked it will always
trigger the validation to fail even if the radio is unchecked. This
behaviour does not occur when you use the built in validation methods.

$.validator.addMethod(dropdown, function(value, element) {
 return element.selectedIndex0;
},'');

$(#myform).validate({
rules:{
mydropdown:{required:#myradio:checked,dropdown:true}
}
});

So even when #myradio is NOT checked the rule is saying that
validation has failed. What I would like to happen would be for
validated to check the required rule first, if the radio is
unchecked then it should return valid and drop calls to any other
validation methods.

Any ideas or have I got something backwards.

Thanks


[jQuery] Re: remove() Method Causes Flicker in Firefox

2008-11-05 Thread Joe

Any ideas on this?  Still stuck...

On Nov 1, 4:33 pm, Joe [EMAIL PROTECTED] wrote:
 I have to remove it, because the code directly following shows it
 loading the new image and appending it to the parent div.  So in order
 for the image that was faded out to not be there, it has to be
 removed.  Once all the rows of the table have been clicked on, they
 images are cached and then I can just alter the src attribute's
 value for the image.

 As far as the dimensions are concerned, I disagree.  The flicker only
 occurs in Firefox, and moreover, the images are dynamically created
 with a php script in the CMS that I built.  They all can't be the same
 size, because the images will never all be the same size, and in order
 to keep the aspect ratio intact, I have to allow them to have
 different widths and heights.

 So thanks for the suggestion, but still having an issue.

 And I'm glad you like the site...my own creation on the front end and
 all the work on the back end as well.

 Cheers.

 Joe

 www.subprint.com

 On Nov 1, 1:43 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:

  Not sure why you wouldremovethe photo... What happens when you hide
  it.

  On my G4 mac everything looks good except on the photo of Little Dave
  Thompson. It moves up and down as it comes in. Noflickerbut it
  doesn't look right.

  I think your problem is related to different dimension in your images.
  When you display Little Dave Thompson you are removing an image with
  different height dimensions. I'd recommend keep heights and widths the
  same on all images. No need toremoveimages either. Just hide them,
  check to see if they are there before you load them. (Easy to do in
  JQuery)

  The website looks great BTW. I have my own band (http://
  RodeoClownsBand.com)

  Regards,

  -b

  On Oct 31, 3:18 pm, Joe [EMAIL PROTECTED] wrote:

   Go here:

  http://www.theshedbbq.com/dev/franchise/events

   Click on one of the rows in the table and you'll see the image fade
   out and thenflicker.

   var livePhoto = $('img#eventImage');
   livePhoto.fadeOut('fast');
   livePhoto.remove();

   Not sure what is causing this but I use
   setTimeout( livePhoto.remove(), 50 but it did not work.

   Suggestions?


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Mike Alsup

 I have to disagree on this being a design flaw. This is one of my favorite
 design features of jQuery. I often think of it like SQL. You might construct
 a SQL statement like


I agree 100% with Richard.

One of the defining design characteristics of jQuery is how it
embodies implicit iteration.  So I can write this:

$('div').hide();

to hide all the divs on the page.  It doesn't matter if there are zero
divs or 100, they are all hidden.  Of course if I have a typo in my
code and execute something like this:

$('divv').hide();

no divs will be hidden.  But that does not make this a design flaw.
It makes it a typo.

Mike





[jQuery] Re: on click doesn't work!

2008-11-05 Thread Andy Matthews

It might help if you moved the jQuery code out of the HTML. It would help
you focus on each seperately which could assist you in finding the problem.
Plus, if you're just going to use jQuery inline, then why bother with using
it at all?


andy

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Miri
Sent: Wednesday, November 05, 2008 10:53 AM
To: jQuery (English)
Subject: [jQuery] on click doesn't work!


Hi everyone!
I've been trying to find the problem in the code below, but I have no idea
what it is.
The problem is with the on click option - it just doesn't work..
Can anyone please help me?!?!
Thanks very much in advance..
Miri.

The code:
#
div id=myform
#
  h3Do you want to subscribe to our newsletter?/h3 #

#
  form
#
input onclick=javascript: $('#email').show('slow');
type=radio name=subscribe value=1 / #
labelYes, I want to subscribe/label #
br /
#

#
input onclick=javascript: $('#email').hide('slow');
type=radio name=subscribe value=0 / #
labelNo, thanks/label
#
br /
#

#
div id=email
#
  labelEmail Address: /label
#
  input name=email type=text / #
/div
#
  /form
#
/div




[jQuery] Re: on click doesn't work!

2008-11-05 Thread MorningZ

Juts like Andy says

http://pastebin.com/m4cbd67f

btw, you wanted to use change, not click   (as my code shows and
works)



On Nov 5, 12:49 pm, Andy Matthews [EMAIL PROTECTED] wrote:
 It might help if you moved the jQuery code out of the HTML. It would help
 you focus on each seperately which could assist you in finding the problem.
 Plus, if you're just going to use jQuery inline, then why bother with using
 it at all?

 andy

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of Miri
 Sent: Wednesday, November 05, 2008 10:53 AM
 To: jQuery (English)
 Subject: [jQuery] on click doesn't work!

 Hi everyone!
 I've been trying to find the problem in the code below, but I have no idea
 what it is.
 The problem is with the on click option - it just doesn't work..
 Can anyone please help me?!?!
 Thanks very much in advance..
 Miri.

 The code:
 #
 div id=myform
 #
   h3Do you want to subscribe to our newsletter?/h3 #

 #
   form
 #
     input onclick=javascript: $('#email').show('slow');
 type=radio name=subscribe value=1 / #
     labelYes, I want to subscribe/label #
     br /
 #

 #
     input onclick=javascript: $('#email').hide('slow');
 type=radio name=subscribe value=0 / #
     labelNo, thanks/label
 #
     br /
 #

 #
     div id=email
 #
       labelEmail Address: /label
 #
       input name=email type=text / #
     /div
 #
   /form
 #
 /div


[jQuery] Re: [validate] Issues using requred:#radio:checked with custom AddMethid validator

2008-11-05 Thread Jörn Zaefferer
You have to modify your method to make it optional, like this:

$.validator.addMethod(dropdown, function(value, element) {
return this.optional(element) || element.selectedIndex0;
},'');

Jörn

On Wed, Nov 5, 2008 at 6:23 PM, Pezza [EMAIL PROTECTED] wrote:

 Hi

 Using JQuery + Validate plugin. When I create a new custom rule using
 a call to addMethod then use required:myradio:checked it will always
 trigger the validation to fail even if the radio is unchecked. This
 behaviour does not occur when you use the built in validation methods.

 $.validator.addMethod(dropdown, function(value, element) {
 return element.selectedIndex0;
 },'');

 $(#myform).validate({
rules:{
mydropdown:{required:#myradio:checked,dropdown:true}
}
 });

 So even when #myradio is NOT checked the rule is saying that
 validation has failed. What I would like to happen would be for
 validated to check the required rule first, if the radio is
 unchecked then it should return valid and drop calls to any other
 validation methods.

 Any ideas or have I got something backwards.

 Thanks



[jQuery] Re: Best event for changing the content of a div?

2008-11-05 Thread Chris

I could be mistaken here, but doesn't jQuery (or javascript for that
matter) need the DOM to be loaded before you can start selecting
things from it?
You could put the script elsewhere on the page, but you're still going
to have to wait for that div to load before you can change its
contents. If you to insert content before the page loads, you're going
to have to use some server-side programming, not javascript.

- Chris


On Nov 5, 11:12 am, Klaus Hartl [EMAIL PROTECTED] wrote:
 If you don't want to put a script after the div it won't get any
 faster then DOM ready.

 You could although poll for that element. Say it had an id of
 'asap' (untested):

 (function() {
     var f = function() {
         var div = document.getElementById('asap');
         if (div) {
             // alter content here...
         } else {
             setTimeout(f, 30);
         }
     };
     f();

 })();

 --Klaus

 On 5 Nov., 16:30, the_woodsman [EMAIL PROTECTED] wrote:

  Hi,

  I want to change the content of a div asap.

  I know about document.ready, but if possible I'd rather do this
  earlier. I'd also rather do it as an event instead of loading a script
  file after the div appears in the page.

  I tried the load() event, but this didn't seem to fire at all.

  Anyone got any tips on this?




[jQuery] Re: Clone problem in IE...

2008-11-05 Thread Rafael Soares
I had a similar problem...
The difference is that I'm trying to clone the file input inside the same
document, just another, hidden, form.
I found a workaround, but I don't know if it'll work for you as well.

Since I was going to clear the form after the whole thing anyway, I decide
to do the inverse: append the original input to the new form, then clone it
and then append the clone to the original form.
It's kinda messy, but worked for me. Of course I'm doing this only in IE,
other browsers use the normal procedure.

Hope it helps.

Rafael Soares


On Thu, Jul 24, 2008 at 12:10, Marcus Eby [EMAIL PROTECTED] wrote:


 I just found out that cloneNode doesn't pass the value in a file field
 when being cloned from inside an iframe in IE.
 Apparently this is an IE bug, and I've tried over 15 different ways of
 trying to clone the object, then change the values, and update the
 values, and even changing them before they get cloned, but nothing
 works.

 After trying so many different options, and still having no value
 being cloned, so that the function won't work, I have given up.

 If anyone else has had this problem and solved it, please post.

 After spending years hating IE, this has definitely helped me to start
 thinking about FF only site-app design. grin

 Thanks

 Marcus



[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Balazs Endresz

You can still write a simple plugin:

jQuery.fn.fail=function(){ return this.length ? this : null; }

Now $('#non-existing-id').fail().toggle() will fail,
but will work if it's not empty.

Consider this for example:
$('#non-existing-id').add('.anotherClass');
if it failed you cannot add other elements to the empty set
and you can't even write a plugin like this one above.

On Nov 5, 10:08 am, brian [EMAIL PROTECTED] wrote:
  It's not a failure to run a query and find nothing - that's a
  perfectly valid use case.

 I understand where you are coming from on the querying side, but
 shouldn't calling a method on an empty object fail?  How can I fade
 in...nothing?

 I'm going to still think of this as a huge design flaw.

 There needs to be a way to specify that it should fail on empty
 results.  /s for strict or whatever.

 This post is for 1) bitching purposes and 2) indexing purposes so that
 future searchers find definitive proof that jquery fails silently and
 that this is not considered a bug, despite obvious appearances.


[jQuery] Check if remote file exists.

2008-11-05 Thread Genu

Is it possible to use jquery to check of remote file (url) exists or
not. For example, I have this url:

http://www.myserver.com/media/test.mp3

can I use a jquery http request to see if the url is valid or not?



[jQuery] Re: Check if remote file exists.

2008-11-05 Thread Andy Matthews

I think if you use the $.ajax method, you can implement the built in failure
method and go from there.


andy 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Genu
Sent: Wednesday, November 05, 2008 12:54 PM
To: jQuery (English)
Subject: [jQuery] Check if remote file exists.


Is it possible to use jquery to check of remote file (url) exists or not.
For example, I have this url:

http://www.myserver.com/media/test.mp3

can I use a jquery http request to see if the url is valid or not?




[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread ricardobeat

Hey Brian, try this:

jQuery.oldfind = jQuery.find;
jQuery.find = function(t,con){
var f = jQuery.oldfind(t,con);
if (f.length == 0) throw('Empty query');
}

cheers,
- ricardo

On Nov 5, 1:08 pm, brian [EMAIL PROTECTED] wrote:
  It's not a failure to run a query and find nothing - that's a
  perfectly valid use case.

 I understand where you are coming from on the querying side, but
 shouldn't calling a method on an empty object fail?  How can I fade
 in...nothing?

 I'm going to still think of this as a huge design flaw.

 There needs to be a way to specify that it should fail on empty
 results.  /s for strict or whatever.

 This post is for 1) bitching purposes and 2) indexing purposes so that
 future searchers find definitive proof that jquery fails silently and
 that this is not considered a bug, despite obvious appearances.


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread brian


 Now $('#non-existing-id').fail().toggle() will fail,
 but will work if it's not empty.

That's actually right on the money.  Thanks.

//Still thinks fail silently on id queries is insane, but knows a
religious argument when he sees one.


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread ricardobeat

oops, missed a line:

jQuery.oldfind = jQuery.find;
jQuery.find = function(t,con){
var f = jQuery.oldfind(t,con);
if (f.length == 0) throw('Empty query');
return f;
}


On Nov 5, 5:10 pm, ricardobeat [EMAIL PROTECTED] wrote:
 Hey Brian, try this:

 jQuery.oldfind = jQuery.find;
 jQuery.find = function(t,con){
     var f = jQuery.oldfind(t,con);
     if (f.length == 0) throw('Empty query');

 }

 cheers,
 - ricardo

 On Nov 5, 1:08 pm, brian [EMAIL PROTECTED] wrote:

   It's not a failure to run a query and find nothing - that's a
   perfectly valid use case.

  I understand where you are coming from on the querying side, but
  shouldn't calling a method on an empty object fail?  How can I fade
  in...nothing?

  I'm going to still think of this as a huge design flaw.

  There needs to be a way to specify that it should fail on empty
  results.  /s for strict or whatever.

  This post is for 1) bitching purposes and 2) indexing purposes so that
  future searchers find definitive proof that jquery fails silently and
  that this is not considered a bug, despite obvious appearances.


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread ricardobeat

That 'religious' bit is a bit offensive don't you think? There are
good reasons for failing silently as Mike, Richard and Jeffrey have
pointed out. The fact you don't accept/understand them doesn't make
their (and mine) opinions less empirical.

- ricardo

On Nov 5, 5:10 pm, brian [EMAIL PROTECTED] wrote:
  Now $('#non-existing-id').fail().toggle() will fail,
  but will work if it's not empty.

 That's actually right on the money.  Thanks.

 //Still thinks fail silently on id queries is insane, but knows a
 religious argument when he sees one.


[jQuery] Re: Advice on sIEve/Drip?

2008-11-05 Thread Jeffrey Kretz

Thanks a bunch for that link, also Josh for your advice.

After running this leak detector, nothing found as well.

Also, the 300MB leak hasn't recurred since that one time.

My current best guess is that the leaks occurred while I was debugging
javascript code and refreshing the page -- so the leaks were probably due to
bad code since fixed.  But since it was the same browser session refreshed
again and again, leaked DOM memory wasn't reclaimed until I closed and
re-opened the browser.

Anyway, I'll keep an eye on it, but I've got some good tools to help, and
jQuery is itself excellent at GC anyway so I hopefully won't run into a
problem.

Thanks again,
JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of trixta
Sent: Wednesday, November 05, 2008 6:15 AM
To: jQuery (English)
Subject: [jQuery] Re: Advice on sIEve/Drip?




On Nov 4, 12:20 am, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 OUCH.

 With over 25,000 lines of javascript code (full featured CMS) that's a
 nightmare to track down.

 Am I out of luck?  Are there no other alternative tools like sIEve that
are
 still in development?


Hi,

there is another tool by microsoft, you can try:
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx

but this tool doesn´t find all memory leaks.

this jquery-related info could be helpfull, too:
http://groups.google.com/group/jquery-dev/browse_thread/thread/4a99f6e9b2e33
057/30099a04db7f87b9
http://www.outsidethediv.com/2008/10/removechild-vs-the-garbage-bin/

One last advice. You don´t have to fix all memory leaks in IE6. It
really depends on the cost-benefit-ratio (hard effort/work to fix it
vs. noticeable advancement for the enduser).

regards
alex



[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Brandon Aaron
On Wed, Nov 5, 2008 at 1:10 PM, brian [EMAIL PROTECTED]wrote:



  Now $('#non-existing-id').fail().toggle() will fail,
  but will work if it's not empty.

 That's actually right on the money.  Thanks.

 //Still thinks fail silently on id queries is insane, but knows a
 religious argument when he sees one.


Hmmm ... you don't expect your CSS queries to throw an error if they don't
match an element do you? It'd be silly if it did. Then you'd need
a separate style sheet for each page instead of making good use of reusing
styles. Same goes for jQuery code. Matching zero or more elements is a
corner stone of being able to progressively enhance your web site/app with
unobtrusive javascript.

--
Brandon Aaron


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread brian


I have a personal jihad against apps that fail silently.

My jihad listens to no reason.

Sure, they have valid points that make sense from the viewpoints they
hold.  I don't share their viewpoints.  OK?

Can we lighten up now?



On Nov 5, 1:13 pm, ricardobeat [EMAIL PROTECTED] wrote:
 That 'religious' bit is a bit offensive don't you think? There are
 good reasons for failing silently as Mike, Richard and Jeffrey have
 pointed out. The fact you don't accept/understand them doesn't make
 their (and mine) opinions less empirical.

 - ricardo

 On Nov 5, 5:10 pm, brian [EMAIL PROTECTED] wrote:

   Now $('#non-existing-id').fail().toggle() will fail,
   but will work if it's not empty.

  That's actually right on the money.  Thanks.

  //Still thinks fail silently on id queries is insane, but knows a
  religious argument when he sees one.


[jQuery] Re: Accordion activate not working

2008-11-05 Thread KCWebMonkey

I got this to work finally by passing in the ID of the toggle i want
to set active.

On Nov 5, 11:01 am, KCWebMonkey [EMAIL PROTECTED] wrote:
 I have an accordion which i am trying to activate on page load, and
 the .activate function doesn't appear to be working. can someone show
 me how i'm implementing it incorrectly?

 JavaScript:

         $(document).ready(function() {
                 $('#childnav').accordion({
                         autoheight: false,
                         header: '.toggle',
                         event: 'click',
                         alwaysOpen: true,
                         active: false
                 });

                 $(.toggle).activate(0);
         });

 HTML:

 ul id=childnav
         li id=childnav_about
                 div style=width:277px;height:5px;background:#014F75;/div
                 a href=# class=togglespanAbout Us/span/a
                 ul class=childnav_sub
                         lia href=#Link 1/a/li
                         lia href=#Link 2/a/li
                 /ul
         /li
         li id=childnav_homes
                 img src=/images/childnav_spacer.jpg alt= /
                 a href=# class=togglespanNew Homes/span/a
                 ul class=childnav_sub
                         lia href=#another link/a/li
                         lia href=#another link/a/li
                 /ul
         /li
         li id=childnav_community
                 img src=/images/childnav_spacer.jpg alt= /
                 a href=# class=togglespanThe Community/span/a
                 ul class=childnav_sub
                         lia href=#Arial PhotoGraph/a/li
                         lia href=#Amenities/a/li
                         lia href=#Schools/a/li
                         lia href=#Utilities/a/li
                 /ul
         /li
         li id=childnav_news
                 img src=/images/childnav_spacer.jpg alt= /
                 a href=# class=togglespanNews amp; Events/span/a
                 ul class=childnav_sub
                         lia href=#Link 1/a/li
                         lia href=#Link 2/a/li
                         lia href=#Link 1/a/li
                         lia href=#Link 2/a/li
                         lia href=#Link 1/a/li
                         lia href=#Link 2/a/li
                 /ul
         /li
         li id=childnav_contact
                 img src=/images/childnav_spacer.jpg alt= /
                 a href=# class=togglespanContact Us/span/a
                 ul class=childnav_sub
                         lia href=#Link 1/a/li
                         lia href=#Link 2/a/li
                         lia href=#Link 1/a/li
                 /ul
         /li
 /ul


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Eric Martin

brian,

 Can we lighten up now?

This is, by far, the most friendly, relaxed technical group of people
you are going to find on the Internet. I think you might be taking it
a little too personal.

If you want to add something in your application that makes it behave
in a certain way, there is nothing stopping you. To suggest that it is
a design flaw or something wrong with jQuery is invalid, regardless of
your personal crusades ;)

A few lines of code and you have exactly what you want...but there
have been plenty of valid reasons as to why what you suggest will
never be part of core jQuery.

-Eric

On Nov 5, 11:23 am, brian [EMAIL PROTECTED] wrote:
 I have a personal jihad against apps that fail silently.

 My jihad listens to no reason.

 Sure, they have valid points that make sense from the viewpoints they
 hold.  I don't share their viewpoints.  OK?

 Can we lighten up now?

 On Nov 5, 1:13 pm, ricardobeat [EMAIL PROTECTED] wrote:

  That 'religious' bit is a bit offensive don't you think? There are
  good reasons for failing silently as Mike, Richard and Jeffrey have
  pointed out. The fact you don't accept/understand them doesn't make
  their (and mine) opinions less empirical.

  - ricardo

  On Nov 5, 5:10 pm, brian [EMAIL PROTECTED] wrote:

Now $('#non-existing-id').fail().toggle() will fail,
but will work if it's not empty.

   That's actually right on the money.  Thanks.

   //Still thinks fail silently on id queries is insane, but knows a
   religious argument when he sees one.


[jQuery] Safe Validate for Salesforce

2008-11-05 Thread Seth - TA

I am using the Validate plugin for validating our contact form which
sends data into SalesForce. We just implemented the AdWords plugin for
SalesForce and they say that using form.submit will break their
javascript for SalesForce. Currently with the Validate plugin I do
some custom functions using the SubmitHandler option for creating
values in the fields that go into SalesForce and at the end I use
form.submit.

$(#EmailForm).validate({
errorContainer: container,
errorLabelContainer: $(ul, container),
wrapper: 'li',
meta: validate,
submitHandler: function(form) {
var comp = $(input[name='company']).val();
var ph = $(input[name='phone']).val();
var em = $(input[name='email']).val();
var ln = $(input[name='last_name']).val();
var fn = $(input[name='first_name']).val();
var comments = $([name='comments']).val();
var prod = ;
//var checkboxes_product_code;
//checkboxes_product_code = 
$('.product:checkbox').attr(name);
//alert(checkboxes_product_code);
var checkbox_count = 0;
$(':checkbox:checked').each(function(checkbox_count){
if(checkbox_count  
$(':checkbox:checked').length - 1){
prod += $(this).val() + , ;
}
else{
prod += $(this).val();
}
return checkbox_count++;
});

var det =  fn +   + ln +  of  + comp + completed 
the form on
the website and would like information on  + prod +.  Please contact
 + fn +  at your earliest convenience at  + ph + or  + em +.;

if(comments != ){
det = det +  Comments / Questions:  + 
comments;
}
//$(input[name=' + checkboxes_product_code + 
']).val(prod);
$(input[name='000jroe']).val(det);
//console.log($(input[name='000jroe']).val());
//alert($(#000jroe).val());
form.submit();
}

});

The recommend using an onsubmit call in the form. Plus the javascript
which it uses to determine the lead source is looking for a button to
submit the form. This is there recommended way
http://blogs.salesforce.com/adwords/2007/09/web-to-lead-for.html. Any
one have experience with this, or have any suggestions of not using
form.submit? Thanks.

Seth


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Jeffrey Kretz

Heh.  I like that -- the Code Jihad.

I agree 100% about failing silently being a BAD THING(tm).

However, our disagreement involves what constitutes a fail.

The only thing we've been trying to say is, an empty result set is only a
fail under certain circumstances.

To define an empty result set is a fail EVERY TIME is to limit the
underlying system.

Going back to the SQL analogy -- I have a data layer that performs a delete
like this:

DELETE FROM Table WHERE PrimaryKey = @KeyValue
SELECT @RowCount = @@ROWCOUNT

The app that calls the delete function will get a return value of how many
rows were deleted.

Maybe 0 rows is a fail, maybe it isn't.  It depends on what I'm trying to
do.

I have a choice to fail the program after the delete.

It would be wrong to require a SQL Exception thrown on every case of 0 rows
deleted.

Savvy?
JK


-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of brian
Sent: Wednesday, November 05, 2008 11:24 AM
To: jQuery (English)
Subject: [jQuery] Re: Can I make jquery not fail silently??



I have a personal jihad against apps that fail silently.

My jihad listens to no reason.

Sure, they have valid points that make sense from the viewpoints they
hold.  I don't share their viewpoints.  OK?

Can we lighten up now?



On Nov 5, 1:13 pm, ricardobeat [EMAIL PROTECTED] wrote:
 That 'religious' bit is a bit offensive don't you think? There are
 good reasons for failing silently as Mike, Richard and Jeffrey have
 pointed out. The fact you don't accept/understand them doesn't make
 their (and mine) opinions less empirical.

 - ricardo

 On Nov 5, 5:10 pm, brian [EMAIL PROTECTED] wrote:

   Now $('#non-existing-id').fail().toggle() will fail,
   but will work if it's not empty.

  That's actually right on the money.  Thanks.

  //Still thinks fail silently on id queries is insane, but knows a
  religious argument when he sees one.



[jQuery] Re: Best event for changing the content of a div?

2008-11-05 Thread Elwood Casey
Correct: I'm not trying to change the content before the div loads.
I'm trying to change it at the soonest possible opportunity, but without
inline script!
I'm hoping for an event that fires on a per element basis, when the element
is ready - i.e $(element).ready().

The only event that seems to match is load(), but I can't get this to
fire...



Looking at the docs, the load() event might be what I'm after

On Wed, Nov 5, 2008 at 5:59 PM, Chris [EMAIL PROTECTED] wrote:


 I could be mistaken here, but doesn't jQuery (or javascript for that
 matter) need the DOM to be loaded before you can start selecting
 things from it?
 You could put the script elsewhere on the page, but you're still going
 to have to wait for that div to load before you can change its
 contents. If you to insert content before the page loads, you're going
 to have to use some server-side programming, not javascript.

 - Chris


 On Nov 5, 11:12 am, Klaus Hartl [EMAIL PROTECTED] wrote:
  If you don't want to put a script after the div it won't get any
  faster then DOM ready.
 
  You could although poll for that element. Say it had an id of
  'asap' (untested):
 
  (function() {
  var f = function() {
  var div = document.getElementById('asap');
  if (div) {
  // alter content here...
  } else {
  setTimeout(f, 30);
  }
  };
  f();
 
  })();
 
  --Klaus
 
  On 5 Nov., 16:30, the_woodsman [EMAIL PROTECTED] wrote:
 
   Hi,
 
   I want to change the content of a div asap.
 
   I know about document.ready, but if possible I'd rather do this
   earlier. I'd also rather do it as an event instead of loading a script
   file after the div appears in the page.
 
   I tried the load() event, but this didn't seem to fire at all.
 
   Anyone got any tips on this?
 
 

 



[jQuery] Re: Toggle and Nested Divs

2008-11-05 Thread n8cshaw

Well, no one followed up and I kept experimenting and found that if I
put the event call in the onclick attribute of the link, it works as
expected. If I try to bind the onclick event on document ready, it
does not work.

Works: onclick=showHideExactDates();

Does not Work:
jq(#dateExactShowHideLink_image).click(showHideExactDates);

The latter method makes the div open and close immediately when
toggled. I believe there must be some conflict going on between JQuery
and some other library being used on the page, but I don't know that
for certain...

I would still love to know why this is happening if anyone has any
ideas or suggestions.


On Nov 5, 8:40 am, n8cshaw [EMAIL PROTECTED] wrote:
 Thanks Ricardo. I have put the code up athttp://jsbin.com/atiza

 As for the double quotes on the Velocity call, those are evaluated on
 the server prior to being sent to the client, so no worries there.

 I appreciate the help with this! It seems like this should be a very
 easy thing to do (I did the exact same thing with Prototype/
 Scriptaculous on another site). I am not sure what I am missing.

 On Nov 5, 7:27 am, ricardobeat [EMAIL PROTECTED] wrote:

  Try providing a test page or pasting your code 
  atwww.pastie.orgorwww.jsbin.com, that way people can actually read it! :)

  Can't figure out from this code what might be wrong, it's probably an
  event bubbling issue.

  And you have src=$content.getURI(images/icon_plus.gif) that will
  cause serious parsing errors on the browser, use single quotes inside.

  - ricardo

  On Nov 4, 7:43 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

   Hi all.

   I have an outer div that contains several child divs (event search
   form that lets the user pick dates, categories, etc...). The user can
   toggle the outer div and the child divs as well. This all works for me
   AS LONG AS the outer div is visible and not able to be toggled. When I
   let the user toggle the outer div, when the outer div is toggled to
   visible and the user tries to toggle a child div, the child div opens
   and then closes again right away.

   I believe this is happening because the child div is somehow
   inheriting the parent's visibility. I debugged it and
   showHideExactDates() is being run twice. So, it seems like it is
   starting out as visible, even though it is not visible on the form.

   Here is a snippet of the code:

   pa href=javascript:void(0) id=searchFormShowHideLink_imageimg
   src=$content.getURI(images/icon_plus.gif)
   name=searchFormShowHideIcon id=searchFormShowHideIcon border=0
   align=left alt=+ //a stronga href=javascript:void(0)
   id=searchFormShowHideLink_textSearch Form/a/strong/p

   div id=eventSearchFormDiv
 pa href=javascript:void(0) id=dateExactShowHideLink_image
   title=show/hide exact date form fieldsimg
   src=$content.getURI(images/icon_plus.gif)
   name=dateExactShowHideIcon id=dateExactShowHideIcon border=0
   align=left alt=+ //a a href=javascript:void(0)
   id=dateExactShowHideLink_textSpecify Exact Dates/a/p
   div id=dateExactDiv style=display: none;
   Occurs between input type=text size=3
   name=dateRangeStartMonth id=dateRangeStartMonth title=date range
   start month value=$!dateRangeStartMonth maxlength=2/
   input type=text size=3 name=dateRangeStartDay
   id=dateRangeStartDay title=date range start day value=$!
   dateRangeStartDay maxlength=2/
   input type=text size=5 name=dateRangeStartYear
   id=dateRangeStartYear title=date range start year value=$!
   dateRangeStartYear maxlength=4a href=javascript:void(0)
   id=dateRangeStartCalendarLink title=event range start calendar date
   pickerimg src=$content.getURI(images/icon_calendar.gif)
   alt=Choose range start date border=0 align=absmiddle/anbsp;
   and input type=text size=3 name=dateRangeEndMonth
   id=dateRangeEndMonth title=date range end month value=$!
   dateRangeEndMonth maxlength=2/
   input type=text size=3 name=dateRangeEndDay
   id=dateRangeEndDay title=date range end day value=$!
   dateRangeEndDay maxlength=2/
   input type=text size=5 name=dateRangeEndYear
   id=dateRangeEndYear title=date range end year value=$!
   dateRangeEndYear maxlength=4a href=javascript:void(0)
   id=dateRangeEndCalendarLink title=event range end calendar date
   pickerimg src=$content.getURI(images/icon_calendar.gif)
   alt=Choose range end date border=0 align=absmiddle/a
   /div
   /div

   function showHideSearchForm() {
   jq(#eventSearchFormDiv).toggle(blind, {}, 1000);
   }

   //add the form submit handler
   jq(document).ready(function() {
   jq(#searchFormShowHideLink_image).click(showHideSearchForm);
   jq(#searchFormShowHideLink_text).click(showHideSearchForm);
   });

   function showHideExactDates() {
   alert(running showHideExactDates());
   jq(#dateExactDiv).toggle(blind, {}, 1000);
   }

   //add the form 

[jQuery] Re: jCarousel, localScroll, other options?

2008-11-05 Thread genius switch

Can that be customized to have the bouncy effect?

On Nov 5, 8:57 am, Ariel Flesler [EMAIL PROTECTED] wrote:
 Maybe SerialScroll ?

 --
 Ariel Fleslerhttp://flesler.blogspot.com

 On Nov 5, 10:45 am, genius switch [EMAIL PROTECTED] wrote:

  Here is my issue, I have used jCarousel to accomplish what I need...
  however the markup is bothering my anal tendencies for pure
  semantics.

  I'm using jCarousel to scroll content blocks in a sexy way, however,
  in order to use jCarousel I must have my content blocks inside a list,
  each as a list item. This validates, and is functioning exactly how I
  want it to, however I can't get past the fact that this markup doesn't
  make sense.

  LocalScroll is my other option, but it doesn't slide sexy the way
  jCarousel does. Does anyone have any advice?

  Here is the test page:http://www.geniusswitchstudio.com/v2/template.htm

  Thanks!

  - C


[jQuery] Re: Best event for changing the content of a div?

2008-11-05 Thread Chris

$(document).ready() is the soonest possible opportunity without using
inline script (and arguably sooner than an inline script).
You cannot use javascript to select your div until the DOM has been
loaded, and $(document).ready() fires as soon as the DOM has been
loaded. This happens before the page has loaded. The .load() function
is only fired after that element and all of its contents have
completely loaded. In the sequence of things, .load() happens after $
(document).ready() -- the DOM load -- and before onLoad -- the page
load.
More info:
http://www.learningjquery.com/2006/09/introducing-document-ready



On Nov 5, 3:30 pm, Elwood Casey [EMAIL PROTECTED] wrote:
 Correct: I'm not trying to change the content before the div loads.
 I'm trying to change it at the soonest possible opportunity, but without
 inline script!
 I'm hoping for an event that fires on a per element basis, when the element
 is ready - i.e $(element).ready().

 The only event that seems to match is load(), but I can't get this to
 fire...

 Looking at the docs, the load() event might be what I'm after

 On Wed, Nov 5, 2008 at 5:59 PM, Chris [EMAIL PROTECTED] wrote:

  I could be mistaken here, but doesn't jQuery (or javascript for that
  matter) need the DOM to be loaded before you can start selecting
  things from it?
  You could put the script elsewhere on the page, but you're still going
  to have to wait for that div to load before you can change its
  contents. If you to insert content before the page loads, you're going
  to have to use some server-side programming, not javascript.

  - Chris

  On Nov 5, 11:12 am, Klaus Hartl [EMAIL PROTECTED] wrote:
   If you don't want to put a script after the div it won't get any
   faster then DOM ready.

   You could although poll for that element. Say it had an id of
   'asap' (untested):

   (function() {
       var f = function() {
           var div = document.getElementById('asap');
           if (div) {
               // alter content here...
           } else {
               setTimeout(f, 30);
           }
       };
       f();

   })();

   --Klaus

   On 5 Nov., 16:30, the_woodsman [EMAIL PROTECTED] wrote:

Hi,

I want to change the content of a div asap.

I know about document.ready, but if possible I'd rather do this
earlier. I'd also rather do it as an event instead of loading a script
file after the div appears in the page.

I tried the load() event, but this didn't seem to fire at all.

Anyone got any tips on this?




[jQuery] Hide/Show in IE 6

2008-11-05 Thread OutOfTouch

Will this work in IE 6?

$('#listings').show();

I can't remember for sure but I thought that didn't work in IE 6.

Thanks!


[jQuery] accessing child element without unique id

2008-11-05 Thread Jared_T

I'm trying to access a td text value, as shown in the javascript
below.  The easiet way to solve this problem would be to give each td
id value a unique identifier (i.e. td id=row1_col1) Is it possible
to access the td element of a tr with a unique tr id tag without
naming each td id uniquely?  I'm new to this, I pasted the code as an
example of what I'm trying to do.  All the attempts in the javascript
below failed.

html
head
  script src=http://code.jquery.com/jquery-latest.js;/script
/head
body

table cellspacing=5 cellpadding=5 border=1
tr id=row1
td id=col11/td
td id=col22/td
/tr
tr id=row2
td id=col13/td
td id=col24/td
/tr
/tablebr /

script type=text/javascript
str01 = $(#row1  col1).text();
document.write(row1 col1 value is:  + str01 + br /);
str02 = $(#row1.col1).text();
document.write(row1 col1 value is:  + str02 + br /);
//str03 = $(#row1).(#col1).text();
//document.write(row1 col1 value is:  + str03 + br /);
//str04 = $(#col1).text((#row1).text());
//document.write(row1 col1 value is:  + str04 + br /);
/script
/body
/html


[jQuery] Async TreeView - loading multiple nodes

2008-11-05 Thread yitznewton

Greetings:

Thank you, Jörn, for a wonderful plugin.  I'm trying to load several
branches asynchronously immediately when the document loads:

Root
|
- Books
- Journals
- Article Databases

Each one of these three is meant to load a different set of children
(e.g. books.php, journals.php, dbs.php; or alternately, 'load_data.php?
type=books' etc.).  Forgive me, I couldn't understand from the docs
how to specify the url to use in these cases - would you please point
me in the right direction?

Many thanks,
yitznewton


[jQuery] print out td in tr without unique ids

2008-11-05 Thread Jared_T

Here's what I am trying to do - I want to print out the text value of
a particular td.  The easy solution would be to give each td in each
row a unique id (change code below so the first td to
id=row1_col1).  However if there is a way to access the text in col1
of row1 with jquery without giving each td element a unique id I'd
love to know.  You can look at the code below to get the idea of what
I am trying to do.

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
  script src=http://code.jquery.com/jquery-latest.js;/script

/head
body

table cellspacing=5 cellpadding=5 border=1
tr id=row1
td id=col11/td
td id=col22/td
/tr
tr id=row2
td id=col13/td
td id=col24/td
/tr
/tablebr /

script type=text/javascript
str01 = $(#row1  col1).text();// this doesn't work
document.write(row1 col1 value is:  + str01 + br /);
str02 = $(#row1).(col1).text();// this doesn't work
either, these are just for the attempts that failed
document.write(row1 col1 value is:  + str02 + br /);
/script
/body
/html


[jQuery] Tablesorter, sorting dates in format dd.m.yyyy

2008-11-05 Thread Josip Lazic

Is it possible to sort column with dates in dd.mm. format?



[jQuery] problems with unhighlight of error labels with jquery validation 1.4

2008-11-05 Thread kedr

my js is as follows:

var validator = $('#myForm').validate({
onfocusout: false,
onkeyup: false,

rules: {
prefix: { required: true },
name: { required: true }
},

messages: {
prefix: { required: 'Please select a prefix' },
name: { required: 'Please provide your name' }
},

errorClass: 'formError',
highlight: function(element, errorClass) {
$(element.form).find('label[for=' + element.id +
']').addClass(errorClass);
},
unhighlight: function(element, errorClass) {
$(element.form).find('label[for=' + element.id +
']').removeClass(errorClass);
}
});

and my html:

fieldset
  label for=prefix*Prefix:/label
  input id=prefix name=prefix type=text class=field /
/fieldset

fieldset
  label for=name*Name:/label
  input id=name name=name type=text class=field /
/fieldset

and I am using jquery 1.2.6 with jquery validation 1.4

When I submit with errors both labels get the errorClass attached
which is what I want. But when I fix the errors and submit again, the
labels disappear and it seems are getting a style=display;none
instead of running the unhighlight method. Also, if I put an alert
statement inside the unhighlight method it seems once you submit with
no errors each corrected field spits out the alert twice. Any ideas?
How do I get the unhighlight to remove the class instead of making the
label disappear?


[jQuery] Effect Like slideUp/Down

2008-11-05 Thread Panman

I cannot for the life of me figure this out. I know it must be easy,
just not finding the solution.

I'd like to toggle() something and use the slide effect. However, I
don't like how the UI slide effect works. It slides the content out of
view then brings whatever was below up. I'd rather have whatever is
below slide up with the content. Compare how .hide(slide,
{direction: up}, slow) and .slideUp(slow) differ. I tried using
the core toggle() with slideUp/Down but that is not reliable. Thanks
for any input!


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Jared Toporek
I hate to barge in on this discussion with something unrelated, but how long
does it take for something to post? I've sent 2 posts in the last 30 minutes
and they are not appearing.  Any idea what I might be doing wrong?

On Wed, Nov 5, 2008 at 2:24 PM, Jeffrey Kretz [EMAIL PROTECTED] wrote:


 Heh.  I like that -- the Code Jihad.

 I agree 100% about failing silently being a BAD THING(tm).

 However, our disagreement involves what constitutes a fail.

 The only thing we've been trying to say is, an empty result set is only a
 fail under certain circumstances.

 To define an empty result set is a fail EVERY TIME is to limit the
 underlying system.

 Going back to the SQL analogy -- I have a data layer that performs a delete
 like this:

 DELETE FROM Table WHERE PrimaryKey = @KeyValue
 SELECT @RowCount = @@ROWCOUNT

 The app that calls the delete function will get a return value of how many
 rows were deleted.

 Maybe 0 rows is a fail, maybe it isn't.  It depends on what I'm trying to
 do.

 I have a choice to fail the program after the delete.

 It would be wrong to require a SQL Exception thrown on every case of 0 rows
 deleted.

 Savvy?
 JK


 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of brian
 Sent: Wednesday, November 05, 2008 11:24 AM
 To: jQuery (English)
 Subject: [jQuery] Re: Can I make jquery not fail silently??



 I have a personal jihad against apps that fail silently.

 My jihad listens to no reason.

 Sure, they have valid points that make sense from the viewpoints they
 hold.  I don't share their viewpoints.  OK?

 Can we lighten up now?



 On Nov 5, 1:13 pm, ricardobeat [EMAIL PROTECTED] wrote:
  That 'religious' bit is a bit offensive don't you think? There are
  good reasons for failing silently as Mike, Richard and Jeffrey have
  pointed out. The fact you don't accept/understand them doesn't make
  their (and mine) opinions less empirical.
 
  - ricardo
 
  On Nov 5, 5:10 pm, brian [EMAIL PROTECTED] wrote:
 
Now $('#non-existing-id').fail().toggle() will fail,
but will work if it's not empty.
 
   That's actually right on the money.  Thanks.
 
   //Still thinks fail silently on id queries is insane, but knows a
   religious argument when he sees one.




[jQuery] jquery validation unhighlight issue

2008-11-05 Thread kedr

my js is as follows:

var validator = $('#myForm').validate({
onfocusout: false,
onkeyup: false,

rules: {
prefix: { required: true },
name: { required: true }
},

messages: {
prefix: { required: 'Please select a prefix' },
name: { required: 'Please provide your name' }
},

errorClass: 'formError',
highlight: function(element, errorClass) {
$(element.form).find('label[for=' + element.id +
']').addClass(errorClass);
},
unhighlight: function(element, errorClass) {
$(element.form).find('label[for=' + element.id +
']').removeClass(errorClass);
}
});

and my html:

fieldset
  label for=prefix*Prefix:/label
  input id=prefix name=prefix type=text class=field /
/fieldset

fieldset
  label for=name*Name:/label
  input id=name name=name type=text class=field /
/fieldset

and I am using jquery 1.2.6 with jquery validation 1.4

When I submit with errors both labels get the errorClass attached
which is what I want. But when I fix the errors and submit again, the
labels disappear and it seems are getting a style=display;none
instead of running the unhighlight method. Also, if I put an alert
statement inside the unhighlight method it seems once you submit with
no errors each corrected field spits out the alert twice. Any ideas?
How do I get the unhighlight to remove the class instead of making the
label disappear?


[jQuery] Re: Effect Like slideUp/Down

2008-11-05 Thread Andy Matthews

There's also show/hide. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Panman
Sent: Wednesday, November 05, 2008 3:09 PM
To: jQuery (English)
Subject: [jQuery] Effect Like slideUp/Down


I cannot for the life of me figure this out. I know it must be easy, just
not finding the solution.

I'd like to toggle() something and use the slide effect. However, I don't
like how the UI slide effect works. It slides the content out of view then
brings whatever was below up. I'd rather have whatever is below slide up
with the content. Compare how .hide(slide,
{direction: up}, slow) and .slideUp(slow) differ. I tried using the
core toggle() with slideUp/Down but that is not reliable. Thanks for any
input!




[jQuery] Re: Tablesorter, sorting dates in format dd.m.yyyy

2008-11-05 Thread aquaone
Yes but it may be better to change your separator.

I haven't tested this but it should work...

$.tablesorter.addParser({
  id: dotDate,
  is: function(s) {
return /\d{1,2}\.\d{1,2}\.\d{2,4}/.test(s);
  },
  format: function(s,table) {
s = s.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/, $1/$2/$3);
return $.tablesorter.formatFloat(new Date(s).getTime());
  },
  type: numeric
});

stephen


On Wed, Nov 5, 2008 at 11:53, Josip Lazic [EMAIL PROTECTED] wrote:


 Is it possible to sort column with dates in dd.mm. format?




[jQuery] Re: Tablesorter, sorting dates in format dd.m.yyyy

2008-11-05 Thread aquaone
ack, just realized you're doing dd.mm so gotta change it to
s = s.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/, $2/$1/$3);
i think?

stephen

On Wed, Nov 5, 2008 at 13:50, aquaone [EMAIL PROTECTED] wrote:

 Yes but it may be better to change your separator.

 I haven't tested this but it should work...

 $.tablesorter.addParser({
   id: dotDate,
   is: function(s) {
 return /\d{1,2}\.\d{1,2}\.\d{2,4}/.test(s);
   },
   format: function(s,table) {
 s = s.replace(/(\d{1,2})\.(\d{1,2})\.(\d{2,4})/, $1/$2/$3);
 return $.tablesorter.formatFloat(new Date(s).getTime());
   },
   type: numeric
 });

 stephen



 On Wed, Nov 5, 2008 at 11:53, Josip Lazic [EMAIL PROTECTED] wrote:


 Is it possible to sort column with dates in dd.mm. format?





[jQuery] Re: Problems with the JSON return from the jQuery.ajax() method

2008-11-05 Thread Augusto TMW

Hi, thanks about your answer.

This is a example of my JSON:


{mes:{
numero:11,
ano:2008,
reunioes: [
{
dia:27,
horario:15:50,
local:lorem ipsum,
titulo:Reunião 03,
documentos:[

{nome:teste5,arquivo:../institucional/downloads/
teste5.pdf},

{nome:teste6,arquivo:../institucional/downloads/
teste6.pdf}
]
},
{
dia:23,
horario:10:20,
local:lorem ipsum,
titulo:Reunião 04,
documentos:[],
}
],
visitas:[
{
dia:1,
horario:21:15,
local:lorem ipsum,
titulo:Visita 01,
documentos:[

{nome:teste4,arquivo:../institucional/downloads/teste4.pdf}
]
},
{
dia:25,
horario:21:15,
local:lorem ipsum,
titulo:Visita 02,
documentos:[

{nome:teste5,arquivo:../institucional/downloads/teste5.pdf}
]
}
]
}}


Where I've to put the comma?

Thanks very much for your help! =D

Augusto TMW

On Nov 5, 12:46 pm, Choan Gálvez [EMAIL PROTECTED] wrote:
 Hi.

 On Nov 4, 2008, at 10:48 PM, Augusto TMW wrote:





  Hi,

  I'm trying do return a JSON with a $.ajax() method.

  here is my entire function:

  function carregaMes(d){
   if(!(_reunioes[reg+d.month+d.year])){
     $.ajax({
             url: reunioes.jsp,
             data: mes=+d.month+ano=+d.year,
             async: false,
             dataType: json,
             success: function(a){
                     _reunioes[reg+d.month+d.year] = a;
             }
     });
     return _reunioes[reg+d.month+d.year];
   } else {
     return _reunioes[reg+d.month+d.year];
   }
  }

  Where _reunioes is an array in window object.

  In FF its ok, but in IE its return undefined. I tried to call a
  normal ajax and use the jQuery.httpData() method to covert my xhr into
  a JSON, but my IE tell me that in line where jQuery tries to convert
  ( data = eval((+data+)); ) has an error Indentifier, sequency or
  number expected.

 I'd bet the input is not valid JSON. Check for extra commas at the end  
 of your JSON array definition.

 Best.
 --
 Choan


[jQuery] Re: Tablesorter, sorting dates in format dd.m.yyyy

2008-11-05 Thread MorningZ

Posted this code:
http://paste.pocoo.org/show/86103/

on an earlier exact post like this:

$.tablesorter.addParser({
id: 'dd.mm.',
is: function(s) {
return false;
},
format: function(s) {
s = '' + s; //Make sure it's a string
var hit = s.match(/(\d{1,2})\.(\d{1,2})\.(\d{4})/);
if (hit  hit.length == 4) {
return hit[3] + hit[2] + hit[1];
}
else {
return s;
}
},
type: 'text'
});




and don't forget, you have to wire up the custom sorter in the options
of the .tablesorter() wire up








On Nov 5, 2:53 pm, Josip Lazic [EMAIL PROTECTED] wrote:
 Is it possible to sort column with dates in dd.mm. format?


[jQuery] Re: Problems with the JSON return from the jQuery.ajax() method

2008-11-05 Thread Jeffrey Kretz

Your second documentos array (the empty one), has a comma after it, which
is not followed by another property.

When I tried to eval your original json, I got an error.

After removing that comma, it eval'ed correctly.

Hope this helps.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Augusto TMW
Sent: Wednesday, November 05, 2008 1:56 PM
To: jQuery (English)
Subject: [jQuery] Re: Problems with the JSON return from the jQuery.ajax()
method


Hi, thanks about your answer.

This is a example of my JSON:


{mes:{
numero:11,
ano:2008,
reunioes: [
{
dia:27,
horario:15:50,
local:lorem ipsum,
titulo:Reunião 03,
documentos:[

{nome:teste5,arquivo:../institucional/downloads/
teste5.pdf},

{nome:teste6,arquivo:../institucional/downloads/
teste6.pdf}
]
},
{
dia:23,
horario:10:20,
local:lorem ipsum,
titulo:Reunião 04,
documentos:[],
}
],
visitas:[
{
dia:1,
horario:21:15,
local:lorem ipsum,
titulo:Visita 01,
documentos:[

{nome:teste4,arquivo:../institucional/downloads/teste4.pdf}
]
},
{
dia:25,
horario:21:15,
local:lorem ipsum,
titulo:Visita 02,
documentos:[

{nome:teste5,arquivo:../institucional/downloads/teste5.pdf}
]
}
]
}}


Where I've to put the comma?

Thanks very much for your help! =D

Augusto TMW

On Nov 5, 12:46 pm, Choan Gálvez [EMAIL PROTECTED] wrote:
 Hi.

 On Nov 4, 2008, at 10:48 PM, Augusto TMW wrote:





  Hi,

  I'm trying do return a JSON with a $.ajax() method.

  here is my entire function:

  function carregaMes(d){
   if(!(_reunioes[reg+d.month+d.year])){
     $.ajax({
             url: reunioes.jsp,
             data: mes=+d.month+ano=+d.year,
             async: false,
             dataType: json,
             success: function(a){
                     _reunioes[reg+d.month+d.year] = a;
             }
     });
     return _reunioes[reg+d.month+d.year];
   } else {
     return _reunioes[reg+d.month+d.year];
   }
  }

  Where _reunioes is an array in window object.

  In FF its ok, but in IE its return undefined. I tried to call a
  normal ajax and use the jQuery.httpData() method to covert my xhr into
  a JSON, but my IE tell me that in line where jQuery tries to convert
  ( data = eval((+data+)); ) has an error Indentifier, sequency or
  number expected.

 I'd bet the input is not valid JSON. Check for extra commas at the end  
 of your JSON array definition.

 Best.
 --
 Choan



[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Richard D. Worth
On Wed, Nov 5, 2008 at 3:29 PM, Jared Toporek [EMAIL PROTECTED] wrote:

 I hate to barge in on this discussion with something unrelated, but how
 long does it take for something to post? I've sent 2 posts in the last 30
 minutes and they are not appearing.  Any idea what I might be doing wrong?


The forum is moderated. Your first post(s) are read to make sure they aren't
spam. After that, they should go right through.

- Richard


[jQuery] Re: Can I make jquery not fail silently??

2008-11-05 Thread Richard D. Worth
On Wed, Nov 5, 2008 at 5:29 PM, Richard D. Worth [EMAIL PROTECTED] wrote:


 On Wed, Nov 5, 2008 at 3:29 PM, Jared Toporek [EMAIL PROTECTED] wrote:

 I hate to barge in on this discussion with something unrelated, but how
 long does it take for something to post? I've sent 2 posts in the last 30
 minutes and they are not appearing.  Any idea what I might be doing wrong?


 The forum is moderated. Your first post(s) are read to make sure they
 aren't spam. After that, they should go right through.


That is, after you've been cleared, any future posts should go through
without moderation.

- Richard


  1   2   >