[jQuery] Re: $.data

2009-02-05 Thread jQuery Lover

There is not much to talk about it...

It let's you save information (metadata if you prefer) to objects.
This should explain it all:

$('#profile_name').data('metaInfo', 'This is my extra data about the object');

$('#change_profile_name').val( $('#profile_name').data('metaInfo') );


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Fri, Feb 6, 2009 at 12:51 PM, Chris J. Lee  wrote:
>
> I haven't been able to find good documentation on the use of $.data.
> Does anyone have any good links to use of this function?


[jQuery] $.data

2009-02-05 Thread Chris J. Lee

I haven't been able to find good documentation on the use of $.data.
Does anyone have any good links to use of this function?


[jQuery] Re: What is difference between ADO and RDO

2009-02-05 Thread jQuery Lover

This is all spam I guess ...


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Fri, Feb 6, 2009 at 11:39 AM, Charlie Griefer
 wrote:
> heh... i searched google, but searched the web.  didn't search groups :)
>
> On Thu, Feb 5, 2009 at 10:36 PM, Michael Geary  wrote:
>>
>> And let me Google that for you:
>>
>> http://groups.google.com/groups?q=agile.scrapping%40gmail.com
>>
>> -Mike
>>
>> 
>> From: Charlie Griefer
>> Sent: Thursday, February 05, 2009 9:00 PM
>> On Thu, Feb 5, 2009 at 8:57 PM, Agile Consulting
>>  wrote:
>>>
>>> Explain ADO and RDO
>>
>> http://letmegooglethatforyou.com/?q=ado%20rdo
>>
>> --
>> I have failed as much as I have succeeded. But I love my life. I love my
>> wife. And I wish you my kind of success.
>
>
>
> --
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.
>


[jQuery] Re: jquery.combobox jumping in internet explorer

2009-02-05 Thread jQuery Lover

You were probably using jquery 1.3.1 and dimensions plugin. Dimensions
plugin has been included into the jquery core since 1.2.(don't
remember:) )

That is probably the source of the problem...


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Fri, Feb 6, 2009 at 12:05 PM, amay0048  wrote:
>
> used this instead, tested and working cross browser
>
> http://info.wsisiz.edu.pl/~suszynsk/jQuery/demos/jquery-selectbox/


[jQuery] Re: General Question RE: Using jQuery with Wordpress

2009-02-05 Thread jQuery Lover

jQuery works just fine with wordpress. There is nothing in wordpress
that may conflict with jquery. Moreover, wordpress admin panel uses
jquery.

Can you post a link to your page, so we could look into it and try to
find out what's causing the problem...


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Fri, Feb 6, 2009 at 11:48 AM, MH1988  wrote:
>
> I just wanted to ask in general if using jQuery inconjunction with
> Wordpress does actually work? I'm pretty sure if jQuery (attached with
> a jQuery plugin) would work if it was to be included on the frontpage
> (index.php) but maybe not for individual Wordpress posts? It's has
> been quite a mountain to see if jQuery would work at all as I was
> trying to use the Cycle plugin for a simple prev/next image slideshow
> but to no avail. changing the script to jQuery () didn't work either.
>
> I've decided to use Lightbox which uses the Prototype framework and
> that does work but prefer images within 's and 's with a div
> overflow: hidden than Lightbox.


[jQuery] Re: Optimized Function to transfer Array to Listbox

2009-02-05 Thread jQuery Lover

Use simple old javascript. jQuery is a great framework, but sometimes
plain javascript is better, your case is an example... (IMO)


Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com



On Fri, Feb 6, 2009 at 11:49 AM, JQueryProgrammer
 wrote:
>
> I have two array of items containing the values and text to be
> inserted in a Listbox. I had written the function as:
>
> array2Listbox = function(objListBox, arrValue, arrText) {
>var oNewOption;
>
>return jQuery.each(arrValue, function(i) {
>oNewOption = new Option(arrText[i], arrValue[i]);
>objListBox[objListBox.length] = oNewOption;
>});
> };
>
> However I know jQuery would be much slower than direct for loop in
> this case where the array size is approx 6000 elements. Can anyone
> tell me a faster way to loop through the array and insert the elements
> in Listbox.


[jQuery] Re: jquery.combobox jumping in internet explorer

2009-02-05 Thread amay0048

used this instead, tested and working cross browser

http://info.wsisiz.edu.pl/~suszynsk/jQuery/demos/jquery-selectbox/


[jQuery] Re: how to pass id to function

2009-02-05 Thread Praveen

Thanks Brian.
ok let me explain in brief what i am trying to do

in html
{% for name in eventname %}
   
{{ name.title }}
   
   
   {{ name.title }}
   {{ name.address }}
   
{% endfor %}
//here to fore i was trying to generate div id using  which was generating in weired way "The" spice="" tate-le=""
jardin="" so i keep id as it is and i changed in my js file

$(document).ready(function ()
 {
$(".viewalldetailslinktext ").find("a.basic,input.basic").click
(function (e)
{
e.preventDefault();
$('#basicModalContent').modal();
});
});

here i am passing class name "the ids will not help you because they
can have different values but all of the elements that you want to
lightbox have the same class"

so its working fine and for both div lightbox is coming.
but the problem again arise
in html i get two title

The Spice Tate-Le Jardin--> as link
The Spice Tate-Le Jardin Bangalore

Underground Monday at Maya--> as link
Underground Monday at Maya, Bangalore

first time i click on Spice Tate-Le Jardin then i shows me the
information related to that objects and second time when i click on
Underground Monday at Maya then it shows me the information related to
Undergrund objects. i seems to be so happy that its working. but when
i refresh page and i clicked on Underground Monday at Maya rather
first time than The Spice then i was getting the information related
to The Spice object not for Underground. so i am now worred if i use
uniqued div id and use this method and i do not know whether i will
get same problem or not and if i do not get same problem then how may
i generate unique id in well format like div1,div2,. if i write in
loop and write div+i then my object display 2 times more.

I hope now you would have got me.


On Feb 6, 11:08 am, brian  wrote:
> On Thu, Feb 5, 2009 at 11:45 PM, Praveen  
> wrote:
>
> > so that's why i am generating different div id
>
> > {% for name in eventname %}
> >                        
> > ...
>
> > so now my div id is
> >  > class="viewalldetailslinktext">
>
> It appears that you first must fix how your application assigns the ID
> to the div.
>
> Once you've dealt with that, just assign another class (eg.
> YourClassName) to your 2 divs.
>
> $(document).ready(function ()
>  {
>        $('.YourClassName input.basic, .YourClassName
> a.basic').click(function (e)
>        {
>                e.preventDefault();
>                $(this).parents(.YourClassName).modal();
>        });
>
>
>
> });


[jQuery] Optimized Function to transfer Array to Listbox

2009-02-05 Thread JQueryProgrammer

I have two array of items containing the values and text to be
inserted in a Listbox. I had written the function as:

array2Listbox = function(objListBox, arrValue, arrText) {
var oNewOption;

return jQuery.each(arrValue, function(i) {
oNewOption = new Option(arrText[i], arrValue[i]);
objListBox[objListBox.length] = oNewOption;
});
};

However I know jQuery would be much slower than direct for loop in
this case where the array size is approx 6000 elements. Can anyone
tell me a faster way to loop through the array and insert the elements
in Listbox.


[jQuery] General Question RE: Using jQuery with Wordpress

2009-02-05 Thread MH1988

I just wanted to ask in general if using jQuery inconjunction with
Wordpress does actually work? I'm pretty sure if jQuery (attached with
a jQuery plugin) would work if it was to be included on the frontpage
(index.php) but maybe not for individual Wordpress posts? It's has
been quite a mountain to see if jQuery would work at all as I was
trying to use the Cycle plugin for a simple prev/next image slideshow
but to no avail. changing the script to jQuery () didn't work either.

I've decided to use Lightbox which uses the Prototype framework and
that does work but prefer images within 's and 's with a div
overflow: hidden than Lightbox.


[jQuery] Re: What is difference between ADO and RDO

2009-02-05 Thread Charlie Griefer
heh... i searched google, but searched the web.  didn't search groups :)

On Thu, Feb 5, 2009 at 10:36 PM, Michael Geary  wrote:

>  And let me Google *that* for you:
>
> http://groups.google.com/groups?q=agile.scrapping%40gmail.com
>
> -Mike
>
>  --
> *From:* Charlie Griefer
> *Sent:* Thursday, February 05, 2009 9:00 PM
>  On Thu, Feb 5, 2009 at 8:57 PM, Agile Consulting <
> agile.scrapp...@gmail.com> wrote:
>
>>
>> Explain ADO and RDO
>
>
> http://letmegooglethatforyou.com/?q=ado%20rdo
>
> --
> I have failed as much as I have succeeded. But I love my life. I love my
> wife. And I wish you my kind of success.
>
>


-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] Re: What is difference between ADO and RDO

2009-02-05 Thread Michael Geary
And let me Google that for you:
 
http://groups.google.com/groups?q=agile.scrapping%40gmail.com
 
-Mike


  _  

From: Charlie Griefer
Sent: Thursday, February 05, 2009 9:00 PM

On Thu, Feb 5, 2009 at 8:57 PM, Agile Consulting 
wrote:



Explain ADO and RDO


http://letmegooglethatforyou.com/?q=ado%20rdo

-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.




[jQuery] Re: is it correct way to pass id to function

2009-02-05 Thread Praveen

Now i have solved my problem

$(document).ready(function ()
 {
$(".viewalldetailslinktext ").find("a.basic,input.basic").click
(function (e)
{
e.preventDefault();
$('#basicModalContent').modal();
});
});

On Feb 6, 10:39 am, Praveen  wrote:
> http://dpaste.com/117315/
>
> my html
> ---
> {% for name in eventname %}
>                         
>                                  class='basic'>{{ name.title }} a>
>                         
>                         {{ name.address }}
>                         {{ name.summary }}
>                         
>                                         {{ name.title 
> }}
>                         
>                 {% endfor %}
>
> basic.js
> -
> $(document).ready(function ()
>  {
>         $('#basicModal input.basic, #basicModal a.basic').click(function (e)
>         {
>                 e.preventDefault();
>                 $('#basicModalContent').modal();
>         });
>
> });
>
> here i am using lightbox. in my template i have 2 title when i am
> clcking on one title it works fine and display light box but for
> second title it does not happened so cause when i saw in page source
> both div have same id basicModal.
>
> so that's why i am generating different div id
>
> {% for name in eventname %}
>                         
>                                  class='basic'>{{ name.title }} a>
>                         
>                         {{ name.address }}
>                         {{ name.summary }}
>                         
>                                         {{ name.title 
> }}
>                         
>                 {% endfor %}
>
> so now my div id is
>  class="viewalldetailslinktext">
>    The Spice Tate-Le
> Jardin
>
>  class="viewalldetailslinktext" style="text-align: left; margin-top:
> 20px;">
>
> Underground Monday at
> Maya
>
> but i do not how may i pass this div id to function which is defined
> in basic.js
>
> i am trying to do like this
>
> $(document).ready(function (id)
>  {
>         $(id input.basic, id a.basic').click(function (e)
>         {
>                 e.preventDefault();
>                 alert(e);
>                 $('#basicModalContent').modal();
>         });
>
> });
>
> but lightbox is not coming.
>
> in view source div id is generationg linke this
>
>  class="viewalldetailslinktext" style="text-align: left; margin-top:
> 20px;">
>                                  class="basic">The Spice Tate-
> Le Jardin


[jQuery] Re: how to pass id to function

2009-02-05 Thread brian

On Thu, Feb 5, 2009 at 11:45 PM, Praveen  wrote:
>
> so that's why i am generating different div id
>
> {% for name in eventname %}
>
> ...
>
> so now my div id is
>  class="viewalldetailslinktext">

It appears that you first must fix how your application assigns the ID
to the div.

Once you've dealt with that, just assign another class (eg.
YourClassName) to your 2 divs.

$(document).ready(function ()
 {
   $('.YourClassName input.basic, .YourClassName
a.basic').click(function (e)
   {
   e.preventDefault();
   $(this).parents(.YourClassName).modal();
   });
});


[jQuery] is it correct way to pass id to function

2009-02-05 Thread Praveen

http://dpaste.com/117315/

my html
---
{% for name in eventname %}

{{ name.title }}

{{ name.address }}
{{ name.summary }}

{{ name.title 
}}

{% endfor %}

basic.js
-
$(document).ready(function ()
 {
$('#basicModal input.basic, #basicModal a.basic').click(function (e)
{
e.preventDefault();
$('#basicModalContent').modal();
});
});

here i am using lightbox. in my template i have 2 title when i am
clcking on one title it works fine and display light box but for
second title it does not happened so cause when i saw in page source
both div have same id basicModal.

so that's why i am generating different div id

{% for name in eventname %}

{{ name.title }}

{{ name.address }}
{{ name.summary }}

{{ name.title 
}}

{% endfor %}

so now my div id is

   The Spice Tate-Le
