[jQuery] Accordion with dynamic loading data

2009-07-16 Thread Todd Stuart
Hello

I am needing an accordion with dynamic data loading on each tier. Does
anyone have a good example of this. I thought I would ask before I took the
dive.

Thanks,
TS


[jQuery] Selector issue (i think), Cant control specific elements

2009-04-28 Thread stuart

Heres a very stripped down version of the page i'm trying to write.
For simplicity, the Show / Hide functions (not meaning hide from view,
but within a db) are the same (they change the background color of the
div), the functions work for the most part but ignores certain divs
(the ones titled Hidden Category, Phones, and The New Hidden
Category). I cant figure out for the life of me why i cant select
them. I CAN select them if i do a sweep of all update_equip classes.

would settle for some sort of workaround, this is killing me

im using jquery-1.3.1.js & livequery (in the actual page, the show /
hide links flip based on what you clicked)

the show / hide function

$('.category_options a').livequery('click', function() { //start
function on links clicked inside #top_nav
 var category_id = $(this).attr("name");
 var cat_action = $(this).attr("action");
 if (cat_action == "show"){
$('div#'+category_id).css({'background-color' : 'yellow'});
 }
 if (cat_action == "hide"){
$('div#'+category_id).css({'background-color' : 'yellow'});
 }

 });


[jQuery] Show and Hide methods on div tag stuttering animation

2008-11-26 Thread Todd Stuart
Hello,

I am using .show() and on a div object. In both IE and FF the display starts
out nice and smooth and then seems to stutter at the end of the show. I have
tried using .show("fast"), .show("slow") also, but with the same results.
Does anyone know a fix to this?

Thanks,
TS


[jQuery] Re: jquery is breaking iWebSite.js

2008-09-09 Thread Stuart Dunkeld

I think the problem is that iWebSite.js uses the Prototype library,
and there's a conflict over which library gets to use the $ shortcut.
http://docs.jquery.com/Using_jQuery_with_Other_Libraries has some
techniques which may help resolve the conflict..

-- stuart

On Tue, Sep 9, 2008 at 9:28 PM, dittmer <[EMAIL PROTECTED]> wrote:
>
> I'm a looser. I use iWeb. Every time I add jquery to my iWeb page it
> breaks all the functions made by this javascript file "iWebSite.js". I
> really know nothing about javascript (I'm a wanna be. That is why I
> use iWeb.) Please help.
>


[jQuery] Re: ui.datepicker trouble

2008-07-15 Thread Stuart Batty


John, would you be willing to post the solution you had at work? I'm still
trying to get this frackin' thing to work.


Shawn-53 wrote:
> 
> 
> Thanks John.  Your tip pointed me in the right direction.
> 
> Basically I changed my code from
> 
> $("#mycontrol").datepicker("getDate")
> to
> $.datepicker._getInst($("#mycontrol")[0]._calId)._getDate()
> 
> Had to go digging in the ui.datepicker code though to work out the 
> specific function.  (and confirm the formatDate function is still there)
> 
> This *seems* to be doing what I need for now.  I'm sure I'll encounter a 
> bug or two as I get deeper into the code though.  This at least gets me 
> past the initial date hurdles - which were significant seeing as 
> everything is driven from the user entered dates.
> 
> Shawn
> 
> John Morrison wrote:
>> I had the problem the other week, basically the datepicker doesn't let
>> you
>> do getDate until after it's been displayed.  I emailed the folks who
>> wrote
>> datepicker and they did get back with a solution, but that's at work and
>> I'm not for the next week.
>> 
>> I can get it you then... but from memory,
>> 
>> $('#dFrom').datepicker({
>> defaultDate: '-1m',
>> minDate: '-3m'
>> });
>> 
>> set the date correctly, to get the date you need the instance...
>> 
>> $.datepicker._getInst($('#dFrom')[0]._calId)._getMinMaxDate('min')
>> 
>> that gets the MinMaxDate, I can't remember what the GetDate function is
>> called.
>> 
>> You might be interested in the rest of the code, two textboxes with
>> custom
>> range with overall min/max set...
>> 
>> $('#dTo').datepicker({
>> maxDate: 0
>> });
>> 
>> // Customize two date pickers to work as a date range
>> function customRange(input) {
>> return {
>> minDate: (input.id == 'dTo' ?
>> $('#dFrom').datepicker('getDate') :
>>
>> $.datepicker._getInst($('#dFrom')[0]._calId)._getMinMaxDate('min')),
>> maxDate: (input.id == 'dFrom' ?
>> $('#dTo').datepicker('getDate') :
>>
>> $.datepicker._getInst($('#dTo')[0]._calId)._getMinMaxDate('max'))
>> };
>> }
>> 
>> Sorry I can't give you the exact code, but I think once you get the
>> instance you've got the rest.
>> 
>> J.
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/ui.datepicker-trouble-tp17846951s27240p18469716.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery moreSelectors :modified - code stopped working

2008-03-27 Thread Stuart

One other bit of wierdness is that using unsaved = $
("*:modified").size(); causes firebug to ignore breakpoints and the
debug directive. If I use unsaved = $("FORM/*:modified") firebug works
as expected. There are no errors, it just ignores the breakpoints and
the debug. Does anybody use this plugin?

