[jQuery] Re: Edit-In-Place with Form plugin

2008-04-10 Thread Mika Tuupola



On Apr 11, 2008, at 3:05 AM, Chris wrote:


My problem is that I cannot edit in
place the items submitted with the form plugin without refreshing the
page.


http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F

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



[jQuery] Re: "this" ?

2008-04-10 Thread Jeffrey Kretz

You could do this:

$('.highlight').removeClass('highlight').filter(':even').addClass('shaded');

The "this" keyword is useful only inside javascript code (it won't work in a
selector).

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jeff
Sent: Thursday, April 10, 2008 7:24 PM
To: jQuery (English)
Subject: [jQuery] "this" ?


'scuse me for the noob question here...

i have statements like this:

$(".highlight").removeClass;
$("this:even").addClass("shaded");

And I don't think I'm using "this" or :even correctly; it doesn't work
=)

Googling has turned up some different ways that the "this" keyword is
used, and I'm not sure what is right here. I'm just trying to remove a
class from a bunch of elements and then apply a new class to even
numbered elements.

Any ideas? Again, sorry for the dumb question, but googling the word
"this" isn't very helpful since you get like 10 kabillion results.



[jQuery] Re: Problem with DOM manipulation in IE

2008-04-10 Thread Karl Swedberg


Hi Jon,

Try inserting a complete DOM element rather than a partial.

$("") instead of $("")

Also, you're missing quotes around the  . Should be:

$("") instead of $()

Also, this is probably breaking, too:

.html(item.text)

Not sure what item.text is. did you mean .html(item.text()) ?


Hope that helps get you started.

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Apr 9, 2008, at 8:12 PM, Jon Loyens wrote:



I'm trying to populate set of lists via some information loaded from
some JSON on $(document).ready.  The following code works fine in FF
but breaks in IE:

function insertItem(item)
{
   var li = $("").html("Item: ");
   $().html(item.text).appendTo(li);
   return li;
}

.
.
.

function buildList()
{
  // psuedo code here
   for ( each item in list )
   {
  $("#mylist").insertItem(item);
   }
}

In FF/Safari the above code works perfectly fine.  In IE the above
code returns an item with only the  element but not the inserted
span element.  Why?

Can someone help me with this problem?




[jQuery] http://docs.jquery.com/ html rendering problem

2008-04-10 Thread bazzzman

Hi ^___^

When reading docs under some browsers (ie6/opera 9.5 beta, and may be
some others) I see tiresome space under sections name.

Check example:
http://farpost.ru/company/misc/jdoc_bug.png (12kb).

Having played with html validator I notice what you output invalid
html:
"line 149 column 5 - Warning:  isn't allowed in  elements"
http://farpost.ru/company/misc/jdoc_bug_html.png (11kb).



Please remove that empty p & br tags from table and check all other
page content by validator.

If u need some help on html or css - feel free to ask me do something.
Thanks for your job ^___^


[jQuery] "this" ?

2008-04-10 Thread Jeff

'scuse me for the noob question here...

i have statements like this:

$(".highlight").removeClass;
$("this:even").addClass("shaded");

And I don't think I'm using "this" or :even correctly; it doesn't work
=)

Googling has turned up some different ways that the "this" keyword is
used, and I'm not sure what is right here. I'm just trying to remove a
class from a bunch of elements and then apply a new class to even
numbered elements.

Any ideas? Again, sorry for the dumb question, but googling the word
"this" isn't very helpful since you get like 10 kabillion results.


[jQuery] Re: Display ajax result in 2 divs

2008-04-10 Thread Hamish Campbell

Why don't you let jQuery handle the AJAX as well? The "." in your
email probably contains some interesting code if you've created the
call yourself:

$.get('someurl.php', data, function(response) {
$('.update_em').html(response).show();
});

http://docs.jquery.com/Ajax

Ciao,

Hamish

On Apr 11, 12:16 am, "Web Specialist" <[EMAIL PROTECTED]>
wrote:
> Hi all.
>
> I have a response from Ajax call and I'll want to display that in 2
> divs(header and footer in my form). Now I'm using this terrible script:
>
>     

[jQuery] Re: Popup window

2008-04-10 Thread Guy Fraser

Josh Nathanson wrote:
>
> Hey Paul,
>
> There isn't really any jQuery code that helps with this, but I've got 
> a little plugin "jqURL" that can make it a bit easier:
>
> http://www.oakcitygraphics.com/jquery/jqURL/jqURLdemo.html
>
> It has a function "loc" so if you want to popup a window you can do this:
>
> $.jqURL("myfile.html", {w:400,h:400,wintype:'_blank'});


Wouldn't the "wintype" property be better named "target"?


[jQuery] Re: Popup window

2008-04-10 Thread Hamish Campbell

Have you considered using the jQuery UI Dialog plugin?

http://docs.jquery.com/UI/Dialog


On Apr 11, 11:50 am, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Hey Paul,
>
> There isn't really any jQuery code that helps with this, but I've got a
> little plugin "jqURL" that can make it a bit easier:
>
> http://www.oakcitygraphics.com/jquery/jqURL/jqURLdemo.html
>
> It has a function "loc" so if you want to popup a window you can do this:
>
> $.jqURL("myfile.html", {w:400,h:400,wintype:'_blank'});
>
> This will pop open a new window that is 400x400 containing "myfile.html".
>
> -- Josh
>
>
>
> - Original Message -
> From: "Paul Collins" <[EMAIL PROTECTED]>
> To: 
> Sent: Thursday, April 10, 2008 4:12 PM
> Subject: [jQuery] Popup window
>
> > Hi all,
>
> > I have been searching for some code to create a popup using JQuery.
> > Surprisingly, I am having a hard time. I want to create one where you
> > can specify size and not have the standard search bar, etc.
>
> > Would appreciate any help.
> > Cheers
> > Paul- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: jCarousel scroller

2008-04-10 Thread tic2000


After hours of trying I managed to do it.
The code that does it is:

   var self = this;

// Generates the scroller
screens = this.options.size / this.options.scroll;
screens = (Math.round(screens) < screens) ? 
Math.round(screens) +
1 : Math.round(screens);
lastItem = (this.first + this.options.scroll - 1);
lastItem = (lastItem > this.options.size) ? 
this.options.size :
lastItem;
currentScreen = lastItem/this.options.scroll;
currentScreen = (Math.round(currentScreen) < 
currentScreen) ?
currentScreen + 1 : Math.round(currentScreen);
var text = '';
if (screens > 1) {
for (i = 1; i <= screens; i++) {
if (i == currentScreen) {
text += '';
}
else {
text += '';
}
}
this.scroller.html(text);
this.scroller.wrap('');
}
// end scroller generation


This code is inside the buttons function "var self = this" is for
reference. Also the code I wrote in my previous post must be added.
But you better get my new file at
http://www.redluk.com/kankand6/sites/all/modules/jcarousel/js/jquery.jcarousel.js
and you can see it in action at http://www.redluk.com/kankand6/


[jQuery] Re: Ajax .load() with Report Pagination

2008-04-10 Thread tfat

Can anyone pls assist.

Thanks.

On Apr 11, 1:06 am, tfat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Really hoping someone can assist as if it's not possible then I will
> probably have to pull out my jQuery code.
>
> Basically using the following jQuery Ajax call, i.e:  $
> ("#links").load("/Main_Page #p-Getting-Started li"); from the
> following linkhttp://docs.jquery.com/Ajax/load#urldatacallback.
>
> I was originally using an iframe to pass in a url to the src attribute
> but changed my iframe to a DIV and then used  $("#links").load("/
> Main_Page #p-Getting-Started li");
>
> My problem is, that one of the pages that I am passing into
> this .load() call acutually hold a report with pagination,
> unfortunately this causes a problem using the .load() call as this
> prevents the pagination from working properly.
>
> Is there a means of somehow getting around this or do I need to resort
> back to an iframe?
>
> I also noticed that there was a jframe plug-in but unsure how to use
> it an unsure if this would solve my problem above but I did notice
> that it uses a "src" attribute within the DIV.
>
> Would really appreciate some help.
>
> Thanks.
> Tony.


[jQuery] Re: Ajax - synchronous ajax call timeout

2008-04-10 Thread Hamish Campbell

Err, this line:

> Try the jQuery Development group - it sounds like a bug.

Should read:

Try the jQuery Development group, they might be able to explain why it
does/doesn't work.

I'm fairly sure that you can't script a timeout for syncronous though.

On Apr 11, 11:35 am, Hamish Campbell <[EMAIL PROTECTED]> wrote:
> Could you post your code?
>
> Looking at the source (1.2.3) it appears that timeouts are not set for
> syncronous calls. I'm not sure if it's even possible - the
> XMLHttpRequest doesn't appear to have a timeout method.
>
> The best solution would probably be to not use syncronous requests at
> all. You'd normally need a really good reason to have syncronous
> calls.
>
> Try the jQuery Development group - it sounds like a bug.
>
> On Apr 11, 8:26 am, steve_f <[EMAIL PROTECTED]> wrote:
>
>
>
> > Anybody??
>
> > On Apr 9, 10:10 pm, steve_f <[EMAIL PROTECTED]> wrote:
>
> > > Has anybody implemented a synchronous ajax call with a timeout. I
> > > cannot get the timeout to fire, instead the ui just locks up, I cannot
> > > really have this in a live environment, it would really hack a user
> > > off!!!
> > > I am trying to use the synchronous call to compliment a client side
> > > asp.net validator therefore I need to wait for the return value of the
> > > webmethod. Anyone got a good approach or solution.
> > > Thanks- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


[jQuery] jquery cycle plugin counter

2008-04-10 Thread rosco

jquery cycle plugin counter - http://www.malsup.com/jquery/cycle/int2.html
The forward and back demo above provides a way to navagate the images,
has anyone found a way of counting the number of cycles. ie 1 or 5
It would display next to the forward and back buttons. see below.

prev | Next   ---  1 of 10


any help would be awesome!!


[jQuery] Edit-In-Place with Form plugin

2008-04-10 Thread Chris

I have a page that uses the jquery form plugin (http://www.malsup.com/
jquery/form/) to dynamically submit the form and then display the
submitted form on the same page.  I use the edit-in-place pluging
developed by (http://15daysofjquery.com/edit-in-place-with-ajax-using-
jquery-javascript-library/15/).  My problem is that I cannot edit in
place the items submitted with the form plugin without refreshing the
page.  I did discover I could make the items clickable (turning into
textarea's) by adding this set clickable function to be executed after
the form is submitted
$(".gr").each(function(i){
   var day =  $("[EMAIL PROTECTED]").val();
setClickable(this, i, day);
})
The items are now clickable, but when I save submit the edited text it
doesn't save in it the database.  Any thoughts?


[jQuery] Re: Popup window

2008-04-10 Thread Paul Collins

Thanks for getting back so fast Josh, that'll do the trick. Suprising
that there isn't much JQuery code for this. Maybe it's too easy!

Thanks again for your help.
Paul


On 11/04/2008, Josh Nathanson <[EMAIL PROTECTED]> wrote:
>
>  Hey Paul,
>
>  There isn't really any jQuery code that helps with this, but I've got a
> little plugin "jqURL" that can make it a bit easier:
>
>  http://www.oakcitygraphics.com/jquery/jqURL/jqURLdemo.html
>
>  It has a function "loc" so if you want to popup a window you can do this:
>
>  $.jqURL("myfile.html", {w:400,h:400,wintype:'_blank'});
>
>  This will pop open a new window that is 400x400 containing "myfile.html".
>
>  -- Josh
>
>
>  - Original Message - From: "Paul Collins" <[EMAIL PROTECTED]>
>  To: 
>  Sent: Thursday, April 10, 2008 4:12 PM
>  Subject: [jQuery] Popup window
>
>
>
>
> >
> > Hi all,
> >
> > I have been searching for some code to create a popup using JQuery.
> > Surprisingly, I am having a hard time. I want to create one where you
> > can specify size and not have the standard search bar, etc.
> >
> > Would appreciate any help.
> > Cheers
> > Paul
> >
>
>


[jQuery] Re: Not Receiving Mail...

2008-04-10 Thread Rick

Anyone have any ideas about why I'm not receiving jQuery email
through my webmail or in Outlook?  All my other mail is coming through
fine,
but not jQuery.

I unsubscribed and re-subscribed, but that didn't help.

I need my jQuery!  It's so lonely out here!

Rick

On Apr 10, 7:28 pm, Rick <[EMAIL PROTECTED]> wrote:
> I've unsubscribed and re-subscribed... let's see if I can get some
> mail!
>
> On Apr 10, 4:27 pm, Rick <[EMAIL PROTECTED]> wrote:
>
>
>
> > Anyone else having trouble receiving email?
>
> > I can read my posts online, but I'm not getting
> > mail in Outlook or on my webmail site.
>
> > Rick- Hide quoted text -
>
> - Show quoted text -


[jQuery] Star Rating Plugin v2.2: Problem disabling cancel button

2008-04-10 Thread DragonI

Hi,

I'm having a problem disabling the cancel button. Maybe it's just
me ;)

code says: //required: false, // disables the 'cancel' button so user
can only select one of the specified values

Here's what I tried:








Also tried:

$(function(){ $
('[EMAIL PROTECTED]').rating({required:false}); });

Thanks!


[jQuery] Re: Display ajax result in 2 divs

2008-04-10 Thread Web Specialist
Thanks upandhigh! Works like a charm with a class.

Cheers
Marco Antonio

On Thu, Apr 10, 2008 at 9:48 AM, upandhigh <[EMAIL PROTECTED]> wrote:

>
> but better to put them into on class
>
> 
> 
>
>  $('.update_em').html(data.saida).show();
>
> then you don't need container + you can put them into separate parts
> on the page
>
> On Apr 10, 3:16 pm, "Web Specialist" <[EMAIL PROTECTED]>
> wrote:
> > Hi all.
> >
> > I have a response from Ajax call and I'll want to display that in 2
> > divs(header and footer in my form). Now I'm using this terrible script:
> >
> > 

[jQuery] Re: Jquery and SSL

2008-04-10 Thread Josh Nathanson


FWIW, I can confirm that getJSON() works fine in Safari 3.1 over  HTTPS. 
I'm using it to call the AIM presence API w/no problems.


Hmm...I have code that works flawlessly for me on all browsers, plus Safari 
non-SSL, and fails only on Safari over SSL.  Something weird is going on - I 
think I was testing in Safari 3.0, maybe that is the issue?


At any rate the OP should test all the popular browsers before launching 
anything in production.


-- Josh



[jQuery] Re: Jquery and SSL

2008-04-10 Thread Chris Scott



On Apr 10, 2008, at 4:32 PM, Josh Nathanson wrote:


I have found that Ajax/jQuery/SSL doesn't work in Safari 3 (didn't  
test 2). I spent a couple of days trying to track down the issue and  
then gave up, after finding very little information available.  So  
you might need to do a little browser sniffing and make sure that if  
they're using Safari, you route them away from any Ajax/SSL  
implementations.