Jardin



Underground Monday at
Maya

but i do not how may i pass this div id to function which is defined
in basic.js


i am trying to do like this

$(document).ready(function (id)
 {
$(id input.basic, id a.basic').click(function (e)
{
e.preventDefault();
alert(e);
$('#basicModalContent').modal();
});
});

but lightbox is not coming.


in view source div id is generationg linke this


The Spice Tate-
Le Jardin


[jQuery] Re: jquery.combobox jumping in internet explorer

2009-02-05 Thread amay0048

bumping this

also wondering if anyone knows a select box replacement plugin which
works cross broswer

On Feb 2, 9:22 am, amay0048  wrote:
> I've implemented the jquery.combobox plugin (http://
> jquery.sanchezsalvador.com/page/jquerycombobox.aspx) on a site 
> (http://www.powerbuy.com.au). The problem is that when you click on the styled
> comboboxes in IE, the page "jumps" down, and sometimes this pushes the
> combobox off screen. I know this plugin relies on the dimensions
> plugin, and both the jquery and dimensions plugins are the most recent
> version.
>
> I think this problem has something to do with the celculation of the
> size of the view port (as the amount this jumps seems to be related to
> the size of the viewport,with smaller viewports causing this to jump
> further).
>
> Any help would be greatly appreciated.


[jQuery] Re: Cascade plugin - feature/improvement request (data optimization)

2009-02-05 Thread James

@Mike
Hi again!

I'm "almost" getting it.  I guess what I'm trying to do is use nested
arrays within the JSON structure and maybe jQuery can't handle it?

I've restructured the JSON file to be:

{
"Country1": {
"Region1": [
"Citya1",
"Citya2",
"Citya3"
],
"Region2": [
"Cityb1",
"Cityb2",
"Cityb3"
]
}
}

It's basically a nested array.  I'm trying to get the (chained)
cascade plugin to simply read in the text on each first level of the
array (ie. the second dropdown box will be populated with all the
"Region#" in the array since the match found in the selectedValue
would equal "Country1".

Then the same function should automatically populate the 3rd dropdown
will the related City# -> ie. if Region1 is selected (as would be the
default in this case), the third dropdown would be populated with all
the Citya# texts.

Does this make sense?

Am what I am trying to do even possible with jQuery's handling of
JSON?

Firebug does tell me that the object has been read correctly and is an
array structure Country1.Region1.City1 (etc)...

If you could point me to just a little more help I think I can get
this!  :)

Thanks,
James


On Feb 4, 3:58 pm, Mike Nichols  wrote:
> sorry i replied on your other thread:
>
> @james,
> There is not a fixed schema for items incascade. The json structure
> is outside the scope ofcascade. For smaller lists I might load some
> javascript when the page hits and assign the 'url' as the var I gave
> it. For larger lists or more complex objects I might just have an ajax
> call for each list change event. It just depends. In either case, you
> are simply dealing with individual items that simply need to answer
> the predicate found in your 'match' option implementation as to
> whether they should be hydrated into the child list or not.
> Hope this helps
> mike
>
> On Feb 3, 9:15 am, James  wrote:
>
> > Mike et all:
>
> > Now that I've worked through some of the basics, I would like to know
> > how easy it would be to accommodate a JSON file in a bit of a more
> > efficient structure using arrays rather than simple value pairs.
>
> > IE.: You have designed around this structure:
> > {'when':'selectedValue','value':'itemValue','text':'itemText'}
>
> > Whereas after some testing, I've realized the data sizes would become
> > rather huge rather quickly.
>
> > I'm proposing a JSON structure such as:
>
> > {
> > "Country1": [
> > {
> > "Region1": [
> > "City1",
> > "City2",
> > "City3"
> > ],
> > "Region2": [
> > "City1",
> > "City2",
> > "City3"
> > ]
> > }
> > ]
>
> > }
>
> > The idea would be for a separate JSON file for each country (now that
> > we've got dynamic URLs working).  (see related discussion: [url]http://
> > groups.google.com/group/jquery-en/browse_thread/thread/
> > 142c1e9e9119b198#[/url]
>
> > Of course this simplified structure would require some parsing and
> > reformatting AFTER loading the JSON file to fit the structure used for
> > the .CASCADEplugin.
>
> > My problem is, since I'm so new to all this, I have no idea where in
> > the code to begin looking at how to take my imported JSON file, and
> > then do the work on it to change it into your format.
>
> > Could you offer some insight on this?
>
> > Thanks,
> > James


[jQuery] What is difference between ADO and RDO

2009-02-05 Thread Agile Consulting

Explain ADO and RDO


[jQuery] Re: ui draggable (option drag doesn't work)

2009-02-05 Thread Richard D. Worth
Which version of jQuery UI are you using?

jQuery UI 1.5.3 is only compatible with jQuery 1.2.6
jQuery UI 1.6rc6 is only compatible with jQuery 1.3+

When these don't match, the most common error is callbacks not firing. If
that's not your issue, please post a follow-up on the jQuery UI list

http://groups.google.com/group/jquery-ui

Thanks.

- Richard

On Thu, Feb 5, 2009 at 8:26 PM, knight  wrote:

>
> Hello,
>
> The question is why drag-option doesn't work ( options.drag = function
> (event,info) { alert('drag'); } )?
> Thanks in advance.
>
>  www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> http://www.w3.org/1999/xhtml";>
> 
> 
> Scroll element
> 
>.scrollable {
>overflow:hidden;
>height:200px;
>width:350px;
>margin:100px auto;
>}
>
>.bloc {
>margin:5px auto;
>font-size:12px;
>}
>
>.scr_cnt_handle {
>float:left;
>height:100%;
>border:1px solid #000;
>}
>
>.scr_body {
>float:left;
>overflow:hidden;
>height:200px;
>width:300px;
>}
>
>.ctr_handle {
>width:20px;
>height:40px;
>background-color:#006699;
>}
> 
>
>  language="javascript">
>  language="javascript">
>  language="javascript">
>
> 
> $(function(){
>var options = {};
>options.containment = 'parent';
>options.axis = 'y';
>   options.drag   = function(event,info) { alert('drag'); }
>
>$('.ctr_handle').draggable(options);
>
> });
> 
> 
>
> 
>
>
>
>
> height="60"
> style="float:left;" />
>Text some here text! Text some here text!
> Text some here text!
> Text some here text!
>
>
> height="60"
> style="float:left;" />
>Text some here text! Text some here text!
> Text some here text!
> Text some here text!
>
>
> height="60"
> style="float:left;" />
>Text some here text! Text some here text!
> Text some here text!
> Text some here text!
>
>
> height="60"
> style="float:left;" />
>Text some here text! Text some here text!
> Text some here text!
> Text some here text!
>
>
>
>
>
>
>
>
>
> 
> 
>


[jQuery] What is difference between ADO and RDO

2009-02-05 Thread Agile Consulting

Explain ADO and RDO


[jQuery] What is difference between ADO and RDO

2009-02-05 Thread Agile Consulting

Explain ADO and RDO


[jQuery] Re: What is difference between ADO and RDO

2009-02-05 Thread Charlie Griefer
On Thu, Feb 5, 2009 at 8:57 PM, Agile Consulting
wrote:

>
> Explain ADO and RDO


http://letmegooglethatforyou.com/?q=ado%20rdo

-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


[jQuery] What is difference between ADO and RDO

2009-02-05 Thread Agile Consulting

Explain ADO and RDO


[jQuery] how to pass id to function

2009-02-05 Thread Praveen

http://dpaste.com/117299/


my html
---
{% for name in eventname %}

{{ name.title }}

{{ name.address }}
{{ name.summary }}

{{ name.title 
}}

{% endfor %}

basic.js
-
$(document).ready(function ()
 {
$('#basicModal input.basic, #basicModal a.basic').click(function (e)
{
e.preventDefault();
$('#basicModalContent').modal();
});
});

here i am using lightbox. in my template i have 2 title when i am
clcking on one title it works fine and display light box but for
second title it does not happened so cause when i saw in page source
both div have same id basicModal.

so that's why i am generating different div id

{% for name in eventname %}

{{ name.title }}

{{ name.address }}
{{ name.summary }}

{{ name.title 
}}

{% endfor %}

so now my div id is

   The Spice Tate-Le
Jardin



Underground Monday at
Maya

but i do not how may i pass this div id to function which is defined
in basic.js


[jQuery] Re: Superfish Help

2009-02-05 Thread Aaron Gundel

if you're logged in?

On Thu, Feb 5, 2009 at 5:32 PM, Josh  wrote:
>
> Hello,
>
> I have installed the Superfish module and can get it to display on my
> site, but I can't seem to get the drop-down to look good.  In fact it
> looks pretty awful.  Any help would be great.  You can see it at
> eslbasics.com
>


[jQuery] Re: Optimize large DOM inserts

2009-02-05 Thread Michael Geary

"...there is not much room for improvement left."

You just know that when you say that, someone will come along with a 20x-40x
improvement. ;-)

http://mg.to/test/loop1.html

http://mg.to/test/loop2.html

Try them in IE, where the performance is the worst and matters the most.

On my test machine, the first one runs about 6.3 seconds and the second one
about 0.13 seconds.

-Mike

> From: Ricardo Tomasi
> 
> Concatenating into a string is already much faster than 
> appending in each loop, there is not much room for 
> improvement left. What you can do improve user experience 
> though is split that into a recursive function over a 
> setTimeout, so that the browser doesn't freeze and you can 
> display a nice loading animation.
> 
> 
> On Feb 5, 5:03 pm, James  wrote:
> > I need tips on optimizing a large DOM insert to lessen the 
> "freeze" on 
> > the browser.
> >
> > Scenario:
> > I receive a large amount of JSON 'data' through AJAX from a 
> database 
> > (sorted the way I want viewed), and loop through them to 
> add to a JS 
> > string, and insert that chunk of string into a tbody of a 
> table. Then, 
> > I run a plug-in that formats the table (with pagination, etc.).
> > Simplified sample code:
> >
> > var html = '';
> > $.each(data, function(i, row) {
> >      html += 'data from json';});
> >
> > $("tbody").append(html);
> > $("table").formatTable();
> >
> > formatTable() requires that the table has to be "completed" 
> before it 
> > can be executed.
> > Is there any way I can optimize this better? I think I've read 
> > somewhere that making a string too long is not good, but I've also 
> > read that updating the DOM on each iteration is even worst.
> >
> > Any advice would be appreciated!
> 




[jQuery] Re: Superfish

2009-02-05 Thread uztha4c

just take a look at the source code for the site...basically it looks
like this:
The Briefing
Room


The Blog
Your Weekly Address
Slideshows
Press
Briefings
Official
Statements


Press
Releases
Presidential Actions
Nominations & Appointments


 



then look at the style.css stylesheet. then check out the js in the
jquery-plugins.js file related to superfish.

On Feb 5, 5:41 pm, Mario  wrote:
> thanks for the response.  Any idea where I can get some code that will
> allow me to create such navigation system?  I'd appreciate the
> information.
>
> On Feb 4, 7:37 pm, Joel Birch  wrote:
>
> > Hello,
>
> > I think that it's simply a matter of including multiple ul elements
> > inside the parent li, then floating them alongside each other
> > (obviously they will need a width to be set). I've seen this work and
> > have experimented with it myself in the past to be sure that it does
> > work, but I don't have any examples to show you unfortunately.
>
> > Joel.


[jQuery] Re: Checkbox selection

2009-02-05 Thread James

Here's a good read for you:
http://www.learningjquery.com/2008/12/quick-tip-click-table-row-to-trigger-a-checkbox-click

On Feb 5, 4:40 pm, Sam Hastings  wrote:
> Hi everyone,
>
> I've got an HTML table like this:
>
> 
>         
>                 Foo
>                 Bar
>                 Baz
>                 
>         
> 
>
> What I'd like to do is toggle the checkbox's checked state when any of
> the cells in its row are clicked. I've tried this a thousand different
> ways and can't get it working and was wondering if someone here would
> be kind enough to help.
>
> Many thanks :-)
>
> Sam Hastings


[jQuery] Checkbox selection

2009-02-05 Thread Sam Hastings

Hi everyone,

I've got an HTML table like this:



Foo
Bar
Baz




What I'd like to do is toggle the checkbox's checked state when any of
the cells in its row are clicked. I've tried this a thousand different
ways and can't get it working and was wondering if someone here would
be kind enough to help.

Many thanks :-)

Sam Hastings


[jQuery] validation plugin: validate checkboxes that don't have same name?

2009-02-05 Thread claudes


using validation plugin, is there a way to validate checkbox group that has
different name attributes? i would like to make sure that at least one
checkbox has been selected but i'm not sure how to do it because they all
have different names. 

thanks
-- 
View this message in context: 
http://www.nabble.com/validation-plugin%3A-validate-checkboxes-that-don%27t-have-same-name--tp21865439s27240p21865439.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] ui draggable (option drag doesn't work)

2009-02-05 Thread knight

Hello,