On Mar 26, 10:32 am, Stuart <[EMAIL PROTECTED]> wrote:
> I've done some further testing using this simplified code: var unsaved
> = $("*:selector").size();
>
> The following selectors work as expected (returning the correct number
> of elements):
> :text
> :textarea
> :select
> :selected
> :multiple
>
> The :modified selector returns undefined. The odd thing is that this
> seems to be, at least coincidentally, related to another problem I'm
> having with firebug. Firebug has been ignoring breakpoints and the
> debug directive lately and I've determined that, at least in the test
> code I'm using, it only does this when using the :modified selector.
> I'm completely stumped.
>
> Any thoughts?
>
> On Mar 26, 10:05 am, Stuart <[EMAIL PROTECTED]> wrote:
>
> > I used the excellent moreSelectors plugin on a project about a year
> > ago and I just discovered that the old code has stopped working. I'm
> > using window.onbeforeunload to call a function that checks to see if
> > there are any modified form fields and alert the user that changes
> > will be lost. The code below used to work but after an upgrade to
> > jQuery 1.2.3 it no longer works. I'm unsure if the jQuery upgrade is
> > actually the culprit however.
> > [code]
> > var unsaved = $
> > ("#formId").find("*:modified").not(":checkbox, :radio, :submit, 
> > :hidden").size();
> > [/code]
>
> > I've tried to simplify the code to just test the :modified selector
> > but no luck. With this code unsaved is still undefined:
> > [code]
> > var unsaved = $("#formId:modified").size();
> > [/code]
>
> > Any ideas anyone?


[jQuery] Re: jQuery moreSelectors :modified - code stopped working

2008-03-26 Thread Stuart

I've done some further testing using this simplified code: var unsaved
= $("*:selector").size();

The following selectors work as expected (returning the correct number
of elements):
:text
:textarea
:select
:selected
:multiple

The :modified selector returns undefined. The odd thing is that this
seems to be, at least coincidentally, related to another problem I'm
having with firebug. Firebug has been ignoring breakpoints and the
debug directive lately and I've determined that, at least in the test
code I'm using, it only does this when using the :modified selector.
I'm completely stumped.

Any thoughts?

On Mar 26, 10:05 am, Stuart <[EMAIL PROTECTED]> wrote:
> I used the excellent moreSelectors plugin on a project about a year
> ago and I just discovered that the old code has stopped working. I'm
> using window.onbeforeunload to call a function that checks to see if
> there are any modified form fields and alert the user that changes
> will be lost. The code below used to work but after an upgrade to
> jQuery 1.2.3 it no longer works. I'm unsure if the jQuery upgrade is
> actually the culprit however.
> [code]
> var unsaved = $
> ("#formId").find("*:modified").not(":checkbox, :radio, :submit, 
> :hidden").size();
> [/code]
>
> I've tried to simplify the code to just test the :modified selector
> but no luck. With this code unsaved is still undefined:
> [code]
> var unsaved = $("#formId:modified").size();
> [/code]
>
> Any ideas anyone?


[jQuery] jQuery moreSelectors :modified - code stopped working

2008-03-26 Thread Stuart

I used the excellent moreSelectors plugin on a project about a year
ago and I just discovered that the old code has stopped working. I'm
using window.onbeforeunload to call a function that checks to see if
there are any modified form fields and alert the user that changes
will be lost. The code below used to work but after an upgrade to
jQuery 1.2.3 it no longer works. I'm unsure if the jQuery upgrade is
actually the culprit however.
[code]
var unsaved = $
("#formId").find("*:modified").not(":checkbox, :radio, :submit, 
:hidden").size();
[/code]

I've tried to simplify the code to just test the :modified selector
but no luck. With this code unsaved is still undefined:
[code]
var unsaved = $("#formId:modified").size();
[/code]

Any ideas anyone?



[jQuery] Re: Div Changer Using Hide And Show

2008-02-22 Thread Charles Stuart

This is quite generalized and is bookmarkable...
- http://enure.net/dev/hide-all-except-one/



On Fri, Feb 22, 2008 at 6:50 AM, J Moore <[EMAIL PROTECTED]> wrote:
>
>
>  good tips so far.
>
>  I just wanted to add that using classes and ids works well.
>
>  show blackbook
>  show redbook
>
>  blackbook stuff...  div>
>  redbook stuff...
>
>  This makes your click function simpler.
>
>  $('a.show').click(function(){
>
> hide_divs();
> var x = $(this).attr('id');
> $('#'+ x + '-content').show('fast');
> return false;
>  });
>
>  The hide_divs method is also a bit simpler.
>
>  var hide_divs = function(){
> $('div.book').hide('fast');
>  };
>
>  You might notice that the div has a "hidden" class. This just makes
>  initialization simpler, since the items are hidden on page load. The
>  css would be something like:
>
>  div.hidden { display: none; }
>
>  -j
>
>
>
>  On Feb 22, 4:02 am, andrea varnier <[EMAIL PROTECTED]> wrote:
>  > On 21 Feb, 23:03, Sientz <[EMAIL PROTECTED]> wrote:
>  >
>  > >   $('a#blackbook').click(function() {
>  > > //HIDE DIVS
>  > > hide_divs();
>  > > //SHOW LISTED DIV
>  > > $('.blackbook').show('fast');
>  > > return false;
>  > >   });
>  >
>  > you see you got all these functions that basically do the same thing.
>  > if an anchor has an id, they show the corresponding div
>  >
>  > I think you could do it like this
>  >
>  > $('a[id]').click(function(){
>  > hide_divs();
>  > var x = $(this).attr('id');
>  > $('div[class=" + x + "]').show('fast');
>  > return false;
>  >
>  > });
>  >
>  > and should do the same thing.
>  > but you could go further, and use classes in a different way.
>  > let's say that instead of calling them divs with 'human' names, we can
>  > use more 'efficient' names, like:
>  >
>  > hs_a
>  > hs_b
>  > hs_c
>  > hs_d
>  > ...
>  > where hs stands for hide/show (just an example).
>  > in this way the function hide_divs becomes something like
>  >
>  > var hide_divs = function(){
>  > $('div[class^="hs"]').hide('fast');  /* this selector looks for
>  > the div(s) that have a classname that starts with the string 'hs' */
>  >
>  > };
>  >
>  > then you give corresponding id's to the anchors, so the other on I
>  > wrote before:
>  >
>  > $('a[id^="hs"]').click(function(){
>  > hide_divs();
>  > var x = $(this).attr('id');
>  > $('div[class=" + x + "]').show('fast');
>  > return false;});
>


[jQuery] Re: Can JQuery support iCab 3 (for legacy Mac OS9)

2008-02-18 Thread Charles Stuart

Since this page (http://docs.jquery.com/Browser_Compatibility) and
your post do not agree, could you clarify if Firefox 1.5+ on Mac OS X
is supported?

best,
Charles



On Jan 8, 7:06 am, "John Resig" <[EMAIL PROTECTED]> wrote:
> Nope, definitely not. We already don't support anything less than
> Safari 2 - or IE 5. The only Mac-based browsers we support are Safari
> 2 + 3, Firefox 2, and Opera 9.
>
> --John
>
> On Jan 7, 2008 11:49 PM, howa <[EMAIL PROTECTED]> wrote:
>
>
>
> > We have some users still running OS9, I would like to know if any OS9
> > users here can confirm if JQuery (1.2x) support iCab 3, so we can
> > advise them to use this browser.
>
> >http://www.icab.de/dl.php
>
> > Thanks.


[jQuery] Re: Opinions on YUI?

2007-09-19 Thread Stuart

Yeah! what Jorn said! I love both jQuery and Ext but wouldn't it be
fantastic to have Ext's widgets, panels, etc all with jQuery's syntax?

On Sep 19, 1:28 pm, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Brian Miller schrieb:> Hopefully, people are open-minded, and willing to mash 
> up 2-3 different
> > libraries.
>
> I'm mashing Ext and jQuery at work. So far there is no equivalent
> jQuery-based component to replace Ext's grid and tree components. And
> jQuery helps a lot to fill all the gaps that Ext doesn't handle, like
> executing scripts in pages (eg. tabs) loaded via AJAX. I also never
> bothered learning DomQuery, instead I'm using jQuery to select elements
> and pass them to Ext as plain DOM elements.
>
> A lot of times I wish that Ext would have been built upon jQuery. That'd
> be much more fun.
>
> -- Jörn



[jQuery] Re: Superfish Question (v1.3.1)

2007-09-17 Thread Jacob Stuart

Joel,

Good work, it seems to function as intended. Unfortunately, I can't
really use it for my purposes. You implemented it exactly as I had
requested, but what that translates into for my code is the shifting
of the drop-down's left position occurs after the animation to reveal
it is complete. I think you have it where it should be and where it
will probably be most useful - it's just not the solution I need (nor
do I think I need superfish to handle my problem).

With your new functionality my code looks like this:

$('.sfMenuDropDown').superfish({
animation : {height: 'show'},
onshow: function() {
$(this).css({left: $(this).parent().offset().left}).bgiframe();
}
});
(the bgiframe call should probably be moved, but I didn't bother with
it for my testing)

While the code I had previously (and will continue using) looks like:

$('.sfMenuDropDown')
.superfish({animation : {height: 'show'}})
.mouseover(function() {
$('ul', this).css({left: $(this).offset().left}).bgiframe();
});

So, as you can see, it's not really all that bad, to use what I have.
I guess if you wanted to add more functionality to Superfish, you
could add other hooks so there would be a hook before the show
animation, after it's shown (currently where you have it), before
hiding and after it's hidden. However, the complexity and possible
bloat probably aren't worth it. I think the one function call after
revealing is sufficient.

One thing I wasn't able to test was how well the function call works
with nested menus (my implementation only has a single level drop
down).

Thanks again for all your help and work.
Jacob Stuart

On Sep 17, 11:19 am, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Thanks Jacob.
>
> I wondered if you would be interested in checking out my initial
> attempt at adding the callback function feature. A beta version of the
> new JS file is 
> here:http://users.tpg.com.au/j_birch/plugins/superfish/superfish-1.3.2b.js
>
> That file should work with whatever example you have at hand if any
> (no pressure to test this). To test the callback function you could
> use the options object like this for example:
>
> $('#myNav').superfish({
> onshow: function(){
> $(this).css('border','solid 1px red')};
> }
>
> });
>
> If you use the 'this' keyword in the onshow function you pass in, it
> will refer to the ul element that was just revealed.
>
> Is this the sort of thing you had in mind? Can anyone see a problem
> with how I have done this? All I did was add o.onshow.call(this)
> inside the callback of the animation that shows the submenu, so that
> onshow is called in the scope of the revealed ul. Seems worryingly
> simple - I was sure there would be more to it than this
>
> Joel Birch.



[jQuery] Re: Superfish Question (v1.3.1)

2007-09-17 Thread Jacob Stuart

Hey Joel,

Thanks for the excellent and clear response. I personally really
appreciated the detail and thoroughness of it. Good luck on
implementing the function call(s) and thanks for continuing to refine
your extremely handy plugin.

Cheers,
Jacob Stuart

On Sep 16, 11:25 pm, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Hi Karl,
>
> Thanks for the kind words. I wondered if it was too much info, but if
> anyone got something out of it then that's great.
>
> The starting point you have given me regarding the callbacks is
> exactly what I was hoping for - I'll be looking into that the first
> chance I get. I really appreciate your help.
>
> Cheers
> Joel Birch.



[jQuery] Re: FCKeditor replacement which works in Safari

2007-09-14 Thread Jacob Stuart

I played around with tinyMCE (v 2.1.0) a few months back and really
enjoyed it: simple and lightweight. However I ran into a bug that made
it impossible for me to use in the application I was developing. If a
user is browsing with IE and Content Advisor enabled (in Tools >
Internet Options then the Content tab) the browser will crash EVERY
time. Unfortunately my code was to be used by a corporate kiosk system
that was controlled by another department and they limited the system
to IE and controlled browsing using Content Advisor. I was forced to
change to FCKEditor to meet my needs. This probably isn't an issue for
you (since you're looking for Safari support), but it's still a good
thing to bear in mind for other projects if the intended audience
might be very broad.

On Sep 14, 6:35 am, Michael Price <[EMAIL PROTECTED]> wrote:
> Eridius wrote:
>
> > There is always tinyMCE
>
> >http://tinymce.moxiecode.com/
>
> Am toying with that one at this very minute - it shows early promise.
> That Asbrusoft one looked quite cool as well but I think I'm heading for
> TinyMCE at the moment.
>
> Thanks for the posts so far!
>
> Regards,
> Michael Price



[jQuery] Re: Superfish Question (v1.3.1)

2007-09-14 Thread Jacob Stuart

Thanks for the reply Joel. If it is indeed something that isn't really
needed then you can take all the time you need ;).

Cheers,
Jacob Stuart

On Sep 14, 6:06 am, "Joel Birch" <[EMAIL PROTECTED]> wrote:
> Hi Jacob,
>
> I don't have time right now to reply in as much detail as I would
> like, but I will make time to do so tomorrow. Short answer is: it
> seems like that line is not needed anymore so feel free to remove it
> as future versions of Superfish will not include it.
>
> I'll respond properly when I get chance.
>
> Joel Birch.



[jQuery] Re: Problem trying to select a ul with only one li in JQuery

2007-09-14 Thread Jacob Stuart

Hey Chris,

If the latter example you gave adds the class to li, you could simple
do:

$("ul li:only-child").parent().addClass("solo");

However, looking at your first example and the API for only-child
and :has, it looks to me like the syntax for the first statement
should work...

Jacob

On Sep 13, 2:23 pm, smuggyuk <[EMAIL PROTECTED]> wrote:
> Given a ul hierarchy as below, I'm struggling to write a JQuery
> selector that will give me a ul that contains only one li element,
> that I can then add a class to, in this example the ul is the one that
> contains the li "Only Child".
>
> 
> First
>
>Only Child
>
> 
> Second
> 
>
> So far I've tried permuations on a theme of:
> $("ul:has(li:only-child)").addClass("solo");
> and
> $("ul li:only-child").addClass("solo"); - this one gets close, but
> adds the class to the li rather than the ul.
>
> I'm sure this is possible, so any help gratefully received,
> Chris



[jQuery] Superfish Question (v1.3.1)

2007-09-14 Thread Jacob Stuart

Hey All,

Yesterday I spent some time implementing Superfish (at that time v1.3)
with jQuery 1.2 - it's not a straightforward menu implementation, I'm
more tailoring it for a pseudo selection box. Curiously I didn't run
into the selector issue (other than animations weren't working) and
had it working pretty much exactly as intended. One of the little
"hacks" I had to put into place was to accommodate the fact that I put
padding and a border around the LI of my top level nav items. These
items also have a background image aligned to the right and nested in
a little (rough approximation below).
_
|  |^| |
|   Drop Down   |
|_|

I'm giving this detail in order to explain later on why I couldn't
quite simulate the CSS in the example on the Superfish plugin page.

The issue I run into with the CSS for this implementation is that the
drop down navigation is shifted to the right a little. The drop down
UL itself has a matching border and padding, but it aligns itself with
the left edge of the text (the "D" in the above example). I monkeyed
with the CSS a bit to see if I couldn't set the border/padding on
different elements, but when combined with the background image for
the parent element it would never exactly align. So, I added a little
jQuery trickery to shift the left position of the UL as it's
displayed:

$('.sfMenuDropDown')
.superfish()
.mouseover(function() {
$('ul', this).css({left: 
$(this).offset().left}).bgiframe();
})
.mouseout(function() {
$('ul', this).css({left: strOrigLeft}).;
});

--(strOrigLeft above is set to $('.sfMenuDropDown li.current
ul').css('left') when the page first loads)--

This worked great when I was on Superfish 1.3 and jQuery 1.2.1 (again,
custom animations didn't work though). However, once I updated
Superfish to 1.3.1 I can see that the shift to the left occurs, but
then after Superfish animates (which now works because of the selector
correction) it shifts over to the right in line with the "D" again.
Upon investigation I discovered the culprit is line 63 in 1.3.1 where
there is $(this).removeAttr('style'); which is removing my style
declaration of shifting the UL over just a bit. If I comment this line
out, my code runs flawlessly (with the addition of the .hide() in the
mouseout function).

So, I'm wondering why this removal of the style attribute is in there.
Watching with Firebug I can see what it's doing and such, but I'm not
sure what the purpose is. When the line is commented out, with a
default setup of Superfish, I only see style="display:block" - and
with my left position hack it adds a left specification. I'm sure
there is/was a reason for it's being in there - I just can't seem to
see it (after playing with various settings). Can someone (Joel maybe)
explain it to me and the possible risk of removing it (obviously I'd
prefer not to have to change the plugin and remember each time I might
need to update it).

For now I may need to simply comment it out in my implementation,
however what would solve my particular dilemma would be if Superfish
allowed for adding custom functions that get executed once the
animation is complete so they would fire just after the removeAttr is
performed (ideally it would be nice to have hooks to put functions at
the end of showSuperfishUI and hideSuperfishUI). Is this sort of
functionality something that might be worked into Superfish in the
future?

Thanks for the great work.

Jacob Stuart



[jQuery] Re: .click() issue in FireFox

2007-09-12 Thread Jacob Stuart

Not sure I follow a 100% percent, but I'll make the assumption that
you are wanting to execute the onclick event in these various rows
when you click some other element on the page. With that said, maybe
you should try:

$('selector for element that gets clicked').click( function() {
$('#Results table [EMAIL PROTECTED]').trigger('click');
});

By the way, I believe the [EMAIL PROTECTED] XPath expression has been deprecated
in 1.1.4 and 1.2. So you may want to update that to $('#Result table
tr[onclick]')...

Seems like the .click() you were using should work (at least
conceptually to me). So maybe it is a bug since it works in IE and not
FF (seems backwards, eh?).

Cheers!
Jacob Stuart
Fellow Web Developer

On Sep 10, 4:54 pm, George Blouin <[EMAIL PROTECTED]> wrote:
> I have rows of data that look like this
>
>  onmouseover="this.className = 'Highlight';"
> onmouseout="this.className = 'MainRow';"
> onclick="addUnit(3);">
> Battle Cobra C
> 1319 (0)
> 
> 40
> 5006750
> Clan/Level 2
> Upgrades
> Present
> Blood Spirit
> 
>
> I wrote a little method to add each row's data to a seperate div using
> the .click() method that looks like this
>
> $("#Results table [EMAIL PROTECTED]").click();
>
> This works great in IE6 but not in Firefox.  To get around the issue
> I've done this
>
> if ($.browser.mozilla) {
> $("#Results table tr").each(function(){
> eval($(this).attr("onclick"));
> });
> } else {
> $("#Results table [EMAIL PROTECTED]").click();
> }
> return false;
>
> I have *got* to be missing something.  Does the .click event only
> apply to buttons and url's and what not?  Or am I just missing
> something?
>
> Thanks!GeorgeBlouin
> Web Developer



[jQuery] Re: Select range of table rows

2007-08-29 Thread Stuart

Yeah.I think I remember reading about the slice method in the
change log. I am using 1.1.4 so I should be set. The API doesn't list
it yet so thanks for the code snippet.

Thanks Benjamin!

On Aug 29, 11:58 am, "Benjamin Sterling"
<[EMAIL PROTECTED]> wrote:
> Stuart, in 1.1.4 you have the slice() method and you can using it like
> $('#myTable tr').slice(firstRow, lastRow); keeping in mind that count starts
> with 0.
>
> I am working on a plugin that is using 
> it:http://benjaminsterling.com/experiments/jsGalScroll/common/js/jqGalSc...
> 20 and 30.
>
> On 8/29/07, Stuart <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > I'm trying to figure out an efficient way to select a range of table
> > rows. What I'd like to do is select perhaps rows 11 through 19.
>
> > I want to have the selector put the desired rows into the jquery
> > object instead of grabbing all rows and looping through them to
> > operate only on the ones I want.
>
> > I keep thinking something like this where the .not() sets the range.
> > It seems almost right but I know its not.
> > var firstRow = 11, lastRow = 19;
>
> > $('#myTable tr').not(':lt(' + firstRow + '), :gt(' + lastRow + ')');
>
> > I know it's simple I just haven't hit on it yet.
>
> --
> Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com



[jQuery] Select range of table rows

2007-08-29 Thread Stuart

I'm trying to figure out an efficient way to select a range of table
rows. What I'd like to do is select perhaps rows 11 through 19.

I want to have the selector put the desired rows into the jquery
object instead of grabbing all rows and looping through them to
operate only on the ones I want.

I keep thinking something like this where the .not() sets the range.
It seems almost right but I know its not.
var firstRow = 11, lastRow = 19;

$('#myTable tr').not(':lt(' + firstRow + '), :gt(' + lastRow + ')');

I know it's simple I just haven't hit on it yet.



[jQuery] Re: How to select element id that contains [] chars

2007-08-16 Thread Stuart

Yep. That did it. Although I could have sworn I already tried that. I
probably tried a single slash or something. This is good to know.
Thanks a bunch!

On Aug 16, 1:26 pm, "Erik Beeson" <[EMAIL PROTECTED]> wrote:
> Try:
>
> $('#scheduleHours\\[' + dayNum + '\\]')
>
> I think you need 1.1.3 for escaping to work right...
>
> --Erik
>
> On 8/16/07, Stuart <[EMAIL PROTECTED]> wrote:
>
>
>
> > I've got a little problem here that would seem simple to sort out but
> > has been rather stubborn. I'm trying to loop through a bunch of hidden
> > text fields and grab their value. They look like so;
>
> >  > value="7.5" />
> >  > value="7.5" />
> >  > value="7.5" />
>
> > These are the product of a Java Server Faces datalist (Tomahawk
> > component) so there is no way to avoid the array-like notation in the
> > id. I'm just building an array of these values with a for loop:
>
> > var schedule = new Array();
>
> > for (var dayNum = 0; dayNum < counts.days; ++dayNum) {
> > schedule[dayNum] = $('#scheduleHours[' + dayNum + ']').val();
> > }
>
> > The problem is that the jQuery selector $('#scheduleHours[' + dayNum +
> > ']').val() is not matching anything. Could it be possible that the "["
> > and "]" characters are being interpreted by jQuery as being part of
> > the attribute selector syntax like so? $("[EMAIL PROTECTED]").val();
> > I'm taking a guess here that I need to escape the [] chars.
>
> > Anyone have an idea?



[jQuery] How to select element id that contains [] chars

2007-08-16 Thread Stuart

I've got a little problem here that would seem simple to sort out but
has been rather stubborn. I'm trying to loop through a bunch of hidden
text fields and grab their value. They look like so;





These are the product of a Java Server Faces datalist (Tomahawk
component) so there is no way to avoid the array-like notation in the
id. I'm just building an array of these values with a for loop:

var schedule = new Array();

for (var dayNum = 0; dayNum < counts.days; ++dayNum) {
schedule[dayNum] = $('#scheduleHours[' + dayNum + ']').val();
}

The problem is that the jQuery selector $('#scheduleHours[' + dayNum +
']').val() is not matching anything. Could it be possible that the "["
and "]" characters are being interpreted by jQuery as being part of
the attribute selector syntax like so? $("[EMAIL PROTECTED]").val();
I'm taking a guess here that I need to escape the [] chars.

Anyone have an idea?



[jQuery] Re: Quick javascript question (not jQuery)

2007-05-30 Thread Stuart

What you want to do is bind a function to the onbeforeunload event of
the window object (ie. window.onbeforeunload = someFunction;). The
onbeforeunload event fires before onunload as the name implies. Here's
a couple artices that should get you on track:
http://www.boutell.com/newfaq/creating/disableclose.html and
http://www.4guysfromrolla.com/webtech/100604-1.shtml, just remember
that you can't prevent a user from unloading a page, you can only
throw up a confirm dialog and use the "hook" to do your final
processing.

On May 30, 10:26 am, "Brian Miller" <[EMAIL PROTECTED]> wrote:
> Web browsers simply don't do this well.  It breaks the whole
> non-persistent model.  No matter what you do, you'll have to deal with
> network latency.  Also, Browsers react differently when the user closes
> the browser window.  I don't think that the onunload event is reliable for
> all the use cases.
>
> Having a 15-second "autosave" is going to be your best fallback.  I only
> hope that your management is going to be flexible on this.  Unfortunately,
> what they want is outside the scope of what browsers can generally
> provide.
>
> - Brian
>
> > Not strictly speaking a jQuery question but I thought somebody on here
> > might have some insight into this. :)
>
> > The Powers That Be have asked me for a system whereby the contents of
> > a form is automatically saved to the server whenever the user leaves
> > the page.  I looked into onunload but from what I can asertain by the
> > time that event fires the form already no longer exists and can't be
> > submitted to the server.  Doing an AJAX post whenever the form changes
> > isn't acceptible because that would generate too much database
> > traffic, so I'm kind of stuck.  I did suggest preservign the data in a
> > cookie instead of the database but that is apparently not acceptable
> > either.
>
> > Is there some other way I could have the form submitted when the user
> > leaves the page?



[jQuery] Re: Having difficulty binding keypress handler in IE 6 & 7

2007-05-30 Thread Stuart

You are absolutely right Richard. I can't believe I didn't remember
that because I just re-read Peter-Paul Koch's entire events section
over at Quirksmode just a few weeks ago. Thank you for being my
"second set of eyes" in this case.

Greatly appreciated my friend!

On May 30, 9:16 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> On 5/30/07, Stuart <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm trying to bind a keypress event handler to the input element in
> > the last cell of a table row. In the real application this will be
> > used to check for a tab key and call a function to add another row to
> > the table. I have it working in FF but apparently the keypress event
> > never gets bound in IE 6 or 7.
>
> The problem is not that the event doesn't get bound in IE, it's that IE
> doesn't fire keypress for the TAB key. See:
>
> http://www.quirksmode.org/js/keys.html
>
> You'll want to use keydown instead. For more info, see:
>
> http://groups.google.com/group/jquery-en/msg/685eb3294c2e9c4e
>
> - Richard D. Worth



[jQuery] Having difficulty binding keypress handler in IE 6 & 7

2007-05-30 Thread Stuart

I'm trying to bind a keypress event handler to the input element in
the last cell of a table row. In the real application this will be
used to check for a tab key and call a function to add another row to
the table. I have it working in FF but apparently the keypress event
never gets bound in IE 6 or 7. I've created a small table and some
simple code to target the desired element and attempt to add the bound
function. I've been messing with this for a while so I'm suspecting
that I've developed "code blindness", you know what I mean, when one
couldn't spot an obvious error if it was in bold italics. I think I've
stripped it to the bare essentials but I can't, for the life of me,
even get the alert to fire. I've attached the code below and would
greatly appreciate someone taking a look, because I'm obviously
missing something.

Thanks


http://www.w3.org/1999/xhtml";>



$(function() {

var table = document.getElementById("test");
var rows = table.getElementsByTagName("tbody")
[0].getElementsByTagName("tr");

for (var rowNum = 0; rowNum <= 2; ++rowNum) {

var cells = rows[rowNum].getElementsByTagName("td");

var currentTarget = cells[cells.length - 1].firstChild;
$(currentTarget).one("keypress", {type: "debug"}, 
function(event) {
alert(event.data.type + " : " + event.keyCode);
});
}
});

IE Bind() Test






Heading
Heading
Heading
Heading
Heading




Some crap here
Some crap here
Some crap here
Some crap here



Some more crap here
Some more crap here
Some more crap here
Some more crap here



Even more crap here
Even more crap here
Even more crap here
Even more crap here










[jQuery] Re: jQuery svn browser broken. Some documentation unaccessible

2007-05-09 Thread Stuart

Thanks. I never even thought to look at Visual jQuery for plugin docs.
That's what I was looking for.

On May 9, 3:56 pm, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> The documentation is 
> inline:http://www.learningjquery.com/src/plugins/dimensions/jquery.dimension...
>
> You can also find some somewhat outdated documentation on the visual
> jQuery site (visualjquery.com) under Plugins > Dimensions.
>
> You can reference the changelog to see what is different (not 
> much).http://www.learningjquery.com/src/plugins/dimensions/ChangeLog.txt
>
> --
> Brandon Aaron
>
> On 5/9/07, Stuart <[EMAIL PROTECTED]> wrote:
>
>
>
> > Bother. I just downloaded the dimensions plugin but it contains no
> > documentation. There are references in the code comments to see the
> > documentation but I can't find any. The plugin demo page  (http://
> > brandon.jquery.com/plugins/dimensions/test/offset.html) is throwing a
> > 404 and the author's site is an empty Plesk installation. As mentioned
> > earlier the jQuery project page (http://jquery.com/plugins/project/
> > dimensions) is also throwing a 404. Where can one find some docs for
> > the dimensions plugin?
>
> > On May 9, 3:45 pm, Stuart <[EMAIL PROTECTED]> wrote:
> > > Thank you for providing the alternate repositories. You might want to
> > > put this information on the official jQuery site. Or at least make it
> > > more prominent if it's there. I've been poking about the web for some
> > > time and didn't find it. Sorry to hear about the recent misfortunes
> > > with the official site.
>
> > > On May 9, 3:31 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
>
> > > > You should contact me offlist, then - right now I'm fighting with
> > > > versions of the pysqlite lib (or maybe mod_python, not sure which).
>
> > > > My contact info can be found here:http://ejohn.org/about/
>
> > > > --John
>
> > > > On 5/9/07, Richard Thomas <[EMAIL PROTECTED]> wrote:
>
> > > > > If you need help with trac I might have a little bit of spare time and
> > > > > have some exp setting trac up.
>
> > > > > On 5/9/07, John Resig <[EMAIL PROTECTED]> wrote:
>
> > > > > > Excellent :-) Yeah, being able to go through http/https is a nice 
> > > > > > side
> > > > > > effect of this. At the very least, we'll still be able to commit 
> > > > > > code
> > > > > > if (when) jQuery.com is down.
>
> > > > > > --John
>
> > > > > > On 5/9/07, Brian Miller <[EMAIL PROTECTED]> wrote:
>
> > > > > > > John,
>
> > > > > > > Thank you!  By moving to Google Code, you've obliquely solved my 
> > > > > > > problem
> > > > > > > of not being able to check out the code at work through the web 
> > > > > > > proxy
> > > > > > > (although, convincing subclipse to do so was a challenge in 
> > > > > > > itself).  Now,
> > > > > > > I don't need the nightlies so much anymore.  :)
>
> > > > > > > - Brian
>
> > > > > > > > The jQuery subversion repository was moved to Google Code 
> > > > > > > > yesterday,
> > > > > > > > so you can reference it there, at least:
> > > > > > > >http://jqueryjs.googlecode.com/svn/
>
> > > > > > > > --John
>
> > > > > > > > On 5/9/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> > > > > > > >> All of the plugins are available (latest svn version) in this 
> > > > > > > >> temporary
> > > > > > > >> location:
>
> > > > > > > >>http://www.learningjquery.com/src/plugins/
>
> > > > > > > >> --Karl
> > > > > > > >> _
> > > > > > > >> Karl Swedberg
> > > > > > > >>www.englishrules.com
> > > > > > > >>www.learningjquery.com
>
> > > > > > > >> On May 9, 2007, at 12:06 PM, Stuart Batty wrote:
>
> > > > > > > >> In an effort to download the dimensions plugin I've discovered 
> > > > > > > >> that the
> > > > > > > >> svn
> > > > > > > >> browser is not working and the link to the plugin on the 
> > > > > > > >> jQuery site is
> > > > > > > >> inaccessible. I understand that there has been some trouble of 
> > > > > > > >> late so I
> > > > > > > >> thought it best to spread the message in the event that these 
> > > > > > > >> problems
> > > > > > > >> are
> > > > > > > >> unknown.
>
> > > > > > > >> Now, until this is fixed can anyone mirror the dimensions 
> > > > > > > >> plugin for
> > > > > > > >> download?
>
> > > > > > > >> Thanks
> > > > > > > >> --
> > > > > > > >> View this message in context:
> > > > > > > >>http://www.nabble.com/jQuery-svn-browser-broken.-Some-documentation-u...
> > > > > > > >> Sent from the JQuery mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery (English)" group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: jQuery svn browser broken. Some documentation unaccessible

2007-05-09 Thread Stuart

Bother. I just downloaded the dimensions plugin but it contains no
documentation. There are references in the code comments to see the
documentation but I can't find any. The plugin demo page  (http://
brandon.jquery.com/plugins/dimensions/test/offset.html) is throwing a
404 and the author's site is an empty Plesk installation. As mentioned
earlier the jQuery project page (http://jquery.com/plugins/project/
dimensions) is also throwing a 404. Where can one find some docs for
the dimensions plugin?

On May 9, 3:45 pm, Stuart <[EMAIL PROTECTED]> wrote:
> Thank you for providing the alternate repositories. You might want to
> put this information on the official jQuery site. Or at least make it
> more prominent if it's there. I've been poking about the web for some
> time and didn't find it. Sorry to hear about the recent misfortunes
> with the official site.
>
> On May 9, 3:31 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
>
> > You should contact me offlist, then - right now I'm fighting with
> > versions of the pysqlite lib (or maybe mod_python, not sure which).
>
> > My contact info can be found here:http://ejohn.org/about/
>
> > --John
>
> > On 5/9/07, Richard Thomas <[EMAIL PROTECTED]> wrote:
>
> > > If you need help with trac I might have a little bit of spare time and
> > > have some exp setting trac up.
>
> > > On 5/9/07, John Resig <[EMAIL PROTECTED]> wrote:
>
> > > > Excellent :-) Yeah, being able to go through http/https is a nice side
> > > > effect of this. At the very least, we'll still be able to commit code
> > > > if (when) jQuery.com is down.
>
> > > > --John
>
> > > > On 5/9/07, Brian Miller <[EMAIL PROTECTED]> wrote:
>
> > > > > John,
>
> > > > > Thank you!  By moving to Google Code, you've obliquely solved my 
> > > > > problem
> > > > > of not being able to check out the code at work through the web proxy
> > > > > (although, convincing subclipse to do so was a challenge in itself).  
> > > > > Now,
> > > > > I don't need the nightlies so much anymore.  :)
>
> > > > > - Brian
>
> > > > > > The jQuery subversion repository was moved to Google Code yesterday,
> > > > > > so you can reference it there, at least:
> > > > > >http://jqueryjs.googlecode.com/svn/
>
> > > > > > --John
>
> > > > > > On 5/9/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> > > > > >> All of the plugins are available (latest svn version) in this 
> > > > > >> temporary
> > > > > >> location:
>
> > > > > >>http://www.learningjquery.com/src/plugins/
>
> > > > > >> --Karl
> > > > > >> _
> > > > > >> Karl Swedberg
> > > > > >>www.englishrules.com
> > > > > >>www.learningjquery.com
>
> > > > > >> On May 9, 2007, at 12:06 PM, Stuart Batty wrote:
>
> > > > > >> In an effort to download the dimensions plugin I've discovered 
> > > > > >> that the
> > > > > >> svn
> > > > > >> browser is not working and the link to the plugin on the jQuery 
> > > > > >> site is
> > > > > >> inaccessible. I understand that there has been some trouble of 
> > > > > >> late so I
> > > > > >> thought it best to spread the message in the event that these 
> > > > > >> problems
> > > > > >> are
> > > > > >> unknown.
>
> > > > > >> Now, until this is fixed can anyone mirror the dimensions plugin 
> > > > > >> for
> > > > > >> download?
>
> > > > > >> Thanks
> > > > > >> --
> > > > > >> View this message in context:
> > > > > >>http://www.nabble.com/jQuery-svn-browser-broken.-Some-documentation-u...
> > > > > >> Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: jQuery svn browser broken. Some documentation unaccessible

2007-05-09 Thread Stuart

Thank you for providing the alternate repositories. You might want to
put this information on the official jQuery site. Or at least make it
more prominent if it's there. I've been poking about the web for some
time and didn't find it. Sorry to hear about the recent misfortunes
with the official site.

On May 9, 3:31 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
> You should contact me offlist, then - right now I'm fighting with
> versions of the pysqlite lib (or maybe mod_python, not sure which).
>
> My contact info can be found here:http://ejohn.org/about/
>
> --John
>
> On 5/9/07, Richard Thomas <[EMAIL PROTECTED]> wrote:
>
>
>
> > If you need help with trac I might have a little bit of spare time and
> > have some exp setting trac up.
>
> > On 5/9/07, John Resig <[EMAIL PROTECTED]> wrote:
>
> > > Excellent :-) Yeah, being able to go through http/https is a nice side
> > > effect of this. At the very least, we'll still be able to commit code
> > > if (when) jQuery.com is down.
>
> > > --John
>
> > > On 5/9/07, Brian Miller <[EMAIL PROTECTED]> wrote:
>
> > > > John,
>
> > > > Thank you!  By moving to Google Code, you've obliquely solved my problem
> > > > of not being able to check out the code at work through the web proxy
> > > > (although, convincing subclipse to do so was a challenge in itself).  
> > > > Now,
> > > > I don't need the nightlies so much anymore.  :)
>
> > > > - Brian
>
> > > > > The jQuery subversion repository was moved to Google Code yesterday,
> > > > > so you can reference it there, at least:
> > > > >http://jqueryjs.googlecode.com/svn/
>
> > > > > --John
>
> > > > > On 5/9/07, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> > > > >> All of the plugins are available (latest svn version) in this 
> > > > >> temporary
> > > > >> location:
>
> > > > >>http://www.learningjquery.com/src/plugins/
>
> > > > >> --Karl
> > > > >> _
> > > > >> Karl Swedberg
> > > > >>www.englishrules.com
> > > > >>www.learningjquery.com
>
> > > > >> On May 9, 2007, at 12:06 PM, Stuart Batty wrote:
>
> > > > >> In an effort to download the dimensions plugin I've discovered that 
> > > > >> the
> > > > >> svn
> > > > >> browser is not working and the link to the plugin on the jQuery site 
> > > > >> is
> > > > >> inaccessible. I understand that there has been some trouble of late 
> > > > >> so I
> > > > >> thought it best to spread the message in the event that these 
> > > > >> problems
> > > > >> are
> > > > >> unknown.
>
> > > > >> Now, until this is fixed can anyone mirror the dimensions plugin for
> > > > >> download?
>
> > > > >> Thanks
> > > > >> --
> > > > >> View this message in context:
> > > > >>http://www.nabble.com/jQuery-svn-browser-broken.-Some-documentation-u...
> > > > >> Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] jQuery svn browser broken. Some documentation unaccessible