FWIW, I can confirm that getJSON() works fine in Safari 3.1 over  
HTTPS.  I'm using it to call the AIM presence API w/no problems.




Other than that I don't think there's anything different.

-- Josh


- Original Message - From: "Paul" <[EMAIL PROTECTED]>
To: "jQuery (English)" 
Sent: Thursday, April 10, 2008 4:19 PM
Subject: [jQuery] Jquery and SSL




Does anybody know if you have to do anything special to allow for  
AJAX

(via jquery) over SSL?




--
cs
http://iamzed.com/
http://hailtheale.com/



[jQuery] Re: Popup window

2008-04-10 Thread Josh Nathanson


Hey Paul,

There isn't really any jQuery code that helps with this, but I've got a 
little plugin "jqURL" that can make it a bit easier:


http://www.oakcitygraphics.com/jquery/jqURL/jqURLdemo.html

It has a function "loc" so if you want to popup a window you can do this:

$.jqURL("myfile.html", {w:400,h:400,wintype:'_blank'});

This will pop open a new window that is 400x400 containing "myfile.html".

-- Josh


- Original Message - 
From: "Paul Collins" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, April 10, 2008 4:12 PM
Subject: [jQuery] Popup window




Hi all,

I have been searching for some code to create a popup using JQuery.
Surprisingly, I am having a hard time. I want to create one where you
can specify size and not have the standard search bar, etc.

Would appreciate any help.
Cheers
Paul 




[jQuery] Re: Event Binding Problem

2008-04-10 Thread mike mike
Got it licked, many many thanks for your help Ariel and Wizzud ;)


On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
> Can't help you out with this, I've never read any..
>
> Cheers
>
>
> On 10 abr, 14:58, "mike mike" <[EMAIL PROTECTED]> wrote:
> > Hi Ariel,
> >
> > Many thanks again for replying!
> >
> > I think I am confussing the two approaches here ;-)  I think I need to
> go
> > down the delegation method as I may be adding a load of divs (the final
> app
> > will be used to track Amateur Radio nets, each one will need to have
> comment
> > data, signal data etc which needs to be editable) and I also want to
> > understand this stuff rather than copy & pasting ;-).
> >


[jQuery] Re: Ajax - synchronous ajax call timeout

2008-04-10 Thread Hamish Campbell

Could you post your code?

Looking at the source (1.2.3) it appears that timeouts are not set for
syncronous calls. I'm not sure if it's even possible - the
XMLHttpRequest doesn't appear to have a timeout method.

The best solution would probably be to not use syncronous requests at
all. You'd normally need a really good reason to have syncronous
calls.



Try the jQuery Development group - it sounds like a bug.

On Apr 11, 8:26 am, steve_f <[EMAIL PROTECTED]> wrote:
> Anybody??
>
> On Apr 9, 10:10 pm, steve_f <[EMAIL PROTECTED]> wrote:
>
>
>
> > Has anybody implemented a synchronous ajax call with a timeout. I
> > cannot get the timeout to fire, instead the ui just locks up, I cannot
> > really have this in a live environment, it would really hack a user
> > off!!!
> > I am trying to use the synchronous call to compliment a client side
> > asp.net validator therefore I need to wait for the return value of the
> > webmethod. Anyone got a good approach or solution.
> > Thanks- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Not Receiving Mail...

2008-04-10 Thread Rick

I've unsubscribed and re-subscribed... let's see if I can get some
mail!

On Apr 10, 4:27 pm, Rick <[EMAIL PROTECTED]> wrote:
> Anyone else having trouble receiving email?
>
> I can read my posts online, but I'm not getting
> mail in Outlook or on my webmail site.
>
> Rick


[jQuery] Popup window

2008-04-10 Thread Paul Collins

Hi all,

I have been searching for some code to create a popup using JQuery.
Surprisingly, I am having a hard time. I want to create one where you
can specify size and not have the standard search bar, etc.

Would appreciate any help.
Cheers
Paul


[jQuery] Re: Find a exact location in the dom, then move down from that location to another element

2008-04-10 Thread Andy Chambers

On Apr 10, 11:24 pm, sleepwalker <[EMAIL PROTECTED]> wrote:
> Is there a way in jquery to find your exact location in the dom and
> then move down from that location to another element? For example can
> I get the value of a input[text].someClass after changing it and write
> that change only to the next td.someOtherClass in the dom without
> using an id?

I'm trying to do something similar and I found something that works
for me but I have a feeling there's a better way.  I'll put down my
example and see if we get any comments.

In my document load function, I attach a handler to catch change
events on select elements like this

$("select").change(function(e) {
  send_select(this,e);
});

then send_select looks like this.

function send_select (obj, e) {
  var request = {};
  var msg = $("#" + obj.id + " option:selected").text();
  request[obj.id] = msg;
  $.get(location.href + "/" + obj.id,
request,
recv);
}

So in this function, obj is the object that was selected for binding.
I get its selected option children by getting its id building up a
selector string like the example in the documentation for the change
binding.  As I said, this does what I want but I wonder if there's a
better way.

--
Andy


[jQuery] Re: Jquery and SSL

2008-04-10 Thread Josh Nathanson


I have found that Ajax/jQuery/SSL doesn't work in Safari 3 (didn't test 2). 
I spent a couple of days trying to track down the issue and then gave up, 
after finding very little information available.  So you might need to do a 
little browser sniffing and make sure that if they're using Safari, you 
route them away from any Ajax/SSL implementations.


Other than that I don't think there's anything different.

-- Josh


- Original Message - 
From: "Paul" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Thursday, April 10, 2008 4:19 PM
Subject: [jQuery] Jquery and SSL




Does anybody know if you have to do anything special to allow for AJAX
(via jquery) over SSL? 




[jQuery] Re: Jquery and SSL

2008-04-10 Thread Jeffrey Kretz

I've successfully run ajax calls with jquery over SSL.

Are you on an https page making an http ajax call or vice-versa?  I'm not
sure if this would make a difference (never tried).

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Paul
Sent: Thursday, April 10, 2008 4:19 PM
To: jQuery (English)
Subject: [jQuery] Jquery and SSL


Does anybody know if you have to do anything special to allow for AJAX
(via jquery) over SSL?



[jQuery] Jquery and SSL

2008-04-10 Thread Paul

Does anybody know if you have to do anything special to allow for AJAX
(via jquery) over SSL?


[jQuery] Re: HTML Partial Element Does Not Exist?!

2008-04-10 Thread Wizzud

Well, without the code or a web-accessible page exhibiting the
problem, it's down to you now.

Use Firefox, with Firebug, and the DOM Inspector
Replace the alert with var assignments, eg
  var za = document.getElementById('MyDiv');
  var zb = $('#MyDiv');
  var zc = zb.html();
  var brk = 0;//set as break point
Break, and inspect vars; check DOM Inspector for #MyDiv (and that it's
unique)

Can't find #MyDiv?...
Break between (2) and (3), and between (3) and (4)
At breaks, inspect the DOM and check Firebug can Watch for, and find,
document.getElementById('MyDiv') and $('#MyDiv')

Still can't find it anywhere in the DOM?...
Break in (2) and check that it's actually in the returned data content

It has to exist at some point in all the above (eg, in the returned
data content?), and presumably start not-existing at some other point.
You're just going to have to narrow it down a bit more yourself.

On Apr 10, 7:12 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
> Not stupid at all...if any one is doing that kind of question, sure it
> is me :)
>
> OK, so the code actually does this:
> 1) AJAX Request to server (get)
> 2) Success: ccontent is placed into 
> 3) After content is is div, a scrubber runs and replaces links. 

[jQuery] Re: Find a exact location in the dom, then move down from that location to another element

2008-04-10 Thread Erik Beeson
I'm not quite sure what you're asking for, but it sounds like you might want
to check out the docs on selecting and traversing:

http://docs.jquery.com/Selectors
http://docs.jquery.com/Traversing

Hope it helps.

--Erik


On 4/10/08, sleepwalker <[EMAIL PROTECTED]> wrote:
>
>
> Is there a way in jquery to find your exact location in the dom and
> then move down from that location to another element? For example can
> I get the value of a input[text].someClass after changing it and write
> that change only to the next td.someOtherClass in the dom without
> using an id?
>


[jQuery] Find a exact location in the dom, then move down from that location to another element

2008-04-10 Thread sleepwalker

Is there a way in jquery to find your exact location in the dom and
then move down from that location to another element? For example can
I get the value of a input[text].someClass after changing it and write
that change only to the next td.someOtherClass in the dom without
using an id?


[jQuery] Re: Validate plugin 1.2.1 backward compatibility break

2008-04-10 Thread Jörn Zaefferer


Bryce Lohr schrieb:

[...]
If you have any suggestions, or alternate strategies, I'd be quite
grateful. Also, if solved, would you consider adding the patch back to
the main distributed version? The added flexibility should be useful
beyond just my case.
You are right that the plugin broke backwards compability in a few ways, 
but so far you are the only one to report this issue.


It would definitely help if you could provide a few more concrete 
examples - I'd like to evaluate if there are viable options to solve 
your problem without giving up the form-per-validator design. A key 
feature of that is the ability to freely add and remove elements from a 
form, without having to care about manully initializing validation for 
those or caring about event handlers.


Jörn


[jQuery] tablesorter, tr highlight

2008-04-10 Thread jseg


I'm using the tablesorter plugin and having a tough time trying to figure out
why my click function does not work on the the second page when using the
pager plugin.

$(document).ready(function() 
{ 
$("#myTable").tablesorter({widgets:
['zebra']}).tablesorterPager({container: $("#pager")});
$('tbody tr').click(function(){
alert('hi');
}); 
}
); 


-- 
View this message in context: 
http://www.nabble.com/tablesorter%2C-tr-highlight-tp16617916s27240p16617916.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Validate plugin 1.2.1 backward compatibility break

2008-04-10 Thread Bryce Lohr

**Apologies for the repost; had to correct the subject line. Anyone
know why text in square brackets is removed when posting via Google
Group's web form?


Hi Jörn,

I believe I've discovered a backward compatibility break when
upgrading from 1.1.2 to 1.2.1 of the Validate plugin. After a few days
of sorting through the problems I've had, I think I've narrowed down
issue down to the fact that the current version assumes in several
places that the form you're validating is actually an HTML form
element. Now, this is a pretty reasonable assumption for most use
cases, but is actually different from the previous version.

I'm developing an application with some rather large and complex
forms. The validate plugin is a critical part of the UI in these
forms. There are several places where I use a separate validator
instance to validate a subset of a large form on a button click. There
are other cases when I use the validator on elements that are not
inside a form tag at all. (I can provide more detail about my use
cases if needed.)

Near as I can tell from reading the code, there are 3 main ways the
current version depends on the HTML form tag:
1. To access the validator instance stored in the form (via
jquery.data())
2. As a query context when finding the number of elements in parts of
a form (the dependency-related methods do this)
3. As a filter in findByName()

You may know of ones I mssed, since you're much more familiar with the
code. I'd like to modify the plugin so that it no longer relies on
form element such as it does, but I'm a bit unsure about how to make
it work without it. #2 and #3 are not too hard to fix, but #1 is a
challenge. The trick is to provide a way to access the validator
instance without using "element.form", since element.form may be
undefined or refer to the wrong object.

If you have any suggestions, or alternate strategies, I'd be quite
grateful. Also, if solved, would you consider adding the patch back to
the main distributed version? The added flexibility should be useful
beyond just my case.

Regards,
Bryce Lohr


[jQuery] jCarousel scroller

2008-04-10 Thread tic2000