The question is why drag-option doesn't work ( options.drag = function
(event,info) { alert('drag'); } )?
Thanks in advance.


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


Scroll element

.scrollable {
overflow:hidden;
height:200px;
width:350px;
margin:100px auto;
}

.bloc {
margin:5px auto;
font-size:12px;
}

.scr_cnt_handle {
float:left;
height:100%;
border:1px solid #000;
}

.scr_body {
float:left;
overflow:hidden;
height:200px;
width:300px;
}

.ctr_handle {
width:20px;
height:40px;
background-color:#006699;
}







$(function(){
var options = {};
options.containment = 'parent';
options.axis = 'y';
   options.drag   = function(event,info) { alert('drag'); }

$('.ctr_handle').draggable(options);

});









Text some here text! Text some here text! Text 
some here text!
Text some here text!



Text some here text! Text some here text! Text 
some here text!
Text some here text!



Text some here text! Text some here text! Text 
some here text!
Text some here text!



Text some here text! Text some here text! Text 
some here text!
Text some here text!













[jQuery] Superfish Help

2009-02-05 Thread Josh

Hello,

I have installed the Superfish module and can get it to display on my
site, but I can't seem to get the drop-down to look good.  In fact it
looks pretty awful.  Any help would be great.  You can see it at
eslbasics.com


[jQuery] Re: Need to make a edit layout system using php and jquery...?

2009-02-05 Thread Mauricio Wolff

To get positions, position() and offset(), along with with() and height
()

When your user edit the layout you can fireup an ajax request to a php
that saves your data...

check the jqEditable plugin code...

cheers

mWolff


[jQuery] Re: Best action to use for selects?

2009-02-05 Thread James

Try Using the onchange event.

On Feb 5, 4:06 pm, "Rick Faircloth"  wrote:
> What's the best event to use for a select to trigger
> a function?
>
> I'm currently using onclick, because it seems to be the
> best option, but that creates problems.  It causes the
> function to fire when the down arrow is clicked and when
> an option is chosen.
>
> I've tried several different approaches, but none are
> very satisfactory.
>
> Suggestions?
>
> Thanks,
>
> Rick


[jQuery] Best action to use for selects?

2009-02-05 Thread Rick Faircloth

What's the best event to use for a select to trigger
a function?

I'm currently using onclick, because it seems to be the
best option, but that creates problems.  It causes the
function to fire when the down arrow is clicked and when
an option is chosen.

I've tried several different approaches, but none are
very satisfactory.

Suggestions?

Thanks,

Rick



[jQuery] Re: Is this bug in IE or ui tabs

2009-02-05 Thread Varun Khatri
I am using a function like :
   $('.ui-tabs-nav').bind('tabsselect', function(event, ui) {
$("input[rel='currentTab']").val(ui.index);
$("#example > div.ui-tabs-panel").empty();

});


It just removes everything from tab , buttons , textbox , table
everything... I want that when I click on some tab the controls belonging to
that tab should be visible...

Any idea ?

Thanks
Varun

On Thu, Feb 5, 2009 at 4:12 PM, James  wrote:

>
> Are your tabs AJAX? I had a similar issue, but it didn't work in
> Firefox also. Apparently this occurred for me because everytime you
> click on a tab, the AJAX loaded HTML remains in the DOM. This is an
> issue if you have separate tabs HTML with elements that have the same
> ID, as this will cause multiple elements with the same ID to exist at
> the same time. I put in a small code in "select" option for Tab UI
> that empties the div for all tabs when a different tab is clicked on
> and my problem went away.
>
> select: function() {
> $("#tab-container > div.ui-tabs-panel").empty();
> }
>
> On Feb 5, 1:52 pm, varun  wrote:
> > HI
> > I am using ui tabs and i have 5 tabs on my page. Each tab is having a
> > submit button and placeholder...
> > when submit button is clicked , it fires a click event for that button
> > in code behind and loads a table in placeholder of that tab...
> > problem is after doing this process once in Internet Explorer
> > when I go to another tab and hit submit button , it does not fire the
> > event attached to that button... means if there are 3 submit buttons
> > and 3 click events in code behind  only 1 time submit button event
> > is fired and then switching to different tab and hitting submit does
> > nothing...
> >
> > But if I do the same stuff in firefox, it works .
> > Can some one please advise ?
> >
> > Thanks
> > Varun
>


[jQuery] Re: Superfish

2009-02-05 Thread Mario

thanks for the response.  Any idea where I can get some code that will
allow me to create such navigation system?  I'd appreciate the
information.

On Feb 4, 7:37 pm, Joel Birch  wrote:
> Hello,
>
> I think that it's simply a matter of including multiple ul elements
> inside the parent li, then floating them alongside each other
> (obviously they will need a width to be set). I've seen this work and
> have experimented with it myself in the past to be sure that it does
> work, but I don't have any examples to show you unfortunately.
>
> Joel.


[jQuery] Re: How to detect jQuery version?

2009-02-05 Thread Karl Rudd

jQuery.fn.jquery

Karl Rudd

On Fri, Feb 6, 2009 at 11:54 AM, Geuis  wrote:
>
> Wondering what an easy way to detect which version of jQuery is
> running on a page. Is there a $.version property? Doing feature
> detection based on deprecated methods probably wouldn't work well,
> since they would still exist in some newer versions.


[jQuery] Re: How to detect jQuery version?

2009-02-05 Thread James

$().jquery seems to work. Not sure if there's a better way.

On Feb 5, 2:54 pm, Geuis  wrote:
> Wondering what an easy way to detect which version of jQuery is
> running on a page. Is there a $.version property? Doing feature
> detection based on deprecated methods probably wouldn't work well,
> since they would still exist in some newer versions.


[jQuery] How to detect jQuery version?

2009-02-05 Thread Geuis

Wondering what an easy way to detect which version of jQuery is
running on a page. Is there a $.version property? Doing feature
detection based on deprecated methods probably wouldn't work well,
since they would still exist in some newer versions.


[jQuery] Re: click/change events not recognized for checkboxes

2009-02-05 Thread James

Try:

$("#mfglist input:checkbox")
or maybe:
$("#mfglist :checkbox")
(note the space before :) might work.


Using:
$('#manufacturers:checkbox')
is saying that you have a checkbox with the ID of manufacturers, which
is incorrect.