2007-05-09 Thread Stuart Batty


In an effort to download the dimensions plugin I've discovered that the svn
browser is not working and the link to the plugin on the jQuery site is
inaccessible. I understand that there has been some trouble of late so I
thought it best to spread the message in the event that these problems are
unknown.

Now, until this is fixed can anyone mirror the dimensions plugin for
download?

Thanks
-- 
View this message in context: 
http://www.nabble.com/jQuery-svn-browser-broken.-Some-documentation-unaccessible-tf371s15494.html#a10397396
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-26 Thread Stuart

Mike, I didn't bother to send you a screenie since I got this example
modified to show the overlay issue. It seems that if the blocked
element (form in this case) doesn't have a defined width, IE aligns
the top-left corner of the overlay with the top-left corner of the
first child element. Or something like that. In my example, if you
remove the "text-align" style from the H1, the overlay follows it to
the left. Similarly, if you remove the H1 tag altogether, the overlay
aligns with the top-left of the table. This behavior is only evident
to me in IE6. It took me several hours of systematically eliminating
CSS styles and page elements in the compiled output of my application
to isolate the behavior and add those conditions to the sample. Why
don't I ever get bored with this stuff? I can simply apply a "width"
style declaration to the form to make it work but that seems "wrong."
Something is telling me that this is the result of a known IE bug but
I can't seem to pull it from memory. It will probably be blatantly
obvious to others.