I want to create a scroller for jCarousel. I made something similar
with a previous version of jCarousel (you can see what exactly I want
to achieve at www.renmenbi.com. The fact is that I'm not at all
familiar with JavaScript nor jQuery and I can't do the scroller this
time.
I tried to use the same approach as I did before inspiring myself from
the prev and next buttons code. But this time if I write this:
 this.scroller = $('.jcarousel-scroller', this.container);

if (this.scroller.size() == 0 && this.options.scrollerHTML !=
null)
this.scroller =
this.clip.before(this.options.scrollerHTML).scrolls();
I get an error telling me that the function doesn't exist, even if I
copied the prev function code and rename it to "scrolls".
There is an easy way to achieve what I want?


[jQuery] tablesorter- click function not working on next page

2008-04-10 Thread jseg

I'm using the tablesorter plugin and having a tough time trying to
figure out why my click function does not work on the the next/second
page when using the pager plugin.

$(document).ready(function()
{
$("#myTable").tablesorter({widgets:
['zebra']}).tablesorterPager({container: $("#pager")});
$('tbody tr').click(function(){
alert('hi');
});
}
);


[jQuery] Multifile plugin IE problem

2008-04-10 Thread Stinkbug

I'm having a problem with the multifile plugin for jquery in Internet
Explorer.  My HTML looks like this.


File Upload





I can select multiple files, but when I try to upload them it only
uploads the first file I selected.  From looking at what the DOM is
doing in IE, it appears to be applying a null to the name attribute
for every addition file input it's adding.  This of course causes it
not to submit my files in an array.  As a test, after adding my files
I changed the name attributes to what they should be in the DOM
(data[file][]).  Then submitted the form and it works fine.

Of course, firefox works fine.  So does anyone know how to fix this?
I'm assuming I can write a little additional javascript to fix it, but
I'm not sure how.


[jQuery] Re: Validate plugn -> Error does not go away!

2008-04-10 Thread asle

Here is a test page:
http://fjklima.no/teknisk/validate.html

/asle


[jQuery] Re: Ajax? issue in IE 7

2008-04-10 Thread Hamish Campbell

Ah, hate it when that happens.

By the way, are you using Firebug for Firefox? That would help you
find this sort of issue a lot quicker.

On Apr 11, 6:16 am, David D <[EMAIL PROTECTED]> wrote:
> I found the problem.
>
> $('a.thickbox').click(function(){
>                         $(*).css("padding",0);
>                         $(*).css("margin",0);
>                 });
>
> I hadn't pasted that in the mail because I didn't think of the missing
> quotes around * causing a problem. I'm pretty sure I just pasted that
> directly from somewhere... Anyway, don't ya hate it when you spend
> hours scouring your code and questioning your sanity and the whole
> time it was someone else's causing problems :/ Live and learn...
>
> David D
>
> On Apr 8, 10:53 pm, David D <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm not for certain the event is firing. What seems kind of strange is
> > hide, show, and other effects dont seem to work correctly in that
> > particular area of the page as well. What marr.adam is saying does
> > kind of describe what seems to be happening, but it only happens from
> > the main page. I am running a php framework (xaraya) and any jquery
> > code that is loaded from other templates appear to work correctly in
> > IE 7. I'm rather stumped. The only thing I can think of is to work on
> > the rest of the project and hope I find an answer somewhere along the
> > way.
>
> > David D
>
> > On Apr 6, 10:35 pm, Hamish Campbell <[EMAIL PROTECTED]> wrote:
>
> > > Either the event didn't bind properly, or something is preventing it
> > > reaching "return false;"
>
> > > Is the even definitely firing? Do your other calls include the fadeOut
> > > and, if not, does it work when you remove that line?
>
> > > On Apr 7, 9:39 am, David D <[EMAIL PROTECTED]> wrote:
>
> > > > I have a login box that loads inside a container via an ajax request,
> > > > using .click. Here's the code:
>
> > > > $(document).ready(function(){
> > > >                 $('a.login').click(function(){
> > > >                         var thiscontainer = "#" + this.rel;
> > > >                         $.ajax({
> > > >                                 url: this.href + "&pageName=html",
> > > >                                 cache: false,
> > > >                                 success: function(html){
> > > >                                 $(thiscontainer).append(html);
> > > >                                 }
> > > >                         });
> > > >                         $('.login').fadeOut('slow');
> > > >                         return false;
> > > >                 });
> > > >         });
>
> > > > It works fine in FF2, but in IE7 it just opens the url, instead of
> > > > loading the requested page in the container (div).
>
> > > > I have several other ajax requests that use the same code and they all
> > > > seem to work fine in IE7. Any ideas why this particular request is
> > > > different?  Thanks for the help.- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Ajax - synchronous ajax call timeout

2008-04-10 Thread steve_f

Anybody??


On Apr 9, 10:10 pm, steve_f <[EMAIL PROTECTED]> wrote:
> Has anybody implemented a synchronous ajax call with a timeout. I
> cannot get the timeout to fire, instead the ui just locks up, I cannot
> really have this in a live environment, it would really hack a user
> off!!!
> I am trying to use the synchronous call to compliment a client side
> asp.net validator therefore I need to wait for the return value of the
> webmethod. Anyone got a good approach or solution.
> Thanks


[jQuery] Re: [validate] 1.2.1 backward compatibility break

2008-04-10 Thread Jörn Zaefferer


Bryce Lohr schrieb:

If you have any suggestions, or alternate strategies, I'd be quite
grateful. Also, if solved, would you consider adding the patch back to
the main distributed version? The added flexibility should be useful
beyond just my case.
  
You are right that the plugin broke backwards compability in a few ways, 
but so far you are the only one to report this issue.


It would definitely help if you could provide a few more concrete 
examples - I'd like to evaluate if there are viable options to solve 
your problem without giving up the form-per-validator design. A key 
feature of that is the ability to freely add and remove elements from a 
form, without having to care about manully initializing validation for 
those or caring about event handlers.


Jörn


[jQuery] Re: Cycle plugin, start from last entry in container, rather than first

2008-04-10 Thread Mike Alsup

> Does anyone know if this is possible?
>
> 
> msg 5
>
> msg 4
>
> msg 3
>
> msg 2
>
> msg 1
> 
>
> Assuming that I have the above code, is it possible to force msg 1 to be
> displayed rather than msg 5?
>
>
> 
>  Andy Matthews
> Senior ColdFusion Developer
>
> Office:  615.627.9747
> Fax:  615.467.6249
> www.dealerskins.com
>
> Total customer satisfaction is my number 1 priority! If you are not
> completely satisfied with the service I have provided, please let me know
> right away so I can correct the problem, or notify my manager Aaron West at
> [EMAIL PROTECTED]
>

Do you mean to have the show start on slide 5?  Use the 'startingSlide' option.

http://www.malsup.com/jquery/cycle/start.html

Mike


[jQuery] Re: [Validation]How to make two field check output one message?

2008-04-10 Thread Jörn Zaefferer


Jacky See schrieb:

Hi,

Some question on the config of validation plugins.
Suppose there are #fromDate and #toDate fields (using ui.datepicker).
I have added these custom rules
[...]

It will output two messages of 'Please input correct date range'.
How can I make it only ouput single one?
  
I've implemented a solution, please give the latest revision a try: 
http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js


You need to specify which elements to group using the new groups-option.

A usage example (actually a test, will later add it to docs) is here: 
http://dev.jquery.com/view/trunk/plugins/validate/test/messages.js


The interesting parts:







$.validator.addClassRules({
requiredDateRange: {required:true, date:true, dateRange:true}
});
$.validator.addMethod("dateRange", function() {
return new Date($("#fromDate").val()) < new Date($("#toDate").val());
}, "Please specify a correct date range.");
$("#dateRangeForm").validate({
groups: {
dateRange: "fromDate toDate"
},
errorPlacement: function(error) {
form.find(".errorContainer").append(error);
}
});

You'll most likely have to skip or modify the errorPlacement option, but 
the rest should work fine.


Your feedback on it is very welcome.

Jörn



[jQuery] Cycle plugin, start from last entry in container, rather than first

2008-04-10 Thread Andy Matthews
Does anyone know if this is possible?
 

msg 5 
msg 4 
msg 3 
msg 2 
msg 1

 
Assuming that I have the above code, is it possible to force msg 1 to be
displayed rather than msg 5?
 

 
Andy Matthews
Senior ColdFusion Developer

Office:  615.627.9747
Fax:  615.467.6249
www.dealerskins.com  
 
Total customer satisfaction is my number 1 priority! If you are not
completely satisfied with the service I have provided, please let me know
right away so I can correct the problem, or notify my manager Aaron West at
[EMAIL PROTECTED]
 
<>

[jQuery] Re: How do I use ColdFusion and jQuery variables for pagination?

2008-04-10 Thread Rick

Thanks, Josh... I'll work on that route.

Rick

On Apr 10, 4:48 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Rick, if you have 10,000 records, I would say to not dump them all into the
> client.
>
> My suggestion would be to set everything up as if you were doing the
> pagination on the server using CF, and then change your pagination links so
> that they are intercepted, and used to do an ajax call to your CF template
> which retrieves the records.
>
> Your CF template could output the records as an html table and then send
> that html back to the client -- this html would be the argument in your ajax
> callback function, which would take the returned html and place it in the
> right place on the page.
>
> This is all independent of any plugins, just using straight jQuery and CF.
>
> Just as a rough outline... suppose your pagination link looks like  href="myCfTemplate.cfm" class="paginate">5 (this would be to go to page
> 5 of the pagination).
>
> Your ajax call would look like something like:
> $("a.paginate").click(function() {
>     $.get(
>         this.href,
>         $(this).text(),
>         outputhtml
>     );
>     return false;
>
> });
>
> Where "outputhtml" is the function that takes the returned html and outputs
> it to the page.  This would send the data "5" to your CF template as an url
> variable, which you could use to determine which records to get from the
> database.
>
> -- Josh
>
>
>
> - Original Message -
> From: "Rick" <[EMAIL PROTECTED]>
> To: "jQuery (English)" 
> Sent: Thursday, April 10, 2008 1:17 PM
> Subject: [jQuery] Re: How do I use ColdFusion and jQuery variables for
>
> pagination?
>
> Thanks for the reply, Josh...
>
> I think the part that I'm not understanding is the "dump the whole
> query
> to the client and then the plugin takes care of the pagination."
>
> It also sounds like a memory and/or processor intensive way to get 20
> records
> per page.  If I have 10,000 records, I guess I would be getting and
> dumping
> all 10,000 records at once?
>
> I've considered taking the straight CF route with this, or perhaps
> using SQL
> to retrieve just the records I need.
>
> Would using CF or SQL be preferable for datasets composed of thousands
> of records?
>
> Rick
>
> On Apr 10, 3:31 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> > Rick - I don't know how the pagination plugin that you're using works, but
> > there may be some sort of "before" event that you can use to ajax some
> > variables to your CF page. Your CF template would take these variables and
> > use them to set the startrow and maxrow values and then send back the
> > result.
>
> > That said, not sure why you'd need to do that if you're doing pagination
> > on
> > the client side? The idea is that you dump the whole query to the client
> > and then the plugin takes care of the pagination.
>
> > -- Josh
>
> > - Original Message -
> > From: "Rick Faircloth" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Thursday, April 10, 2008 12:19 PM
> > Subject: [jQuery] How do I use ColdFusion and jQuery variables for
>
> > pagination?
>
> > > Hi, all...
>
> > > I'm a bit confused about how to get variables from jQuery that
> > > I can use in my ColdFusion code.
>
> > > In typical CF pagination, I use startrow and maxrows variables
> > > to limit the query output. How would I get these variables
> > > from the jQuery?
>
> > > I just can't piece together what's happening.
>
> > > Below is the jQuery I'm currently using. The total number
> > > of records is set in the jQuery using the recordCount CF variable.
>
> > > Thanks for any help!
>
> > > Rick
>
> > > 
>
> > > function pageselectCallback(page_id, jq){
> > > $('#Searchresult').text("Showing search results
> > > "+((page_id*20)+1)+"-"+((page_id*20)+20));
> > > }
>
> > > $(document).ready(function(){
> > > // Create pagination element
>
> > > $("#Pagination").pagination(#get_properties.recordCount#,
> > > {
> > > items_per_page:20,
> > > num_edge_entries: 2,
> > > num_display_entries: 20,
> > > callback: pageselectCallback
> > > });
> > > });
>
> > > - Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: [treeview] Drag and Drop support

2008-04-10 Thread Jörn Zaefferer


xwisdom schrieb:

Hello,

It would be nice if the treeview had drag & drop node sorting. It
would also be nice to have a node showing that the tree is loading
from the server.
  
There is some experimental code for adding and removing nodes available, 
a demo is here: 
http://dev.jquery.com/view/trunk/plugins/treeview/demo/edit.html (right 
click to remove nodes).


If you add jQuery UI sortables and a bit of code when adding/removing 
nodes you may already be pretty close.


Showing a loading indicator would be an addition to the async plugin: 
http://dev.jquery.com/view/trunk/plugins/treeview/jquery.treeview.async.js


Contributions are welcome.

Jörn


[jQuery] Re: How do I use ColdFusion and jQuery variables for pagination?

2008-04-10 Thread Josh Nathanson


Rick, if you have 10,000 records, I would say to not dump them all into the 
client.


My suggestion would be to set everything up as if you were doing the 
pagination on the server using CF, and then change your pagination links so 
that they are intercepted, and used to do an ajax call to your CF template 
which retrieves the records.


Your CF template could output the records as an html table and then send 
that html back to the client -- this html would be the argument in your ajax 
callback function, which would take the returned html and place it in the 
right place on the page.


This is all independent of any plugins, just using straight jQuery and CF.

Just as a rough outline... suppose your pagination link looks like href="myCfTemplate.cfm" class="paginate">5 (this would be to go to page 
5 of the pagination).


Your ajax call would look like something like:
$("a.paginate").click(function() {
   $.get(
   this.href,
   $(this).text(),
   outputhtml
   );
   return false;
});

Where "outputhtml" is the function that takes the returned html and outputs 
it to the page.  This would send the data "5" to your CF template as an url 
variable, which you could use to determine which records to get from the 
database.


-- Josh

- Original Message - 
From: "Rick" <[EMAIL PROTECTED]>

To: "jQuery (English)" 
Sent: Thursday, April 10, 2008 1:17 PM
Subject: [jQuery] Re: How do I use ColdFusion and jQuery variables for 
pagination?




Thanks for the reply, Josh...

I think the part that I'm not understanding is the "dump the whole
query
to the client and then the plugin takes care of the pagination."

It also sounds like a memory and/or processor intensive way to get 20
records
per page.  If I have 10,000 records, I guess I would be getting and
dumping
all 10,000 records at once?

I've considered taking the straight CF route with this, or perhaps
using SQL
to retrieve just the records I need.

Would using CF or SQL be preferable for datasets composed of thousands
of records?

Rick

On Apr 10, 3:31 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:

Rick - I don't know how the pagination plugin that you're using works, but
there may be some sort of "before" event that you can use to ajax some
variables to your CF page. Your CF template would take these variables and
use them to set the startrow and maxrow values and then send back the
result.

That said, not sure why you'd need to do that if you're doing pagination 
on

the client side? The idea is that you dump the whole query to the client
and then the plugin takes care of the pagination.

-- Josh



- Original Message -
From: "Rick Faircloth" <[EMAIL PROTECTED]>
To: 
Sent: Thursday, April 10, 2008 12:19 PM
Subject: [jQuery] How do I use ColdFusion and jQuery variables for

pagination?

> Hi, all...

> I'm a bit confused about how to get variables from jQuery that
> I can use in my ColdFusion code.

> In typical CF pagination, I use startrow and maxrows variables
> to limit the query output. How would I get these variables
> from the jQuery?

> I just can't piece together what's happening.

> Below is the jQuery I'm currently using. The total number
> of records is set in the jQuery using the recordCount CF variable.

> Thanks for any help!

> Rick

> 

> function pageselectCallback(page_id, jq){
> $('#Searchresult').text("Showing search results
> "+((page_id*20)+1)+"-"+((page_id*20)+20));
> }

> $(document).ready(function(){
> // Create pagination element

> 
$("#Pagination").pagination(#get_properties.recordCount#,
> {
> items_per_page:20,
> num_edge_entries: 2,
> num_display_entries: 20,
> callback: pageselectCallback
> });
> });

> - Hide quoted text -

- Show quoted text - 




[jQuery] Re: Testing...not receiving mail...

2008-04-10 Thread Aaron Heimlich
On Thu, Apr 10, 2008 at 3:23 PM, <[EMAIL PROTECTED]> wrote:

> This is just a test... had this been an actual...
>

emergency, the Attention Signal you just heard would have been followed by
official information, news or instructions.

-- 
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com


[jQuery] Not Receiving Mail...

2008-04-10 Thread Rick

Anyone else having trouble receiving email?

I can read my posts online, but I'm not getting
mail in Outlook or on my webmail site.

Rick


[jQuery] Testing...not receiving mail...

2008-04-10 Thread rick

This is just a test... had this been an actual...


[jQuery] Re: How do I use ColdFusion and jQuery variables for pagination?

2008-04-10 Thread Rick

Thanks for the reply, Josh...

I think the part that I'm not understanding is the "dump the whole
query
to the client and then the plugin takes care of the pagination."

It also sounds like a memory and/or processor intensive way to get 20
records
per page.  If I have 10,000 records, I guess I would be getting and
dumping
all 10,000 records at once?

I've considered taking the straight CF route with this, or perhaps
using SQL
to retrieve just the records I need.

Would using CF or SQL be preferable for datasets composed of thousands
of records?

Rick

On Apr 10, 3:31 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote:
> Rick - I don't know how the pagination plugin that you're using works, but
> there may be some sort of "before" event that you can use to ajax some
> variables to your CF page.  Your CF template would take these variables and
> use them to set the startrow and maxrow values and then send back the
> result.
>
> That said, not sure why you'd need to do that if you're doing pagination on
> the client side?  The idea is that you dump the whole query to the client
> and then the plugin takes care of the pagination.
>
> -- Josh
>
>
>
> - Original Message -
> From: "Rick Faircloth" <[EMAIL PROTECTED]>
> To: 
> Sent: Thursday, April 10, 2008 12:19 PM
> Subject: [jQuery] How do I use ColdFusion and jQuery variables for
>
> pagination?
>
> > Hi, all...
>
> > I'm a bit confused about how to get variables from jQuery that
> > I can use in my ColdFusion code.
>
> > In typical CF pagination, I use startrow and maxrows variables
> > to limit the query output.  How would I get these variables
> > from the jQuery?
>
> > I just can't piece together what's happening.
>
> > Below is the jQuery I'm currently using.  The total number
> > of records is set in the jQuery using the recordCount CF variable.
>
> > Thanks for any help!
>
> > Rick
>
> >        
>
> > function pageselectCallback(page_id, jq){
> >    $('#Searchresult').text("Showing search results
> > "+((page_id*20)+1)+"-"+((page_id*20)+20));
> >                    }
>
> >            $(document).ready(function(){
> > // Create pagination element
>
> > $("#Pagination").pagination(#get_properties.recordCount#,
> > {
> > items_per_page:20,
> > num_edge_entries: 2,
> > num_display_entries: 20,
> >                    callback: pageselectCallback
> >                });
> >            });
>
> >        - Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Validate plugn -> Error does not go away!

2008-04-10 Thread Jörn Zaefferer


asle schrieb:

Hello,
I am using jQuery Validation Plugin. The demos work fine. But when I
am using a new form I get correct errors. When I correct the invalid
input the error does not go away until I click the "submit" button.

A testpage would help debugging this.

Jörn


[jQuery] basic understanding of jquery and XMLresponse

2008-04-10 Thread Radek Šťastný

Hello I trying to start with jQuery, I have a working Ajax solution in pure 
javascript from before and I'd like to benefit from jquery in this way:
the server returns XML in form like

Content-Type: text/xml




status


in readable form
jQuery("#parts").find("ul").prepend("data time variables")

In xhtml code there is code

data time variables



And there is and "universal script" which go thought responseXML and looks 
for "parts" id on page and eval the content of jquery attribute.
function aj_set(xmlhttp) {
  if(xmlhttp.readyState == 4) {
var x=xmlhttp.responseXML.documentElement;
loop throught all xml entities...
  if (jQuery("parts",x.responseXML).attr("jquery")!=null){
 eval(jQuery("parts",x.responseXML).attr("jquery"));
  }

And here my confusion starts - it works for first call, but all other call 
returns still the same values.
when I add an alert with length after eval
if (jQuery(i,x.responseXML).attr("jquery")!=null){
   eval(jQuery("parts",x.responseXML).attr("jquery"));
   alert(jQuery("parts",x.responseXML).length);
}

I get increading number as a result of alert for every next call. Can someone 
explain me if it's a feature, or do I use it in a bad way? I tested that 
result object contains all the history of Ajax calls and at the end is the 
current result.
Meantime I found that I can use
jQuery("parts:last",x.responseXML) to overcme it, but I still do not 
understand why there is not only the last result



[jQuery] [validate] 1.2.1 backward compatibility break

2008-04-10 Thread Bryce Lohr

Hi Jörn,

I believe I've discovered a backward compatibility break when
upgrading from 1.1.2 to 1.2.1 of the Validate plugin. After a few days
of sorting through the problems I've had, I think I've narrowed down
issue down to the fact that the current version assumes in several
places that the form you're validating is actually an HTML form
element. Now, this is a pretty reasonable assumption for most use
cases, but is actually different from the previous version.

I'm developing an application with some rather large and complex
forms. The validate plugin is a critical part of the UI in these
forms. There are several places where I use a separate validator
instance to validate a subset of a large form on a button click. There
are other cases when I use the validator on elements that are not
inside a form tag at all. (I can provide more detail about my use
cases if needed.)

Near as I can tell from reading the code, there are 3 main ways the
current version depends on the HTML form tag:
1. To access the validator instance stored in the form (via
jquery.data())
2. As a query context when finding the number of elements in parts of
a form (the dependency-related methods do this)
3. As a filter in findByName()

You may know of ones I mssed, since you're much more familiar with the
code. I'd like to modify the plugin so that it no longer relies on
form element such as it does, but I'm a bit unsure about how to make
it work without it. #2 and #3 are not too hard to fix, but #1 is a
challenge. The trick is to provide a way to access the validator
instance without using "element.form", since element.form may be
undefined or refer to the wrong object.

If you have any suggestions, or alternate strategies, I'd be quite
grateful. Also, if solved, would you consider adding the patch back to
the main distributed version? The added flexibility should be useful
beyond just my case.

Regards,
Bryce Lohr


[jQuery] Re: Event Binding Problem

2008-04-10 Thread Ariel Flesler

Can't help you out with this, I've never read any..

Cheers

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

On 10 abr, 14:58, "mike mike" <[EMAIL PROTECTED]> wrote:
> Hi Ariel,
>
> Many thanks again for replying!
>
> I think I am confussing the two approaches here ;-)  I think I need to go
> down the delegation method as I may be adding a load of divs (the final app
> will be used to track Amateur Radio nets, each one will need to have comment
> data, signal data etc which needs to be editable) and I also want to
> understand this stuff rather than copy & pasting ;-).
>
> The fact that I have gotten this far really is testement to Jquery (I'v
> treid them all), it's allowed a PHP only JayEss-a-phobe an 'in' to this
> stuff.
>
> One more question if I may impose further - What is the best JQuery Book to
> buy?
>
> Many thanks for giving me a start on this, much appreciated ;-))
> Best Wishes
> Mike
>
> On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi Mike
>
> > >>I *think* the answer is in the FAQ snippet
>
> > That snippet is the base for Event delegation. That would the second
> > approach, I think you've been following the first (re-binding).
> > So, you take one option, or the other, not both. If you stick to re-
> > binding, the technique of a class you mentioned (dynamic) should work.
>
> > function bind(){
> >   $('a.new').click(fn).removeClass('new');
> > };
> > bind();
> > $.ajax({
> > 
> > success:function(){
> >          .
> >          bind();
> >          .
> > }
> > });
>
> > If you do this a lot (many times on many elements), you should
> > consider event delegation.
>
> > Cheers
>
> > --
> > Ariel Flesler
> >http://flesler.blogspot.com
>
> > On 10 abr, 11:41, "mike mike" <[EMAIL PROTECTED]> wrote:
> > > Many thanks for the help,
>
> > > *Ariel*, Yes I have read the FAQ and now followed all the links.  It's
> > > starting to make some sense, slowly, but I can't relate the examples to
> > my
> > > code (I really am a newb LOL).  I'm on a learning curve here ;-))
>
> > > *Wizzud*, Many thanks for the great explanation and yep, I see the
> > problem
> > > and it makes sense that I am giving away click events too freely (I am
> > > generous ike that).  So I need to target my new dynamic DIV rather than
> > all
> > > divs of the same class.  How to do that though?
>
> > > I tried adding a class "dynamic" to the server returned div, attached a
> > > click and then removed the class but that failed badly ;)  I can't see a
> > way
> > > to remove all clicks when an item is added and then re add click events
> > (and
> > > that seems silly somehow) and I can't add a unique ID per
> > DIV.portlet.  I
> > > have read about traversing but found no answer.
>
> > > I *think* the answer is in the FAQ snippet
>
> > > $('#mydiv').click(function(e){
> > >     if( $(e.target).is('a') )
> > >        fn.call(e.target,e);});
>
> > > $('#mydiv').load('my.html');
>
> > > but I can not relate this to what I am trying to do, I still have the
> > > problem of not being able to target the new DIV with   if(
> > > $(e.target).is('.portHeader') ) or does this method only select the
> > > .portHeader Clicked?
>
> > > I'd really appreciate any help with understanding this.
>
> > > Many thanks both,
> > > Mike
>
> > > On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
> > > > Have you checked this ?
>
> > > >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st.
> > ..
>
> > > > --
> > > > Ariel Flesler
> > > >http://flesler.blogspot.com
>
> > > > On 9 abr, 17:34, GM1WKR <[EMAIL PROTECTED]> wrote:
> > > > > Hi There,
>
> > > > > I am a total JS newb and hobbyist only so I hope I can explain my
> > > > > problem...
>
> > > > > I am using UI sortables to create a sortable list of DIVs each with
> > a
> > > > > header and content area.  I want to show/hide the content area when
> > > > > the header is clicked.
>
> > > > > DIVs are added dynamically via AJAX and are sortable and use the
> > > > > jquery Livedata plugin.
>
> > > > > However when my function setQRX fires I get strange results - 2 or
> > > > > three clicks are needed to collapse the .portContent div.  When
> > > > > collapsed a click opens the div and then immeadiately closes it
> > again.
>
> > > > > I am stumped, not a professional and in need of some help.  I have
> > > > > read about event delegation and think the problem may be related.
>
> > > > > I have found the same problem using fn toggle in any way when called
> > > > > from $
> > > > > ("#column").append(html).find('.portHeader').bind('click',setQRX);
>
> > > > > Best wishes
> > > > > Mike
>
> > > > > HTML returned by ajax is ...
>
> > > > > 
> > > > >                  > > > class="portHeader">MM0CKRMike > > > > span>Aberdeen59
> > > > >                 
> > > > >                 Comment Text in
> > > > here.
> > > > >                 Toggle
> > > > >         
>
> > > > > 
> > > > >         function setQRX(){
> > > > >                         var

[jQuery] Re: Event Binding Problem

2008-04-10 Thread mike mike
Hi Ariel,

Many thanks again for replying!

I think I am confussing the two approaches here ;-)  I think I need to go
down the delegation method as I may be adding a load of divs (the final app
will be used to track Amateur Radio nets, each one will need to have comment
data, signal data etc which needs to be editable) and I also want to
understand this stuff rather than copy & pasting ;-).