On Feb 5, 11:09 am, sdeo  wrote:
> Hi
>   I have the following html where I have a bunch of checkboxes which I
> want to trigger events when checked/unchecked. But apparently the
> events are not being recognized.
>
> I have tried using various ways to access the checkboxes, but nothing
> seems to work.
>   1)    $('#manufacturers:checkbox').click(function(){
>   2)    $("#mfglist:checkbox").click(function(){
>
> Being new to JQuery, I did try reading all the blogs/tutorials, but no
> luck so far. Any help is really appreciated.
>
> Thanks!
> sdeo
>
> BEGIN HTML SNIPPET
>
> 
>      Manufacturers
>       
>            
>                 
>                    type="checkbox">Apple (10)
>                    type="checkbox">Nokia (30)
>                   Motorola (8)
>                   Samsung (5)
>               
>            
>       
> 
>
> JS file:
>
> function selectMfgEvent(){
>    console.log("begin selectMfgEvent");
>    $('input[type="checkbox"]').click(function(){
>                 if($(this).is(":checked")){
>                         console.log("checked = "+this);
>                 }
>
>    });
>
> $(document).load(selectMfgEvent());
>
> };
>
>


[jQuery] Re: Is this bug in IE or ui tabs

2009-02-05 Thread James

Are your tabs AJAX? I had a similar issue, but it didn't work in
Firefox also. Apparently this occurred for me because everytime you
click on a tab, the AJAX loaded HTML remains in the DOM. This is an
issue if you have separate tabs HTML with elements that have the same
ID, as this will cause multiple elements with the same ID to exist at
the same time. I put in a small code in "select" option for Tab UI
that empties the div for all tabs when a different tab is clicked on
and my problem went away.

select: function() {
 $("#tab-container > div.ui-tabs-panel").empty();
}

On Feb 5, 1:52 pm, varun  wrote:
> HI
> I am using ui tabs and i have 5 tabs on my page. Each tab is having a
> submit button and placeholder...
> when submit button is clicked , it fires a click event for that button
> in code behind and loads a table in placeholder of that tab...
> problem is after doing this process once in Internet Explorer
> when I go to another tab and hit submit button , it does not fire the
> event attached to that button... means if there are 3 submit buttons
> and 3 click events in code behind  only 1 time submit button event
> is fired and then switching to different tab and hitting submit does
> nothing...
>
> But if I do the same stuff in firefox, it works .
> Can some one please advise ?
>
> Thanks
> Varun


[jQuery] jeditable and selects: how does it choose the default?

2009-02-05 Thread garth.colasu...@gmail.com

I have a question about how jeditable chooses which select option to
start with when you click to edit a field. For example I have the
following table:

Person 1,  Color:  Orange
Person 2,  Color:  Blue
Person 3,  Color:  Blue
Person 4,  Color:  Orange
Person 5,  Color:  Red
Person 6,  Color:  Orange

Then clicking on a color produces a dropdown box with the help of
jeditable.

If the select options are blue,orange,red,yellow (in that order). Most
of the time the shown text is preselected when I invoke the jeditable
select (example clicking on "Orange" will have "Orange" selected).
Sometimes though, it defaults to the first item ("Blue").

How does jeditable preselect when you don't use a selected item in the
json data? On my pages it guesses well 19 out of 22 times. I'm just
curious.


[jQuery] Re: Optimize large DOM inserts

2009-02-05 Thread Henrik Javén

this will be significantly faster

var html = [];
$.each(data, function(i, row) {
 html.push('data from json');


});


$("tbody").append(html.join(''));
$("table").formatTable();

On Feb 5, 12:56 pm, James  wrote:
> I see. Thanks for the tip. I'll try to work on that!
>
> On Feb 5, 10:38 am, Ricardo Tomasi  wrote:
>
>
>
> > Concatenating into a string is already much faster than appending in
> > each loop, there is not much room for improvement left. What you can
> > do improve user experience though is split that into a recursive
> > function over a setTimeout, so that the browser doesn't freeze and you
> > can display a nice loading animation.
>
> > James wrote:
> > > I need tips on optimizing a large DOM insert to lessen the "freeze" on
> > > the browser.
>
> > > Scenario:
> > > I receive a large amount of JSON 'data' through AJAX from a database
> > > (sorted the way I want viewed), and loop through them to add to a JS
> > > string, and insert that chunk of string into a tbody of a table. Then,
> > > I run a plug-in that formats the table (with pagination, etc.).
> > > Simplified sample code:
>
> > > var html = '';
> > > $.each(data, function(i, row) {
> > >      html += 'data from json';
> > > });
> > > $("tbody").append(html);
> > > $("table").formatTable();
>
> > > formatTable() requires that the table has to be "completed" before it
> > > can be executed.
> > > Is there any way I can optimize this better? I think I've read
> > > somewhere that making a string too long is not good, but I've also
> > > read that updating the DOM on each iteration is even worst.
>
> > > Any advice would be appreciated!- Hide quoted text -
>
> - Show quoted text -


[jQuery] click/change events not recognized for checkboxes

2009-02-05 Thread sdeo

Hi
  I have the following html where I have a bunch of checkboxes which I
want to trigger events when checked/unchecked. But apparently the
events are not being recognized.

I have tried using various ways to access the checkboxes, but nothing
seems to work.
  1)$('#manufacturers:checkbox').click(function(){
  2)$("#mfglist:checkbox").click(function(){

Being new to JQuery, I did try reading all the blogs/tutorials, but no
luck so far. Any help is really appreciated.

Thanks!
sdeo

BEGIN HTML SNIPPET


 Manufacturers
  
   

  Apple (10)
  Nokia (30)
  Motorola (8)
  Samsung (5)
  
   
  



JS file:

function selectMfgEvent(){
   console.log("begin selectMfgEvent");
   $('input[type="checkbox"]').click(function(){
if($(this).is(":checked")){
console.log("checked = "+this);
}

   });

$(document).load(selectMfgEvent());


};


[jQuery] Internet Explorer not firing ajax get on success of ajax post

2009-02-05 Thread georgelaugha...@gmail.com

I have a web application that i have been working on for a few months
now and i ran into a stumbling block about 2 weeks ago, i have tried
everything i can think of and with no success i figured i would get a
second opinion.

$(document).ready(function(){
$("button#Submit").click(function() {
var TN = $("#TroopNumberS").attr("value");
var TL = $("#TroopLocationS").attr("value");
var FN = $("#FName").attr("value");
var LN = $("#LName").attr("value");
var A  = $("#Age").attr("value");
var R  = $("#Rank").attr("value");
var W  = $("#WeekS").attr("value");
var id = $("#ID").attr("value");

$.ajax({
type: "POST",
url: "/php/addscout.php",
data: 
"TN="+TN+"&TL="+TL+"&FN="+FN+"&LN="+LN+"&A="+A+"&R="+R
+"&W="+W,
success: function(del){
$.facebox.loading(true);
$.get(["forms/addscout.php?id="+id], 
function(data){
jQuery.facebox(data)
});

$.get(["records/addscoutprogress.php?tn="+TN+"&tl="+TL], function
(data){

document.getElementById("progressivelist").innerHTML=data;
});
}
});
return false;
});

});

this is the post function the problem i am having is inside the
success function
it calls two pages the first is actually calling back it's self this
clears out all the fields and lets them add again without the reload
the second gets added to the bottom of the first and is a progressive
list of what they added so they can see it happening as it happens.
the content of the next page is as follows


";
$TroopLoc="'".$_GET["tl"]."'";

echo $TroopLoc;
echo $TroopNum;

$sql2="SELECT * FROM Scouts WHERE TroopNumber = $TroopNum AND Location
= $TroopLoc";
$result2=mysql_query($sql2);
$count2=mysql_num_rows($result2);
$x=0;
for ($i=0; $i < $count2; $i++) {
$x++;
$row = mysql_fetch_array($result2);
if($x==1){echo "".$row
["ScoutName"]."";}
elseif($x==2){echo "".$row
["ScoutName"]."";}
else{echo "".$row["ScoutName"]."";$x=0;}
}
?>


just a simple table to show progress
all of this works fine in Firefox safari everything but IE and the
only part not working in IE is the second page it calls it back in but
without the stuff they added ergo defeating it's purpose and i have
checked it is submitting but the thing that i find most weird is that
it won't even show the new content on a page reload, i have to close
the page and open it again to get the new content it is like IE is
loading that page as soon as the site loads and then just keeping the
information it has instead of reloading it

sorry for the long post but i wanted to make the problem and thanks
for reading it please post any thoughts i will try anything my client
won't accept the project without this function and it has me stumped

thanks
DJ


[jQuery] click/change events not recognized for checkboxes

2009-02-05 Thread sdeo

Hi
  I have the following html where I have a bunch of checkboxes which I
want to trigger events when checked/unchecked. But apparently the
events are not being recognized.

I have tried using various ways to access the checkboxes, but nothing
seems to work.
  1)$('#manufacturers:checkbox').click(function(){
  2)$("#mfglist:checkbox").click(function(){

Being new to JQuery, I did try reading all the blogs/tutorials, but no
luck so far. Any help is really appreciated.

Thanks!
sdeo

BEGIN HTML SNIPPET


 Manufacturers
  
   

  Apple (10)
  Nokia (30)
  Motorola (8)
  Samsung (5)
  
   
  



JS file:

function selectMfgEvent(){
   console.log("begin selectMfgEvent");
   $('input[type="checkbox"]').click(function(){
if($(this).is(":checked")){
console.log("checked = "+this);
}

   });

$(document).load(selectMfgEvent());


};


[jQuery] Re: Optimize large DOM inserts

2009-02-05 Thread Henrik Javén

This will be significantly faster

var html = [];
$.each(data, function(i, row) {
 html.push('data from json');


});


$("tbody").append(html.join(''));
$("table").formatTable();

On Feb 5, 12:56 pm, James  wrote:
> I see. Thanks for the tip. I'll try to work on that!
>
> On Feb 5, 10:38 am, Ricardo Tomasi  wrote:
>
>
>
> > Concatenating into a string is already much faster than appending in
> > each loop, there is not much room for improvement left. What you can
> > do improve user experience though is split that into a recursive
> > function over a setTimeout, so that the browser doesn't freeze and you
> > can display a nice loading animation.
>
> > James wrote:
> > > I need tips on optimizing a large DOM insert to lessen the "freeze" on
> > > the browser.
>
> > > Scenario:
> > > I receive a large amount of JSON 'data' through AJAX from a database
> > > (sorted the way I want viewed), and loop through them to add to a JS
> > > string, and insert that chunk of string into a tbody of a table. Then,
> > > I run a plug-in that formats the table (with pagination, etc.).
> > > Simplified sample code:
>
> > > var html = '';
> > > $.each(data, function(i, row) {
> > >      html += 'data from json';
> > > });
> > > $("tbody").append(html);
> > > $("table").formatTable();
>
> > > formatTable() requires that the table has to be "completed" before it
> > > can be executed.
> > > Is there any way I can optimize this better? I think I've read
> > > somewhere that making a string too long is not good, but I've also
> > > read that updating the DOM on each iteration is even worst.
>
> > > Any advice would be appreciated!- Hide quoted text -
>
> - Show quoted text -


[jQuery] Re: Map navigation

2009-02-05 Thread brian

On Thu, Feb 5, 2009 at 2:55 PM, ebru...@gmail.com  wrote:
>
> Hello,
>
> I am working on a map just like mmog games have like travian etc.
>
> The map has 4 navigation buttons nord east south west. If someone
> presses on it it loads the page again, i just want the map to move.
>
> Is there some kind of plugin or a other simple way to fix this?
>

At a guess--and it really only *can be* a guess--I'd say that you need
to return false from the click event handler.

http://www.catb.org/~esr/faqs/smart-questions.html


[jQuery] Re: Optimize large DOM inserts

2009-02-05 Thread Michael Geary

Here's a way you can make that much faster:

function loadTable( rows ) {
var out = [], o = -1;
out[++o] = '';
for( var row, iRow = -1;  row = rows[++iRow]; ) {
out[++o] = '';
out[++o] = row.whatever;
out[++o] = '';
}
out[++o] = '';
$('#container').html( out.join('') );
}

This is faster for several reasons:

* Explicit for loop (and the fastest kind of for loop) - no function
callback for each row.

* Builds an array of string fragments and then joins it, instead of string
concatenation.

* Buils the array with "out[++o] = ..." instead of the more obvious
"out.push(...)" (faster in IE).

* Instead of inserting a large number of sibling DOM elements (the TRs)
together, inserts only a single DOM element (the TABLE).

Note that the for loop will fail if the array may have null/false/zero/empty
string elements. This is usually a safe assumption if each 'row' in the JSON
data is actually an object, e.g.

json = {
"rows": [
{ "whatever":"something", "more":"something else" },
{ "whatever":"something 2", "more":"something else 2" },
{ "whatever":"something 3", "more":"something else 3" }
]
};

If, for example, those array entries are strings and empty strings are a
possibility, e.g.:

json = {
"rows": [
"something",
"",
"something 3"
]
};

then use a (somewhat) more conventional for loop:

for( var iRow = -1, nRows = rows.length;  ++iRow < nRows; ) {
out[++o] = '';
out[++o] = rows[iRow];
out[++o] = '';
}

Let me know if this helps!

-Mike

> From: James
> 
> I need tips on optimizing a large DOM insert to lessen the 
> "freeze" on the browser.
> 
> Scenario:
> I receive a large amount of JSON 'data' through AJAX from a 
> database (sorted the way I want viewed), and loop through 
> them to add to a JS string, and insert that chunk of string 
> into a tbody of a table. Then, I run a plug-in that formats 
> the table (with pagination, etc.).
> Simplified sample code:
> 
> var html = '';
> $.each(data, function(i, row) {
>  html += 'data from json'; }); 
> $("tbody").append(html); $("table").formatTable();
> 
> formatTable() requires that the table has to be "completed" 
> before it can be executed.
> Is there any way I can optimize this better? I think I've 
> read somewhere that making a string too long is not good, but 
> I've also read that updating the DOM on each iteration is even worst.
> 
> Any advice would be appreciated!
> 



[jQuery] Re: Need to make a edit layout system using php and jquery...?

2009-02-05 Thread shyhockey...@gmail.com

Thanks... So I can save these values with php???

Cause I plan to allow people to make their own profile page layout and
need to save these values.

On Feb 2, 7:11 am, jQuery Lover  wrote:
> To find positions and everything:http://docs.jquery.com/CSS
>
> 
> Read jQuery HowTo Resource  -  http://jquery-howto.blogspot.com
>
> On Mon, Feb 2, 2009 at 3:19 AM, shyhockey...@gmail.com
>
>  wrote:
>
> > Hi, I am right now trying to make a edit layout  system.
>
> > basicly I want to know how I can use jquery to  grab the height width
> > and position elements are at.
>
> > Cause I plan to make in the edit mode to allow users to move like
> > images and tables and texts around on the layout and even change
> > background images and add more artistic images for their profiles.
>
> > I will add also a music player.
>
> > So I need to know how I can grab all positions height and width of
> > each element on my layout and then store that data.
>
> > I am planning to make databases for users where I will store their
> > edited stuff.
>
> > So I need the x  and  y position of where the elements are at and also
> > the height and width. Some told me I should  just grab what  css
> > element of height and width and top and left of the elements using
> > javascript.
>
> > What would you suggest on how I should do it?
>
> > Can I do it using jquery or no???
>
> > Thanks for your time.


[jQuery] Re: alignment IN IE6 ... with jquery..

2009-02-05 Thread shyhockey...@gmail.com

OK, My website is :  www.chillenvillen.comon that site  click the
home button. It will take you to a login page  use TEST for both user
name and password.

this takes you to a test account. This account page has jquery
javascript.  Use Firefox to see what it supposed to be doing and then
look at it with IE7 or 6  and you will see what I am complaining
about.

hope this helps any.



On Feb 5, 4:15 am, Stephan Veigl  wrote:
> Hi,
>
> can you post your code (e.g. at jsbin.com) or give us a link to it.
>
> Being standard compliant is always a good idea :-)
>
> by(e)
> Stephan
>
> 2009/2/5 shyhockey...@gmail.com :
>
>
>
> > Hi, ok currently I just looked at my website using IE6 and IE7.
>
> > I notice the pages I used jquery and javascript, would be randomly
> > placed around the website and also the menus that needed to fade in
> > and out when a mouse hover occurs over the user image. Well those
> > menus show up as images and dosen't fade in or out but is randomly
> > placed around the website.
>
> > In firefox it works fine. I can see it fade in and out and many other
> > stuff. So firefox is set to go.
>
> > it's just that IE 7, and 6 is weird. It would randomly place the
> > elements around the website. It would also show hidden elements
> > meaning that they are hidden first and then fade in upon a certain
> > condition.
>
> > So is there anyway I can fix this???
>
> > I heard that I need to comply with WS3 . I heard their is a standard
> > that I need to follow in order for my javascript or jquery to show
> > properly.
>
> > Any ideas?


[jQuery] Is this bug in IE or ui tabs

2009-02-05 Thread varun

HI
I am using ui tabs and i have 5 tabs on my page. Each tab is having a
submit button and placeholder...
when submit button is clicked , it fires a click event for that button
in code behind and loads a table in placeholder of that tab...
problem is after doing this process once in Internet Explorer
when I go to another tab and hit submit button , it does not fire the
event attached to that button... means if there are 3 submit buttons
and 3 click events in code behind  only 1 time submit button event
is fired and then switching to different tab and hitting submit does
nothing...


But if I do the same stuff in firefox, it works .
Can some one please advise ?

Thanks
Varun


[jQuery] Re: Ajax/Drag and Drop question

2009-02-05 Thread Tbone

Hi,
What I had to do to get that to work(doing exactly what you are
doing), was once the new content was loaded from the AJAX call,
destroy and "re-drag" the loaded divs...

Something like this

$ajax...

success:
   ..somestuff...
   ..load new content...
   $('.classname').draggable('destroy');
   $('.classname').draggable({helper: 'clone',handle: 'div',appendTo:
'body',zindex:1000,cursorAt: {top: 7, left: 25} });

Try something like this..I know I spent a day figuring out what needed
to be done..

T.

On Feb 5, 1:17 pm, DReed  wrote:
> Hi There.  I am new to jQuery and I have a question.  I was able to
> get the drag/drop functionality working, very slick.
>
> For an example, I have some HTML in one  which has a "droppable"
> point, and HTML in another  which has many "draggable" points.  I
> can drag and drop and all is well.
>
> The next step is to source the HTML for each  from an AJAX call,
> which I have done.  The problem is, after it loads, the DRAG/DROP
> doesn't work.  The "draggable" elements are no longer draggable.
>
> my code is pretty simple:
>
> $("#leftside").load("draggable.html");
> $("#pane2").load("droppable.html");
>
> Could it be that I have to do this load with a callback and then
> assign which classes are draggable in the callabck for the "draggable"
> content, and then do the same for the "droppable"?
>
> Sorry, I would have posted the source but it is in pieces right now
> will I am trying different things.
>
> Thanks in advance.


[jQuery] Re: Plugin Question

2009-02-05 Thread Chris



On Feb 5, 6:17 pm, Jörn Zaefferer 
wrote:
> I'm sorry. I confused the (hidden) select and the text input. Please
> revert that last change and lets try again.
>
> Jörn

It's reverted.


[jQuery] Re: Plugin Question

2009-02-05 Thread Jörn Zaefferer

I'm sorry. I confused the (hidden) select and the text input. Please
revert that last change and lets try again.

Jörn

On Fri, Feb 6, 2009 at 12:02 AM, Chris  wrote:
>
> On Feb 5, 5:50 pm, Jörn Zaefferer 
> wrote:
>> You've got class="required" on the text-input-element. The validation
>> picks that up as a validation rule. Removing it should give you the
>> correct rule instead.
>>
>> Could be considered a bug, where the option-rule should override the
>> class rule, instead of the current behaviour.
>
> Here's what I don't understand.
>
> (1) how now do I make sure the text input element is required?
> (2) The form still allows me to submit value="" (in this case it has a
> # there) when the accept radio button is selected.


[jQuery] Re: Plugin Question

2009-02-05 Thread Chris

On Feb 5, 5:50 pm, Jörn Zaefferer 
wrote:
> You've got class="required" on the text-input-element. The validation
> picks that up as a validation rule. Removing it should give you the
> correct rule instead.
>
> Could be considered a bug, where the option-rule should override the
> class rule, instead of the current behaviour.

Here's what I don't understand.

(1) how now do I make sure the text input element is required?
(2) The form still allows me to submit value="" (in this case it has a
# there) when the accept radio button is selected.


[jQuery] Re: $('#xxx').html() changing xhtml to html

2009-02-05 Thread Klaus Hartl

You can try as long as you want - as long as you serving XHTML as text/
html, from the browsers point of view (e.g. its parser) it's HTML it's
dealing with, thus it'll remove those slashes internally.

Have you ever wondered why in Firefox' source code view those slashes
are marked red (as in error)? Technically it's still HTML with some
weird slashes where they do not belong. You'd have to serve XHTML as
application/xhtml+xml to change the browser's parser.

That said, you shouldn't waste your time regexing slashes. And instead
go back to HTML 4.01 maybe.

--Klaus



On 5 Feb., 16:03, dantan  wrote:
> I am trying to parse the html out of a specific div to save it with
> php into a SQL-database.
>
> Working good so far.
> The html is valid xhtml, but html() makes  instead of  and
>  instead of 
>
> Is there a workaround to get the xhtml?


[jQuery] Re: Validation Plugin

2009-02-05 Thread tres

You can with my form validation plugin.

http://shugartweb.com/jquery/form

There is an option that you can pass called 'ignore'. It is a selector
for all fields that should be ignored in validation. By default it is
':hidden', but you can put anything in there such as ':hidden,
[value="default value"], .example-field'. It will then ignore those on
validation.

If you have any questions, changes, suggestions, comments or just
would like to collaborate, let me know.

Trey




On Feb 5, 6:56 am, varun  wrote:
> Hi
>
> Can some one please tell me if I can use validate plugin if saomething
> is written in textbox by default ?
>
> I have a textbox which is using auto complete p[lugin , so when page
> loads an "auto-suggest" keyword always written in textbox and if some
> user clicks that keyword,it disappears ...
> I want even if it is there and somebody submits the form , validation
> plugin should work?
>
> Thanks
> Varun


[jQuery] Re: Plugin Question

2009-02-05 Thread Jörn Zaefferer

You've got class="required" on the text-input-element. The validation
picks that up as a validation rule. Removing it should give you the
correct rule instead.

Could be considered a bug, where the option-rule should override the
class rule, instead of the current behaviour.

Jörn

On Thu, Feb 5, 2009 at 10:56 PM, Chris  wrote:
>
>
>
> On Feb 5, 4:34 pm, Jörn Zaefferer 
> wrote:
>> Remove the required-class. That overrides the dependency-required-rule.
>>
>> Jörn
>
> Sir,
>
> From the markup above (Google Group) the only thing I include on the
> radio button is the validate="required:true". Should I remove that? I
> tried to remove it, and it didn't do anything.
>
> Also, is the :checked selector the one I want for a radio button?


[jQuery] Re: Superfish horizontal menu issue in IE6 / IE7

2009-02-05 Thread ch...@chris-reilly.com

Fix'd.

It turned out just to be a CSS issue - float:left instead of right...
DOH.



On Feb 5, 11:34 am, "ch...@chris-reilly.com" 
wrote:
> Hello everybody!
>
> I am working on finishing a site that another web designer started,
> and am a total newb to Superfish and not very strong in CSS/JS
> troubleshooting. We are using a horizontal menu with a horizontal
> submenu below it. It looks beautiful in FF, in IE 6/7 it is rendering
> the submenus vertically. Please help!!! My eternal gratitude to
> whomever can help. We are needing to get this site up 2 months ago and
> this is the only holdup.
>
> See for yourself:http://www.moreorlessmyself.com/linc<-- using older libraries
> orhttp://www.thelincolncenterspokane.com/test/<--- using the latest
> superfish and jquery files
>
> HTML:
> 
>                         
>
>                                  href="index.html" title="The
> Lincoln Center Home">Home
>
>                  title="About The Lincoln Center Spokane">About
>                     
>                          title="About The Lincoln Center Spokane">About The Lincoln Center li>
>                          href="management_team.html" title="The Lincoln Center Management
> Team">Management Team
>                     
>                 
>                  href="services.html" title="Lincoln Center Services">Services
>                     
>                          href="the_wedding_experience.html" title="The Wedding Experience at
> The Lincoln Center Spokane">The Wedding Experience
>                          href="meetings_and_corporate_events.html" title="Meetings &
> Corporate Events at The Lincoln Center Spokane">Meetings  &
> Corporate Events
>                          href="special_events.html" title="Special Events at The Lincoln Center
> Spokane">Special Events
>                          title="Catering at The Lincoln Center Spokane">Catering
>                     
>                 
>                  href="facilities.html" title="Lincoln Center Facilities">Facilities a>
>                      
>                          href="monroe_ballroom.html" title="The Monroe Ballroom at The Lincoln
> Center Spokane">The Monroe Ballroom
>                          href="lincoln_ballroom.html" title="The Lincoln Ballroom at The
> Lincoln Center Spokane">The Lincoln Ballroom
>                           title="The Library at The Lincoln Center Spokane">The Library
>                          href="landau_conference_room.html" title="The Landau Conference Room
> at The Lincoln Center Spokane">Landau Conference Room
>                          href="maxwell_board_room.html" title="The Maxwell Board Room at The
> Lincoln Center Spokane">Maxwell Board Room
>                          href="art_gallery_foyer.html" title="The Art Gallery Foyer at The
> Lincoln Center Spokane">Gallery Foyer
>
>                     
>                 
>                  title="Lincoln Center Frequently Asked Questions">FAQ's
>                 
>                  href="public_events.html" title="Lincoln Center News &
> Events">News & Events
>
>                 
>                  href="location.html" title="Contact The Lincoln Center">Contact
>                     
>                          title="How To Find The Lincoln Center Spokane">Location & Map
>                          title="Contact The Lincoln Center Spokane">Contact Info
>                          title="Getting Started with your Lincoln Center Event">Getting
> Started
>                     
>                 
>                         
>                 
>
> CSS:
>
> body{color:#000;background:#FFF;}
> body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td
> {margin:0;padding:0;}
> table{border-collapse:collapse;border-spacing:0;}
> fieldset,img{border:0;}
> address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-
> weight:normal;}
> li{list-style:none;}
> caption,th{text-align:left;}
> h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
> q:before,q:after{content:'';}
> abbr,acronym{border:0;font-variant:normal;}
> sup,sub{line-height:-1px;vertical-align:text-top;}sub{vertical-
> align:text-bottom;}
> input, textarea, select{font-family:inherit;font-size:inherit;font-
> weight:inherit;}
>
> /* GLOBAL
> --- */
>
> body { background:#171717 ; font: 63.7%/1.55 Verdana, Arial, sans-
> serif; color:#333 ; }
>
> /* =Clearfix */
> .clearfix:after { content: ""; display: block; height: 0; clear: both;
> visibility: hidden; }
> .clearfix { display: inline-table; }
> /* Hides from IE-mac \*/
> .clearfix { height: 1%; }
> .clearfix { display: block; }
> /* End hide from IE-mac */
>
> /* HEADER
> --- */
>
> #header { background: #171717 url(../img/img_home.jpg) no-repeat 0 0;
> width: 980px; height:202px; }
> #header h1 {}
> #header h1 a { display: block; width: 260px; height: 202px; }
> #header p { margin-left: 300px; }
>
> /* NAVIGATION
> --- */
>
> #primary_na

[jQuery] Superfish - Drop down opacity

2009-02-05 Thread magik20

I still havent found a solution for the drop down opacity for
superfish.

Ive tried changing all the colors , but the drop down background one
stays the same, and makes the text very hard to read.

i want the BACKGROUND color of the drop down to change from clear to a
color.

Any help??

my email is adarr...@darrellit.com

example of the problem

http://bischoffhomeremodeling.com/ ( hover over customer testimonials )


[jQuery] "After the fact" tooltip application problem

2009-02-05 Thread Tbone

I have a page where I'm using tooltip that is dynamically constructed
with $AJAX calls.  The static content gets tooltip initialization just
fine, but I'm having trouble with content added after initial load.

The first call to tooltip after page load:
function setFactoryTooltip()
{
$('.factory,').tooltip({
  track:
true,
  delay:
0,
  showURL:
false,
  opacity:
1,
  showBody: " -
",
  extraClass: "pretty
fancy",
  fixPNG:
true,
  top:
-15,
  left:
5
});
}

This works great.
After an AJAX call that populates another area on the screen, I call:
function setSingleTooltip(element) {
  $(element).tooltip({
track: true,
delay: 0,
showURL: false,
opacity: 1,
showBody: " - ",
extraClass: "list",
fixPNG: true,
top: -15,
left: 5
  });
}
where 'element' is the class of a newly added .


I haven't been able to figure out where I can put the "SingleTooltip"
call such that it is done automatically after the new divs are added.
Nothing I've tried works.  However, if I put that function call on a
button or menu and physically call it manually, it works.  Throughout
all this, the original tooltips work great!

Any ideas?

Thanks,
T.


[jQuery] Re: list traversing

2009-02-05 Thread amazz...@gmail.com

You know how sometimes you are working on a problem and you stare at
it so long that the most obvious answers escape you until someone
points it out and it is like a smack in the face?

Yeah. Serious 'duh' moment on my part. Thanks.

On Feb 5, 3:32 pm, MorningZ  wrote:
> Can you just make life REALLY easy on yourself and put the text in a
>  tag or something?
>
> ie/
>
> 
>     List Item1
>     List Item2
>         
>             Sub Item1
>             Sub Item2
>         
>     
> 
>
> then
>
> http://docs.jquery.com/Selectors/firstChild
>
> would make it a snap to get the text()
>
> On Feb 5, 3:00 pm, "amazz...@gmail.com"  wrote:
>
> > Hi,
> > I'm trying to traverse a list that has some sub-lists nested, i.e.
> > 
> >     List Item1
> >     List Item2
> >         
> >             Sub Item1
> >             Sub Item2
> >         
> >     
> > 
>
> > I'm trying to grab the text of List Item2, but without the text of the
> > sublist items. Right now if I use:
> > $('ul li').text()   -- it returns the text of the List Item and the
> > text of any sub items.
>
> > I'm thinking I may have to write a regular expression to filter out
> > the sublist, but was wondering if jQuery could handle this? Any ideas
> > appreciated.
>
> > AM


[jQuery] Re: Plugin Question

2009-02-05 Thread Chris



On Feb 5, 4:34 pm, Jörn Zaefferer 
wrote:
> Remove the required-class. That overrides the dependency-required-rule.
>
> Jörn

Sir,

>From the markup above (Google Group) the only thing I include on the
radio button is the validate="required:true". Should I remove that? I
tried to remove it, and it didn't do anything.

Also, is the :checked selector the one I want for a radio button?


[jQuery] Re: Plugin Question

2009-02-05 Thread Jörn Zaefferer

Remove the required-class. That overrides the dependency-required-rule.

Jörn

On Thu, Feb 5, 2009 at 9:58 PM, Chris  wrote:
>
> Thanks James. Now the page doesn't break, but my validation rules
> still don't hold.


[jQuery] Re: logical AND check

2009-02-05 Thread Jörn Zaefferer

Yeah, that'll do, too:

required: function() {
 return $('#radioButton1:checked, #radioButton2: checked').length == 2;
}

Jörn

On Thu, Feb 5, 2009 at 10:12 PM, Eric Garside  wrote:
>
> You could just do:
>
> if ($('#radioButton1:checked, #radioButton2: checked').length == 2)){
> //required
> } else {
> //not required
> }
>
> On Feb 5, 1:51 pm, Jörn Zaefferer 
> wrote:
>> The [validate] indicates that the message is about the validation
>> plugin. I'm asking to put that into the subject on the plugin page.
>>
>> To the question, try this:
>>
>> required: function() {
>>   return $("#radioButton1:unchecked").length &&
>> $("#radioButton2:unchecked").length;
>>
>> }
>>
>> Jörn
>>
>> On Thu, Feb 5, 2009 at 7:22 PM, MorningZ  wrote:
>>
>> > You using a plugin like "Validate" or just a general "how do I?"
>> > question


[jQuery] Re: Checkbox and Radio buttons hooked on change problem in Internet Explorer

2009-02-05 Thread Justin Meyer

listen for click

On Jan 21, 5:24 am, XeroXer  wrote:
> Hi all.
>
> I am triggering an ajax load on my page if a radio button or checkbox
> is changed.
> For this i am binding 'change' to the checkbox or radio button.
> This works perfect in both Firefox and Safari but not in Internet
> Explorer.
> In Internet Explorer it does not hook on the change but the deselect
> after the change.
> So the trigger is not happening when you check the box but after you
> check it and then select something else on the page.
>
> If anyone have any idea on how to solve this please tell me :)


[jQuery] Re: logical AND check

2009-02-05 Thread Eric Garside

You could just do:

if ($('#radioButton1:checked, #radioButton2: checked').length == 2)){
//required
} else {
//not required
}

On Feb 5, 1:51 pm, Jörn Zaefferer 
wrote:
> The [validate] indicates that the message is about the validation
> plugin. I'm asking to put that into the subject on the plugin page.
>
> To the question, try this:
>
> required: function() {
>   return $("#radioButton1:unchecked").length &&
> $("#radioButton2:unchecked").length;
>
> }
>
> Jörn
>
> On Thu, Feb 5, 2009 at 7:22 PM, MorningZ  wrote:
>
> > You using a plugin like "Validate" or just a general "how do I?"
> > question


[jQuery] Re: Plugin Question

2009-02-05 Thread Chris

Thanks James. Now the page doesn't break, but my validation rules
still don't hold.


[jQuery] Re: Optimize large DOM inserts

2009-02-05 Thread James

I see. Thanks for the tip. I'll try to work on that!

On Feb 5, 10:38 am, Ricardo Tomasi  wrote:
> Concatenating into a string is already much faster than appending in
> each loop, there is not much room for improvement left. What you can
> do improve user experience though is split that into a recursive
> function over a setTimeout, so that the browser doesn't freeze and you
> can display a nice loading animation.
>
> James wrote:
> > I need tips on optimizing a large DOM insert to lessen the "freeze" on
> > the browser.
>
> > Scenario:
> > I receive a large amount of JSON 'data' through AJAX from a database
> > (sorted the way I want viewed), and loop through them to add to a JS
> > string, and insert that chunk of string into a tbody of a table. Then,
> > I run a plug-in that formats the table (with pagination, etc.).
> > Simplified sample code:
>
> > var html = '';
> > $.each(data, function(i, row) {
> >      html += 'data from json';
> > });
> > $("tbody").append(html);
> > $("table").formatTable();
>
> > formatTable() requires that the table has to be "completed" before it
> > can be executed.
> > Is there any way I can optimize this better? I think I've read
> > somewhere that making a string too long is not good, but I've also
> > read that updating the DOM on each iteration is even worst.
>
> > Any advice would be appreciated!
>
>


[jQuery] Re: Plugin Question

2009-02-05 Thread James

var r = jQuery("#rsvp").validate({
rules: {
select: {
required: "#accept:checked"
}
}, < RIGHT HERE
submitHandler: function(form) {
jQuery(form).ajaxSubmit(options2);
}
});


On Feb 5, 10:44 am, Chris  wrote:
> On Feb 5, 3:23 pm, Jörn Zaefferer 
> wrote:
>
> > Could you provide a testpage? Your code looks fine.
>
> > Jörn
>
> Sure.http://www.chris-gwen.com/Right now Firebug says i'm missing a
> semicolon which breaks everything, but i don't see why it says that.


[jQuery] Re: [validate] Plugin Question

2009-02-05 Thread Chris

On Feb 5, 3:23 pm, Jörn Zaefferer 
wrote:
> Could you provide a testpage? Your code looks fine.
>
> Jörn

Sure. http://www.chris-gwen.com/ Right now Firebug says i'm missing a
semicolon which breaks everything, but i don't see why it says that.


[jQuery] Re: autocomplete and json

2009-02-05 Thread zendog74

I managed to alias some of the classes to more simple names in my WS,
so my JSON now looks like this.

{"persons":
{"person":[
{"personId__":
6,"firstName__":"Jack","lastName__":"Black","email__":"jbl...@jackblack.com"},
{"personId__":
1,"firstName__":"Joe","lastName__":"Blow","email__":"jb...@hotmail.com"},
{"personId__":
4,"firstName__":"Jason","lastName__":"Giambi","email__":"jgia...@yahoo.com"},
{"personId__":
3,"firstName__":"Jim","lastName__":"Jones","email__":"jjo...@hotmail.com"},
{"personId__":
5,"firstName__":"Jill","lastName__":"Robin","email__":"jro...@gmail.com"},
{"personId__":
2,"firstName__":"Jason","lastName__":"Smith","email__":"jsm...@hq.nasa.gov"}
]}
}

I am still working on getting it parsed properly by overriding the
parse function in autocomplete, but I don't have it working yet. Any
assistance is appreciated!

jQuery("#pocEmail").autocomplete("../screen/PersonLookup", {
width: 260,
minChars: 1,
cacheLength: 20,
selectFirst: false,
max: 25,
dataType: "json",
extraParams: {field2Use:'email',output:'json'},
//formatResult: formatResult,
//formatItem: formatItem,
//formatMatch: formatMatch
parse: autocompleteJSON,
formatItem: function(row) {
return row["email__"];
//return row.firstName__ + " " + row.lastName__ + "["
+ row.email + "]";
}
});
  });

  var autocompleteJSON = function(data) {
var json = data.persons.person;
var parsed = [];
for (var i=0; i < json.length; i++) {
var row = json[i];
parsed.push({
data: row,
value: row["firstName__"] + ' ' + row["lastName__"] +
' [' + row["email__"] + ']',
result: row["email"]
});
}
return parsed;
 };


On Feb 5, 10:32 am, zendog74  wrote:
> What is the status of using remote JSON with jquery.autocomplete? I
> saw a couple of threads in the group about it, but they are patchworky
> and hard to follow. I did not see anything about using JSON on the
> autocomplete jquery plugin site. Is using remote JSON supported or do
> I have to modify source to make it work?
>
> Here is what I am trying to do. I created a WS to return some user
> data for an autocomplete. Here is the JSON that is returned when I
> type 'j' into my autocomplete form field.
>
> {"linked-list":{"gov.nasa.hq.portal.calendar.to.PersonTO":
> [{"personId__":
> 6,"firstName__":"Jack","lastName__":"Black","email__":"jbl...@jackblack.com"},
> {"personId__":
> 1,"firstName__":"Joe","lastName__":"Blow","email__":"jb...@hotmail.com"},
> {"personId__":
> 4,"firstName__":"Jason","lastName__":"Giambi","email__":"jgia...@yahoo.com"},
> {"personId__":
> 3,"firstName__":"Jim","lastName__":"Jones","email__":"jjo...@hotmail.com"},
> {"personId__":
> 5,"firstName__":"Jill","lastName__":"Robin","email__":"jro...@gmail.com"},
> {"personId__":
> 2,"firstName__":"Jason","lastName__":"Smith","email__":"jsm...@hq.nasa.gov"}]}}
>
> Here is my javascript:
>
> document.observe("dom:loaded", function() {
>
>         jQuery("#pocEmail").autocomplete("../screen/PersonLookup", {
>             width: 260,
>             minChars: 1,
>             cacheLength: 20,
>             selectFirst: false,
>             max: 25,
>             extraParams: {field2Use:'email',output:'json'},
>             formatItem: function(row, i, max) {
>                 alert(row);
>                 return row;
>                 //return row.firstName__ + " " + row.lastName__ + "["
> + row.email + "]";
>             }
>         });
>
> });
>
> The entire JSON is getting returned as a row, so I assume it is being
> treated as a String and is seen as one row.
>
> Can I make this work without too much hardship? The WS I created can
> return XML as well if that is an option.
>
> Thanks!


[jQuery] Re: Scoping, Closure and $.post

2009-02-05 Thread Ricardo Tomasi

renderTree: function(){
  var tree = this;
  $.post("/Treeview?task=GET_NODE&action=DYNAMIC", {}, function() {
tree.renderFolder(xml, 'foldersView');
  });
},

On Feb 5, 5:54 pm, MoBel  wrote:
> I'm integrating prototype and jQuery together.  I have a class that
> looks like this:
>
> var TreeView = function(){};
> TreeView.prototype = {
>     initialize: function()
>     {
>         this.view = 'Data management';
>     },
>
>     renderTree: function()
>     {
>         $.post("/Treeview?task=GET_NODE&action=DYNAMIC", {}, function
> () { this.renderFolder(xml, 'foldersView'); } );
>     },
>
>     renderFolder: function(xml, outputDiv)
>     {
>         // do some stuff
>     }
>
> }
>
> var treeview = new TreeView();
>
> Obviously this doesn't work because this does not refer to the my
> treeview instance of the TreeView object.
>
> I've also tried doing this with $.post
>         $.post("/Treeview?task=GET_NODE&action=DYNAMIC", {}, function
> () { this.renderFolder(xml, 'foldersView'); }.bind(this) );
>
> But that doesn't seem to help.
>
> So my question is, is there a way to get around this?  Should I be
> writing my TreeView object in a different way?


[jQuery] Re: Optimize large DOM inserts

2009-02-05 Thread Ricardo Tomasi

Concatenating into a string is already much faster than appending in
each loop, there is not much room for improvement left. What you can
do improve user experience though is split that into a recursive
function over a setTimeout, so that the browser doesn't freeze and you
can display a nice loading animation.

James wrote:
> I need tips on optimizing a large DOM insert to lessen the "freeze" on
> the browser.
>
> Scenario:
> I receive a large amount of JSON 'data' through AJAX from a database
> (sorted the way I want viewed), and loop through them to add to a JS
> string, and insert that chunk of string into a tbody of a table. Then,
> I run a plug-in that formats the table (with pagination, etc.).
> Simplified sample code:
>
> var html = '';
> $.each(data, function(i, row) {
>  html += 'data from json';
> });
> $("tbody").append(html);
> $("table").formatTable();
>
> formatTable() requires that the table has to be "completed" before it
> can be executed.
> Is there any way I can optimize this better? I think I've read
> somewhere that making a string too long is not good, but I've also
> read that updating the DOM on each iteration is even worst.
>
> Any advice would be appreciated!


[jQuery] Re: Optimize large DOM inserts

2009-02-05 Thread Ricardo Tomasi

Concatenating into a string is already much faster than appending in
each loop, there is not much room for improvement left. What you can
do improve user experience though is split that into a recursive
function over a setTimeout, so that the browser doesn't freeze and you
can display a nice loading animation.


On Feb 5, 5:03 pm, James  wrote:
> I need tips on optimizing a large DOM insert to lessen the "freeze" on
> the browser.
>
> Scenario:
> I receive a large amount of JSON 'data' through AJAX from a database
> (sorted the way I want viewed), and loop through them to add to a JS
> string, and insert that chunk of string into a tbody of a table. Then,
> I run a plug-in that formats the table (with pagination, etc.).
> Simplified sample code:
>
> var html = '';
> $.each(data, function(i, row) {
>      html += 'data from json';});
>
> $("tbody").append(html);
> $("table").formatTable();
>
> formatTable() requires that the table has to be "completed" before it
> can be executed.
> Is there any way I can optimize this better? I think I've read
> somewhere that making a string too long is not good, but I've also
> read that updating the DOM on each iteration is even worst.
>
> Any advice would be appreciated!


[jQuery] Re: BLOCK method

2009-02-05 Thread Mike Alsup

> I am using the block method to block  a specific element on my page.
> Below is the syntax I used to try to block it.
>
>     $(document).ready(function() {
>
>          $('#btnBlock').click(function() {
>           $('#tblTest').block({ css: { backgroundColor: 'red', color:
> 'red' , height: '3px'} });
>
>          });
>      });
>
> THe block works, the strange thing is, it blocks more than what it
> should. It blocked half of my page vs blocking only the specific
> element that is asked. Secondly, my css doesnt work.
>
> Any feedback is appreciated.


Blocking elements is meant for block-level elements, not inline-
elements.  Are you trying to block and inline element?


[jQuery] Re: list traversing

2009-02-05 Thread MorningZ

Can you just make life REALLY easy on yourself and put the text in a
 tag or something?

ie/


List Item1
List Item2

Sub Item1
Sub Item2




then

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

would make it a snap to get the text()





On Feb 5, 3:00 pm, "amazz...@gmail.com"  wrote:
> Hi,
> I'm trying to traverse a list that has some sub-lists nested, i.e.
> 
>     List Item1
>     List Item2
>         
>             Sub Item1
>             Sub Item2
>         
>     
> 
>
> I'm trying to grab the text of List Item2, but without the text of the
> sublist items. Right now if I use:
> $('ul li').text()   -- it returns the text of the List Item and the
> text of any sub items.
>
> I'm thinking I may have to write a regular expression to filter out
> the sublist, but was wondering if jQuery could handle this? Any ideas
> appreciated.
>
> AM


[jQuery] BLOCK method

2009-02-05 Thread Hokie

Hi All -

I am using the block method to block  a specific element on my page.
Below is the syntax I used to try to block it.

$(document).ready(function() {

 $('#btnBlock').click(function() {
  $('#tblTest').block({ css: { backgroundColor: 'red', color:
'red' , height: '3px'} });

 });
 });


THe block works, the strange thing is, it blocks more than what it
should. It blocked half of my page vs blocking only the specific
element that is asked. Secondly, my css doesnt work.

Any feedback is appreciated.


Savoy


[jQuery] Scoping, Closure and $.post

2009-02-05 Thread MoBel

I'm integrating prototype and jQuery together.  I have a class that
looks like this:

var TreeView = function(){};
TreeView.prototype = {
initialize: function()
{
this.view = 'Data management';
},

renderTree: function()
{
$.post("/Treeview?task=GET_NODE&action=DYNAMIC", {}, function
() { this.renderFolder(xml, 'foldersView'); } );
},

renderFolder: function(xml, outputDiv)
{
// do some stuff
}
}

var treeview = new TreeView();


Obviously this doesn't work because this does not refer to the my
treeview instance of the TreeView object.

I've also tried doing this with $.post
$.post("/Treeview?task=GET_NODE&action=DYNAMIC", {}, function
() { this.renderFolder(xml, 'foldersView'); }.bind(this) );

But that doesn't seem to help.

So my question is, is there a way to get around this?  Should I be
writing my TreeView object in a different way?


[jQuery] Superfish horizontal menu issue in IE6 / IE7

2009-02-05 Thread ch...@chris-reilly.com

Hello everybody!

I am working on finishing a site that another web designer started,
and am a total newb to Superfish and not very strong in CSS/JS
troubleshooting. We are using a horizontal menu with a horizontal
submenu below it. It looks beautiful in FF, in IE 6/7 it is rendering
the submenus vertically. Please help!!! My eternal gratitude to
whomever can help. We are needing to get this site up 2 months ago and
this is the only holdup.

See for yourself:
http://www.moreorlessmyself.com/linc <-- using older libraries
or
http://www.thelincolncenterspokane.com/test/ <--- using the latest
superfish and jquery files

HTML:



Home

About

About The Lincoln Center
Management Team


Services

The Wedding Experience
Meetings  &
Corporate Events
Special Events
Catering


Facilities
 
The Monroe Ballroom
The Lincoln Ballroom
 The Library
Landau Conference Room
Maxwell Board Room
Gallery Foyer



FAQ's

News & Events


Contact

Location & Map
Contact Info
Getting
Started





CSS:

body{color:#000;background:#FFF;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td
{margin:0;padding:0;}
table{border-collapse:collapse;border-spacing:0;}
fieldset,img{border:0;}
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-
weight:normal;}
li{list-style:none;}
caption,th{text-align:left;}
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
q:before,q:after{content:'';}
abbr,acronym{border:0;font-variant:normal;}
sup,sub{line-height:-1px;vertical-align:text-top;}sub{vertical-
align:text-bottom;}
input, textarea, select{font-family:inherit;font-size:inherit;font-
weight:inherit;}


/* GLOBAL
--- */

body { background:#171717 ; font: 63.7%/1.55 Verdana, Arial, sans-
serif; color:#333 ; }

/* =Clearfix */
.clearfix:after { content: ""; display: block; height: 0; clear: both;
visibility: hidden; }
.clearfix { display: inline-table; }
/* Hides from IE-mac \*/
.clearfix { height: 1%; }
.clearfix { display: block; }
/* End hide from IE-mac */


/* HEADER
--- */

#header { background: #171717 url(../img/img_home.jpg) no-repeat 0 0;
width: 980px; height:202px; }
#header h1 {}
#header h1 a { display: block; width: 260px; height: 202px; }
#header p { margin-left: 300px; }


/* NAVIGATION
--- */

#primary_nav { background:#753425; padding-bottom: 36px; font-family:
Avenir, Arial, sans-serif; margin: 0;}
#primary_nav li { float: left; text-align: center; background: #171717
url(../img/bg_prim_nav_bl.gif) repeat-x top; margin: 0; list-style:
none; }
#primary_nav a { display: block; height:36px; text-transform:
uppercase; text-decoration: none; font-size: 1.1em; color:#ccc; line-
height: 2.7 }
#primary_nav a:hover,
#primary_nav li.sfHover a,
#primary_nav li.sf-breadcrumb a { color:#ff; background:
#753425; }
#primary_nav li.current_page_item a,
#primary_nav li.current_page_parent a,
#primary_nav li.current_page_ancestor a { color:#ff; background:
#753425 url(../img/bg_prim_nav_current.gif) repeat-x top; }
#primary_nav .primary_nav_home a { width: 115px; }
#primary_nav .primary_nav_about a { width: 120px; }
#primary_nav .primary_nav_services a { width: 160px; }
#primary_nav .primary_nav_facility a { width: 160px; }
#primary_nav .primary_nav_pack a { width: 115px; }
#primary_nav .primary_nav_newsevents a { width: 180px; }
#primary_nav .primary_nav_contact a { width: 130px; }
#primary_nav ul { width: 980px; margin: 0; }
#primary_nav .current_page_item ul,
#primary_nav .sfHover ul { display: block !important;
visibility:visible !important; width:100%; background:#753425; }
#primary_nav ul li { }
#primary_nav ul li a { background: #753425; text-transform:none;
width: auto !important; padding: 0 18px; font-size: 1em; line-height:
2.4; color:#fff; float:right;}
#primary_nav ul li a:hover { text-decoration: underline;}
#primary_nav ul li.current_page_item a,
#primary_nav li.current_page_ancestor ul li a,
#primary_nav li.current_page_item ul li a { background: #753425; }


/* MAIN CONTENT
--- */

.columns { margin: 0 20px 30px;}
.columns.no_margin { margin-bottom: 0;}
.col_left { width: 300px; float:left; mar

[jQuery] Ajax/Drag and Drop question

2009-02-05 Thread DReed

Hi There.  I am new to jQuery and I have a question.  I was able to
get the drag/drop functionality working, very slick.

For an example, I have some HTML in one  which has a "droppable"
point, and HTML in another  which has many "draggable" points.  I
can drag and drop and all is well.

The next step is to source the HTML for each  from an AJAX call,
which I have done.  The problem is, after it loads, the DRAG/DROP
doesn't work.  The "draggable" elements are no longer draggable.

my code is pretty simple:

$("#leftside").load("draggable.html");
$("#pane2").load("droppable.html");

Could it be that I have to do this load with a callback and then
assign which classes are draggable in the callabck for the "draggable"
content, and then do the same for the "droppable"?

Sorry, I would have posted the source but it is in pieces right now
will I am trying different things.

Thanks in advance.


[jQuery] AJAX returning Facebook Connect Markup

2009-02-05 Thread sonicsteps


It seems that when I do an ajax call (or post) to pull in my comments section
my Facebook Connect code doesn't work absolutely correct.  I'm not sure if
this has to do with the fact that scripting doesn't work when you do this or
not.  Anyone have any ideas?
-- 
View this message in context: 
http://www.nabble.com/AJAX-returning-Facebook-Connect-Markup-tp21859054s27240p21859054.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Can i use selector to reach "slice" in jQuery 1.3?

2009-02-05 Thread Ricardo Tomasi

It's much faster (and clearer) to use slice():

$('.button').slice(1,3);

On Feb 5, 12:56 pm, Stephan Veigl  wrote:
> Hi
>
> that selector works just as it should. If you get other results in
> JQuery 1.2.6, then there was a bug in 1.2.6.
> What you ask for is:
>  1. give me every element of class = "button" {'.button'} ==> "button1,...5"
>  2. give me the element with index 1 = second element  {:eq(1)} ==> "button2"
>  3. give me only the first 3 elements in the remaining selection
> {:lt(3)} ==> "button2"
>
> what you described would be
>   jQuery('.button:gt(1):lt(3)')
>
> by(e)
> Stephan
>
> 2009/2/5 Jackal :
>
>
>
> > I remember i can use the statement "jQuery('.button:eq(1):lt(3)');" in
> > jQuery 1.2.6.
> > example:
> > 
> >  
> >  button1
> >  button2
> >  button3
> >  button4
> >  button5
> >  
> > 
> > It returned matched button results from button2 to button4.
>
> > But now it only returned button2 element in jQuery 1.3.
> > So the selector statement like this can't chain filters??


[jQuery] Re: [validate] Plugin Question

2009-02-05 Thread Jörn Zaefferer

Could you provide a testpage? Your code looks fine.

Jörn

On Thu, Feb 5, 2009 at 9:08 PM, Chris  wrote:
>
> On Feb 5, 6:09 am, Leonardo K  wrote:
>> http://docs.jquery.com/Plugins/Validation/Methods/required#dependency...
>
> Ok, here's my markup and my attempt to do the conditional validation,
> but it obviously doesn't work.  I only want the select (#select) to be
> required if the radio button (#accept) is clicked.
>
>
> 
> title="This field is required">
>RSVP
> validate="required:true" value="Accept" />Accept
> value="Regret" />Regret
>
>Attendees
>
>#
>1
>2
>
>
> 
>
>var r = jQuery("#rsvp").validate({
>rules: {
>select: {
>required: "#accept:checked"
>}
>}
>submitHandler: function(form) {
>jQuery(form).ajaxSubmit(options2);
>}
>});


[jQuery] Re: Superfish - Entire menu flickers on hover

2009-02-05 Thread TimA

I've not had any luck troubleshooting this problem.  If the flicker
were restricted to only teh item being hovered on, I'd probably just
let it go, but the entire meny disappearing is to much.  any thoughts?

-Tim


[jQuery] Re: How can I extract the index of an item based within a table?

2009-02-05 Thread Ricardo Tomasi

Correction: you actually need the children collection to work out the
index:

var index = $(this).parent('tr').children().index(this);

On Feb 5, 5:01 am, Ricardo Tomasi  wrote:
> var index = $(this).parent('tr').index(this);
> var quantity = $('.price_table th').eq(index).text();
> alert( quantity );
>
> On Feb 4, 9:45 pm, paulswansea  wrote:
>
> > Hi,
>
> > I'm trying to write some jquery code so when i click on the relevent
> > item price, it alerts me with the quantity of that item and also
> > displays the content of the h2 header just before the relevant table,
> > is there a way somehow of finding out the index of the 'td' which is
> > clicked, and then extracting the quantity in the row above with the
> > same index. also be able to grab the text from the h2 header before
> > the table, so in effect, when i click on the '40p each' box within the
> > first item table, it alerts me with the quantity being 1000, and also
> > the h2 header of 'First Item Named here' Can someone please help!?
>
> > Example :
>
> > First Item Named here
> > information goes here
> > 
> >         
> >                  Quantity
> >                  1000 
> >                  5000 
> >                  10,000 
> >                  15,000 
> >                  20,000 
> >         
> >         
> >                  Price 
> >                 £400
> >                         40p each
> >                 £1650
> >                         33p each
> >                 £3200
> >                         32p each
> >                 £4800
> >                         32p each
> >                 £6200
> >                         31p each
> >         
> > 
>
> > second Item Named here
> > information goes here
> > 
> >         
> >                  Quantity
> >                  1000 
> >                  5000 
> >                  10,000 
> >                  15,000 
> >                  20,000 
> >         
> >         
> >                  Price 
> >                 £400
> >                         40p each
> >                 £1650
> >                         33p each
> >                 £3200
> >                         32p each
> >                 £4800
> >                         32p each
> >                 £6200
> >                         31p each
> >         
> > 
>
> > 
> > // > $('.each_item').parent().mouseover( function(){
> >         $(this).css('background-color','#F90');
> >         $(this).css('cursor','hand');
> >         $(this).css('cursor','pointer');
> >     }).mouseout(function() {
> >         $(this).css('background-color','#EFEFEF');
> >         $(this).css('cursor','default');
> >         }).click( function() {
>
> >          alert('display quantity based upon the pricebox and also
> > display the
> > previous h2 heading');
> >          } );
>
> > //]]>
> > 


[jQuery] Re: Having problems getting index() and closest() to work

2009-02-05 Thread Ricardo Tomasi

duplicate:
http://groups.google.com/group/jquery-en/browse_thread/thread/1b8e73583661fa52/ec7d0d275d484f66?hl=en#ec7d0d275d484f66

On Feb 5, 9:19 am, paulswansea  wrote:
> Hi,
>
> I have a page with multiple tables, and need to get the index value of
> a cell with a price which i click on, so i can extract the relevent
> quantity within the row above, i've tried using the index() function
> but to no avail!
>
> also, I wish to extract the content of the previous h2 header, i'm not
> sure if closest('h2') is the best way to do it, but it also doesn't
> work, could someone please tell me how to do this?
>
> Please see below for the code (note that there is roughly about ten
> tables to which i've cut down to two for here, also I CANNOT change
> the tables i.e. add id or classes anywhere, so the tables have to stay
> the way they are, I just need to get some jquery code to work around
> this and extract the relevant data).
>
> So a brief run down of what i need to do :
>
> 1) get the quantity above the price that is clicked
> 2) get the content of the heading above the relevant table
>
> THE CODE :
>
> First Item Named here
> information goes here
> 
>   
>      Quantity
>      1000 
>      5000 
>      10,000 
>      15,000 
>      20,000 
>   
>   
>      Price 
>     £400
>       40p each
>     £1650
>       33p each
>     £3200
>       32p each
>     £4800
>       32p each
>     £6200
>       31p each
>   
> 
> second Item Named here
> information goes here
> 
>   
>      Quantity
>      1000 
>      5000 
>      10,000 
>      15,000 
>      20,000 
>   
>   
>      Price 
>     £400
>       40p each
>     £1650
>       33p each
>     £3200
>       32p each
>     £4800
>       32p each
>     £6200
>       31p each
>   
> 
> 
> //   $('.each_item').parent().click( function() {
>         var indexvar = $(this).parent().index(this); /* NOT WORKING
> /
>         var headerval = $(this).closest('h2').text(); /** ALSO NOT
> WORKING **/
>         var quantity = $(tbodyvar).children('tr').children('th').eq
> (indexvar).text();
>         alert('Requested ' + quantity + ' of ' + headerval);
>   });
>
> //]]>
> 