Thanks again!

http://www.w3.org/
TR/html4/strict.dtd">


blockUI Test




#button { text-align: center; }
#myForm h1 { text-align: center; }


$(function() {
$.blockUI.defaults.elementMessage = "Please Wait...";
$.extend($.blockUI.defaults.overlayCSS, { backgroundColor: '#00f' });
$.extend($.blockUI.defaults.elementMessageCSS, {
 color: '#00a',
 backgroundColor: '#fff',
 border: '2px solid #2f4f4f'

});

$(function () {
$("#myForm").submit(function() {
$(this).block();
setTimeout(test, 1000);
return false;
});

});

function test() {
$("#myForm")[0].submit();

}
} );




   First Name: 
   Last Name: 
   Age: 


blockUI Test
 
 
 First Name
 Last Name
 Age
 
 
 
 
 
 
 









On Apr 25, 8:06 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> > I thank you for providing support for your wonderful plugin. I'll be
> > using this one a lot. Probably even for things it wasn't intended :-)
>
> Well you're already doing that, Stuart!  This is an unusual use-case,
> blocking a page that you are leaving.
>
> > I'm not sure I fully understand the setTimeout() bit.
> > Am I correct in assuming that it is used to allow the plugin to
> > complete the DOM manipulation before the submit event fires?
>
> Yes.  Normally this is not necessary because typically blockUI is used
> during async operations, so the browser (IE) has idle time to fully
> render everything properly.
>
> > Does the plugin remove the blocked element from the DOM
> > when it is blocked or at least sometime during the blocking
> > process?
>
> No.  The blocked element, the form in your case, is not removed from the DOM.
>
> > If you would be so kind as to providing a quick run-down on how
> > the iframe is positioned in your code
>
> The positioning code is browser dependent.  For IE6 (and IE7 in quirks
> mode), style expressions are used.
>
> Mike



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-25 Thread Stuart