The fact that I have gotten this far really is testement to Jquery (I'v
treid them all), it's allowed a PHP only JayEss-a-phobe an 'in' to this
stuff.

One more question if I may impose further - What is the best JQuery Book to
buy?

Many thanks for giving me a start on this, much appreciated ;-))
Best Wishes
Mike


On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
> Hi Mike
>
> >>I *think* the answer is in the FAQ snippet
>
> That snippet is the base for Event delegation. That would the second
> approach, I think you've been following the first (re-binding).
> So, you take one option, or the other, not both. If you stick to re-
> binding, the technique of a class you mentioned (dynamic) should work.
>
> function bind(){
>   $('a.new').click(fn).removeClass('new');
> };
> bind();
> $.ajax({
> 
> success:function(){
>  .
>  bind();
>  .
> }
> });
>
> If you do this a lot (many times on many elements), you should
> consider event delegation.
>
> Cheers
>
> --
> Ariel Flesler
> http://flesler.blogspot.com
>
> On 10 abr, 11:41, "mike mike" <[EMAIL PROTECTED]> wrote:
> > Many thanks for the help,
> >
> > *Ariel*, Yes I have read the FAQ and now followed all the links.  It's
> > starting to make some sense, slowly, but I can't relate the examples to
> my
> > code (I really am a newb LOL).  I'm on a learning curve here ;-))
> >
> > *Wizzud*, Many thanks for the great explanation and yep, I see the
> problem
> > and it makes sense that I am giving away click events too freely (I am
> > generous ike that).  So I need to target my new dynamic DIV rather than
> all
> > divs of the same class.  How to do that though?
> >
> > I tried adding a class "dynamic" to the server returned div, attached a
> > click and then removed the class but that failed badly ;)  I can't see a
> way
> > to remove all clicks when an item is added and then re add click events
> (and
> > that seems silly somehow) and I can't add a unique ID per
> DIV.portlet.  I
> > have read about traversing but found no answer.
> >
> > I *think* the answer is in the FAQ snippet
> >
> > $('#mydiv').click(function(e){
> > if( $(e.target).is('a') )
> >fn.call(e.target,e);});
> >
> > $('#mydiv').load('my.html');
> >
> > but I can not relate this to what I am trying to do, I still have the
> > problem of not being able to target the new DIV with   if(
> > $(e.target).is('.portHeader') ) or does this method only select the
> > .portHeader Clicked?
> >
> > I'd really appreciate any help with understanding this.
> >
> > Many thanks both,
> > Mike
> >
> > On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > Have you checked this ?
> >
> > >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st.
> ..
> >
> > > --
> > > Ariel Flesler
> > >http://flesler.blogspot.com
> >
> > > On 9 abr, 17:34, GM1WKR <[EMAIL PROTECTED]> wrote:
> > > > Hi There,
> >
> > > > I am a total JS newb and hobbyist only so I hope I can explain my
> > > > problem...
> >
> > > > I am using UI sortables to create a sortable list of DIVs each with
> a
> > > > header and content area.  I want to show/hide the content area when
> > > > the header is clicked.
> >
> > > > DIVs are added dynamically via AJAX and are sortable and use the
> > > > jquery Livedata plugin.
> >
> > > > However when my function setQRX fires I get strange results - 2 or
> > > > three clicks are needed to collapse the .portContent div.  When
> > > > collapsed a click opens the div and then immeadiately closes it
> again.
> >
> > > > I am stumped, not a professional and in need of some help.  I have
> > > > read about event delegation and think the problem may be related.
> >
> > > > I have found the same problem using fn toggle in any way when called
> > > > from $
> > > > ("#column").append(html).find('.portHeader').bind('click',setQRX);
> >
> > > > Best wishes
> > > > Mike
> >
> > > > HTML returned by ajax is ...
> >
> > > > 
> > > >  > > class="portHeader">MM0CKRMike > > > span>Aberdeen59
> > > > 
> > > > Comment Text in
> > > here.
> > > > Toggle
> > > > 
> >
> > > > 
> > > > function setQRX(){
> > > > var parent = $(this);
> > > > $(this).toggle(
> >
> > > function(){$(this).next(".portContent").show().end();},
> >
> > > > function(){$(this).next(".portContent").hide("slow").end();}
> >
> > > > );return false;
> > > > }
> >
> > > > $('#column').sortable();
> > > > 

