[jQuery] Re: cancelling default click handler for

2009-03-08 Thread David Muir
And why is the input within the label? I was under the impression that the correct format is: My Label To have the label select the checkbox: My Labeltype="checkbox" /> David MorningZ wrote: is there any reason why you couldn't use a instead of a ? On Mar 8, 8:57 pm, Bill wrote: I

[jQuery] Re: getJSON url variable broken

2009-03-08 Thread David Muir
do want to let your script halt until the AJAX response is received. I don't think there's an option for getJSON for that, so you'll have to do everything you need to do inside your callback, or switch to using the $.ajax() function. On Mar 5, 5:00 pm, David Muir wrote: You

[jQuery] Re: 2 tables with same td width

2009-03-06 Thread David Muir
Alain Roger wrote: On Fri, Mar 6, 2009 at 4:16 AM, David Muir <mailto:davidkm...@gmail.com>> wrote: So you're saying you need to use js to sync the two tables so that you can use different styling for the header? Sounds like you should be updating your html

[jQuery] Re: 2 tables with same td width

2009-03-05 Thread David Muir
So you're saying you need to use js to sync the two tables so that you can use different styling for the header? Sounds like you should be updating your html markup instead. Header cells should be using th tags. Header1Header2 Cell1Cell2

[jQuery] Re: getJSON url variable broken

2009-03-05 Thread David Muir
You need to include what you want to do within the callback: $(function(){ var youtubeurl; $.getJSON('data.inc.json', function(j){ youtubeurl = j.video_url; so = new SWFObject(j.video_url, "TEST", "498", "278", "9.0.28","#00", "true"); //etc... });

[jQuery] Re: how to add callback in the $.ajax ?

2009-03-04 Thread David Muir
$.ajax doesn't return the response, and can't because AJAX is asyncronous. That's why you've got callbacks that execute once you've got a response. for what you're doing, just use: $.post("/goods/detail/","id="+id, function(json){ //do something useful with the data updateGoodsDetails(js

[jQuery] Re: how to add callback in the $.ajax ?

2009-03-04 Thread David Muir
Because you're returning your data to $.ajax, which isn't expecting anything to be returned from the callback. Just use the success callback to do what you want with the result. David Adwin Wijaya wrote: nope, i want to return as json. price was there because i was logging into console. ju

[jQuery] Re: Dialog has no scrollbars

2009-03-04 Thread David Muir
What dialog plugin are you using? If it's jQueryUI then post to the UI list. http://groups.google.com/group/jquery-ui Cheers, David jtibbetts wrote: Scrollbars refuse to appear on my dialog box. function LoadDialog (id) { $("body").append(''); $("#dialog").dialog( { title: '

[jQuery] Re: How to create dom on the fly using jQuery????

2009-03-03 Thread David Muir
Generating DOM manually as you have in your example is probably the slowest method you can use. Using a document fragment would be much faster and is the way that jQuery 1.3 does its appending. Straight HTML insertion is the fastest though. One method that I've used is to basically roll out

[jQuery] Re: UI/Tabs Losing selected tab on updatepanel postback

2009-02-25 Thread David Muir
isplay: none; } Tab 1 Tab 2 Tab 3 Tab 4 Tab 1

[jQuery] Re: radio buttons and php

2009-02-25 Thread David Muir
There's no way for the browser to manipulate something it never sees or knows about. You can submit *values* back to the server in a GET or POST request, by clicking on a link (GET), submitting a form(GET or POST), or ajax (usually GET or POST). PHP can then process that request and attached

[jQuery] Re: radio buttons and php

2009-02-25 Thread David Muir
Don't get what you're trying to do either. jQuery is run client-side, php, server-side, so there shouldn't be any php tags showing up in the final output. If it is coming through unprocessed, then you've got your webserver configured wrong, or your serving php as html. David James wrote:

[jQuery] Re: problem with using .each() in forms validation

2009-02-25 Thread David Muir
validate_form() isn't returning a value, so it won't stop the submit. your return clauses are within the closure for the each method, so they're not being passed down. You'll need to do something like this: function validate_form() { var pass = true; $("select[id^='products']").each(fun

[jQuery] Re: problem with using .each() in forms validation

2009-02-25 Thread David Muir
Shouldn't your onSubmit handler be: onSubmit="return validate_form();" or $('form').submit(function(){return validate_form();}); Cheers, David James wrote: So what happens if your validate_page() is only: function validate_form() { return false; } Does it submit? On Feb 25, 2:31 pm,

[jQuery] Re: UI/Tabs Losing selected tab on updatepanel postback

2009-02-25 Thread David Muir
It requires the cookie plugin. David Paul Allington wrote: Would the cookies option help in this case? I've come across the cookies option but I haven't been able to make it work (I don't know when it saves the cookie). P 2009/2/25 David Muir mailto:davidkm...@gmail.com&

[jQuery] Re: UI/Tabs Losing selected tab on updatepanel postback

2009-02-25 Thread David Muir
I think what P is referring to is what using cookies enables: remember what tab you were on when refreshing the page. Which makes me wonder, why not have an option to have the hash set instead of using a cookie? eg index.html: Tab1 Tab2 If I type index.html

[jQuery] Re: tbody:first-child & thead

2009-02-25 Thread David Muir
works when thead doesnt exist) > > On Wed, Feb 25, 2009 at 8:06 PM, Alex Wibowo mailto:alexwib...@gmail.com>> wrote: >> >> how does that explain the behaviour when there's thead then?? >> >> >> On Wed,

[jQuery] Re: tbody:first-child & thead

2009-02-25 Thread David Muir
re's no thead" (because it works when thead doesnt exist) On Wed, Feb 25, 2009 at 8:06 PM, Alex Wibowo wrote: how does that explain the behaviour when there's thead then?? On Wed, Feb 25, 2009 at 7:47 PM, David Muir wrote: It's because tbody:first-child is alre

[jQuery] Re: tbody:first-child & thead

2009-02-25 Thread David Muir
It's because tbody:first-child is already selecting the tr, so you're effectively doing: tbody tr tr (where the first tr is the first child of tbody) Cheers, David Alex Wibowo wrote: Hi all, I have a code that counts the number of rows in a table... the table looks like: ...

[jQuery] Re: how to use sortable and dragable on the same element?

2009-02-22 Thread David Muir
Err, just apply sortable to both lists, and connect them. http://jqueryui.com/demos/sortable/#connect-lists David Vincent Nguyen wrote: > Thanx for the link! > But that doesn't hepl me! > Can not use dragable, dropable, sortable on the SAME element! > Such as we have two list, left and right! > A