It would seem that none of my attempts to fix the IE6 overlay position
bug work. As IE6 is the current Agency standard around here (lord have
mercy on us all) I have to code for it. If I can't find a work-around
this might end up being a deal-breaker. I've read every post/thread
that I can find on the subject but no joy. Has anyone got an idea?

On Apr 24, 9:10 am, Stuart <[EMAIL PROTECTED]> wrote:
> Yes, It works! Mostly. I'm still having problems with the overlay
> position in IE 6. I'm guessing that might be the result of some of my
> CSS stomping on the positioning used by blockUI. If you have any ideas
> where to look for this I'd appreciate it. As for the main issue, I'm
> not sure I fully understand the setTimeout() bit. Am I correct in
> assuming that it is used to allow the plugin to complete the DOM
> manipulation before the submit event fires? Does the plugin remove the
> blocked element from the DOM when it is blocked or at least sometime
> during the blocking process? The code would seem, at least to me, to
> suggest this is possible. If that's the case I can see why the submit
> action might fail. That doesn't explain why it works in FF however. At
> any rate, it is fully working in IE 7 and at least functionally
> working in IE 6.
>
> I thank you for providing support for your wonderful plugin. I'll be
> using this one a lot. Probably even for things it wasn't intended :-)
> If you would be so kind as to providing a quick run-down on how the
> iframe is positioned in your code, I can most likely come up with a
> fix for my IE positioning problem.
>
> Again, Thanks much Mike.
>
> On Apr 23, 3:40 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
>
> > > OK, after lunch I knocked together a quick and very dirty php page
> > > that contains a form that submits back to itself. In my testing, this
> > > form displays the much of the same behavior that I described
> > > originally. Works fine in FF. Form doesn't submit in IE 6 or 7. This
> > > example, however, does not present the iframe alignment problem I
> > > encountered with my original form. I can deal with that I think. It
> > > must be some sort of CSS collision. Here's the form:
>
> > Thanks for the sample page, Stuart.  I reworked your code a bit before
> > I started debugging and once I did it started working fine.  I think
> > it's important to use setTimeout so that the browser has some time to
> > render the updated DOM before lauching into its submit operation.  I
> > don't know why the submit wasn't working in ie previously, but it is
> > now.  Give this a shot:
>
> >  > "http://www.w3.org/TR/html4/strict.dtd";>
> > 
> > 
> > 
> >  > src="../malsup/block/jquery.block.js">
> > 
> > $.blockUI.defaults.elementMessage = "Please Wait...";
> > $.extend($.blockUI.defaults.elementMessageCSS, {
> >color: '#00a',
> >backgroundColor: '#fff',
> >border: '2px solid #2f4f4f'
>
> > });
>
> > $(function () {
> > $("#insertForm").submit(function() {
> > $(this).block();
> > setTimeout(test, 100);
> > return false;
> > });
>
> > });
>
> > function test() {
> > $("#insertForm")[0].submit();
>
> > }
>
> > 
> > 
> > Insert Record
> > 
> > 
> > 
> >First Name: 
> >Last Name: 
> >Age: 
> > 
> > 
> >
> >
> >First Name
> >Last Name
> >Age
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >  
> > 
> > 
> > 
> > 



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-24 Thread Stuart