[jQuery] Validate plugn -> Error does not go away!

2008-04-10 Thread asle

Hello,
I am using jQuery Validation Plugin. The demos work fine. But when I
am using a new form I get correct errors. When I correct the invalid
input the error does not go away until I click the "submit" button.

Here is the code for a form with id="finansform":

var validator = $("#finansform").validate({
//  debug: true,
rules: {
firmanavn: {
required: true
},
org: {
required: true
},
kontaktperson: {
required: true
},
epost: {
required: true,
email:true
},
telefon: {
required: true
}
 },
messages:{
epost: "Ugyldig epost!"
},
errorElement: "em",
errorPlacement: function(error, element) {
error.text("obs!").appendTo(element.parent() );
},
success: function(label) {
// set   as text for IE
label.html(" ").addClass("success");
}
});


[jQuery] Re: Ajax? issue in IE 7

2008-04-10 Thread David D

I found the problem.

$('a.thickbox').click(function(){
$(*).css("padding",0);
$(*).css("margin",0);
});

I hadn't pasted that in the mail because I didn't think of the missing
quotes around * causing a problem. I'm pretty sure I just pasted that
directly from somewhere... Anyway, don't ya hate it when you spend
hours scouring your code and questioning your sanity and the whole
time it was someone else's causing problems :/ Live and learn...

David D

On Apr 8, 10:53 pm, David D <[EMAIL PROTECTED]> wrote:
> I'm not for certain the event is firing. What seems kind of strange is
> hide, show, and other effects dont seem to work correctly in that
> particular area of the page as well. What marr.adam is saying does
> kind of describe what seems to be happening, but it only happens from
> the main page. I am running a php framework (xaraya) and any jquery
> code that is loaded from other templates appear to work correctly in
> IE 7. I'm rather stumped. The only thing I can think of is to work on
> the rest of the project and hope I find an answer somewhere along the
> way.
>
> David D
>
> On Apr 6, 10:35 pm, Hamish Campbell <[EMAIL PROTECTED]> wrote:
>
> > Either the event didn't bind properly, or something is preventing it
> > reaching "return false;"
>
> > Is the even definitely firing? Do your other calls include the fadeOut
> > and, if not, does it work when you remove that line?
>
> > On Apr 7, 9:39 am, David D <[EMAIL PROTECTED]> wrote:
>
> > > I have a login box that loads inside a container via an ajax request,
> > > using .click. Here's the code:
>
> > > $(document).ready(function(){
> > > $('a.login').click(function(){
> > > var thiscontainer = "#" + this.rel;
> > > $.ajax({
> > > url: this.href + "&pageName=html",
> > > cache: false,
> > > success: function(html){
> > > $(thiscontainer).append(html);
> > > }
> > > });
> > > $('.login').fadeOut('slow');
> > > return false;
> > > });
> > > });
>
> > > It works fine in FF2, but in IE7 it just opens the url, instead of
> > > loading the requested page in the container (div).
>
> > > I have several other ajax requests that use the same code and they all
> > > seem to work fine in IE7. Any ideas why this particular request is
> > > different?  Thanks for the help.


[jQuery] Re: How do I use ColdFusion and jQuery variables for pagination?

2008-04-10 Thread Josh Nathanson


Rick - I don't know how the pagination plugin that you're using works, but 
there may be some sort of "before" event that you can use to ajax some 
variables to your CF page.  Your CF template would take these variables and 
use them to set the startrow and maxrow values and then send back the 
result.


That said, not sure why you'd need to do that if you're doing pagination on 
the client side?  The idea is that you dump the whole query to the client 
and then the plugin takes care of the pagination.


-- Josh

- Original Message - 
From: "Rick Faircloth" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, April 10, 2008 12:19 PM
Subject: [jQuery] How do I use ColdFusion and jQuery variables for 
pagination?





Hi, all...

I'm a bit confused about how to get variables from jQuery that
I can use in my ColdFusion code.

In typical CF pagination, I use startrow and maxrows variables
to limit the query output.  How would I get these variables
from the jQuery?

I just can't piece together what's happening.

Below is the jQuery I'm currently using.  The total number
of records is set in the jQuery using the recordCount CF variable.

Thanks for any help!

Rick


   

function pageselectCallback(page_id, jq){
   $('#Searchresult').text("Showing search results
"+((page_id*20)+1)+"-"+((page_id*20)+20));
   }

   $(document).ready(function(){
// Create pagination element

$("#Pagination").pagination(#get_properties.recordCount#, {
items_per_page:20,
num_edge_entries: 2,
num_display_entries: 20,
   callback: pageselectCallback
   });
   });

   





[jQuery] How do I use ColdFusion and jQuery variables for pagination?

2008-04-10 Thread Rick Faircloth

Hi, all...

I'm a bit confused about how to get variables from jQuery that
I can use in my ColdFusion code.

In typical CF pagination, I use startrow and maxrows variables
to limit the query output.  How would I get these variables
from the jQuery?

I just can't piece together what's happening.

Below is the jQuery I'm currently using.  The total number
of records is set in the jQuery using the recordCount CF variable.

Thanks for any help!

Rick




function pageselectCallback(page_id, jq){
$('#Searchresult').text("Showing search 
results
"+((page_id*20)+1)+"-"+((page_id*20)+20));
}

$(document).ready(function(){
// Create pagination element

$("#Pagination").pagination(#get_properties.recordCount#, {
items_per_page:20,
num_edge_entries: 2,
num_display_entries: 20,
callback: pageselectCallback
});
});





[jQuery] Re: How to get a 'fresh' ui datepicker date?

2008-04-10 Thread Jacky See

I have found some wicked way to do it.

This is the code where I'm writing a plugin to accept date range pair
and auto-init them.

//Assuming from/to date have same prefix id (e.g. #eventFromDate,
#eventToDate)
$.fn.datepickerPair = function(options){
return this.datepicker(
$.extend({
beforeShow:function(elem){
var id = elem.id;
var isFrom = /FromDate$/.test(id);
var prefix = id.replace(/(FromDate|ToDate)$/,'');
var minDate = isFrom?null: $.datepicker._getInst($
("#"+prefix+"FromDate").get(0)._calId)._setDateFromField("#"+prefix
+"FromDate");
var maxDate = !isFrom?null: $.datepicker._getInst($
("#"+prefix+"ToDate").get(0)._calId)._setDateFromField("#"+prefix
+"ToDate");
return {minDate:minDate, maxDate:maxDate};
},options)
);
}

Any other 'cleaner' way?

On 4月11日, 上午1時09分, Jacky  See <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> This is about the ui datepicker.
>
> I have an input field with a datepicker, using image as trigger.
> The field is not read only, user are allowed to input by keyboard.
>
> The problem is that when user type some invalid input like '33'
> the $('#input').datepicker('getdate'), will still only get the last
> selected date.
>
> Is that any way to get the 'fresh' date?
> Any trigger I can call?
> I need it to fill in a date range using 'beforeShow' option.


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

2008-04-10 Thread skube

Has this issue been resolved?

On Mar 27, 8:31 am, Stuart <[EMAIL PROTECTED]> wrote:
> 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 :modifiedselector 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 :modifiedselector.
> > 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 anymodifiedform 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 :modifiedselector
> > > but no luck. With this code unsaved is still undefined:
> > > [code]
> > > var unsaved = $("#formId:modified").size();
> > > [/code]
>
> > > Any ideas anyone?


[jQuery] Re: HTML Partial Element Does Not Exist?!

2008-04-10 Thread OhNoMrBill

Not stupid at all...if any one is doing that kind of question, sure it
is me :)

OK, so the code actually does this:
1) AJAX Request to server (get)
2) Success: ccontent is placed into 
3) After content is is div, a scrubber runs and replaces links. 

[jQuery] Re: Event Binding Problem