[jQuery] Re: [validate] Plugin Question

2009-02-05 Thread Chris

On Feb 5, 6:09 am, Leonardo K  wrote:
> http://docs.jquery.com/Plugins/Validation/Methods/required#dependency...

Ok, here's my markup and my attempt to do the conditional validation,
but it obviously doesn't work.  I only want the select (#select) to be
required if the radio button (#accept) is clicked.




RSVP
Accept
Regret

Attendees

#
1
2




var r = jQuery("#rsvp").validate({
rules: {
select: {
required: "#accept:checked"
}
}
submitHandler: function(form) {
jQuery(form).ajaxSubmit(options2);
}
});


[jQuery] list traversing

2009-02-05 Thread amazz...@gmail.com

Hi,
I'm trying to traverse a list that has some sub-lists nested, i.e.

List Item1
List Item2

Sub Item1
Sub Item2




I'm trying to grab the text of List Item2, but without the text of the
sublist items. Right now if I use:
$('ul li').text()   -- it returns the text of the List Item and the
text of any sub items.

I'm thinking I may have to write a regular expression to filter out
the sublist, but was wondering if jQuery could handle this? Any ideas
appreciated.

AM


[jQuery] converting my codes to JQuery

2009-02-05 Thread efet

I use ajax suggest at my website with the following codes. I tried
converting them to JQuery after reading few tutorials. I get showHint
() is not defned error. What is wrong where?


Basically,

I submit to test.asp?Process=CheckCustomer then I get results as xxx,
xxx2, xxx3...

function showHint()
{
$.get("text.asp?Process=CheckCustomer", { QUERY: "TUNCEL" },
function(txtHint)
{
document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
}
);


--

var xmlHttp

function showHint(str)
{
if (str.length==0)
  {
  document.getElementById("txtHint").innerHTML="";
  return;
  }
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="?Process=CheckCustomer";
url=url+"&QUERY="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChanged()
{
if (xmlHttp.readyState==4)
{
document.getElementById("txtHint").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
}
  catch (e)
{
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
  }
return xmlHttp;
}


[jQuery] Re: Writing Ajax to table cells.

2009-02-05 Thread Tim Johnson

On Thursday 05 February 2009, David Meiser wrote:
> I'm not 100% sure what you're trying to accomplish, but you can output
> anywhere on the page using a distinct element name.
>
> I have code in which I attach tables generated in jquery to DIVs, for
> example.  And I'm certain you could go the opposite way, as well.
>
> Hope that helps, somewhat.
  My suggestion to him was consider div or span tags inside of td elements.
  I'm probably a bit ahead of myself - I should try a test with jquery writing
  to such a tag inside of a table cell - - -
thanks for the reply
tim


[jQuery] Map navigation

2009-02-05 Thread ebru...@gmail.com

Hello,

I am working on a map just like mmog games have like travian etc.

The map has 4 navigation buttons nord east south west. If someone
presses on it it loads the page again, i just want the map to move.

Is there some kind of plugin or a other simple way to fix this?

Erwin


[jQuery] Re: ajax style form, how to pass the php $_FILE variable?

2009-02-05 Thread James

You cannot upload files via conventional AJAX (XMLHttpRequest).
There are several around it, most commonly to do a normal submit of
the upload form to a hidden iframe.
There are many articles around on that if you do a search.

On Feb 5, 5:58 am, "david.0pl...@gmail.com" 
wrote:
> Disclaimer: I know there are plugins for this but I'm trying to learn
> to do things myself before using other people solutions!
>
> I have a nice form that send data like this:
>
> var nome = $("#nome").attr("value");
> var hyperlink = $("#hyperlink").attr("value");
> var gruppi = $("#gruppi").attr("value");
> var data_f = $("#data_f").attr("value");
> var stato = $("#stato").attr("value");
> var uploadedfile = $("#uploadedfile").attr("value");
> .
> then goes the ajax:
>
> $.ajax({
>
> type: "POST", url: "func/ajax.uploader.php",
> data: "_invia_check=1&nome=" + nome + "&hyperlink=" + hyperlink +
> "&gruppi=" + gruppi + "&data_f=" + data_f + "&stato=" + stato +
> "&uploadedfile=" + uploadedfile,
>
> //Mentre carica il responso!
> beforeSend: function(){$("#loading").show("fast");},
> complete: function(){ $("#loading").hide("fast");},
> //Richiesta completata! Riscriviamo l' html!
> success: function(html){$("#banner_inserisci").html(html);}
>  });
>
> On the backend there is data manipulation (php) and sql queries.
> Now the problem arise when i need this:
>
> $target_path = '../../' . $target_path . basename( $_FILES
> ['uploadedfile']['name']);
> if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'],
> $target_path)) {..}
>
> How I can pass the $_FILES variable in javascript??
>
> Thanks


[jQuery] Re: Turning JSON-formatted AJAX data into data usable by ColdFusion

2009-02-05 Thread Rick Faircloth
Thanks for the tip, David!

 

I'll have a look at jTemplates.

 

Rick

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of David Meiser
Sent: Thursday, February 05, 2009 12:52 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning JSON-formatted AJAX data into data usable by 
ColdFusion

 

Rick,

I've got a project that I used jTemplates on.  They're nice because you use 
standard HTML to
template with and just wrap your JSON items in braces.  For me, at least, it 
took a bunch of
javascript strings (some upwards of 1000 characters) and replaced them with a 
straightforward block
of HTML code.  Word of caution, though: jtemplates does increase load times 
(hardly noticeable on a
modern browser - including IE8, but moderately noticeable on IE7 and very 
noticeable on IE6).

http://plugins.jquery.com/project/jTemplates
http://jtemplates.tpython.com/
http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=472

Good luck!

On Wed, Feb 4, 2009 at 12:26 PM, Charlie Griefer  
wrote:

Unfortunately, right now I just don't have the time to take on another project 
(even a small one
like 'code consulting'), otherwise I'd be happy to.

 

As far as someone who knows CF... that shouldn't really be an issue.  You've 
-got- the data back
already.  You just need someone to show you how to work with it in jQuery.  
Hopefully someone else
on the list has some extra time and needs some wish list items :)

 