Yes, It works! Mostly. I'm still having problems with the overlay
position in IE 6. I'm guessing that might be the result of some of my
CSS stomping on the positioning used by blockUI. If you have any ideas
where to look for this I'd appreciate it. As for the main issue, I'm
not sure I fully understand the setTimeout() bit. Am I correct in
assuming that it is used to allow the plugin to complete the DOM
manipulation before the submit event fires? Does the plugin remove the
blocked element from the DOM when it is blocked or at least sometime
during the blocking process? The code would seem, at least to me, to
suggest this is possible. If that's the case I can see why the submit
action might fail. That doesn't explain why it works in FF however. At
any rate, it is fully working in IE 7 and at least functionally
working in IE 6.

I thank you for providing support for your wonderful plugin. I'll be
using this one a lot. Probably even for things it wasn't intended :-)
If you would be so kind as to providing a quick run-down on how the
iframe is positioned in your code, I can most likely come up with a
fix for my IE positioning problem.

Again, Thanks much Mike.

On Apr 23, 3:40 pm, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> > OK, after lunch I knocked together a quick and very dirty php page
> > that contains a form that submits back to itself. In my testing, this
> > form displays the much of the same behavior that I described
> > originally. Works fine in FF. Form doesn't submit in IE 6 or 7. This
> > example, however, does not present the iframe alignment problem I
> > encountered with my original form. I can deal with that I think. It
> > must be some sort of CSS collision. Here's the form:
>
> Thanks for the sample page, Stuart.  I reworked your code a bit before
> I started debugging and once I did it started working fine.  I think
> it's important to use setTimeout so that the browser has some time to
> render the updated DOM before lauching into its submit operation.  I
> don't know why the submit wasn't working in ie previously, but it is
> now.  Give this a shot:
>
>  "http://www.w3.org/TR/html4/strict.dtd";>
> 
> 
> 
> 
> 
> $.blockUI.defaults.elementMessage = "Please Wait...";
> $.extend($.blockUI.defaults.elementMessageCSS, {
>color: '#00a',
>backgroundColor: '#fff',
>border: '2px solid #2f4f4f'
>
> });
>
> $(function () {
> $("#insertForm").submit(function() {
> $(this).block();
> setTimeout(test, 100);
> return false;
> });
>
> });
>
> function test() {
> $("#insertForm")[0].submit();
>
> }
>
> 
> 
> Insert Record
> 
> 
> 
>First Name: 
>Last Name: 
>Age: 
> 
> 
>
>
>First Name
>Last Name
>Age
>
>
>
>
>
>
>
>
>
>
>
>
>  
> 
> 
> 
> 