2008-04-10 Thread Wizzud

Turn it round slightly.
Instead of ...

$("#column").append(html).find('.portHeader').bind('click',setQRX);

try...

$(html).appendTo('#column').find('.portHeader').bind('click',setQRX);

This way, when you get to the find(), the context is the newly
appended html, whereas previously is was #column.


On Apr 10, 3:41 pm, "mike mike" <[EMAIL PROTECTED]> wrote:
> Many thanks for the help,
>
> *Ariel*, Yes I have read the FAQ and now followed all the links.  It's
> starting to make some sense, slowly, but I can't relate the examples to my
> code (I really am a newb LOL).  I'm on a learning curve here ;-))
>
> *Wizzud*, Many thanks for the great explanation and yep, I see the problem
> and it makes sense that I am giving away click events too freely (I am
> generous ike that).  So I need to target my new dynamic DIV rather than all
> divs of the same class.  How to do that though?
>
> I tried adding a class "dynamic" to the server returned div, attached a
> click and then removed the class but that failed badly ;)  I can't see a way
> to remove all clicks when an item is added and then re add click events (and
> that seems silly somehow) and I can't add a unique ID per DIV.portlet.  I
> have read about traversing but found no answer.
>
> I *think* the answer is in the FAQ snippet
>
> $('#mydiv').click(function(e){
> if( $(e.target).is('a') )
>fn.call(e.target,e);});
>
> $('#mydiv').load('my.html');
>
> but I can not relate this to what I am trying to do, I still have the
> problem of not being able to target the new DIV with   if(
> $(e.target).is('.portHeader') ) or does this method only select the
> .portHeader Clicked?
>
> I'd really appreciate any help with understanding this.
>
> Many thanks both,
> Mike
>
> On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
>
> > Have you checked this ?
>
> >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> > --
> > Ariel Flesler
> >http://flesler.blogspot.com
>
> > On 9 abr, 17:34, GM1WKR <[EMAIL PROTECTED]> wrote:
> > > Hi There,
>
> > > I am a total JS newb and hobbyist only so I hope I can explain my
> > > problem...
>
> > > I am using UI sortables to create a sortable list of DIVs each with a
> > > header and content area.  I want to show/hide the content area when
> > > the header is clicked.
>
> > > DIVs are added dynamically via AJAX and are sortable and use the
> > > jquery Livedata plugin.
>
> > > However when my function setQRX fires I get strange results - 2 or
> > > three clicks are needed to collapse the .portContent div.  When
> > > collapsed a click opens the div and then immeadiately closes it again.
>
> > > I am stumped, not a professional and in need of some help.  I have
> > > read about event delegation and think the problem may be related.
>
> > > I have found the same problem using fn toggle in any way when called
> > > from $
> > > ("#column").append(html).find('.portHeader').bind('click',setQRX);
>
> > > Best wishes
> > > Mike
>
> > > HTML returned by ajax is ...
>
> > > 
> > >  > class="portHeader">MM0CKRMike > > span>Aberdeen59
> > > 
> > > Comment Text in
> > here.
> > > Toggle
> > > 
>
> > > 
> > > function setQRX(){
> > > var parent = $(this);
> > > $(this).toggle(
>
> > function(){$(this).next(".portContent").show().end();},
>
> > > function(){$(this).next(".portContent").hide("slow").end();}
>
> > > );return false;
> > > }
>
> > > $('#column').sortable();
> > > $('#addportlet').livequery('click',function()
> > > {
> > > var data = $("#portAdd").serialize();
>
> > > $.ajax({
> > >   url: "3ajax.php",
> > >   cache: false,
> > >   data: data,
> > >   success: function(html){
> > > $
> > > ("#column").append(html).find('.portHeader').bind('click',setQRX);
>
> > $('#column').sortable('refresh');
> > > $( "form" )[ 0
> > ].reset();
> > >   }
> > > });
> > > }
> > > );//click#addport
> > > 


[jQuery] Re: HTML Partial Element Does Not Exist?!

2008-04-10 Thread Wizzud

Um, I realise this is probably a stupid question but has the named DIV
actually been added into the DOM at the time you do the jQuery lookup
on it?
(I know you've said that it displays on the page, but you don't show
what is actually being done to it to get it there)

On Apr 10, 6:41 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
> Bouncing this one up. Getting kind of urgent. Can anyone tell me what
> the requirements are for accessing an element delivered in an HTML
> partial?
>
> All I am trying to do is attach an onclick to an href...after it comes
> down from the server.
>
> On Apr 10, 6:47 am, OhNoMrBill <[EMAIL PROTECTED]> wrote:
>
> > That is a bit cryptic, what do you mean by completed? The AJAX call
> > does successfully fire the call back for success.
>
> > It is after this call back completes, that a "scrubber" function is
> > called on the newly arrived div. Which, we are told is undefined.
>
> > So, the question is why would a div that displays in the browser not
> > be available by a reference such as:
>
> > alert($("#MyDiv").html()); or alert($("#MyDiv").text());
>
> > On Apr 9, 9:36 pm, Hamish Campbell <[EMAIL PROTECTED]> wrote:
>
> > > Is this an ajax call? 90% of these questions seem to come down to the
> > > call not being completed.
>
> > > On Apr 10, 1:38 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
>
> > > > Yup, agreed. Tried that method too. Both return undefined. Any other
> > > > thoughts on why the div and/or it's contents are not showing up in the
> > > > DOM?
>
> > > > On Apr 9, 4:49 pm, Wizzud <[EMAIL PROTECTED]> wrote:
>
> > > > > Your div does not actually contain any HTML, just text.
> > > > > Try ...
> > > > > alert($("#MyDiv").text());
>
> > > > > On Apr 9, 8:39 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
>
> > > > > > I have an HTML partial coming back from a server that includes a 
> > > > > > named
> > > > > > div (ex: blah)
>
> > > > > > When I try to run the following on it, it shows the div as empty:
>
> > > > > > alert($("#MyDiv").html());
>
> > > > > > I suspect the DOM is not aware of the retuned div (though, why it
> > > > > > displays is then a huge mystery).
>
> > > > > > Can anyone clarify this for me? Maybe tell me how to tap the DOM on
> > > > > > the shoulder with the newly returned div?
>
> > > > > > Thanks much!- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > > - Show quoted text -


[jQuery] Re: JQuery Selector

2008-04-10 Thread Wizzud

Ah, sorry. I was looking at it wrt the literal elements, not as the
representation of an external structure. Apologies.

On Apr 10, 3:52 am, JB <[EMAIL PROTECTED]> wrote:
> A section is just and idea, here it is represented by 'sectionstart'
> divs and 'sectionend' divs, everything within a section should be
> indented progressively based on how deep it is (infinitely deep is
> possible).
>
> On Apr 9, 6:53 pm, Wizzud <[EMAIL PROTECTED]> wrote:
>
> > Actually, no I can't see. Every DIV with #survey contains just one
> > text node - nothing else.
>
> > On Apr 9, 10:27 pm, JB <[EMAIL PROTECTED]> wrote:
>
> > > I've got the following html
>
> > > 
> > > 
> > > 
> > > start
> > > 
> > > 
> > > start
> > > 
> > > 
> > > end
> > > 
> > > 
> > > start
> > > 
> > > 
> > > end
> > > 
> > > 
> > > start
> > > 
> > > 
> > > start
> > > 
> > > 
> > > end
> > > 
> > > 
> > > end
> > > 
> > > 
> > > end
> > > 
> > > 
>
> > > As you can see there are section starts & section ends that can
> > > contain other starts and ends.  I want to leave the html as is, but
> > > visually give some left padding/margin based on how 'deep' the section
> > > is.  I've been trying to get this via jquery but can't seem to get
> > > it.  Say I'm one level deep I want margin-left:20px, if I'm 2 levels
> > > deep I want margin-left:40px and so on...
>
> > > Thanks for the help.- Hide quoted text -
>
> > - Show quoted text -


[jQuery] Re: HTML Partial Element Does Not Exist?!

2008-04-10 Thread OhNoMrBill

Bouncing this one up. Getting kind of urgent. Can anyone tell me what
the requirements are for accessing an element delivered in an HTML
partial?

All I am trying to do is attach an onclick to an href...after it comes
down from the server.

On Apr 10, 6:47 am, OhNoMrBill <[EMAIL PROTECTED]> wrote:
> That is a bit cryptic, what do you mean by completed? The AJAX call
> does successfully fire the call back for success.
>
> It is after this call back completes, that a "scrubber" function is
> called on the newly arrived div. Which, we are told is undefined.
>
> So, the question is why would a div that displays in the browser not
> be available by a reference such as:
>
> alert($("#MyDiv").html()); or alert($("#MyDiv").text());
>
> On Apr 9, 9:36 pm, Hamish Campbell <[EMAIL PROTECTED]> wrote:
>
> > Is this an ajax call? 90% of these questions seem to come down to the
> > call not being completed.
>
> > On Apr 10, 1:38 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
>
> > > Yup, agreed. Tried that method too. Both return undefined. Any other
> > > thoughts on why the div and/or it's contents are not showing up in the
> > > DOM?
>
> > > On Apr 9, 4:49 pm, Wizzud <[EMAIL PROTECTED]> wrote:
>
> > > > Your div does not actually contain any HTML, just text.
> > > > Try ...
> > > > alert($("#MyDiv").text());
>
> > > > On Apr 9, 8:39 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
>
> > > > > I have an HTML partial coming back from a server that includes a named
> > > > > div (ex: blah)
>
> > > > > When I try to run the following on it, it shows the div as empty:
>
> > > > > alert($("#MyDiv").html());
>
> > > > > I suspect the DOM is not aware of the retuned div (though, why it
> > > > > displays is then a huge mystery).
>
> > > > > Can anyone clarify this for me? Maybe tell me how to tap the DOM on
> > > > > the shoulder with the newly returned div?
>
> > > > > Thanks much!- Hide quoted text -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -


[jQuery] Re: IE doesn't like .css(stuff)?

2008-04-10 Thread Leanan

Fixed it.


[jQuery] How to get a 'fresh' ui datepicker date?

2008-04-10 Thread Jacky See

Dear all,

This is about the ui datepicker.

I have an input field with a datepicker, using image as trigger.
The field is not read only, user are allowed to input by keyboard.

The problem is that when user type some invalid input like '33'
the $('#input').datepicker('getdate'), will still only get the last
selected date.

Is that any way to get the 'fresh' date?
Any trigger I can call?
I need it to fill in a date range using 'beforeShow' option.


[jQuery] Re: Event Binding Problem

2008-04-10 Thread Ariel Flesler

Hi Mike

>>I *think* the answer is in the FAQ snippet

That snippet is the base for Event delegation. That would the second
approach, I think you've been following the first (re-binding).
So, you take one option, or the other, not both. If you stick to re-
binding, the technique of a class you mentioned (dynamic) should work.

function bind(){
   $('a.new').click(fn).removeClass('new');
};
bind();
$.ajax({
  
  success:function(){
  .
  bind();
  .
  }
});

If you do this a lot (many times on many elements), you should
consider event delegation.

Cheers

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

On 10 abr, 11:41, "mike mike" <[EMAIL PROTECTED]> wrote:
> Many thanks for the help,
>
> *Ariel*, Yes I have read the FAQ and now followed all the links.  It's
> starting to make some sense, slowly, but I can't relate the examples to my
> code (I really am a newb LOL).  I'm on a learning curve here ;-))
>
> *Wizzud*, Many thanks for the great explanation and yep, I see the problem
> and it makes sense that I am giving away click events too freely (I am
> generous ike that).  So I need to target my new dynamic DIV rather than all
> divs of the same class.  How to do that though?
>
> I tried adding a class "dynamic" to the server returned div, attached a
> click and then removed the class but that failed badly ;)  I can't see a way
> to remove all clicks when an item is added and then re add click events (and
> that seems silly somehow) and I can't add a unique ID per DIV.portlet.  I
> have read about traversing but found no answer.
>
> I *think* the answer is in the FAQ snippet
>
> $('#mydiv').click(function(e){
>     if( $(e.target).is('a') )
>        fn.call(e.target,e);});
>
> $('#mydiv').load('my.html');
>
> but I can not relate this to what I am trying to do, I still have the
> problem of not being able to target the new DIV with   if(
> $(e.target).is('.portHeader') ) or does this method only select the
> .portHeader Clicked?
>
> I'd really appreciate any help with understanding this.
>
> Many thanks both,
> Mike
>
> On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Have you checked this ?
>
> >http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_st...
>
> > --
> > Ariel Flesler
> >http://flesler.blogspot.com
>
> > On 9 abr, 17:34, GM1WKR <[EMAIL PROTECTED]> wrote:
> > > Hi There,
>
> > > I am a total JS newb and hobbyist only so I hope I can explain my
> > > problem...
>
> > > I am using UI sortables to create a sortable list of DIVs each with a
> > > header and content area.  I want to show/hide the content area when
> > > the header is clicked.
>
> > > DIVs are added dynamically via AJAX and are sortable and use the
> > > jquery Livedata plugin.
>
> > > However when my function setQRX fires I get strange results - 2 or
> > > three clicks are needed to collapse the .portContent div.  When
> > > collapsed a click opens the div and then immeadiately closes it again.
>
> > > I am stumped, not a professional and in need of some help.  I have
> > > read about event delegation and think the problem may be related.
>
> > > I have found the same problem using fn toggle in any way when called
> > > from $
> > > ("#column").append(html).find('.portHeader').bind('click',setQRX);
>
> > > Best wishes
> > > Mike
>
> > > HTML returned by ajax is ...
>
> > > 
> > >                  > class="portHeader">MM0CKRMike > > span>Aberdeen59
> > >                 
> > >                 Comment Text in
> > here.
> > >                 Toggle
> > >         
>
> > > 
> > >         function setQRX(){
> > >                         var parent = $(this);
> > >                         $(this).toggle(
>
> > function(){$(this).next(".portContent").show().end();},
>
> > > function(){$(this).next(".portContent").hide("slow").end();}
>
> > >                         );return false;
> > >         }
>
> > >                 $('#column').sortable();
> > >                 $('#addportlet').livequery('click',function()
> > >                         {
> > >                         var data = $("#portAdd").serialize();
>
> > >                                         $.ajax({
> > >                                           url: "3ajax.php",
> > >                                           cache: false,
> > >                                           data: data,
> > >                                           success: function(html){
> > >                                                 $
> > > ("#column").append(html).find('.portHeader').bind('click',setQRX);
>
> > $('#column').sortable('refresh');
> > >                                                 $( "form" )[ 0
> > ].reset();
> > >                                           }
> > >                                         });
> > >                         }
> > >                 );//click#addport
> > > - Ocultar texto de la cita -
>
> - Mostrar texto de la cita -