But yeah, in the interim just rely heavily on the docs and write out some 
static examples of your
own to get a feel for it.  The first link I gave you shows an example of using 
.each() to loop over
JSON data:

 

var obj = { one:1, two:2, three:3, four:4, five:5 };

 

I understand that the data you're working with might be more complex than 
that... but if you can get
comfortable working with that, it's less of a shock to the system to work with 
more complex data.

 

On Wed, Feb 4, 2009 at 9:18 AM, Rick Faircloth  wrote:

yeah, I know.it's not a bummer "knowing" more JS, but at this point

projects are falling behind and I can't afford much more time for

education.  It's time to produce!  I could have written this app 20 times

by now except for the JS/AJAX part!  

 

Maybe it's time to once again turn to a private tutor to get me over the hump.

Are you interested in an hour or two soon to work out the code for this app

(basically, just showing me how to use the data that I'm putting out now)

and showing me how to use it for some "wish-list" gifts or something?

 

You can just email me off-list about it. r...@whitestonemedia.com

I can post code online at some of the "code-posting" sites and we could

IM and/or email responses.  I did this recently and the person who helped

out just wrote the necessary code and then explained it to me.  Took about

an hour or so.

 

I know that you understand jQuery *and* CF, which be essential to making this

work properly.  Just let me know.  If you're not interested or don't have the 
time,

perhaps someone else who can help will be.

 

Meanwhile, I'll check out the jQuery docs and see if any bells ring or lights 
come on!

 

Rick

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Wednesday, February 04, 2009 12:00 PM


To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning JSON-formatted AJAX data into data usable by 
ColdFusion

 

Having to learn more JS shouldn't really be a "bummer".  More tools in the 
toolbox isn't a bad
thing.

 

i don't think you need any particular plug-ins... just read the jQuery docs.

 

http://docs.jquery.com/Utilities/jQuery.each#objectcallback

 

that'll iterate over a JS object or array.

 

As you're looping over the data, you'll likely be wanting to manipulate various 
page elements with
that data.

 

http://docs.jquery.com/Manipulation

 

On Wed, Feb 4, 2009 at 8:51 AM, Rick Faircloth  wrote:

Oh..so true.  Didn't even think of it that way.

 

Bummer.that means I've got to learn more JS!

 

I've looked at some blogs and tutorials that deal

with outputting JS, but they've all dealt with queries.

 

Know of any resources that provide guidance for dealing

with structs?

 

My current CFC creates data from two queries and some

single pieces of data and puts them into a struct.

 

Parsing through that is proving to be a little more

than I can figure out at this point.

 

Is there any jQuery plug-ins that help deal with parsing

and outputting JS data that I can use to by-pass writing

raw JS?

 

Projects are getting behind trying to figure out the

AJAX approach.perhaps it's just time to shelve AJAX

and go back to regular CF code for awhile.

 

Thoughts?

 

Thanks,

 

Rick

 

 

 

From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf 
Of Charlie Griefer
Sent: Wednesday, February 04, 2009 11:23 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Turning JSON-formatted AJAX da

[jQuery] Referencing AJAX Loaded Content

2009-02-05 Thread nick

Hello world,

I've managed to load a simple HTML file using the .load function.  I'm
trying to traverse between the multiple pages using forward and back
buttons. Right now, I have the click function of the AJAX loaded page
inside of the load function, but that is messy and runs into problems.
Is there a better way using the find function?

Thanks!


[jQuery] Optimize large DOM inserts

2009-02-05 Thread James

I need tips on optimizing a large DOM insert to lessen the "freeze" on
the browser.

Scenario:
I receive a large amount of JSON 'data' through AJAX from a database
(sorted the way I want viewed), and loop through them to add to a JS
string, and insert that chunk of string into a tbody of a table. Then,
I run a plug-in that formats the table (with pagination, etc.).
Simplified sample code:

var html = '';
$.each(data, function(i, row) {
 html += 'data from json';
});
$("tbody").append(html);
$("table").formatTable();

formatTable() requires that the table has to be "completed" before it
can be executed.
Is there any way I can optimize this better? I think I've read
somewhere that making a string too long is not good, but I've also
read that updating the DOM on each iteration is even worst.

Any advice would be appreciated!


[jQuery] Re: logical AND check

2009-02-05 Thread Jörn Zaefferer

The [validate] indicates that the message is about the validation
plugin. I'm asking to put that into the subject on the plugin page.

To the question, try this:

required: function() {
  return $("#radioButton1:unchecked").length &&
$("#radioButton2:unchecked").length;
}

Jörn

On Thu, Feb 5, 2009 at 7:22 PM, MorningZ  wrote:
>
> You using a plugin like "Validate" or just a general "how do I?"
> question
>
>


[jQuery] Re: Cycle Help, please - can't get working

2009-02-05 Thread Wendy

Thanks very much for having a look. I just found when I redownloaded
it that I hadn't linked the original Cycle js file correctly. That
dumb error taken care of, it's working just as it should now. Like a
million other people, I can't believe I spent so much time trying to
fix this, when I should have re-checked that in the first place. So
I've learned something valuable, at the very least.

I really appreciate your help!

On Feb 5, 12:08 pm, rmurdoch  wrote:
> Quickly looking at your test page, Firebug ( an addon for Mozilla
> Firefox that can give you good info on JS errors ) is throwing an
> error saying your cycle all .js file has an illegal character on line
> 1. Maybe try downloading the script again to cure that error.
>
> On Feb 5, 11:25 am, Wendy  wrote:
>


  1   2   >