[jQuery] Re: Why is IE messing with my mind?

2007-04-24 Thread Stuart

Try removing the comma after "left: 0" on line 8. Firefox doesn't seem
to mind the trailing comma but IE completely breaks. You see this with
mostly with literal notation.

On Apr 24, 11:06 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> On PC IE (v. 7.0) only, I'm getting a JS error on line 9, saying
> "Error: Expected identifier string, or number."  Here's the code
>
> function slideIn(id) {
> hideAllSubNavs();
> if (IsHidden(id))
> toggleDiv(id);
> $('#' + id).animate(
> {
> left: 0,
> },// line 9
> "normal"
> );
>
> }   // slideIn
>
> This, of course, works fine on Firefox.  Could someone tell me how to
> heal the pain on IE?
>
> Thanks, - Dave



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart

OK, after lunch I knocked together a quick and very dirty php page
that contains a form that submits back to itself. In my testing, this
form displays the much of the same behavior that I described
originally. Works fine in FF. Form doesn't submit in IE 6 or 7. This
example, however, does not present the iframe alignment problem I
encountered with my original form. I can deal with that I think. It
must be some sort of CSS collision. Here's the form:

http://www.w3.org/
TR/html4/strict.dtd">





$(function () {
$("#insertForm :submit").click( function() {
$.blockUI.defaults.elementMessage = "Please Wait...";
$.extend(
$.blockUI.defaults.elementMessageCSS, {
color: '#00a',
backgroundColor: '#fff',
border: '2px solid #2f4f4f'
}
);
$("#insertForm").block();
return true;
} );
} );