[jQuery] Re: jQuery Image Slideshow likd jdGallery?

2008-04-10 Thread mmcglynn

I would like something like this as well. The Interface plugin is not
very good.

On Apr 7, 3:11 pm, dsizemore <[EMAIL PROTECTED]> wrote:
> Does anyone know if there is a jQuery imageslideshowplugin that will
> basically duplicate the functionality of 
> jdGallery:http://smoothgallery.jondesign.net/showcase/gallery/?
>
> I've tried jdGallery alongside jQuery, but it doesn't seem to work
> when next to some jQuery plugins.
>
> Really all I'm looking for is an automatic image transition (fading
> effect or other) and the ability to write a caption at the buttom of
> the image (so I don't have to go in to photoshop and create the
> caption into the image).
>
> Thanks


[jQuery] IE doesn't like .css(stuff)?

2008-04-10 Thread Leanan

Afternoon ladies and gents.

I'm experiencing a weird issue.  I have a div that contains popup
information for when users hover over specific items on the page.
Everything looks beautiful in firefox, but IE takes a dump (go
figure).

I was wondering if anyone might have an idea why?

Here's what I got:

When someone hovers over the appropriate thing:

$("#mypopup").html(myText).show().css({'top' : ypos, 'left': xpos});

ypos and xpos are the coordinates of the mouse on the screen.

When I look at it in Firefox, the div is shown and "pops up" next to
the mouse (I do a little ofsetting with xpos and ypos).

However in IE, it causes the div to just be shown, which pushes
everything under it down (and causes things to flicker because now the
mouse isn't on the item that should trigger the popup).

I've tried searching known css() issues in IE, but haven't found
anything that pertains to this situation (modifying the top and left
of an element).

Thanks in advance.


[jQuery] Re: Using Jquery instance in an Iframe

2008-04-10 Thread rolfsf

There was a plugin that someone developed for this sort of situation,
but I'm not sure it's still being supported/updated. Look for a jQuery
plugin called FrameReady

rolfsf

On Apr 10, 5:51 am, Frederic <[EMAIL PROTECTED]> wrote:
> Hello,
> To avoid the loading of multiple Jquery in my application using
> Iframe, I would know if anybody has succeeded in using a single Jquery
> instance (in the same domain name).
>
> Any idea on a solution ?
> regards
> Frederic


[jQuery] Re: markItUp! input for Jeditable

2008-04-10 Thread Jay Salvat

Thanks to you Mika !

> All feedback and bug reports are welcome.

Not a bug but a Css conflict. In the demo, buttons are underlined as
your links.


Jay.
www.jaysalvat.com

On 8 avr, 12:58, Mika Tuupola <[EMAIL PROTECTED]> wrote:
> Finally had some extra time so I glued markItUp! and Jeditable
> together. Actually writing the blog entry took more time than
> JavaScript code. This custom input is only six lines long. I still
> decided to write one more tutorial on how to write Jeditable inputs.
> Below links to tutorial and separate demo page.
>
> http://www.appelsiini.net/2008/4/markitup-for-jeditablehttp://www.appelsiini.net/projects/jeditable/markitup/markitup.html
>
> Thanks to Jay Salvat for great plugin! It was incredible easy to work
> with (read, I encountered zero problems).
>
> All feedback and bug reports are welcome.
>
> --
> Mika Tuupolahttp://www.appelsiini.net/


[jQuery] jCarousel's wrap: 'both' doesn't seem to work

2008-04-10 Thread sprocketeer

Perhaps I'm misunderstanding what this is supposed to do, but when I
have wrap set to both I was expecting that both the previous and next
buttons would become inactive (when you're at either the beginning or
end of the list). Is this not what wrap: 'both' is supposed to do? If
not, is there a way to do what I'm describing?

Also, is there a way to make it circular so that if you click the
previous button on the first item it would scroll to the left (items
scroll in from the left) and the reverse at the end?


[jQuery] Re: Event Binding Problem

2008-04-10 Thread mike mike
Many thanks for the help,

*Ariel*, Yes I have read the FAQ and now followed all the links.  It's
starting to make some sense, slowly, but I can't relate the examples to my
code (I really am a newb LOL).  I'm on a learning curve here ;-))

*Wizzud*, Many thanks for the great explanation and yep, I see the problem
and it makes sense that I am giving away click events too freely (I am
generous ike that).  So I need to target my new dynamic DIV rather than all
divs of the same class.  How to do that though?

I tried adding a class "dynamic" to the server returned div, attached a
click and then removed the class but that failed badly ;)  I can't see a way
to remove all clicks when an item is added and then re add click events (and
that seems silly somehow) and I can't add a unique ID per DIV.portlet.  I
have read about traversing but found no answer.

I *think* the answer is in the FAQ snippet

$('#mydiv').click(function(e){
if( $(e.target).is('a') )
   fn.call(e.target,e);
});
$('#mydiv').load('my.html');


but I can not relate this to what I am trying to do, I still have the
problem of not being able to target the new DIV with   if(
$(e.target).is('.portHeader') ) or does this method only select the
.portHeader Clicked?

I'd really appreciate any help with understanding this.

Many thanks both,
Mike


On 10/04/2008, Ariel Flesler <[EMAIL PROTECTED]> wrote:
>
>
> Have you checked this ?
>
> http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F
>
> --
> Ariel Flesler
> http://flesler.blogspot.com
>
> On 9 abr, 17:34, GM1WKR <[EMAIL PROTECTED]> wrote:
> > Hi There,
> >
> > I am a total JS newb and hobbyist only so I hope I can explain my
> > problem...
> >
> > I am using UI sortables to create a sortable list of DIVs each with a
> > header and content area.  I want to show/hide the content area when
> > the header is clicked.
> >
> > DIVs are added dynamically via AJAX and are sortable and use the
> > jquery Livedata plugin.
> >
> > However when my function setQRX fires I get strange results - 2 or
> > three clicks are needed to collapse the .portContent div.  When
> > collapsed a click opens the div and then immeadiately closes it again.
> >
> > I am stumped, not a professional and in need of some help.  I have
> > read about event delegation and think the problem may be related.
> >
> > I have found the same problem using fn toggle in any way when called
> > from $
> > ("#column").append(html).find('.portHeader').bind('click',setQRX);
> >
> > Best wishes
> > Mike
> >
> > HTML returned by ajax is ...
> >
> > 
> >  class="portHeader">MM0CKRMike > span>Aberdeen59
> > 
> > Comment Text in
> here.
> > Toggle
> > 
> >
> > 
> > function setQRX(){
> > var parent = $(this);
> > $(this).toggle(
> >
> function(){$(this).next(".portContent").show().end();},
> >
> > function(){$(this).next(".portContent").hide("slow").end();}
> >
> > );return false;
> > }
> >
> > $('#column').sortable();
> > $('#addportlet').livequery('click',function()
> > {
> > var data = $("#portAdd").serialize();
> >
> > $.ajax({
> >   url: "3ajax.php",
> >   cache: false,
> >   data: data,
> >   success: function(html){
> > $
> > ("#column").append(html).find('.portHeader').bind('click',setQRX);
> >
> $('#column').sortable('refresh');
> > $( "form" )[ 0
> ].reset();
> >   }
> > });
> > }
> > );//click#addport
> > 
> >
>


[jQuery] $. get xml on IE, does not work....

2008-04-10 Thread Totha

Hello guys, Please help.

Belove works well in Firefox an Opera but not in IE.
In IE nothing is returned...

Client side:
- appends result to 

$.get('page/dbRead.php', function(xml) {
 $('#reader').append( $(xml).find('content') );
});

Server side:
- script produces very simple xml response



{$c}

XML;
?>

That's it.

Any idea, how to make it works? The solution, other than producing
palin text instead xml?


Cheers,
totha


[jQuery] Tabs conflict with in-page anchors?

2008-04-10 Thread owen

I've got a page that uses tabs (v.3), and also has a series of in-page
anchors. I'd like to be able to link from other pages to those in-page
anchors, but that doesn't seem to work. The page doesn't jump to the
anchor. I'm assuming this is because it's conflicting with the tabs?
Interestingly, I can embed a link on that page that will make the
jump. I'm guessing that's because the handling of the anchor for tab-
switching is being done on page load?

How can I get the tabs to play nice with my non-tab-linking anchor?

Thanks,

  Owen


[jQuery] Strange problem of $.post()

2008-04-10 Thread Huisi Wang

Hi all,

I'm a newbie of jQuery. I've tried to send post request by $.post(),
and used to succeed. When I try to use $.post() this time, I get a
strange problem. I'm trying to send request as below:

$.post('http://vhost/deng/commitment/save', {num:1, name:abc},
function(xml) { //something for processing xml });

'vhost' is a virtual host on my apache server, and I send this request
from a web page under 'localhost'. I cannot see any post request in
Firebug. The request was not sent successfully. And I got some strange
from apache access log, as below:

 "127.0.0.1 - - [10/Apr/2008:18:21:21 +0800] "OPTIONS
/deng/commitment/save HTTP/1.1" 404 9245 "-" "Mozilla/5.0 (X11; U;
Linux i686; en-US; rv:1.9b4) Gecko/2008030318 Firefox/3.0b4"

You can see the OPTIONS method, I have no idea of that. Why I sent a
post request, but it was treated as OPTIONS. But if I send request to
some URL in 'localhost', it will be ok. I don't know how to solve it.
It took me more than 2 hours, it's killing me. How can I solve this
problem, or where can I find some clue? My jQuery is version 1.2.3.

Thanks and regards,

Huisi


[jQuery] Ajax .load() with Report Pagination

2008-04-10 Thread tfat

Hi,

Really hoping someone can assist as if it's not possible then I will
probably have to pull out my jQuery code.

Basically using the following jQuery Ajax call, i.e:  $
("#links").load("/Main_Page #p-Getting-Started li"); from the
following link http://docs.jquery.com/Ajax/load#urldatacallback.

I was originally using an iframe to pass in a url to the src attribute
but changed my iframe to a DIV and then used  $("#links").load("/
Main_Page #p-Getting-Started li");

My problem is, that one of the pages that I am passing into
this .load() call acutually hold a report with pagination,
unfortunately this causes a problem using the .load() call as this
prevents the pagination from working properly.

Is there a means of somehow getting around this or do I need to resort
back to an iframe?

I also noticed that there was a jframe plug-in but unsure how to use
it an unsure if this would solve my problem above but I did notice
that it uses a "src" attribute within the DIV.

Would really appreciate some help.

Thanks.
Tony.


[jQuery] Re: Using Jquery instance in an Iframe

2008-04-10 Thread Jake McGraw

I would suggest using the frameready plugin, but it appears the
authors site was been removed from the internet.

You can download it from here:

http://jakemcgraw.com/javascript/jquery.frameready.js

Usage instructions are included in the script comments.

- jake

On Thu, Apr 10, 2008 at 12:25 PM, Jeffrey Kretz <[EMAIL PROTECTED]> wrote:
>
>  I've successfully used jquery by referring to the parent frame.
>
>  Instead of "this", try "document"
>
>  alert($("#mycontent", document).html());
>
>  JK
>
>
> -Original Message-
>  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
>  Behalf Of Frederic
>  Sent: Thursday, April 10, 2008 5:52 AM
>  To: jQuery (English)
>  Subject: [jQuery] Using Jquery instance in an Iframe
>
>
>  Hello,
>  To avoid the loading of multiple Jquery in my application using
>  Iframe, I would know if anybody has succeeded in using a single Jquery
>  instance (in the same domain name).
>
>  myexample.html
>  
>  
>  
>  
>  Hello world!
>  
>  
>  
>
>  myiframe.html
>  
>  
>  
>  
>  var $ = window.parent.$;
>  var jQuery = window.parent.jQuery;
>  $().ready(function() {
>alert('jquery loaded in iframe');
>alert($("#myparent", parent.document).html());
>alert($("#mycontent", this).html());
>  });
>  
>  Working in iframe !  html>
>
>
>  When executing myexample.html :
>  => alert box #1 : "jquery loaded in iframe"
>  => alert box #2 : "Hello world!"
>  => alert box #3 : null<=== must be "Working in iframe !"
>
>  Any idea on a solution ?
>  regards
>  Frederic
>
>


[jQuery] Re: Using Jquery instance in an Iframe

2008-04-10 Thread Jeffrey Kretz

I've successfully used jquery by referring to the parent frame.

Instead of "this", try "document"

alert($("#mycontent", document).html());

JK
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Frederic
Sent: Thursday, April 10, 2008 5:52 AM
To: jQuery (English)
Subject: [jQuery] Using Jquery instance in an Iframe


Hello,
To avoid the loading of multiple Jquery in my application using
Iframe, I would know if anybody has succeeded in using a single Jquery
instance (in the same domain name).

myexample.html




Hello world!




myiframe.html




var $ = window.parent.$;
var jQuery = window.parent.jQuery;
$().ready(function() {
   alert('jquery loaded in iframe');
   alert($("#myparent", parent.document).html());
   alert($("#mycontent", this).html());
});

Working in iframe !


When executing myexample.html :
=> alert box #1 : "jquery loaded in iframe"
=> alert box #2 : "Hello world!"
=> alert box #3 : null<=== must be "Working in iframe !"

Any idea on a solution ?
regards
Frederic



[jQuery] Tabs & Validation

2008-04-10 Thread MarcelloP

Hi all!
I need a little advice; in a page I have a form with a tabs with 3 tab-
pages, all with input elements and all required; in this form I also
have enabled the splendid Validation plugin.
My concern is this: if a user fill only the inputs of the first tab-
page and leave blank the others, he cannot submit the form 'cause this
is correctly stopped by the validation plugin, but the problem is that
the user cannot see the invalid inputs (highlighted by the Validation)
on the others tabpages 'cause he is on the first.

Please, someone may suggest me the correct way to proceed within?
Thanks in advance.

MarcelloP


[jQuery] [Validation]How to make two field check output one message?

2008-04-10 Thread Jacky See

Hi,

Some question on the config of validation plugins.
Suppose there are #fromDate and #toDate fields (using ui.datepicker).
I have added these custom rules

jQuery.validator.addMethod("afterFromDate" 
,function(value,
element, targetId){
var fromDate = 
$("#"+targetId).datepicker("getDate");
var toDate = $(element).datepicker("getDate");
if(toDate && fromDate && fromDate > toDate){
return false;
}
return true;
}, "Please input correct date range");
jQuery.validator.addMethod("beforeToDate" 
,function(value, element,
targetId){
var fromDate = $(element).datepicker("getDate");
var toDate = 
$("#"+targetId).datepicker("getDate");
if(toDate && fromDate && fromDate > toDate){
return false;
}
return true;
}, "Please input correct date range");

And config like

$("#form").validate({
rules:{
'fromDate': { beforeToDate:'fromDate' },
'toDate: { afterFromDate:'toDate' },
}
})

It will output two messages of 'Please input correct date range'.
How can I make it only ouput single one?


[jQuery] Re: Custom rich text editor with some protected contents

2008-04-10 Thread Olive

On 10 avr, 16:11, Scott González <[EMAIL PROTECTED]> wrote:
> Off the top of my head, I can think of cut/delete from the context
> menu.  Also, a user could select the protected data and paste over it.

Good points Scott, thanks !

Then I am wondering if there a mean to disable the context menus (at
least for IE and FF).

Regarding paste, I will check if the selection does not contain any
protected element before accepting the ctrl-v event.


[jQuery] Re: Custom rich text editor with some protected contents

2008-04-10 Thread Scott González

Off the top of my head, I can think of cut/delete from the context
menu.  Also, a user could select the protected data and paste over it.

On Apr 10, 8:26 am, Olive <[EMAIL PROTECTED]> wrote:
> Frederic,
>
> Thank you for your help and pointers.
>
> I doubt that blockUI will help in preventing an element to be deleted
> from an editable area.
>
> After further thoughts, I will try to prevent img deletion only (maybe
> I will convert any special XML element to an image on  the server side
> before serving it to the browser).
>
> Do I only need to process keyboard events (backspace, delete, ctrl
> +x ...) or am I missing something obvious ?
>
> Regards,
>
> Olivier.


[jQuery] Re: blockUI

2008-04-10 Thread Mike Alsup

>  I have to implement this scenario: in a web page all the stuff
>  contained in the web page must be blocked and only the images should
>  be visible.
>  How do I create an overlay with jquery having glossy all the images
>  and opaque the rest?

Are you looking for something like Thickbox?

http://jquery.com/demo/thickbox/


[jQuery] Re: Display ajax result in 2 divs

2008-04-10 Thread upandhigh

but better to put them into on class




 $('.update_em').html(data.saida).show();

then you don't need container + you can put them into separate parts
on the page

On Apr 10, 3:16 pm, "Web Specialist" <[EMAIL PROTECTED]>
wrote:
> Hi all.
>
> I have a response from Ajax call and I'll want to display that in 2
> divs(header and footer in my form). Now I'm using this terrible script:
>
> 

[jQuery] Re: inner frames

2008-04-10 Thread upandhigh

it's not real. and it doesn't matter if you have this iframe from the
start or you will add it later with js to your dom. you cannot change
anything on other sites, even if this site is opening in iframe what
is on your page, and the reason why is so clean like sunny day -
because you could easily compromise this site by changing its html/
css, just image - you could easily change M$ site by adding own
banner, or putting any fake info or form to collect some data from
pipls who trust to M$ but not to you, so it's because you can't do
that and that's great.



On Apr 10, 5:59 am, Michael <[EMAIL PROTECTED]> wrote:
> I don't quite get why, since an iframe is an object of the page, you
> can't write something like $('iframe body').etc();
>
> I understand the cross domain manipulation being a security violation
> but once you introduce the new object(iframe) to your page. I just
> figured you might have more access to it's elements.
>
> On Apr 9, 10:17 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote:
>
> > On Apr 9, 2008, at 8:51 PM, Michael wrote:
>
> > > Is there a way to access the object model of an inner frame generated
> > > by another site?
>
> > > If I wanted to change the background of an inner frame, can I do it?
> > > and how?
>
> > Hi Michael,
>
> > Unless I'm mistaken, JavaScript doesn't allow this sort of cross-
> > domain DOM manipulation for security reasons.
>
> > --Karl
> > _
> > Karl Swedbergwww.englishrules.comwww.learningjquery.com


[jQuery] Re: blockUI

2008-04-10 Thread upandhigh

your images must have bigger z-index, to be on the top of blocking
layer and other content

On Apr 10, 9:57 am, makkina <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have to implement this scenario: in a web page all the stuff
> contained in the web page must be blocked and only the images should
> be visible.
> How do I create an overlay with jquery having glossy all the images
> and opaque the rest?
>
> thanks
> makkina


[jQuery] Loading a page with javascript via ajax

2008-04-10 Thread eyal

Hello everybody!

How are you doing?

I have a very simple question: let's say i want to load a new page
into a div via ajax and that page is contains some javascript and
css.

Should I write the page i'm loading into a div like that (just like a
regular page):



  
  


  Hello! I am the new content inside the div!



The thing is it's pretty weird to add full page with  etc.

On the other half, I want all the javascript & css calling to be on
the head.


Thanks,
Eyal


[jQuery] Using Jquery instance in an Iframe

2008-04-10 Thread Frederic

Hello,
To avoid the loading of multiple Jquery in my application using
Iframe, I would know if anybody has succeeded in using a single Jquery
instance (in the same domain name).

myexample.html




Hello world!




myiframe.html




var $ = window.parent.$;
var jQuery = window.parent.jQuery;
$().ready(function() {
   alert('jquery loaded in iframe');
   alert($("#myparent", parent.document).html());
   alert($("#mycontent", this).html());
});

Working in iframe !


When executing myexample.html :
=> alert box #1 : "jquery loaded in iframe"
=> alert box #2 : "Hello world!"
=> alert box #3 : null<=== must be "Working in iframe !"

Any idea on a solution ?
regards
Frederic


[jQuery] Re: Display ajax result in 2 divs

2008-04-10 Thread upandhigh

why not to put both divs into one DIV container?



  
  


 $('#update_id div').html("test").show();



On Apr 10, 3:16 pm, "Web Specialist" <[EMAIL PROTECTED]>
wrote:
> Hi all.
>
> I have a response from Ajax call and I'll want to display that in 2
> divs(header and footer in my form). Now I'm using this terrible script:
>
> 

[jQuery] Re: HTML Partial Element Does Not Exist?!

2008-04-10 Thread OhNoMrBill

That is a bit cryptic, what do you mean by completed? The AJAX call
does successfully fire the call back for success.

It is after this call back completes, that a "scrubber" function is
called on the newly arrived div. Which, we are told is undefined.

So, the question is why would a div that displays in the browser not
be available by a reference such as:

alert($("#MyDiv").html()); or alert($("#MyDiv").text());



On Apr 9, 9:36 pm, Hamish Campbell <[EMAIL PROTECTED]> wrote:
> Is this an ajax call? 90% of these questions seem to come down to the
> call not being completed.
>
> On Apr 10, 1:38 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
>
> > Yup, agreed. Tried that method too. Both return undefined. Any other
> > thoughts on why the div and/or it's contents are not showing up in the
> > DOM?
>
> > On Apr 9, 4:49 pm, Wizzud <[EMAIL PROTECTED]> wrote:
>
> > > Your div does not actually contain any HTML, just text.
> > > Try ...
> > > alert($("#MyDiv").text());
>
> > > On Apr 9, 8:39 pm, OhNoMrBill <[EMAIL PROTECTED]> wrote:
>
> > > > I have an HTML partial coming back from a server that includes a named
> > > > div (ex: blah)
>
> > > > When I try to run the following on it, it shows the div as empty:
>
> > > > alert($("#MyDiv").html());
>
> > > > I suspect the DOM is not aware of the retuned div (though, why it
> > > > displays is then a huge mystery).
>
> > > > Can anyone clarify this for me? Maybe tell me how to tap the DOM on
> > > > the shoulder with the newly returned div?
>
> > > > Thanks much!- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -


[jQuery] Re: Custom rich text editor with some protected contents

2008-04-10 Thread Olive

Frederic,

Thank you for your help and pointers.

I doubt that blockUI will help in preventing an element to be deleted
from an editable area.

After further thoughts, I will try to prevent img deletion only (maybe
I will convert any special XML element to an image on  the server side
before serving it to the browser).

Do I only need to process keyboard events (backspace, delete, ctrl
+x ...) or am I missing something obvious ?

Regards,

Olivier.


[jQuery] Display ajax result in 2 divs

2008-04-10 Thread Web Specialist
Hi all.

I have a response from Ajax call and I'll want to display that in 2
divs(header and footer in my form). Now I'm using this terrible script:



[jQuery] Re: Custom rich text editor with some protected contents

2008-04-10 Thread Frederic

Hello Olivier,
To protect content you can have use blockUI plugin (http://
www.malsup.com/jquery/block/#element) on specific elements in your
edited content.
Another editor based on Jquery :
http://projects.bundleweb.com.ar/jWYSIWYG/

regards.
Frederic

On 10 avr, 10:55, Olive <[EMAIL PROTECTED]> wrote:
> Hi,
>
> First, please let me describe my project:
>
> I need to implement a simple rich text editor (only one paragraph with
> no carriage return and underlined, superscript subscript period).
> For that I could borrow some idea 
> fromhttp://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-j...
> orhttp://avidansoft.com/dsrte/dsrte.php
>
> But the most difficult part is  that I need to protect some contents
> from deletion (img and some specific empty xml/non-xhtml tags with
> attributes).
>
> As a plus, I would also like to be able to drag and drop those
> protected elements to change their position within the text.
>
> Then my questions:
>
> Is it possible to do that with JQuery (at least the tag protection) ?
>
> Could you please give me some idea or pointer ?
>
> Regards,
>
> Olivier.


[jQuery] Sending large file from server to browser

2008-04-10 Thread dineshv

I want to send a 400KB text file to the browser each time a user comes
to the site.  The file will be sent once only during a user session.
Are there any mechanisms in JS/JQuery to reduce the size of the file
eg. send as a binary and de-binarize at the browser?

Dinesh


[jQuery] copying the menu from radiotimes.com to jquery

2008-04-10 Thread ontangent

Hi

I want to do something like http://www.radiotimes.com/ but in jquery
not flash, does anyone know if there is a tutorial on this sort of
thing somewhere?

ta

t


[jQuery] jqModal and Submit in existing window

2008-04-10 Thread Andrea-T


Hello,

I have a page which opens a jqModal window. This contains a new php-page via
the AJAX-Request of jqModal (actually the basic example no 2 on page
http://dev.iceburg.net/jquery/jqModal/)

Everything works fine and the window shows the correct content. In this
content I have a  with input fields. If one field is empty I want to
show an error message on this window, but it closes and I am back on my main
window.

What do I have to do (maybe a short example), to stay in the window until I
explicitly close it with jqmClose?

Thank you,
Andrea
-- 
View this message in context: 
http://www.nabble.com/jqModal-and-Submit-in-existing-window-tp16605108s27240p16605108.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



  1   2   >