Insert Record


blockUI Test Page

First Name: 
Last Name: 
Age: 




First Name
Last Name
Age


  









  





Sorry for just pasting the code here but I'm unable to host a live
page at the moment. If that's necessary I can do that after I get home
from work. Hope this helps.

Thanks

On Apr 23, 11:01 am, Stuart Batty <[EMAIL PROTECTED]> wrote:
> The form is not submitted by ajax. It is a http post. I'll simplify the form
> down to something manageable and post.
>
>
>
> malsup wrote:
>
> > Stuart,
>
> > Is the form submitted via normal browser invocation or via ajax?
> > Also, it would be immensely helpful if you could put together a simple
> > html page (ignore the server component) that demonstrates the problem.
>
> > Mike
>
> > On 4/23/07, Stuart Batty <[EMAIL PROTECTED]> wrote:
>
> >> Mike, I don't immediately see any way to post a sample page since the
> >> application is a intranet java webapp running on Tomcat using MyFaces. I
> >> could possibly post the compiled output from the .jsp but I fear that may
> >> mask the original problem. I could probably work around the odd modal
> >> alignment issue in IE 6 if I could get the form to submit. Here's the
> >> function I'm using to bind blockUI to the onclick event:
> >> [code]
> >> $("#myForm :submit").click( function() {
> >> $.blockUI.defaults.elementMessage = "Please Wait...";
> >> $.extend(
> >> $.blockUI.defaults.elementMessageCSS, {
> >> color: '#00a',
> >> backgroundColor: '#fff',
> >> border: '2px solid #2f4f4f'
> >> }
> >> );
> >> $("#myForm").block();
> >> return true;
> >> } );
> >> [/code]
> >> There are two submit buttons on the form; Save and Submit, that I want to
> >> apply the block to onclick. On form submit the appropriate java method is
> >> executed and the form is re-displayed with a message confirming the
> >> action.
> >> One other thing I've noticed is that when one clicks a submit button in
> >> IE
> >> it seems to take several seconds for the iframe to appear where in FF it
> >> is
> >> instantaneous. If you can think of any test methods I can employ please
> >> let
> >> me know. Your plugin does exactly what I need to do but I must support
> >> IE.
>
> >> malsup wrote:
>
> >> > Stuart,
>
> >> > Can you post a sample page?
>
> >> > Mike
>
> >> --
> >> View this message in context:
> >>http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7...
> >> Sent from the JQuery mailing list archive at Nabble.com.
>
> --
> View this message in 
> context:http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7...
> Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart Batty


The form is not submitted by ajax. It is a http post. I'll simplify the form
down to something manageable and post. 

malsup wrote:
> 
> 
> Stuart,
> 
> Is the form submitted via normal browser invocation or via ajax?
> Also, it would be immensely helpful if you could put together a simple
> html page (ignore the server component) that demonstrates the problem.
> 
> Mike
> 
> On 4/23/07, Stuart Batty <[EMAIL PROTECTED]> wrote:
>>
>>
>> Mike, I don't immediately see any way to post a sample page since the
>> application is a intranet java webapp running on Tomcat using MyFaces. I
>> could possibly post the compiled output from the .jsp but I fear that may
>> mask the original problem. I could probably work around the odd modal
>> alignment issue in IE 6 if I could get the form to submit. Here's the
>> function I'm using to bind blockUI to the onclick event:
>> [code]
>> $("#myForm :submit").click( function() {
>> $.blockUI.defaults.elementMessage = "Please Wait...";
>> $.extend(
>> $.blockUI.defaults.elementMessageCSS, {
>> color: '#00a',
>> backgroundColor: '#fff',
>> border: '2px solid #2f4f4f'
>> }
>> );
>> $("#myForm").block();
>> return true;
>> } );
>> [/code]
>> There are two submit buttons on the form; Save and Submit, that I want to
>> apply the block to onclick. On form submit the appropriate java method is
>> executed and the form is re-displayed with a message confirming the
>> action.
>> One other thing I've noticed is that when one clicks a submit button in
>> IE
>> it seems to take several seconds for the iframe to appear where in FF it
>> is
>> instantaneous. If you can think of any test methods I can employ please
>> let
>> me know. Your plugin does exactly what I need to do but I must support
>> IE.
>>
>> malsup wrote:
>> >
>> >
>> > Stuart,
>> >
>> > Can you post a sample page?
>> >
>> > Mike
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10142260
>> Sent from the JQuery mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10143321
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart

I just did an experiment where I added an explicit call to submit
after the block and it works in IE. I just added $
("#myForm").submit(); after the call to block. It still takes about 6
seconds for the modal to appear but this does show that the submit
event is getting clobbered somehow.




[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart Batty


Mike, I don't immediately see any way to post a sample page since the
application is a intranet java webapp running on Tomcat using MyFaces. I
could possibly post the compiled output from the .jsp but I fear that may
mask the original problem. I could probably work around the odd modal
alignment issue in IE 6 if I could get the form to submit. Here's the
function I'm using to bind blockUI to the onclick event:
[code]
$("#myForm :submit").click( function() { 
$.blockUI.defaults.elementMessage = "Please Wait...";
$.extend(
$.blockUI.defaults.elementMessageCSS, {
color: '#00a', 
backgroundColor: '#fff', 
border: '2px solid #2f4f4f'
}
);
$("#myForm").block();
return true;
} );
[/code]
There are two submit buttons on the form; Save and Submit, that I want to
apply the block to onclick. On form submit the appropriate java method is
executed and the form is re-displayed with a message confirming the action.
One other thing I've noticed is that when one clicks a submit button in IE
it seems to take several seconds for the iframe to appear where in FF it is
instantaneous. If you can think of any test methods I can employ please let
me know. Your plugin does exactly what I need to do but I must support IE.

malsup wrote:
> 
> 
> Stuart,
> 
> Can you post a sample page?
> 
> Mike
> 
> 

-- 
View this message in context: 
http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10142260
Sent from the JQuery mailing list archive at Nabble.com.



[jQuery] Re: blockUI plugin blocking form submit on IE 6 & 7

2007-04-23 Thread Stuart Batty


Pardon me for replying to my own thread but I can't seem figure out why it's
not getting accepted to the mailing list. I'm subscribed but I keep getting
email saying that it's still pending. I posted it 3 days ago so I'm thinking
that's not normal. By the way, if this gets on the mailing list, I can sure
use a little help with this IE issue.

Thanks

Stuart Batty wrote:
> 
> I'm trying to use blockUI to block user from accessing menus, links, etc
> after clicking on a form submit button by blocking the form element. This
> would hopefully have the added benefit of keeping the user from clicking
> the submit button multiple times while waiting for the submit. I've
> successfully done this in FF but it doesn't work as expected in IE. In IE
> 6 the overlay is not centered and the form doesn't submit. In IE7 the
> overlay is centered but the form still doesn't submit. In both cases the
> overlay appears and the browser simply hangs. After some thought I figured
> that maybe it is actually blocking the submit in IE so I tried wrapping
> the form in a div and blocking that. No change. As suggested elsewhere,
> I've changed the transitional DTD to strict but no change. I did an
> experiment where I used the submit click event to block an element outside
> the form and it did not block the submit event but the overlay was still
> jacked-up in IE6.
> 
> Can anyone help me figure out what blockUI is doing in regards to event
> handling here? I'm guessing from looking at the code that it would block
> the submit by design but it works in FF. I need some way to block the UI
> while the submit action is processing. This is a java application using
> MyFaces.
> 
> Thanks for any suggestions.
> 
> Almost forgot, this plug-in is pretty sweet!
> 

-- 
View this message in context: 
http://www.nabble.com/blockUI-plugin-blocking-form-submit-on-IE-6---7-tf3620149s15494.html#a10141754
Sent from the JQuery mailing list archive at Nabble.com.