[jQuery] Move an element

2010-01-29 Thread Daniel Beard
Hi everyone,

I have the following HTML code, various times in a page:


Aprecio y reconocimiento
La recompensa de un trabajo bien hecho. CESUR en sus años de existencia ha venido marcando una
trayectoria ascendente, avalada por los resultados obtenidos.

Due to the CMS, I can't put the h3 BEFORE the image tag and it doesn't
look right. So, I am trying to move the h3 element to go before the
img tag, so it looks like this:

Aprecio y reconocimiento

La recompensa de un trabajo bien hecho. CESUR en sus años de existencia ha venido marcando una
trayectoria ascendente, avalada por los resultados obtenidos.

...to do this, I am using this code:

$('h3').insertBefore('.floatRight').remove();

But it puts the h3 tag before EVERY .floatRight class (there are 6 in
total on the page).

My question is how do I make it just move that element, not ALL of
them. I have experimented with next(), siblings(), etc, but with no
luck...

Many thanks!

Daniel


[jQuery] LavaLamp Plugin-Superfish Intergration

2009-12-22 Thread Daniel
Hi,

I am extremely new to jQuery and and wondered if someone might be able
to point me in the right direction. I want to add the LavaLamp plugin
to the Superfish menu module created for Joomla. It is located here:
http://users.tpg.com.au/j_birch/plugins/superfish/

The documentation on this site says that other plugins are able to be
used with this. I just don't know enough about jquery to know how to
add this plugin. I know a lot about Joomla, Joomla parameters, PHP,
CSS, XHTML. I have created my own Joomla extensions, so I just need
some guidance on the jQuery part.

Can someone help me out? I would greatly appreciate it!

Regards,

Dan


[jQuery] center popup scroll/resize probs

2009-10-25 Thread Daniel Donaldson

So I have a modal popup that is working fairly well, but I have some
issues in IE/FF (the only browsers I've tested in so far).

One thing is that the popup won't recenter if the browser is resized.

The other prob is a bit more difficult to replicate, but I've noticed
if my browser window is sized so that I can fit all the bottom of the
top row in the screen, but am otherwise scrolled down to the bottom,
and then when I click on 1 of the top row items the popup opens with
only the bottom half in the viewport.

There are more instances of this type of behavior if I play around
with scrolling and clicking on items of different distances from the
scroll direction. But again, this is hard to predictably replicate,
but occurs fairly often.

So, essentially, I would like the popup in the center of the viewable
area, no matter what.

Is this possible?

You can see it here:
http://development.aquatictraininginstitute.com/schedule/schedule.html

Any of the divs that change background on hover will produce the popup
on click.

The relevant code is here:

//centering popup
function centerPopup(){
//request data for centering
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var popupHeight = $("#popupContact").height();
var popupWidth = $("#popupContact").width();
var mypopup = $("#popupContact");
//centering
$("#popupContact").css({
"position": "absolute",
"top": windowHeight/2-popupHeight/2,
"left": windowWidth/2-popupWidth/2
});
//only need force for IE6

$("#backgroundPopup").css({
"height": windowHeight
});


}

Thank you for taking the time to look at this :)


[jQuery] show/hide problem

2009-10-24 Thread Daniel Donaldson

I am trying to have a image (link button) appear within a div on
mousenter for the div, and disappear on mouseleave.
I have this working in the following code as expected, but I only want
it to apply to the specific div that is being entered/left.
The way I have it right now it applies to the class, so every div with
the class will trigger the function, which is not the desired effect :
(

What I would like to have it do is have the image show/hide only
within the specific div that is being entered/left.
Due to the nature of the project, I cannot simply apply id's to the
divs as a solution.

The code follows, I apologize that I cannot provide a live link, it
isn't online yet, but I have pasted the code below:


 //
  $('a.more').hide();

 //
  $('div.featured-cell-padding').mouseenter(function() {
 $('a.more').show();
 return false;
  });

  //
 $('div.featured-cell-padding').mouseleave(function() {
 $('a.more').hide();
 return false;
  });



});

thanks for any help/insight/words of wisdom :)


[jQuery] Re: ie6 and .val() issue

2009-10-14 Thread Daniel Murker

the  was a typo here.  It's correct in the source code.

Ultimatately the issue wasn't with the Jquery, it was with how IE6
executes javascript faster than it renders dom elements, even when the
javascript is nested in a $(document).ready() function.  Re-factoring
the code so that I'd create the option elements and append them, along
with using a decision tree to match each option value to the target
value and concatenate a selected attribute at element creation solved
the issue.

New Code sample:

$(document).ready(function(){
var value = 'opt2';

var option = {
opt1 : 'option1',
opt2 : 'option2'
};

for (var i in options){
if (i == value){
$("#select_test").append('");
}else{
$("#select_test").append('");
}
}

});







[jQuery] Re: ie6 and .val() issue

2009-10-13 Thread Daniel Murker

$(document).ready(function(){

and

$().ready(function()

are interchangeable.  that's not what's throwing the error.

This line is:

 $("#selectbox").val("value");

On Oct 13, 5:36 pm, James  wrote:
> The line is:
>
> $(document).ready(function(){
>
> On Oct 13, 2:08 pm, Daniel Murker  wrote:
>
>
>
> > I've come across an issue where doing something along the lines of
>
> > $().ready(function(){
> >      $("#selectbox").val("value");
>
> > });
>
> > Throws the following error in IE6
>
> > Could not set the Selected Property: Unspecified Error.
>
> > $("#selectbox") referrs to the following html.
>
> > 
> >      Default
> >      TEST
> > 
>
> > Anyone know a way around this?


[jQuery] ie6 and .val() issue

2009-10-13 Thread Daniel Murker

I've come across an issue where doing something along the lines of

$().ready(function(){
 $("#selectbox").val("value");
});

Throws the following error in IE6

Could not set the Selected Property: Unspecified Error.

$("#selectbox") referrs to the following html.


 Default
 TEST


Anyone know a way around this?





[jQuery] Re: Accessing Elements after adding them with Append

2009-09-03 Thread Daniel

Hi mkmanning,

works like a charm, thanks a lot! :)

Daniel

On 2 Sep., 18:00, mkmanning  wrote:
> Use .live()
>
> http://docs.jquery.com/Events/live#typefn
>
> On Sep 2, 1:51 am, Daniel  wrote:
>
>
>
> > Hi There,
>
> > I'm having trouble accessing some Elements with jQuery after I created
> > them and added them to the HTML. I want to add some Checkboxes to my
> > Site as soon as the user clicks another Checkbox. That works just
> > fine. But if the user clicks on one of these added checkboxes, i want
> > an event to trigger, too. For starters, i just want to alert a
> > message. But this doesnt happen.
>
> > Here's my code:
>
> > function load(katstring) {
> >         var mykats = '';
> >         $('div#kategorien input:checkbox:checked').each(function() {
> >                 mykats += "&mykategorien[]=" + $(this).attr('id').substr(4);
> >         });
> >         $.post('ajaxfunctions.php', '&function=updateCategories', function
> > (data){
> >                 var kattext = '';
> >                 kattext += '';
> >                 for (index in data) {
> >                         kattext += ' > name="category[]"
> > value="'+data[index]+'" />'+data[index]+'';
> >                 }
> >                 kattext += '';
>
> >                 $('div#categories div.select').html(kattext);
> >         },'json');
>
> > }
>
> > $('div#categories div.select ul li input').click( function() {
> >         alert("clicked");
>
> > });
>
> > So on click of the new, added checkboxes, i want to alert "clicked".
> > Nothing More. But that just won't happen. First, i figured the problem
> > lies in just adding some html Text and not properly adding the
> > elements to the DOM Tree. So i tried something like this:
>
> > function load(katstring) {
> >         var mykats = '';
> >         $('div#kategorien input:checkbox:checked').each(function() {
> >                 mykats += "&mykategorien[]=" + $(this).attr('id').substr(4);
> >         });
> >         $.post('ajaxfunctions.php', '&function=updateCategories', function
> > (data){
> >                 var cul = document.createElement('ul');
> >                 for (index in data) {
> >                         var cli = document.createElement('li');
> >                         var cinput = document.createElement('input');
> >                         var ctext = document.createTextNode(data[index]);
> >                         cli.appendChild(cinput);
> >                         cli.appendChild(ctext);
> >                         cul.appendChild(cli);
> >                 }
> >                 document.getElementById('categories').appendChild(cul);
> >         },'json');
>
> > }
>
> > $('div#categories ul li input').click( function() {
> >         alert("clicked");
>
> > });
>
> > In this Code all the Element Attributes are missing but I think you
> > get what i was trying. ;) So, now I think the Elements are added
> > properly to DOM tree. But still, when I click on one of the added
> > input Elements, nothing happens.
>
> > What am I doing wrong? How can i get jQuery to recognize the Elements
> > I added?
>
> > Can you please help? Thanks a lot.
>
> > battlewizz


[jQuery] Accessing Elements after adding them with Append

2009-09-02 Thread Daniel

Hi There,

I'm having trouble accessing some Elements with jQuery after I created
them and added them to the HTML. I want to add some Checkboxes to my
Site as soon as the user clicks another Checkbox. That works just
fine. But if the user clicks on one of these added checkboxes, i want
an event to trigger, too. For starters, i just want to alert a
message. But this doesnt happen.

Here's my code:

function load(katstring) {
var mykats = '';
$('div#kategorien input:checkbox:checked').each(function() {
mykats += "&mykategorien[]=" + $(this).attr('id').substr(4);
});
$.post('ajaxfunctions.php', '&function=updateCategories', function
(data){
var kattext = '';
kattext += '';
for (index in data) {
kattext += ''+data[index]+'';
}
kattext += '';

$('div#categories div.select').html(kattext);
},'json');
}

$('div#categories div.select ul li input').click( function() {
alert("clicked");
});

So on click of the new, added checkboxes, i want to alert "clicked".
Nothing More. But that just won't happen. First, i figured the problem
lies in just adding some html Text and not properly adding the
elements to the DOM Tree. So i tried something like this:

function load(katstring) {
var mykats = '';
$('div#kategorien input:checkbox:checked').each(function() {
mykats += "&mykategorien[]=" + $(this).attr('id').substr(4);
});
$.post('ajaxfunctions.php', '&function=updateCategories', function
(data){
var cul = document.createElement('ul');
for (index in data) {
var cli = document.createElement('li');
var cinput = document.createElement('input');
var ctext = document.createTextNode(data[index]);
cli.appendChild(cinput);
cli.appendChild(ctext);
cul.appendChild(cli);
}
document.getElementById('categories').appendChild(cul);
},'json');
}

$('div#categories ul li input').click( function() {
alert("clicked");
});

In this Code all the Element Attributes are missing but I think you
get what i was trying. ;) So, now I think the Elements are added
properly to DOM tree. But still, when I click on one of the added
input Elements, nothing happens.

What am I doing wrong? How can i get jQuery to recognize the Elements
I added?

Can you please help? Thanks a lot.

battlewizz


[jQuery] circular autoscrolling

2009-09-01 Thread Daniel

Is it possible in jCarousel to have circular autoscrolling? I tried
setting the circular scrolling example to autoscroll and it wouldn't
work. However, when I took all the content out of the container it
worked somehow. Is this a bug?

The only thing I changed in the example was:
jQuery(document).ready(function() {
jQuery('#mycarousel').jcarousel({
wrap: 'circular',
auto:1,
scroll:1,
itemVisibleInCallback: {onBeforeAnimation:
mycarousel_itemVisibleInCallback},
itemVisibleOutCallback: {onAfterAnimation:
mycarousel_itemVisibleOutCallback}
});
});

and



  


  


[jQuery] Re: jQuery & Adobe Air: onclick event not working

2009-08-31 Thread Daniel Bachhuber

I have this same issue too. Did you ever find a resolution? I've
started a thread on Stack Overflow as well:

http://stackoverflow.com/questions/1359713/using-jquery-the-onclick-event-and-adobe-air

On Jul 23, 11:24 am, DPeters65  wrote:
> I am stumped... have been banging my head for days on this one...
> I am pulling in XML, parsing it, then dynamically writing blocks
> (append) of code as I loop through the XML... all via jQuery. Within
> each of these code blocks, which btw are displaying properly, there is
> an onclick event (openInBrowser(url)) applied to text in order to open
> an external URL in the browser, outside of the Air app. However, this
> onclick event never gets executed when it is clicked. Anyone know why
> this would occur?
>
> From what I can tell it is related to the functions in jQuery such as
> this: $(data).find("item").each(function() {... I tested another page
> where I appended a test block of code within a $('elementId').click
> (function(){... and the same result... nothing happens. If I pull the
> code outside of the jQuery function it works just fine.
>
> Here is my code:
> ...
>         
>     
>     
>         
>         
>         
>         $(document).ready(function(){
>                 // make sure the application is visible
>                 nativeWindow.visible = true;
>                 var content = readLocalFile();
>                 if (content == '')
>                 {
>                     alert('Please set your email address registered
> with NowInStock.net under the options tab.');
>                     $('#alertsMain').hide();
>                     var noalerts = 'message to user...';
>                     $('#alertsMain').append(noalerts);
>                     $('#optionsMain').show();
>                 }else {
>                     //alert(content);
>                     email = content;
>                     $('#emailAddress').val(email);
>                         // Get product info from server
>                         var vurl = 
> "http://www.domian.com/XML.php?emailAddress="+email;
>                         $.get(vurl, function (data, textStatus) {
>                                  $(data).find("item").each(function() {
>                                      pid = $(this).attr("pid");
>                                      url = $(this).attr("url");
>                                      model_name = $(this).attr("model_name");
>                                      store_name = $(this).attr("store_name");
>                                      product_name = 
> $(this).attr("product_name");
>                                      myurl = "openInBrowser('"+url+"');";
>                                      var block = '
class="item">
  • id="itemTitle'+pid+'" class="itemTitle">'+model_name+'
    '+store_name+' : > '+product_name+'
  • class="itemAvail">Checking...
  • '; >                                      air.trace(block); >                                      $('#alertsMain').append(block); >                                 }); >                         }); >                    } >                 }); >         >     > >

    [jQuery] Optional Buttons in Modal Form Dialog

    2009-08-02 Thread Daniel Israel
    
    Hi All,
    
    I am creating an form dialog that will be slightly different for  
    creating data than editing data.  I'm pretty new to jquery, but I'm  
    using the jqueryui and it seems to be working fine, but now I'm  
    looking to change the labels of a couple of buttons and have one  
    button available during editing (but not creating).
    
    
    Hope this makes sense...  Is there a way to do that without having to  
    create new dialogs?
    
    
    Thanks.
    
    -D. Israel
    d...@ebji.org
    http://www.customcodebydan.com
    AIM: JudoDanIzz
    
    If a dozen smart, successful people who've achieved something great  
    are all giving the same advice, take it.
    
    
    
    

    [jQuery] Re: Ajax sometimes not executing callback...

    2009-07-31 Thread Daniel Israel
    
    
    OK  I hope people will forgive my faux pas of responding to my own  
    item...
    
    
    so I have found my problem.  It turns out that the "this" in the line:  
    $(this).dialog('close');
    
    
    is not referring to the dialog...  but to the ajax request.  Duh.
    
    There are a couple other things too...  but I was wondering about this:
    
    When I get the return from the ajax request, I want to call another  
    function that calls an ajax request.  Seems that things get kinda  
    messed up.   I have fixed it by setting a timeout to call that function.
    
    
    Are embedded Ajax calls not supported?
    
    Thanks.
    
    
    On Jul 31, 2009, at 1:40 PM, Daniel Israel wrote:
    
    
    
    I'm using jQuery and jQueryUI.  I'm new to jQuery, so any help much  
    appreciated...
    
    
    I have an application where I am displaying a list from a database.   
    When the user hits a button, a modal form dialog comes up and they  
    can enter data.
    
    
    It makes an ajax call to the server, gets the data, populates the  
    dialog, then opens it.  Change the data, hit the "Create" button and  
    it makes another Ajax call to update the database.
    
    
    I see the changes (correctly) in the database, but the callback is  
    not being executed!  It's the weirdest thing...  I'm not sure what  
    the problem is..  I examine the HTTP traffic and I'm getting a  
    status of 200 and the response looks correct.
    
    
    If it matters, I'm on OS X using FF 3.51
    
    Note that if I put an alert before the dialog('close') call, the  
    alert pops up, but the dialog does not close... :(
    
    
    Code for this dialog is here:
    
    $("#dialog").dialog({
    bgiframe: true,
    autoOpen: false,
    height: 350,
    modal: true,
    buttons: {
    'Create': function() {
    	var data = { section: $("#section_id").val(), label: $ 
    ("#label").val(), description: $("#description").val(), thumbnail: $ 
    ("#thumbnail").val(), format: $("#format").val() };
    
    $.post("command/save_section.php", 
    data, function(xml) {
    var save_request = 
    parseInt($("#section_id").val());
    var save_result = 
    parseInt($('section', xml).text());
    //alert("testing " + save_request + 
    " to " + save_result);
    if (save_request == 
    save_result) {
    $(this).dialog('close');
    }
    else {
    			open_alert_dialog("There was an error when processing this  
    request!");
    
    }
    });
    },
    Cancel: function() {
    $(this).dialog('close');
    }
    },
    close: function() {
    allFields.val('').removeClass('ui-state-error');
    }
    });
    
    
    
    any help is appreciated... thanks.
    
    
    -D. Israel
    d...@ebji.org
    http://www.customcodebydan.com
    AIM: JudoDanIzz
    
    If a dozen smart, successful people who've achieved something great  
    are all giving the same advice, take it.
    
    
    
    
    -D. Israel
    d...@ebji.org
    http://www.customcodebydan.com
    AIM: JudoDanIzz
    
    If a dozen smart, successful people who've achieved something great  
    are all giving the same advice, take it.
    
    
    
    

    [jQuery] Ajax sometimes not executing callback...

    2009-07-31 Thread Daniel Israel
    
    I'm using jQuery and jQueryUI.  I'm new to jQuery, so any help much  
    appreciated...
    
    I have an application where I am displaying a list from a database.   
    When the user hits a button, a modal form dialog comes up and they can  
    enter data.
    
    It makes an ajax call to the server, gets the data, populates the  
    dialog, then opens it.  Change the data, hit the "Create" button and  
    it makes another Ajax call to update the database.
    
    I see the changes (correctly) in the database, but the callback is not  
    being executed!  It's the weirdest thing...  I'm not sure what the  
    problem is..  I examine the HTTP traffic and I'm getting a status of  
    200 and the response looks correct.
    
    If it matters, I'm on OS X using FF 3.51
    
    Note that if I put an alert before the dialog('close') call, the alert  
    pops up, but the dialog does not close... :(
    
    Code for this dialog is here:
    
    $("#dialog").dialog({
    bgiframe: true,
    autoOpen: false,
    height: 350,
    modal: true,
    buttons: {
    'Create': function() {
    var data = { section: 
    $("#section_id").val(), label: $ 
    ("#label").val(), description: $("#description").val(), thumbnail: $ 
    ("#thumbnail").val(), format: $("#format").val() };
    $.post("command/save_section.php", 
    data, function(xml) {
    var save_request = 
    parseInt($("#section_id").val());
    var save_result = 
    parseInt($('section', xml).text());
    //alert("testing " + 
    save_request + " to " + save_result);
    if (save_request == 
    save_result) {
    $(this).dialog('close');
    }
    else {
    
    open_alert_dialog("There was an error when processing this  
    request!");
    }
    });
    },
    Cancel: function() {
    $(this).dialog('close');
    }
    },
    close: function() {
    allFields.val('').removeClass('ui-state-error');
    }
    });
    
    
    
    any help is appreciated... thanks.
    
    
    -D. Israel
    d...@ebji.org
    http://www.customcodebydan.com
    AIM: JudoDanIzz
    
    If a dozen smart, successful people who've achieved something great  
    are all giving the same advice, take it.
    
    
    

    [jQuery] Re: Rich Text Editor plugin

    2009-07-26 Thread DANIEL BUENO
    Hi Mike,
    Thanks for your help.
    I'll test your sugestion.
    Now I'm testing the HtmlBox plugin from
    http://remiya.com/cms/projects/jquery-plugins/htmlbox/.
    Thank you
    
    *****
    Daniel Ribeiro Bueno
    Bacharel em Ciência da Computação
    Desenvolvimento de Sistemas
    E-mail: bueno1...@gmail.com
    Site: www.buenodf.net
    *
    
    
    On Sun, Jul 26, 2009 at 8:09 PM, helpfulMike wrote:
    
    >
    > Hi Daniel,
    > Not sure if this is what you need, but I used..
    >
    > I needed a very light editor, so used the one by Batiste Bieler
    > http://batiste.dosimple.ch/blog/2007-09-11-1/
    >
    >
    > It loads a rte via iframe.
    > Then I accessed as follows
    >   iframe = $('iframe.rte-zone')[0];
    >   var $R = function(sel, newContent){
    >return $('body', $(sel).contents()).html(newContent
    > || undefined);
    >   };
    >
    >
    > Code in the form...
    >MY CONTENT
    > HERE
    >
    > 
    >$('.rte-zone').rte("../css/rte.css", "../img/ico/");
    > 
    >
    > css I used to stylise..
    > .frameBody
    > {
    >font-family:sans-serif;
    >font-size:12px;
    >margin:0;
    >width:100%;
    >height:100%;
    > }
    >
    > .frameBody p
    > {
    >border:1px #bbb solid;
    >padding:2px;
    > }
    > .rte-zone
    > {
    >width:100%;
    >margin:0;
    >padding:0 5px;
    >border:1px #999 solid;
    >clear:both;
    >height:200px;
    >display:block;
    >background:#e0e0e0;
    > }
    > .rte-toolbar{ overflow:hidden; }
    > .rte-toolbar a, .rte-toolbar a img {
    >border:0;
    >color:#6CC;
    > }
    >
    > .rte-toolbar p {
    >float:left;
    >margin:0;
    >padding-right:5px;
    > }
    >
    > hope it helps,
    > thx
    > Mike
    >
    >
    > On Jul 27, 1:42 am, Daniel Bueno  wrote:
    > > Hi,
    > >
    > > I need  to put a rich text editor in a textarea.
    > > Is there any way to do this with jQuery?
    > >
    > > Thanks,
    > > Daniel Bueno
    >
    
    

    [jQuery] Rich Text Editor plugin

    2009-07-26 Thread Daniel Bueno
    
    Hi,
    
    I need  to put a rich text editor in a textarea.
    Is there any way to do this with jQuery?
    
    
    Thanks,
    Daniel Bueno
    
    

    [jQuery] Re: update several divs within a .each() loop

    2009-07-22 Thread Daniel
    
    notice:
    if i do an alert() with the response just before i update the content
    of the div, everything works fine...
    
    On Jul 22, 1:58 pm, Daniel  wrote:
    > Hi everybody!
    >
    > I want to update the contents of several divs periodically with the
    > response i get from a php-script. the number of divs is changing
    > depending on what the user has chosen before. i store the variable
    > part of the ids in a hidden input field. this input field may look
    > like this:
    >
    > 
    >
    > to do this task periodically i use setIntervall():
    >
    > 
    > // dies stellt sicher, dass updateDivs() erst ausgeführt wird, wenn
    > die ganze seite geladen wurde
    > $(document).ready(function() {
    > updateDivs();
    > // wenn die seite komplett geladen ist, soll die progress-
    > bar verschwinden
    > $("#hide_me").hide();
    > });
    > setInterval("updateDivs()", 5000);
    > 
    >
    > and the Code of the updateDivs() function:
    >
    > 
    > function updateDivs()
    > {
    > $($("[name=devices]").val().split(","))
    > .each(function(){
    > var handler_url = 'devices_handler.php';
    > var devID = this;
    >
    > var randomNumber = Math.random();
    >
    > // DATEN-Abfrage mit ajax-queue
    > var monValues = $("#mon_" + devID).val();
    > var getValuesParams = {
    > "do":"1",
    > "de":devID,
    > "mo":monValues,
    > "rand":randomNumber
    > }
    >
    > $.ajax({
    > type: "GET",
    > cache: false,
    > url: handler_url,
    > data: getValuesParams,
    > async: false,
    > success: function(response){
    > //alert(response);
    > $("#dev_" + devID).html(response);
    > }
    > });
    > });}
    >
    > 
    >
    > Now the Problem:
    > The only browser who behaves as expected is Firefox 3.x - he flushes
    > the response after every ajax-request to the corresponding div ( .html
    > (response) ). All the other browsers are not updating the contents of
    > the divs until all the responses are available (although i execute the
    > request with async=false), and then they update all the divs (ids
    > dev_1 to dev_7) at the same time... but for me it would be necessary
    > that the other browsers behave like Firefox 3.
    >
    > Does anyone have an idea? I would really appreciate it :-)
    >
    > Thanks!
    > Daniel
    
    

    [jQuery] update several divs within a .each() loop

    2009-07-22 Thread Daniel
    
    Hi everybody!
    
    I want to update the contents of several divs periodically with the
    response i get from a php-script. the number of divs is changing
    depending on what the user has chosen before. i store the variable
    part of the ids in a hidden input field. this input field may look
    like this:
    
    
    
    to do this task periodically i use setIntervall():
    
    
    // dies stellt sicher, dass updateDivs() erst ausgeführt wird, wenn
    die ganze seite geladen wurde
    $(document).ready(function() {
    updateDivs();
    // wenn die seite komplett geladen ist, soll die progress-
    bar verschwinden
    $("#hide_me").hide();
    });
    setInterval("updateDivs()", 5000);
    
    
    and the Code of the updateDivs() function:
    
    
    function updateDivs()
    {
    $($("[name=devices]").val().split(","))
    .each(function(){
    var handler_url = 'devices_handler.php';
    var devID = this;
    
    var randomNumber = Math.random();
    
    // DATEN-Abfrage mit ajax-queue
    var monValues = $("#mon_" + devID).val();
    var getValuesParams = {
    "do":"1",
    "de":devID,
    "mo":monValues,
    "rand":randomNumber
    }
    
    $.ajax({
    type: "GET",
    cache: false,
    url: handler_url,
    data: getValuesParams,
    async: false,
    success: function(response){
    //alert(response);
    $("#dev_" + devID).html(response);
    }
    });
    });
    }
    
    
    
    Now the Problem:
    The only browser who behaves as expected is Firefox 3.x - he flushes
    the response after every ajax-request to the corresponding div ( .html
    (response) ). All the other browsers are not updating the contents of
    the divs until all the responses are available (although i execute the
    request with async=false), and then they update all the divs (ids
    dev_1 to dev_7) at the same time... but for me it would be necessary
    that the other browsers behave like Firefox 3.
    
    Does anyone have an idea? I would really appreciate it :-)
    
    Thanks!
    Daniel
    
    

    [jQuery] Is it possible to change the URL of a jQuery tab?

    2009-07-09 Thread Daniel
    
    So far I have tried:
    
    $('a.classname').attr('href','/some_page')
    
    and
    
    $('#li_id').html('Details')
    
    
    Thanks in advance.
    
    

    [jQuery] jQuery ajaxSubmit(), how to send the form in a json format?

    2009-07-02 Thread DaNieL
    
    Hi guys, i just leanerd the existence of the ajaxSubmit jQuery plugin,
    im wondering if there is a way to use the JSON both to send and
    retrieve the requests.
    
    I mean, no the plugin have the option 'dataType', that is used to
    specify the format that the server will send back, but i need to send
    the form as jquery to the server.
    
    For example, if my form looks like:
    
    
    
    
    
    
    i'll love that the plugin will send a request like:
    
    mypage.php?mytest=[{'firstone':'here some text!','secondone':'text in
    here too'}]
    
    
    Is it possible?
    
    

    [jQuery] AutoComplete Plugin + Json not work in IE!

    2009-06-19 Thread DaNieL
    
    Hy guys, im new in jQuery ;)
    My problem is the autocomplete plugin:
    http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
    
    It works very well and i'll find it much usefull, but i got a problem
    with it..
    Using the remote procedure (ajax requests), if the returning value
    from the script is a string containing a Json object, IE completely
    fall to parse the array (while firefox and others browser obviously do
    it correctly).
    
    The error occour even in the official demo page:
    http://jquery.bassistance.de/autocomplete/demo/json.html (try to digit
    everything that return an string, as 'pe')
    
    Can anyone help me?
    The error reported by the ie 'debugger' is:
    
    Message: 'name' is null or not object
    Line: 25
    Char: 5
    Code: 0
    URI: http://jquery.bassistance.de/autocomplete/demo/json.html
    
    
    Now, the strange thing is that i implemented this in my script, and it
    fall both with IE and Firefox just when i type some strings, for
    example works perfectly with 'john' but fail with 'new '.
    
    Did anyone get those errors before?
    
    My code is:
    
    
    --
    $('input#contact-list').autocomplete('test-db.php', {
    multiple: false,
    dataType: "json",
    width: 400,
    scrollHeight: 300,
    max: 25,
    parse: function(data) {
    return $.map(data, function(row) {
    return {
    data: row,
    value: row.azienda,
    result: row.azienda
    }
    });
    },
    formatItem: function(item) {
    return item.azienda + '' + item.nome + ' ' +
    item.cognome + '' + item.email;
    }
    }).result(function(e, item) {
    //this will be triggered when the selection has made
    $.ajax({
    type: "POST",
    cache: false,
    data: "idAzienda=" + item.id_azienda + "&idReferente=" +
    item.id_user,
    url: "test-db-02.php",
    success: function(message){
    //fillup the form fields
    $("input[rel='ship']").attr("readonly", true).css
    ("background-color", "#DFDFDF");
    $("input[rel='company']").attr("readonly", true).css
    ("background-color", "#DFDFDF");
    var rd = json_parse(message);
    $("input#ship-nome-referente").val(rd.company.nome);
    //[...]
    
    $("div#selected-contact").html(rd.company.codice + ' - ' +
    rd.company.azienda + ' | ' + rd.company.nome + ' ' +
    rd.company.cognome);
    
    $("div#contact-list-selected").css("display", "inline").css
    ("visibility", "visible");
    $("div#contact-list-container").css("display", "none").css
    ("visibility", "hidden");
    
    $("div#deselect-contact").click(function(){
    $("div#selected-contact").html('');
    $("input#contact-list").val('');
    
    $("input[rel='ship']").attr("readonly", false).css
    ("background-color", "#FF").val('');
    $("input[rel='company']").attr("readonly", false).css
    ("background-color", "#FF").val('');
    
    $("div#contact-list-container").css("display",
    "inline").css("visibility", "visible");
    $("div#contact-list-selected").css("display",
    "none").css("visibility", "hidden");
    });
    }
    });
    });
    --
    
    An example of my Json returned by the php script can be:
    
    [{
    azienda: "company_name",
    codice: "company_code",
    nome: "user_name",
    cognome: "user_surname",
    email: "user_email",
    id_user: "user_id",
    id_azienda: "company_id"
    },
    {
    azienda: "company_name",
    codice: "company_code",
    nome: "user_name",
    cognome: "user_surname",
    email: "user_email",
    id_user: "user_id",
    id_azienda: "company_id"
    },
    {
    azienda: "company_name",
    codice: "company_code",
    nome: "user_name",
    cognome: "user_surname",
    email: "user_email",
    id_user: "user_id",
    id_azienda: "company_id"
    }]
    
    

    [jQuery] AutoComplete Plugin + Json not work in IE!

    2009-06-19 Thread DaNieL
    
    Hy guys, im new in jQuery ;)
    My problem is the autocomplete plugin:
    http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
    
    It works very well and i'll find it much usefull, but i got a problem
    with it..
    Using the remote procedure (ajax requests), if the returning value
    from the script is a string containing a Json object, IE completely
    fall to parse the array (while firefox and others browser obviously do
    it correctly).
    
    The error occour even in the official demo page:
    http://jquery.bassistance.de/autocomplete/demo/json.html (try to digit
    everything that return an string, as 'pe')
    
    Can anyone help me?
    The error reported by the ie 'debugger' is:
    
    Message: 'name' is null or not object
    Line: 25
    Char: 5
    Code: 0
    URI: http://jquery.bassistance.de/autocomplete/demo/json.html
    
    
    Now, the strange thing is that i implemented this in my script, and it
    fall both with IE and Firefox just when i type some strings, for
    example works perfectly with 'john' but fail with 'new '.
    
    Did anyone get those errors before?
    
    My code is:
    
    
    --
    $('input#contact-list').autocomplete('test-db.php', {
    multiple: false,
    dataType: "json",
    width: 400,
    scrollHeight: 300,
    max: 25,
    parse: function(data) {
    return $.map(data, function(row) {
    return {
    data: row,
    value: row.azienda,
    result: row.azienda
    }
    });
    },
    formatItem: function(item) {
    return item.azienda + '' + item.nome + ' ' +
    item.cognome + '' + item.email;
    }
    }).result(function(e, item) {
    //this will be triggered when the selection has made
    $.ajax({
    type: "POST",
    cache: false,
    data: "idAzienda=" + item.id_azienda + "&idReferente=" +
    item.id_user,
    url: "test-db-02.php",
    success: function(message){
    //fillup the form fields
    $("input[rel='ship']").attr("readonly", true).css
    ("background-color", "#DFDFDF");
    $("input[rel='company']").attr("readonly", true).css
    ("background-color", "#DFDFDF");
    var rd = json_parse(message);
    $("input#ship-nome-referente").val(rd.company.nome);
    //[...]
    
    $("div#selected-contact").html(rd.company.codice + ' - ' +
    rd.company.azienda + ' | ' + rd.company.nome + ' ' +
    rd.company.cognome);
    
    $("div#contact-list-selected").css("display", "inline").css
    ("visibility", "visible");
    $("div#contact-list-container").css("display", "none").css
    ("visibility", "hidden");
    
    $("div#deselect-contact").click(function(){
    $("div#selected-contact").html('');
    $("input#contact-list").val('');
    
    $("input[rel='ship']").attr("readonly", false).css
    ("background-color", "#FF").val('');
    $("input[rel='company']").attr("readonly", false).css
    ("background-color", "#FF").val('');
    
    $("div#contact-list-container").css("display",
    "inline").css("visibility", "visible");
    $("div#contact-list-selected").css("display",
    "none").css("visibility", "hidden");
    });
    }
    });
    });
    --
    
    An example of my Json returned by the php script can be:
    
    [{
    azienda: "company_name",
    codice: "company_code",
    nome: "user_name",
    cognome: "user_surname",
    email: "user_email",
    id_user: "user_id",
    id_azienda: "company_id"
    },
    {
    azienda: "company_name",
    codice: "company_code",
    nome: "user_name",
    cognome: "user_surname",
    email: "user_email",
    id_user: "user_id",
    id_azienda: "company_id"
    },
    {
    azienda: "company_name",
    codice: "company_code",
    nome: "user_name",
    cognome: "user_surname",
    email: "user_email",
    id_user: "user_id",
    id_azienda: "company_id"
    }]
    
    

    [jQuery] Custom Attributes with Integer values?

    2009-05-14 Thread Daniel Murker
    
    Hello,
    
    I have a form containing a list of checkboxes each with an 'amount'
    attribute.  These checkboxes are in no particular order, and all have
    different values for the amount attribute.  Example:
    
    
    
    
    
    I had hoped to use jquery to retrieve the value from the amount attribute,
    subtract it from another number, and then disable any inputs of class
    'puzzle' with 'amount's greater than the remaining number.
    
    Example:
    
    $().ready(function(){
    var remaining = 15;
    
       $("input[amount]").click(function(){
    if ( $(this).is(':checked'){
    var subtract = parseInt( $(this).attr('amount') );
    remaining -= subtract;
    
    }
    
    });
    });
    
    
    for the above code, what would be the best way to then DISABLE any and all
    remaining inputs with the amount attribute that have an amount attribute
    value greater than the new value of the *remaining* variable?
    is it even possible?
    
    Daniel
    
    

    [jQuery] Re: JQuery - Tablesorter - move the last line to firt line

    2009-05-11 Thread Daniel Queiroz
    But the tablesorter don´t need the  to work?
    Look my code:
    
    
    
    
    
    
    
       
    
       
    
       
    
       Nº
    RAV
    
       
    
    
    Título
    
       
    
    
    Cargo
    
       
    
    
    Localidade
    
       
    
       Qtde
    de vagas  (Preenchidas / Abertas)
    
       
    
       Data
    de Aprovação
    
       
    
       Vaga
    TM
    
       
    
    
    Usuário
    
       
    
    
    Formulário de Movimentação
    
       
    
       
    
       
    
    
    
    
    
    
    
       
    
       
    
       
    
       
    
       <%#
    DataBinder.Eval(Container.DataItem,"IDRAV")%>
    
    
     
    
       
    
       
    
       
    
       
    
        
    
       
    
       
    
        
    
       
    
       
    
        
    
       
    
       
    
        
    
       
    
       
    
        
    
       
    
       
    
       
    
        
    
       
    
       
    
        
    
       
    
       Formulário
    
    
    
    
    
    
    
       
    
    
    
    
    
    
    
    On Mon, May 11, 2009 at 3:56 PM, aquaone  wrote:
    
    > ... no.
    >
    >  is the same level as  and . it does not belong inside
    > the . it should be a child of the .
    >
    > stephen
    >
    >
    >
    > On Mon, May 11, 2009 at 11:52, Daniel Queiroz  wrote:
    >
    >> I tried to do this
    >>
    >> Put all rows inside the  but in this case
    >> the tablesorter don´t work more and crash the javascript..
    >>
    >> :S
    >>
    >> On Mon, May 11, 2009 at 3:29 PM, aquaone  wrote:
    >>
    >>> What is meant by this? I'm assuming that a sort is being performed that
    >>> is forcing that row to move based on the content of the . If you do not
    >>> wish content at the "bottom" of your table to be sorted, why not place those
    >>> rows in the  instead of in the ?
    >>>
    >>> stephen
    >>>
    >>>
    >>>
    >>> On Sun, May 10, 2009 at 06:44, Danielrq.net  wrote:
    >>>
    >>>>
    >>>>
    >>>> Any sugestion?
    >>>>
    >>>> Danielrq.net wrote:
    >>>> >
    >>>> > Hi guys,
    >>>> >
    >>>> > We´re use the table sorter script in our systemsbut now we note a
    >>>> > problem.
    >>>> >
    >>>> > After the data load in table...the last line goes to the firt line...
    >>>> >
    >>>> > You did see this any time?
    >>>> >
    >>>> > Can help?
    >>>> >
    >>>> >
    >>>> >
    >>>>
    >>>> --
    >>>> View this message in context:
    >>>> http://www.nabble.com/JQuery---Tablesorter---move-the-last-line-to-firt-line-tp23451697s27240p23470231.html
    >>>> Sent from the jQuery General Discussion mailing list archive at
    >>>> Nabble.com.
    >>>>
    >>>>
    >>>
    >>
    >>
    >> --
    >> "Em 6 dias Deus criou o universo com a aparência de bilhões de anos de
    >> existência. OU será que Adão foi criado sendo um bebezinho?
    >> Se um homem pode ser criado adulto, o universo também pode..."
    >>
    >
    >
    
    
    -- 
    "Em 6 dias Deus criou o universo com a aparência de bilhões de anos de
    existência. OU será que Adão foi criado sendo um bebezinho?
    Se um homem pode ser criado adulto, o universo também pode..."
    
    

    [jQuery] Re: JQuery - Tablesorter - move the last line to firt line

    2009-05-11 Thread Daniel Queiroz
    I tried to do this
    
    Put all rows inside the  but in this case the
    tablesorter don´t work more and crash the javascript..
    
    :S
    
    On Mon, May 11, 2009 at 3:29 PM, aquaone  wrote:
    
    > What is meant by this? I'm assuming that a sort is being performed that is
    > forcing that row to move based on the content of the . If you do not
    > wish content at the "bottom" of your table to be sorted, why not place those
    > rows in the  instead of in the ?
    >
    > stephen
    >
    >
    >
    > On Sun, May 10, 2009 at 06:44, Danielrq.net  wrote:
    >
    >>
    >>
    >> Any sugestion?
    >>
    >> Danielrq.net wrote:
    >> >
    >> > Hi guys,
    >> >
    >> > We´re use the table sorter script in our systemsbut now we note a
    >> > problem.
    >> >
    >> > After the data load in table...the last line goes to the firt line...
    >> >
    >> > You did see this any time?
    >> >
    >> > Can help?
    >> >
    >> >
    >> >
    >>
    >> --
    >> View this message in context:
    >> http://www.nabble.com/JQuery---Tablesorter---move-the-last-line-to-firt-line-tp23451697s27240p23470231.html
    >> Sent from the jQuery General Discussion mailing list archive at
    >> Nabble.com.
    >>
    >>
    >
    
    
    -- 
    "Em 6 dias Deus criou o universo com a aparência de bilhões de anos de
    existência. OU será que Adão foi criado sendo um bebezinho?
    Se um homem pode ser criado adulto, o universo também pode..."
    
    

    [jQuery] [validation] Specify range with attributes

    2009-04-29 Thread Daniel Sabater
    
    Hello
    
    I am trying to specify range validation as an attribute in order to
    have the validation rule as close as possible to the control. Trying
    to avoid having to specify the rules somewhere else. I am using
    jquery.validation 1.5.2
    
    I have tried the following, but without luck:
    
    

    [jQuery] Re: basic image gallery, running into a few problems

    2009-04-24 Thread Daniel
    
    A simple solution would be:
    
    function forwardClick() {
    var i = $('#images .visible').attr('id');
    var currentImg = $('#images .foo:eq(' + i + ')');
    var nextImg = $('#images .foo:eq(' + j + ')');
    var currentDesc = $('#descriptions .bar:eq(' + i + ')');
    var nextDesc = $('#descriptions .bar:eq(' + j + ')');
    
    currentImg.animate( { marginLeft: left }, 300, function 
    () { $
    (this).removeClass('visible'); } );
    nextImg.css('margin-left', 
    '240px').addClass('visible').animate
    ( { marginLeft: "0" }, 300 );
    
    currentDesc.animate( { marginLeft: descLeft }, 300, 
    function() { $
    (this).removeClass('visible'); } );
    nextDesc.css('margin-left', 
    descRight).addClass('visible').animate
    ( {marginLeft: "0" }, 300 );
    i += 1; j += 1; k += 1;
    
    if (i > length - 1) { i = 0; }
    if (j > length - 1) { j = 0; }
    if (k > length - 1) { k = 0; }
    $('#forward').bind("click", function() {
     $('#forward').unbind("click");
     forwardClick();
    };
    }
    $('#forward').click( function() {
     $('#forward').unbind("click");
     forwardClick();
    });
    
    But I'm sure there's a better way to do it...
    
    On Apr 24, 10:39 am, roryreiff  wrote:
    > Hello there,
    >
    > I have created a simply navigable image gallery with a bit of json, as
    > well as .animate() and altering the margin of elements. Currently, I
    > am pulling in the 5 most recent images with a tag of 'spock' from
    > flickr. It seems to be working fine, except that when clicking through
    > very fast it gets a bit wonky. I am also really curious as to opinions
    > on better ways of doing this? Perhaps there is a way that relies upon
    > the json instead of simply just injecting it into the dom right off
    > the bat?
    >
    > The basic strategy I employed was to animate the current image off the
    > stage, and then make it invisibe, while also animating the next image
    > onto the stage after making it visible. I have a feeling it's these
    > queued effects/animations that aren't dealing so well with fast
    > clicks. Perhaps the best way to solve this is limit when/how the
    > arrows can be clicked?
    >
    > Any help is greatly appreciated. Thanks!
    >
    > example:http://www.pomona.edu/dev/spock/index.asp
    >
    > js:http://www.pomona.edu/dev/spock/spock-feed.js
    
    

    [jQuery] Re: performance of jQuery.each

    2009-04-24 Thread Daniel
    
    Well, you have to keep in mind that not all arrays will be as
    "structured" as yours.
    with an array like [1=>4,5=>3,"foo"=>4], your iteration won't work. In
    fact, yours will only work for arrays with sequential numeric keys. If
    that is the array that you have, a for loop might be the best way to
    go. If you are trying to iterate through an array of unknown objects/
    items, the each function is your way to go.
    
    -Daniel
    
    On Apr 24, 3:24 am, "Magnus O."  wrote:
    > Hi!
    >
    > I saw that the jQuery.each function iterates over the array like this:
    >
    > for ( name in object){}
    >
    > From what I read this is one of the slowest ways of iterating over an
    > array in js.
    >
    > I made a very simple test like:
    >
    >                                 var array = [];
    >                                 for (var i = 0; i < 100; i++)
    >                                         array[i] = Math.random();
    >
    >                                 var t = new Array();
    >
    > //Start jquery.each test
    >                                 var start = (new Date).getTime();
    >                                 $(array).each(function() {
    >                                         t.push(this);
    >                                 });
    >                                 alert((new Date).getTime() - start);
    >
    >                                 t = new Array();
    >
    > //Start another iteraton way test
    >                                 start = (new Date).getTime();
    >                                 var i = array.length;
    >                                 while (i--) {
    >                                         t.push(array[i]);
    >                                 }
    >                                 alert((new Date).getTime() - start);
    >
    > In my testbrowser the jquery.each testtime was 2378ms and the other
    > test was 110ms. This is a big difference. I know this test was very
    > easy bit it still shows that the each function could be made faster?
    >
    > Is there any reason why the for ( name in object){} way of iterating
    > an array is used? Is this the most optimized way of iteration an
    > array?
    >
    > //Magnus
    
    

    [jQuery] Re: Get background-image url ?

    2009-04-24 Thread Daniel
    
    $$.css('background-image').replace(/^url|[\(\)]/g, '');
    
    should do the trick.
    
    On Apr 24, 6:34 am, Mech7  wrote:
    > What is the best way to get the background image url in css?
    > i have found this in crossfade plugin but does not work in opera..
    >
    > var target = $$.css('backgroundImage').replace(/^url|[\(\)]/g, '');
    
    

    [jQuery] tablesorter plugin

    2009-04-23 Thread Daniel
    
    I am working with tablesorter plugin and pager plugin. I have written
    code that looks for a class and decides whether or not to display the
    row based on which checkboxes are selected.
    
    Example: if i select the checkbox vehicles, the category id is 4, so
    jquery looks in the table for any rows with class "cat_4" and show()
    is called.
    
    Problem: with the pager plugin, it only "filters" on the current page,
    it does not filter on the whole data set. How do I tweak and tell the
    tablesorter/pager plugin that certain are set to display:none so
    update the table and only include those rows that are set to "show()"?
    
    

    [jQuery] Re: Bug? Jquery 1.3.2 -> $.ajax + Firefor 3.0.8

    2009-04-22 Thread Daniel
    
    Happens all the time.
    
    Could you give an example of the data array being sent, and how?
    
    On Apr 22, 2:23 pm, Mario Soto  wrote:
    > Thanks for the "tipe", was my bug on the post :( . But, I'm sending a
    > php array data. This data is not properly sended or discarded. Any
    > idea to know what and how this happens? or how to find.
    >
    > On Apr 22, 5:49 am, donb  wrote:
    >
    > > Sounds more like the data type expected IS 'json' but the data coming
    > > in is not valid JSON so it gets discarded.  With the data type
    > > interpreted as text, it's returned as-is.
    >
    > > It would be a good idea to open the URL providing this data in your
    > > browser and examine the data, perhaps pasting it intohttp://jsonlint.com
    > > to see if it's valid or not.
    >
    > > On Apr 22, 7:28 am, Daniel  wrote:
    >
    > > > This may be silly, but I notice you put "dataTipe" instead of
    > > > "dataType". If this is what your code looks like also, then there is
    > > > your problem right there...
    >
    > > > On Apr 22, 4:56 am, Mario Soto  wrote:
    >
    > > > > The $.ajax function is causing me trouble, I'm using Mozilla Firefox
    > > > > 3.0.8 in a Kubuntu 8.10 computer, with php PHP/5.2.6-2ubuntu4.2 and
    > > > > web server Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.2 with Suhosin-
    > > > > Patch and jQuery version 1.3.2.
    >
    > > > > If I use dataTipe: 'json' and type:'post' with $-ajax, jQuery seems to
    > > > > send something but, php does not recieve a thing. But when I use
    > > > > 'text', it recieves data.
    >
    > > > > Specifically what im sending is (in this case, just to try).
    >
    > > > > 
    > > > >     
    > > > >     
    > > > >     
    > > > >      > > > value="({gol})" />
    > > > > 
    >
    > > > > Then i echo a json_encode($_POST) and die. So, should be returning the
    > > > > same I've sended, but returns nothing with 'json', and a json string
    > > > > with 'text'. Even firebug tellsme that those are the results.
    >
    > > > > Can you recreate or send any comment.
    
    

    [jQuery] Re: How to catch mouse position inside an area?

    2009-04-22 Thread Daniel
    
    something like...
    
    $("#div").click(function() {
      var ox = $(this).offset().left;
      var oy = $(this).offset().top;
    }
    
    On Apr 22, 6:36 am, "David .Wu"  wrote:
    > If I got a 400px width div, can I get the offset left distance from
    > mouse to the div in where I click?
    
    

    [jQuery] Re: Removing anonymous element

    2009-04-22 Thread Daniel
    
    Wait. I'm sorry... the second half of my response was for a different
    post relating to parent and parents. I have not tested that in the
    wild. It should, however, not remove the siblings for the same
    reason.
    
    On Apr 22, 6:45 am, Daniel  wrote:
    > It shouldn't. there is parent() and parents().
    > I use that exact code for a tag system that i created. I'd link you to
    > it... but it's not public yet. The code is exact, the properties
    > changed are different.
    >
    > On Apr 22, 6:40 am, dth  wrote:
    >
    > > As far as I can see, that would remove my element as well as all of
    > > it's siblings?
    >
    > > -dennis
    >
    > > On 22 Apr., 13:36, Daniel  wrote:
    >
    > > > var.parent().remove() should do the trick i think?
    
    

    [jQuery] Re: select only the father

    2009-04-22 Thread Daniel
    
    I'm very glad!
    
    On Apr 22, 6:38 am, gostbuster  wrote:
    > Thank you very much! it works !
    >
    > thanks a lot !
    >
    > On 22 avr, 13:31, Daniel  wrote:
    >
    > > try this...
    >
    > >                 $(".delete").hover(function(){
    > >                         $(this).parent().css('background-
    > > color','red');
    > >                 }, function() {
    > >                         $(this).parent().css('background-
    > > color','white');
    > >                 });
    >
    > > On Apr 22, 6:25 am, gostbuster  wrote:
    >
    > > > Hi, thank you for you answser.
    >
    > > > Of course I could do that, expect that I'll have an undefined number
    > > > of "container" div. That's why I gave them classes and no id !
    >
    > > > Thank you
    >
    > > > On 22 avr, 13:17, Zeeshan Khan  wrote:
    >
    > > > > Instead of call the parent you can call Only that DIV of which u want to
    > > > > change the background color
    >
    > > > > $(document).ready(function(){
    > > > >              //action when the mouse is over :
    >
    > > > >                $("#delete").mouseover(function(){ // I select the 
    > > > > .delete
    > > > > divs.
    > > > >                        //now i want to change the bg color of the
    > > > > entire div, but only this div. here is my problem
    > > > >                        $('#container').css('background-color','red');
    > > > >                  //with this selection, I select ALL the parents,but
    > > > > I want only the father..
    > > > >                })
    >
    > > > > //action when the mouse is out
    > > > >                        $(".thumbdelete").mouseout(function(){
    > > > >                                $('#container
    > > > > ').css('background-color','white');
    > > > >                        })
    >
    > > > > })
    >
    > > > > I think it might work.
    >
    > > > > Regards;
    >
    > > > > Zeeshan Ahmed Khan
    >
    > > > > On Wed, Apr 22, 2009 at 4:11 PM, gostbuster 
    > > > > wrote:
    >
    > > > > > Hi everyone,
    >
    > > > > > I'm getting in trouble with this problem,
    >
    > > > > > I have several divs which contains an image, and another div. we can
    > > > > > imagine somethin like that :
    >
    > > > > > 
    > > > > >         ...my image...
    > > > > >         delete
    >
    > > > > > 
    >
    > > > > > What I want to do is, when I put the mouse over the div Delete (and
    > > > > > only this one), I want to change the background of the
    > > > > > entire .container div.
    >
    > > > > > here is my code :
    >
    > > > > > $(document).ready(function(){
    > > > > >              //action when the mouse is over :
    >
    > > > > >                $(".delete").mouseover(function(){ // I select the 
    > > > > > .delete
    > > > > > divs.
    > > > > >                        //now i want to change the bg color of the
    > > > > > entire div, but only this div. here is my problem
    > > > > >                        
    > > > > > $(this+':parent').css('background-color','red');
    > > > > >                  //with this selection, I select ALL the parents,but
    > > > > > I want only the father..
    > > > > >                })
    >
    > > > > > //action when the mouse is out
    > > > > >                        $(".thumbdelete").mouseout(function(){
    >
    > > > > >  $(this+':parent').css('background-color','white');
    > > > > >                        })
    >
    > > > > > })
    >
    > > > > > Your help would be very greatful.
    >
    > > > > > Thank you very much in advance.
    
    

    [jQuery] Re: Removing anonymous element

    2009-04-22 Thread Daniel
    
    It shouldn't. there is parent() and parents().
    I use that exact code for a tag system that i created. I'd link you to
    it... but it's not public yet. The code is exact, the properties
    changed are different.
    
    On Apr 22, 6:40 am, dth  wrote:
    > As far as I can see, that would remove my element as well as all of
    > it's siblings?
    >
    > -dennis
    >
    > On 22 Apr., 13:36, Daniel  wrote:
    >
    > > var.parent().remove() should do the trick i think?
    
    

    [jQuery] Re: tow live event imbriqued

    2009-04-22 Thread Daniel
    
    I can't tell 100% from looking at the code...
    
    but it seems like you don't need to have that code inside the "if"
    statement.
    
    putting the:
      $('.exploitation_seat span.addIfEmpty').live('click', function(){
       elementInQuestionParent.append(contentToInsert) ;
      })
    
    code anywhere in the $(document).ready() loop should execute it how
    you want.
    
    if it doesn't, there may be something wrong with your selectors.
    
    
    On Apr 22, 6:22 am, ghaliano  wrote:
    > Hi all ;
    > i have a classic system to add remove line to a form with to image (i
    > target them with class name "add" and "remove") this first
    > fuctionality must be executed with live event .
    > But whene i remove all my line i should add a new button but the live
    > event on it not seem to be fired
    > This is my code :
    >
    > $('.btn_container img').live('click',function(){
    >         var elementInQuestion           =  $(this).parents
    > ('div.to_duplicate:first') ;
    >         var contentToInsert             =  elementInQuestion.clone() ;
    >         var elementInQuestionParent =  elementInQuestion.parents
    > ('li:first') ;
    >
    >         switch($(this).attr('class')){
    >                 case 'add' :
    >                         //duplicate the element
    >                         var duplicated = 
    > elementInQuestion.before(contentToInsert).hide() ;
    >                         duplicated.fadeIn() ;
    >                         //Remove the label (Not a real remove)
    >                         $('label', duplicated).html(' ') ;
    >                 break ;
    >                 case 'remove' :
    >                         elementInQuestion.remove() ;
    >                 break ;
    >         }
    >
    >         if(elementInQuestion.is('.exploitation_seat')){
    >                 //This code add a span button to add automaticly a
    > line whene all removed
    >                 if($('div.exploitation_seat').length == 0){
    >
    >                         
    > elementInQuestionParent.append('  class="addIfEmpty">+Add blank') ;
    >                         //Here the issue whene i click on the span the event 
    > not fired
    >                         $('.exploitation_seat span.addIfEmpty').live('click', 
    > function(){
    >                                 
    > elementInQuestionParent.append(contentToInsert) ;
    >                         })
    >                 }
    >                 $('div.exploitation_seat').each(function(i){
    >                         $(":input", $(this)).each(function () {
    >                 $(this).attr('name', $(this).attr('name').replace(/
    > [0-9]/g, i)) ;
    >                 $(this).attr('id', $(this).attr('id').replace(/[0-9]/
    > g,     i)) ;
    >              })
    >              $("label", $(this)).each(function () {
    >                 $(this).attr('for', $(this).attr('for').replace(/[0-9]/
    > g, i)) ;
    >              })
    >                 })
    >         }})
    >
    > Sorry if the code is long .
    > Cordialy Ahmed .
    
    

    [jQuery] Re: Removing anonymous element

    2009-04-22 Thread Daniel
    
    var.parent().remove() should do the trick i think?
    
    On Apr 22, 5:47 am, dth  wrote:
    > Hi,
    >
    > I have a jquery array with an element in it. I'd like to remove this
    > element from the DOM, but can't see how.
    >
    > If I use var.remove() it removes all children but not the element
    > itself.
    >
    > I cannot think of any way to specify this very element in a selector
    > either, as it can have various placements in the DOM and it doesn't
    > have an id.
    >
    > If there was a good mechanism for generating unique ids maybe that
    > would be the way to go?
    >
    > Thanks,
    >
    > -dennis
    
    

    [jQuery] Re: select only the father

    2009-04-22 Thread Daniel
    
    try this...
    
    $(".delete").hover(function(){
    $(this).parent().css('background-
    color','red');
    }, function() {
    $(this).parent().css('background-
    color','white');
    });
    
    On Apr 22, 6:25 am, gostbuster  wrote:
    > Hi, thank you for you answser.
    >
    > Of course I could do that, expect that I'll have an undefined number
    > of "container" div. That's why I gave them classes and no id !
    >
    > Thank you
    >
    > On 22 avr, 13:17, Zeeshan Khan  wrote:
    >
    > > Instead of call the parent you can call Only that DIV of which u want to
    > > change the background color
    >
    > > $(document).ready(function(){
    > >              //action when the mouse is over :
    >
    > >                $("#delete").mouseover(function(){ // I select the .delete
    > > divs.
    > >                        //now i want to change the bg color of the
    > > entire div, but only this div. here is my problem
    > >                        $('#container').css('background-color','red');
    > >                  //with this selection, I select ALL the parents,but
    > > I want only the father..
    > >                })
    >
    > > //action when the mouse is out
    > >                        $(".thumbdelete").mouseout(function(){
    > >                                $('#container
    > > ').css('background-color','white');
    > >                        })
    >
    > > })
    >
    > > I think it might work.
    >
    > > Regards;
    >
    > > Zeeshan Ahmed Khan
    >
    > > On Wed, Apr 22, 2009 at 4:11 PM, gostbuster wrote:
    >
    > > > Hi everyone,
    >
    > > > I'm getting in trouble with this problem,
    >
    > > > I have several divs which contains an image, and another div. we can
    > > > imagine somethin like that :
    >
    > > > 
    > > >         ...my image...
    > > >         delete
    >
    > > > 
    >
    > > > What I want to do is, when I put the mouse over the div Delete (and
    > > > only this one), I want to change the background of the
    > > > entire .container div.
    >
    > > > here is my code :
    >
    > > > $(document).ready(function(){
    > > >              //action when the mouse is over :
    >
    > > >                $(".delete").mouseover(function(){ // I select the .delete
    > > > divs.
    > > >                        //now i want to change the bg color of the
    > > > entire div, but only this div. here is my problem
    > > >                        $(this+':parent').css('background-color','red');
    > > >                  //with this selection, I select ALL the parents,but
    > > > I want only the father..
    > > >                })
    >
    > > > //action when the mouse is out
    > > >                        $(".thumbdelete").mouseout(function(){
    >
    > > >  $(this+':parent').css('background-color','white');
    > > >                        })
    >
    > > > })
    >
    > > > Your help would be very greatful.
    >
    > > > Thank you very much in advance.
    
    

    [jQuery] Re: Bug? Jquery 1.3.2 -> $.ajax + Firefor 3.0.8

    2009-04-22 Thread Daniel
    
    This may be silly, but I notice you put "dataTipe" instead of
    "dataType". If this is what your code looks like also, then there is
    your problem right there...
    
    
    On Apr 22, 4:56 am, Mario Soto  wrote:
    > The $.ajax function is causing me trouble, I'm using Mozilla Firefox
    > 3.0.8 in a Kubuntu 8.10 computer, with php PHP/5.2.6-2ubuntu4.2 and
    > web server Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.2 with Suhosin-
    > Patch and jQuery version 1.3.2.
    >
    > If I use dataTipe: 'json' and type:'post' with $-ajax, jQuery seems to
    > send something but, php does not recieve a thing. But when I use
    > 'text', it recieves data.
    >
    > Specifically what im sending is (in this case, just to try).
    >
    > 
    >     
    >     
    >     
    >      value="({gol})" />
    > 
    >
    > Then i echo a json_encode($_POST) and die. So, should be returning the
    > same I've sended, but returns nothing with 'json', and a json string
    > with 'text'. Even firebug tellsme that those are the results.
    >
    > Can you recreate or send any comment.
    
    

    [jQuery] IE7 Thrown Invalid Argument Bug resurfaced

    2009-04-22 Thread Daniel
    
    I know this area of code was recently fixed for IE8 issues, but
    something else is going wacky.
    
    line 1065 and 1002
    elem[ name ] = value;
    
    change this to
    try{elem[ name ] = value;} catch (err){};
    
    and you're avoid errors being thrown in IE7 when a property is send an
    invalid number.
    
    You should of course be making sure to pass valid information, but in
    my case, there was a plugin sending bad information. This also makes
    IE7 behave the same way as Firefox and Safari, for more consistancy.
    
    A bug report has been filed, but this will fix it right away if need
    be.
    
    

    [jQuery] jQuery multiple toggle - should be quick

    2009-04-13 Thread Daniel
    
    I have multiple divs called article which have a show/hide link to
    toggle a div inside called articleBody. Problem is when I click the
    link all divs show/hide.
    
    The html structure is below:
    
    
    Hide [-]
    

    [jQuery] jCarousel initial images

    2009-04-10 Thread Daniel Khan
    
    Hello,
    
    as the issues addressed in my first posting are mostly solved I do
    this new post - maybe someone can help me with that.
    I use jCarousel with jQuery to pull images from flickr and everything
    works so far except for the initial state in firefox. It only requests
    one image at the beginning so that only one is shown. Looks as
    if .first and .last are wrong at the beginning.
    
    It also works if I reload with caching on. Then the first request
    fails and then it is shown correctly.
    If I disable caching only one image is shown at the beginning till I
    scroll to the next.
    
    Here is the example: http://almdorf-reiteralm.sandbox.khan-it.at/
    
    Maybe someone can help me now.
    
    Thanks in advance
    
    Daniel
    
    

    [jQuery] Re: jCarousel display and scrolling problems

    2009-04-09 Thread Daniel Khan
    
    Hello again,
    
    scrolling works now - I copyied the example over it again.
    But still initially opnly one image is loaded in FF.
    
    Greetings
    
    Daniel Khan
    
    

    [jQuery] jCarousel display and scrolling problems

    2009-04-09 Thread Daniel Khan
    
    Hello,
    
    I am using jCarousel 0.2.3 with jQuery 1.3.2 for displaying flickr
    images and slimbox2 to show them in a lightbox.
    
    I'm new to jQuery and I fiddled everything together from examples and
    it allready works somehow but ere is my problem:
    
    In FF most of the time only one picture is shown at the beginning.
    Firebug also shows this request:
    http://almdorf-reiteralm.sandbox.khan-it.at/lib/dynamic_flickr_api.php?per_page=1&page=1
    So it only wants to fetch one. Funny enough IE shows 3 images as
    expected.
    
    This is for IE and FF:
    When I try to scroll I can see the next images floating through the
    visible area very quickly till they are gone.
    Scrolling back doesn't work at all.
    
    It seems as if the .first and .last value is somehow wrong but I have
    no clue how they are calculated.
    
    You can see the scroller at http://almdorf-reiteralm.sandbox.khan-it.at/
    The jCarousel code is here:
    http://almdorf-reiteralm.sandbox.khan-it.at/mysite/javascript/jcarousel_loader.js
    
    Maybe someone can help me out.
    
    Thanks in advance!
    
    Daniel
    
    
    
    

    [jQuery] Re: New plugin: simplyScroll

    2009-02-20 Thread Daniel
    
    Great. I'm working on it now, and I'd be happy to send you a link when
    it's done! Great choice of items to show in your example by the
    way :-)
    
    On Feb 19, 9:53 am, Will Kelly  wrote:
    > Have added a new complex markup example
    >
    > http://logicbox.net/jquery/simplyscroll/custom.html
    >
    > On Feb 19, 1:13 am, Will Kelly  wrote:
    >
    > > Great stuff, let me know how it goes! Will
    >
    > > On Feb 18, 11:06 pm, Daniel  wrote:
    >
    > > > Wonderful! I plan to use this on the redesign of
    > > > hodgesfarmequipment.com! Thank you, bookmarked!
    >
    > > > On Feb 18, 2:41 pm, Will Kelly  wrote:
    >
    > > > > Hi
    >
    > > > > Just released a plugin for some code I've been working on and off for
    > > > > the past few months.
    >
    > > > > It's a simple content scroller that can accept images as well as more
    > > > > complex content and features an 'infinite' scroll mode as well as
    > > > > image data from Flickr.
    >
    > > > > Plug-in:http://logicbox.net/jquery/simplyscroll/
    > > > > Blog post:http://logicbox.net/blog/simplyscroll-jquery-plugin
    >
    > > > > Would love feedback etc, also would be interested to know how I can
    > > > > detect Safari/Chrome (webkit), now that I can't use $.browser!
    >
    > > > > Cheers
    >
    > > > > Will
    
    

    [jQuery] Re: Jquery Form Plugin issues

    2009-02-18 Thread Daniel
    
    It is posting, but its not ajax posting. I've tried with and without
    other inputs, and it still submits like a normal form. I'm losing my
    mind over this one! Thanks for the quick response, Mike. Love the
    plugin, and have used it more than once!
    
    On Feb 18, 5:26 pm, Mike Alsup  wrote:
    > > Everything has been checked for validation and so on. Doesn't work in
    > > IE or FF. Thanks in advance!
    >
    > > 
    > > $(document).ready(function() {
    > >         var submitoptions = {
    > >         target:        '#loading'
    > >                 };
    >
    > >         $('#e2').submit(function(){
    > >                 $(this).ajaxSubmit(submitoptions);
    > >             return false;
    > >         });});
    >
    > > 
    >
    > >  > action="photo_process.php" method="post">
    > > Photo # 2
    > > 
    > > 
    > > 
    >
    > The code looks fine, aside from a missing > char in your submit
    > input.  Can you explain what is not working?  Is it not posting?  Not
    > processing the response?
    >
    > Mike
    
    

    [jQuery] Jquery Form Plugin issues

    2009-02-18 Thread Daniel
    
    I'm going nuts here, and I think i've been staring at this far too
    long. I have done more than one of these in my day, but for some
    reason this just isn't working. I'm hoping a fresh set of genius eyes
    can help me out here.
    
    Everything has been checked for validation and so on. Doesn't work in
    IE or FF. Thanks in advance!
    
    
    $(document).ready(function() {
    var submitoptions = {
    target:'#loading'
    };
    
    $('#e2').submit(function(){
    $(this).ajaxSubmit(submitoptions);
    return false;
    });
    });
    
    
    
    Photo # 2
    
    
    
    
    
    

    [jQuery]

    2009-02-18 Thread Daniel Costalis
    
    
    

    [jQuery] Re: New plugin: simplyScroll

    2009-02-18 Thread Daniel
    
    Wonderful! I plan to use this on the redesign of
    hodgesfarmequipment.com! Thank you, bookmarked!
    
    On Feb 18, 2:41 pm, Will Kelly  wrote:
    > Hi
    >
    > Just released a plugin for some code I've been working on and off for
    > the past few months.
    >
    > It's a simple content scroller that can accept images as well as more
    > complex content and features an 'infinite' scroll mode as well as
    > image data from Flickr.
    >
    > Plug-in:http://logicbox.net/jquery/simplyscroll/
    > Blog post:http://logicbox.net/blog/simplyscroll-jquery-plugin
    >
    > Would love feedback etc, also would be interested to know how I can
    > detect Safari/Chrome (webkit), now that I can't use $.browser!
    >
    > Cheers
    >
    > Will
    
    

    [jQuery] Re: Select Box. Anyone?

    2009-02-18 Thread Daniel
    
    What exactly is it that you are looking for as far as a replacement?
    JQuery works great with the  box. If you are looking for
    something visually different, more so than CSS can take care of, you
    can check out this one: http://www.brainfault.com/demo/selectbox/, if
    there is something more you are looking for, maybe someone else can
    help.
    
    On Feb 18, 3:42 pm, shapper  wrote:
    > Hello,
    >
    > I am looking for a Select Box replacement so I can style an HTML
    > Select.
    > I need something that works across browsers.
    >
    > Something like this is very common on other frameworks but I haven't
    > found anything for JQuery.
    >
    > Could someone, please, suggest me one?
    >
    > Thanks,
    > Miguel
    
    

    [jQuery] Re: jQuery 1.3 incompatible plugins

    2009-02-06 Thread Daniel
    
    Hi, quick fix for compatibility with jQuery 1.3
    1. Open jquery.fancybox.js file
    2. Replace line 73:
    
    Before:
    var arr = $("a...@rel=" + el.rel + "]").get();
    
    After:
    var arr = $("a[rel=" + el.rel + "]").get();
    
    Bye.
    
    
    On 22 Led, 16:13, Gordon  wrote:
    > Sorry for the double posting! Google groups seems to have gone nuts on
    > me, it's also decided that my google email address should be my
    > primary address instead of the address I've used for years, and as a
    > result I'm no longer subscribed to any of my groups.
    >
    > On Jan 22, 2:26 pm, Stefan Sturm 
    > wrote:
    >
    > > Hello,
    >
    > > good Question. I have problems withFancyboxandjQuery1.3...
    >
    > > Greetings,
    > > Stefan Sturm
    >
    > > 2009/1/22 Gordon :
    >
    > > > Just a quick question, is there a list of plugins that don't work with
    > > >jQuery1.3, or a list of plugins that have been upgraded to work with
    > > > it?  I want to be able to quickly check my list of plugins against a
    > > > list of known incompatibilities before upgrading.
    
    

    [jQuery] Re: Jquery coding direction

    2009-01-06 Thread Daniel
    
    Sry , I mean Validation plugin
    
    On Jan 7, 3:40 am, Daniel  wrote:
    > What kind of validation are you using ? Are you using jquery Form
    > plugin ?
    >
    > On Jan 7, 3:03 am, tawright915  wrote:
    >
    > > I did not make my question clear and left out some things so here is
    > > goes again.
    >
    > > I have two textboxes on my web form.  When blank they are both
    > > required and are validated upon submit.  However if one is filled in
    > > then the other is not required any more and the page should allow to
    > > validate successfully.
    >
    > > Thanks
    >
    > > On Jan 2, 12:50 pm, brian  wrote:
    >
    > > > On Fri, Jan 2, 2009 at 10:16 AM,tawright915 wrote:
    >
    > > > > I'm having problems wrapping my head around how to code this:
    >
    > > > > I have two textboxes both are required.  However if a user fills out
    > > > > one of the textboxes then the other is no longer required.
    >
    > > > $('#the_form').submit(function()
    > > > {
    > > >         return $('#textarea_1').val() || $('#textarea_2').val();
    >
    > > > });
    >
    > > > Obviously, you'd want to adjust that to give some feedback to the user.
    
    

    [jQuery] Re: Jquery coding direction

    2009-01-06 Thread Daniel
    
    What kind of validation are you using ? Are you using jquery Form
    plugin ?
    
    On Jan 7, 3:03 am, tawright915  wrote:
    > I did not make my question clear and left out some things so here is
    > goes again.
    >
    > I have two textboxes on my web form.  When blank they are both
    > required and are validated upon submit.  However if one is filled in
    > then the other is not required any more and the page should allow to
    > validate successfully.
    >
    > Thanks
    >
    > On Jan 2, 12:50 pm, brian  wrote:
    >
    > > On Fri, Jan 2, 2009 at 10:16 AM,tawright915 wrote:
    >
    > > > I'm having problems wrapping my head around how to code this:
    >
    > > > I have two textboxes both are required.  However if a user fills out
    > > > one of the textboxes then the other is no longer required.
    >
    > > $('#the_form').submit(function()
    > > {
    > >         return $('#textarea_1').val() || $('#textarea_2').val();
    >
    > > });
    >
    > > Obviously, you'd want to adjust that to give some feedback to the user.
    
    

    [jQuery] Re: Hide / show password field with focus

    2009-01-06 Thread Daniel
    
    When you click outside the password field, the field is still
    
    not
    
    
    Therefore, default value is '' , not 
    
    a quick fix to your code ( not tested )
    $('.login_input').blur(function(){
    if(this.value === '' && this.name === 'pass'){
    $('.header_login_right_fake > .login_input')[0].value = 
    $
    ('.header_login_right_fake > .login_input')[0].defaultValue
    } else{
    if (this.value === ''){
    this.value = this.defaultValue
    }
    }
    if(this.name === 'pass'){
    $('.header_login_right_real').hide();
    $('.header_login_right_fake').show();
    $('html').focus();
    }
    });
    
    On Jan 6, 11:51 pm, rob303  wrote:
    > Hi,
    >
    > I'm still really struggling with this.  Any help would be greatly
    > appreciated!
    >
    > Rob.
    >
    > On Jan 6, 11:40 am, rob303  wrote:
    >
    > > Hi,
    >
    > > I've put together a couple of small functions to handle the removal /
    > > restore of the default text inside some text inputs.  One of these
    > > inputs is a password field.  I'm showing the user a standard text
    > > field containing the text 'Password'.  When the user clicks in the box
    > > the standard text field is hidden and a proper password box is show.
    > > The following works fine:
    >
    > > $('.login_input').click(function() {
    > >     if(this.value == this.defaultValue) {
    > >       this.value = '';
    > >     }
    > >     if(this.name == 'fake_pass') {
    > >       $('.header_login_right_fake').hide();
    > >       $('.header_login_right_real').show();
    > >     }
    > >   });
    >
    > >   $('.login_input').blur(function() {
    > >     if(this.value == '') {
    > >       this.value = this.defaultValue;
    > >       if(this.name == 'pass') {
    > >         $('.header_login_right_real').hide();
    > >         $('.header_login_right_fake').show();
    > >         $('html').focus();
    > >       }
    > >     }
    > >   });
    >
    > > However, the newly displayed password box is not in focus and the user
    > > has to click again to start typing their password.  So, in an attempt
    > > to correct this problem I added '$('.login_input').focus();'. This
    > > works and focus is added to the password input but it now breaks the
    > > recall of the default text.  Now when a user clicks away from the box
    > > and calls the onblur() function the default text is not displayed.
    > > Here is all my code plus the HMTL:
    >
    > > --
    > > $('.login_input').click(function() {
    > >     if(this.value == this.defaultValue) {
    > >       this.value = '';
    > >     }
    > >     if(this.name == 'fake_pass') {
    > >       $('.header_login_right_fake').hide();
    > >       $('.header_login_right_real').show();
    > >       $('.login_input').focus();
    > >     }
    > >   });
    >
    > >   $('.login_input').blur(function() {
    > >     if(this.value == '') {
    > >       this.value = this.defaultValue;
    > >       if(this.name == 'pass') {
    > >         $('.header_login_right_real').hide();
    > >         $('.header_login_right_fake').show();
    > >         $('html').focus();
    > >       }
    > >     }
    > >   });
    > > --
    > > 
    > >   
    > > 
    > > 
    > >   
    > > 
    > > 
    > >   
    > >  
    > > --
    >
    > > Can anybody see where I'm going wrong or how I could improve these
    > > functions generally?  I'm very new to jQuery so please feel free to
    > > talk down to me!  Thanks in advance for any help.
    >
    > > Rob.
    
    

    [jQuery] Select a line inside a tag

    2009-01-01 Thread Daniel
    
    Hi,
    i'm working on some bookmarklets / greasemonke scripts to
    change some functionality in some websites.
    
    i got some code like this
    
    
    line 1 - aa
    line 2 - bb
    line 3 - cc
    
    
    and i need to select all lines that contains "aa" and "cc"
    
    does anybody have an idea how to do this?
    
    

    [jQuery] Re: ajaxStart don't work for ajax/load?

    2008-12-29 Thread Daniel
    
    yes it should. Do you have a test page ?
    
    Cheers,
    Daniel
    
    On Dec 29, 8:47 pm, hcvitto  wrote:
    > hi daniel
    > thanks for the replay..
    > yes, it's initial state is hidden..As far as you know, should the
    > ajaxStart/ajaxStop functions work with the "load" function too?
    >
    > On 29 Dic, 12:49, Daniel  wrote:
    >
    > > I dont think there is a problem with your javascript code.
    >
    > > Did you try to set #load initial style to display:none ?
    >
    > > Cheers,
    > > Daniel
    >
    > > On Dec 29, 5:33 pm, hcvitto  wrote:
    >
    > > > come on..give me a christmas present  ;)
    >
    > > > On 23 Dic, 09:51, hcvitto  wrote:
    >
    > > > > i'm still here :) ...?
    
    

    [jQuery] Re: corner plugin ie7 bug

    2008-12-29 Thread Daniel
    
    The page isnt loading correctly for me
    
    On Dec 29, 4:44 pm, hcvitto  wrote:
    > http://www.tasker.it/img/demo/
    >
    > hi
    > sorry for the long delay..i moved everything here
    >
    > http://www.tasker.it/img/demo/
    >
    > would you check now whether you can see it?
    >
    > On 23 Dic, 16:58, Mike Alsup  wrote:
    >
    > > > mmh..that's weird..i can see it right..
    >
    > > All of the scripts and stylesheets on that page return "403 Forbidden".
    
    

    [jQuery] Re: ajaxStart don't work for ajax/load?

    2008-12-29 Thread Daniel
    
    I dont think there is a problem with your javascript code.
    
    Did you try to set #load initial style to display:none ?
    
    Cheers,
    Daniel
    
    On Dec 29, 5:33 pm, hcvitto  wrote:
    > come on..give me a christmas present  ;)
    >
    > On 23 Dic, 09:51, hcvitto  wrote:
    >
    > > i'm still here :) ...?
    
    

    [jQuery] Re: .ajaxSend fires six times

    2008-12-27 Thread Daniel
    
    should be $(document).ajaxSend(function(){...})
    
    Cheers,
    Daniel.
    
    On Dec 28, 3:14 am, "Lay András"  wrote:
    > Hello!
    >
    > On Sat, Dec 27, 2008 at 8:27 PM, Michael Geary  wrote:
    > > Well, that's odd that it didn't work. Try a single element by ID then:
    >
    > > $('#someExistingID').ajaxSend(...);
    >
    > Trying, don't works. Here's my test page:
    >
    > http://bogex.hu/jquerytest.php
    
    

    [jQuery] Re: Wildcard selector AND pass the selector to a sub-function?

    2008-12-13 Thread Daniel L
    
    CSS 3 selectors seem to be my solution:
    
    $('inp...@id^="foo"]...@id$="bar"]').change(function(){
    alert(this.id);
    }
    
    This will be attached to all input fields that have an ID starting
    with 'foo' and ending with 'bar' (e.g. 'foo123bar', 'foobar',
    'foo456bar').
    
    Then within the function I can pass through the actual ID with
    'this.id'.
    
    Cheers.
    
    
    
    
    On Dec 14, 1:44 pm, "Dan Switzer"  wrote:
    > The easiest way to do this would be to give each div a specific class:
    >
    > 
    > 
    > 
    > 
    >
    > Now you could just do:
    >
    > $("div.foo").change();
    >
    > I like this method, since usually this divs have related visuals, so
    > you may already have a constant class defined for the elements.
    >
    > An alternative would be to do something like:
    >
    > $("div[id^=mydiv]").change();
    >
    > This would find all divs with an ID that starts "mydiv". The
    > performance on the class method may be more efficient though.
    >
    > -Dan
    >
    > On Sat, Dec 13, 2008 at 8:30 PM, Daniel L  wrote:
    >
    > > Hi, I have a situation where the same javascript is repeated about 50
    > > times - just with a differnt ID. Example:
    >
    > > $('#mydiv1').change(function() {
    > >   doStuff('#mydiv1');
    > > });
    > > $('#mydiv2').change(function() {
    > >   doStuff('#mydiv2');
    > > });
    > > ...
    > > $('#mydiv50').change(function() {
    > >   doStuff('#mydiv50');
    > > });
    >
    > > Is there a way to combine all these calls using wildcards?? I imagine
    > > it would be something like:
    >
    > > $('#mydiv<* as foo>').change(function() {
    > >   doStuff('#mydiv');
    > > });
    >
    > > Any help would be greatly appreciated.
    
    

    [jQuery] Wildcard selector AND pass the selector to a sub-function?

    2008-12-13 Thread Daniel L
    
    Hi, I have a situation where the same javascript is repeated about 50
    times - just with a differnt ID. Example:
    
    $('#mydiv1').change(function() {
       doStuff('#mydiv1');
    });
    $('#mydiv2').change(function() {
       doStuff('#mydiv2');
    });
    ...
    $('#mydiv50').change(function() {
       doStuff('#mydiv50');
    });
    
    
    Is there a way to combine all these calls using wildcards?? I imagine
    it would be something like:
    
    $('#mydiv<* as foo>').change(function() {
       doStuff('#mydiv');
    });
    
    Any help would be greatly appreciated.
    
    

    [jQuery] jqmodal and ui datepicker problem

    2008-11-25 Thread Daniel
    
    Hi
    
    I have a problem with jqmodal and ui datepicker.
    
    Often datepicker just  doesn't appear when I initiate in in a jqmodal
    window. Funnywise there isn't any warning or error in firebug.
    
    than I have to clean cache in Firefox and datepicker appears again
    during next load of modal window - even it appears slow and somehow
    crankier than without modal windows.
    
    I tried many things and spent quite some time on it, but I doesn't get
    stable. Any ideas...
    
    my code:.
    
    //jqmodal
    $('#mw1').jqm({ajax: 'offer.cfm?at=1&oid=#myOfferID#', ajaxText:
    'Loading..',trigger: 'a.ad_text_trigger'});
    
    //datepicker
    
    
    
    
    $().ready(function() {
    $('#frm input#valid_from').datepicker($.extend({},
    
    $.datepicker.regional['de'], {
    
     dateFormat: 'm.d.yy',
    
     duration: "fast",
    
     showOn: 'both',
    
     buttonImage:cal.gif',
    
     buttonImageOnly: true
    
     }));
    $('#frm input#valid_to').datepicker($.extend({},
    
    $.datepicker.regional['de'], {
    
     dateFormat: 'm.d.yy',
    
     duration: "fast",
    
     showOn: 'both',
    
     buttonImage:cal.gif',
        
     buttonImageOnly: true
    
     }));
    
    });
    
    Daniel
    
    

    [jQuery] Re: why is the "click" event different in elements?

    2008-11-23 Thread Daniel
    
    Tested your code. It worked in both Firefox 3 and IE7.
    
    On Nov 23, 8:10 pm, Lorenzo Gil Sanchez
    <[EMAIL PROTECTED]> wrote:
    > Imagine this code:
    >
    > $("a").click(function () { alert("hello world"); return false; });
    >
    > $("button").click(function () { $("a").click(); });
    >
    > I would expect that clicking on the button would trigger the click
    > event on the links element, but it is not the case because of the
    > following code in jQuery:
    >
    >                         // Handle triggering native .onfoo handlers (and on 
    > links since we
    > don't call .click() for links)
    >                         if ( (!fn || (jQuery.nodeName(elem, 'a') && type == 
    > "click")) &&
    > elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
    >                                 val = false;
    >
    >                         // some code in between these blocks
    >
    >                         // Trigger the native events (except for clicks on 
    > links)
    >                         if ( fn && donative !== false && val !== false && 
    > !(jQuery.nodeName
    > (elem, 'a') && type == "click") ) {
    >                                 this.triggered = true;
    >                                 try {
    >                                         elem[ type ]();
    >                                 // prevent IE from throwing an error for some 
    > hidden elements
    >                                 } catch (e) {}
    >                         }
    >
    > It is around line 2019 in jquery-1.2.6.js (the trigger function).
    >
    > So my question is: why jQuery makes an exception with the 
    > elements? At least it should mention this in the docs. I spent quite
    > some time until I found this.
    >
    > Best regards
    
    

    [jQuery] Re: adding different class for only 1 error element?

    2008-11-23 Thread Daniel
    
    Hi AxIF,
    
    you can use the errorPlacement:
    
    errorPlacement: function(error, element) {
     if(element.attr("id") == 'cname'){ // match your
    element's id
       error.addClass("invalid"); // add invalid class
       error.appendTo(element.parent()); // this line will
    change depends on your form layout
       }else{
      error.appendTo(element.parent()); // this line will
    change depends on your form layout
       }
     }
    
    Daniel.
    
    On Nov 24, 12:40 am, Cronet <[EMAIL PROTECTED]> wrote:
    > Hi,
    >
    > i would like adding all errors the call .inlineError ... Simply done
    > with
    >
    >         $("#UserAddForm").validate({
    >                         errorClass: "inlineError"
    >                   }
    >         });
    >
    > Is it possible adding to one Element the class .error, all
    > others .inlineError ?
    >
    > Regards,
    > AxlF
    
    

    [jQuery] Re: jQuery date picker - how to disable all Sunday

    2008-11-23 Thread Daniel
    
    Hi plee,
    
    to disable all Sunday:
    
    javascript:
      $('#noSunday').datepicker({
    beforeShowDay: noSunday,
    showOn: "both",
    buttonImage: "templates/images/calendar.gif",
    buttonImageOnly: true
      });
    
      function noSunday(date){
      var day = date.getDay();
      return [(day > 0), ''];
      };
    
    To disable any Saturday and Sunday , I assumed that you want to
    disable all Saturday and Sunday , in this case , you can use the built-
    in noWeekends option:
    
    $(".selector").datepicker({ beforeShowDay: $.datepicker.noWeekends })
    
    
    On Nov 23, 11:59 pm, plee <[EMAIL PROTECTED]> wrote:
    > Hello
    >
    > Thank you for the jQuery date picker.
    >
    > Is there a way to disable all Sunday or any Saturday and Sunday?
    >
    > Thank you for everyone who has contributed.
    >
    > Best regards
    
    

    [jQuery] Re: Simple Validate if empty

    2008-11-22 Thread Daniel
    
    if($('#term').val() == ""){
      alert("empty");
      //do something
    }else{
      alert($('#term').val());
      //do something
    }
    
    On Nov 22, 3:32 am, coughlinsmyalias <[EMAIL PROTECTED]> wrote:
    > Hey,
    >
    > I have been trying to look for a simple way to validate one field, if
    > its empty then do X, how would I check? I have this:
    >
    > term = $('#term').attr('value');
    >
    > Would I check if term is empty? Then don't allow the submit, my code
    > is here:http://pastie.org/320870
    >
    > Any thoughts?
    >
    > Thanks,
    >
    > Ryan
    
    

    [jQuery] Re: can you perhaps tell why this page doesnt show in firefox?

    2008-11-22 Thread Daniel
    
    my firefox display it normally.
    
    Can you indicate which part is not displayed correctly in firefox ?
    
    Daniel.
    
    On Nov 22, 5:46 am, Rene Veerman <[EMAIL PROTECTED]> wrote:
    > This page displays fine in IE, opera and safari.
    > But not in firefox :(
    >
    > http://tevlar.net/mytevlar/
    >
    > any clues greatly appreciated..
    >
    > --
    > --
    > Rene Veerman, creator of web2.5 CMShttp://mediabeez.ws/
    
    

    [jQuery] Re: ajaxsubmit with autosave feature

    2008-11-19 Thread Daniel
    
    I have just checked your new solution with setTimeout. It should
    produce similar result if you change the ajaxForm to ajaxSubmit.
    
    Daniel.
    
    On Nov 20, 4:10 am, anny <[EMAIL PROTECTED]> wrote:
    > Daniel,
    >
    > Thank you for the reponse.
    >
    > I tried this , but does not work. Firfox hangs at everyTime
    > (1000,.  Do i need to unclude any jquery files?
    > right now i have only 3 files, form.js and jquery.js , timers.js
    >
    > $(document).ready(function(){
    >                         $('#form').everyTime(1000, function(){
    >                                $("#form").ajaxForm(function() {
    >                                      alert("data has been saved!");
    >                                  });
    >                         });
    >
    > });
    >
    > I also tried this, but form is not submitted. I see that save()
    > function is called and   does show alert("end of save"); but form is
    > not submitted.
    >
    > 
    >         // wait for the DOM to be loaded
    >       $(document).ready(function() {
    >              startsave();
    >        });
    >
    >         function startsave()
    >         {
    >          var  timeout = setTimeout( "save()", 1 );
    >         }
    >
    >         function save(){
    >              $('#form').ajaxForm(function() {
    >                  alert("data has been saved!");
    >                   startsave();
    >              });
    >      alert("end of save");
    >        }
    >
    > 
    >
    > Any help will be appreciated.
    > Thanks,
    > Anny
    >
    > On Nov 19, 4:05 am, Daniel <[EMAIL PROTECTED]> wrote:
    >
    > > Hi ,
    >
    > > you can try jQuery Timers.http://jquery.offput.ca/every/
    >
    > > I have done a sample:
    >
    > > javascript;
    > > $(document).ready(function(){
    > >                         $('#formLoad').everyTime(1000, function(i){
    > >                                 $('input[name=q]').val(i);
    > >                                 
    > > $('#south').load("select.php?q="+$("input[name=q]").val());
    > >                         });
    >
    > > });
    >
    > > html:
    > > 
    > >            
    > >            
    > > 
    > >  Load content into this div
    >
    > > Daniel.
    >
    > > On Nov 19, 5:53 am, anny <[EMAIL PROTECTED]> wrote:
    >
    > > > Hi ,
    >
    > > > I tried ajaxsubmit which works fine. I need to submit the entire form
    > > > by POST automatically for every 60 seconds.
    >
    > > > What is the best way to do it?
    >
    > > > How do i use ajaxsubmit  to submit form automatically for every 60
    > > > seconds.
    >
    > > > I did search & do see there are auto save plug-in... but not sure
    > > > which one to use.
    > > > Prefer ajaxsubmit  with autosave feature. Please help.
    >
    > > > Thanks in advance. Any help will be appreciated.
    > > > Anny- Hide quoted text -
    >
    > > - Show quoted text -
    
    

    [jQuery] Re: ajaxsubmit with autosave feature

    2008-11-19 Thread Daniel
    
    You should change ajaxForm to ajaxSubmit as ajaxForm doesnt submit the
    Form for you. It will just prepare the Form and submit it when you
    press Submit I think. You can refer to the documentation for more
    information.
    
    $(document).ready(function(){
    
    $('#formLoad').everyTime(1, function(i){
    $(this).ajaxSubmit(function(responseText){
    alert("The form has been saved 
    " + responseText);
    }
    );
    });
        });
    
    Daniel.
    
    
    On Nov 20, 4:10 am, anny <[EMAIL PROTECTED]> wrote:
    > Daniel,
    >
    > Thank you for the reponse.
    >
    > I tried this , but does not work. Firfox hangs at everyTime
    > (1000,.  Do i need to unclude any jquery files?
    > right now i have only 3 files, form.js and jquery.js , timers.js
    >
    > $(document).ready(function(){
    >                         $('#form').everyTime(1000, function(){
    >                                $("#form").ajaxForm(function() {
    >                                      alert("data has been saved!");
    >                                  });
    >                         });
    >
    > });
    >
    > I also tried this, but form is not submitted. I see that save()
    > function is called and   does show alert("end of save"); but form is
    > not submitted.
    >
    > 
    >         // wait for the DOM to be loaded
    >       $(document).ready(function() {
    >              startsave();
    >        });
    >
    >         function startsave()
    >         {
    >          var  timeout = setTimeout( "save()", 1 );
    >         }
    >
    >         function save(){
    >              $('#form').ajaxForm(function() {
    >                  alert("data has been saved!");
    >                   startsave();
    >              });
    >      alert("end of save");
    >        }
    >
    > 
    >
    > Any help will be appreciated.
    > Thanks,
    > Anny
    >
    > On Nov 19, 4:05 am, Daniel <[EMAIL PROTECTED]> wrote:
    >
    > > Hi ,
    >
    > > you can try jQuery Timers.http://jquery.offput.ca/every/
    >
    > > I have done a sample:
    >
    > > javascript;
    > > $(document).ready(function(){
    > >                         $('#formLoad').everyTime(1000, function(i){
    > >                                 $('input[name=q]').val(i);
    > >                                 
    > > $('#south').load("select.php?q="+$("input[name=q]").val());
    > >                         });
    >
    > > });
    >
    > > html:
    > > 
    > >            
    > >            
    > > 
    > >  Load content into this div
    >
    > > Daniel.
    >
    > > On Nov 19, 5:53 am, anny <[EMAIL PROTECTED]> wrote:
    >
    > > > Hi ,
    >
    > > > I tried ajaxsubmit which works fine. I need to submit the entire form
    > > > by POST automatically for every 60 seconds.
    >
    > > > What is the best way to do it?
    >
    > > > How do i use ajaxsubmit  to submit form automatically for every 60
    > > > seconds.
    >
    > > > I did search & do see there are auto save plug-in... but not sure
    > > > which one to use.
    > > > Prefer ajaxsubmit  with autosave feature. Please help.
    >
    > > > Thanks in advance. Any help will be appreciated.
    > > > Anny- Hide quoted text -
    >
    > > - Show quoted text -
    
    

    [jQuery] Re: ajaxsubmit with autosave feature

    2008-11-19 Thread Daniel
    
    Hi ,
    
    you can try jQuery Timers. http://jquery.offput.ca/every/
    
    I have done a sample:
    
    javascript;
    $(document).ready(function(){
    $('#formLoad').everyTime(1000, function(i){
    $('input[name=q]').val(i);
    
    $('#south').load("select.php?q="+$("input[name=q]").val());
    });
    });
    
    html:
    
       
       
    
     Load content into this div
    
    Daniel.
    
    On Nov 19, 5:53 am, anny <[EMAIL PROTECTED]> wrote:
    > Hi ,
    >
    > I tried ajaxsubmit which works fine. I need to submit the entire form
    > by POST automatically for every 60 seconds.
    >
    > What is the best way to do it?
    >
    > How do i use ajaxsubmit  to submit form automatically for every 60
    > seconds.
    >
    > I did search & do see there are auto save plug-in... but not sure
    > which one to use.
    > Prefer ajaxsubmit  with autosave feature. Please help.
    >
    > Thanks in advance. Any help will be appreciated.
    > Anny
    
    

    [jQuery] Re: not a standard .attr task - needs a filter

    2008-11-18 Thread daniel
    
    Thanks for replying - as it turned out, in trying to go with what was
    suggested I realised I was doing it all wrong! It's my fault for not
    including the whole snippet I was working with (was trying to snip so
    I didn't confuse the issue) and I would have normally worked it out if
    it wasn't for the lack of sleep I have right now. Just so you know, I
    realized I needed to quantify the type of link when selecting it:
    
    $("div a[href^=#]").click(function() {
    var link = $(this).attr("href");
    
    
    Thanks for attempting to make sense of my nonsense :)
    
    

    [jQuery] not a standard .attr task - needs a filter

    2008-11-18 Thread daniel
    
    Maybe it's the really late night I had but I can't figure this one
    out. First the html:
    
    
    Internal Link
    http://external.com";>External Link
    Internal Link2
    
    
    in order to do something on the page instead of going to the link I
    need to filter it based on if it contains a # at the start. It's the
    perfect problem for the [attribute^=value] solution but this doesn't
    work...
    
    var link = $(this[href^=#]).val();
    
    I just know it's an issue with how to put this and the attribute
    qualifier together... and I don't know what to put afterwards .val()?!
    I've also tried:
    var link = $(this).attr("[href^=#]");
    
    thanks
    
    

    [jQuery] Re: Executing Dynamic Javascript

    2008-11-18 Thread Daniel
    
    You can try jQuery.getScript(url, callback)
    
    http://docs.jquery.com/Ajax/jQuery.getScript#urlcallback
    
    
    On Nov 19, 4:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
    > I have an issue that I initially thought was a jQuery problem, but
    > after simplifying things in preparation for posting my question, I see
    > that it's a fundamental javascript matter.
    > I don't understand why this works:http://pastebin.com/m3a767745
    > but this doesn't:http://pastebin.com/m346451b4
    > Note that the "external.js" file is just a single alert statement.
    >
    > What I'm trying to do (with javascript) is create a 

    [jQuery] Re: Ajax call with a Form button

    2008-11-18 Thread Daniel
    
    Did you try to use the submit event ?
    
    For example:
    
    Javascript:
    $(document).ready(function(){
    $('#formLoad').submit(function(){
    $('#south').html("Loading ...").load("test.html");
    return false;
    });
    
    });
    
    HTML:
    
       
       
    
     Load content into this div
    
    On Nov 19, 3:44 am, Shannon <[EMAIL PROTECTED]> wrote:
    > No one has had to do this?
    >
    > On Nov 18, 9:26 am, Shannon <[EMAIL PROTECTED]> wrote:
    >
    > > I take it back, the value comes back as UNDEFINED...
    >
    > > Any advice?
    >
    > > On Nov 18, 9:17 am, Shannon <[EMAIL PROTECTED]> wrote:
    >
    > > > Nevermind, I got it.
    >
    > > > On Nov 18, 9:14 am, Shannon <[EMAIL PROTECTED]> wrote:
    >
    > > > > Hi everyone,
    >
    > > > > I am attempting to fetch a page via ajax when a person submits a form
    > > > > button.
    >
    > > > > JAVASCRIPT:
    > > > > function sEngFam(str)
    > > > > {
    > > > >   $('#south').html('Loading data, please wait...').load("select3.php?
    > > > > q="+str);
    >
    > > > > }
    >
    > > > > HTML:
    > > > > 
    > > > >    
    > > > >     > > > value="submit"/>
    > > > > 
    >
    > > > > When I click the button I see the "Loading data, please wait..." but
    > > > > the page then goes white. There is even static content from the
    > > > > select3.php page that isn't showing up.
    >
    > > > > Any suggestions?
    
    

    [jQuery] Re: Validate. Can I validate using 2 values?

    2008-11-18 Thread Daniel
    
    For my case , I get the user value from the field and add it as a
    parameter into the remote's url . Sth like this : /
    checkpass&user=userid
    
    Daniel.
    
    On Nov 17, 5:07 am, shapper <[EMAIL PROTECTED]> wrote:
    > In this case I have only the validate request for the password field
    > that also sends the username for the test ...
    >
    > But if I would have various requests, from validate or others,
    > shouldn't I add the username only to the password validate request?
    >
    > Is this possible?
    >
    > Thanks,
    > Miguel
    >
    > On Nov 16, 6:45 pm, "Jörn Zaefferer" <[EMAIL PROTECTED]>
    > wrote:
    >
    > > This would add the username to all requests:
    >
    > > $().ajaxSend(function(event, XMLHttpRequest, ajaxOptions) {
    > >   ajaxOptions.data.username = $("#username").val();
    >
    > > });
    >
    > > Jörn
    >
    > > On Sun, Nov 16, 2008 at 7:18 PM, shapper <[EMAIL PROTECTED]> wrote:
    >
    > > > Sorry, is there any example using validate for this?
    >
    > > > To be honest I am completely lost on how to do this ...
    >
    > > > Thank You,
    > > > Miguel
    >
    > > > On Nov 16, 10:39 am, "Jörn Zaefferer" <[EMAIL PROTECTED]>
    > > > wrote:
    > > >> I mean
    >
    > > >> $().ajaxSend(function() {
    >
    > > >> });
    >
    > > >> Jörn
    >
    > > >> On Sun, Nov 16, 2008 at 1:24 AM, shapper <[EMAIL PROTECTED]> wrote:
    >
    > > >> > Hi Jorn,
    >
    > > >> > You mean using:
    >
    > > >> >  $.ajax({
    > > >> >   beforeSend: function(){
    > > >> >   }
    > > >> >  });
    >
    > > >> > And in before send get the value of the text box and add it to the
    > > >> > ajax validate request of the validate?
    >
    > > >> > But how can I link it to the Validate email validation?
    >
    > > >> > Thanks,
    > > >> > Miguel
    >
    > > >> > On Nov 15, 2:21 pm, Alexsandro_xpt <[EMAIL PROTECTED]> wrote:
    > > >> >> And about form submit before to validate e-mail field?
    >
    > > >> >> Do you know something about that?
    >
    > > >> >> Thanks
    > > >> >> Alexsandro
    >
    > > >> >> On 13 nov, 14:00, "Jörn Zaefferer" <[EMAIL PROTECTED]>
    > > >> >> wrote:
    >
    > > >> >> > The plugin doesn't support that. As a workaround, you can use 
    > > >> >> > jQuery's
    > > >> >> > ajaxSend callback to add additional data to the 
    > > >> >> > request:http://docs.jquery.com/Ajax/ajaxSend#callback
    >
    > > >> >> > Jörn
    >
    > > >> >> > On Thu, Nov 13, 2008 at 3:35 PM, shapper <[EMAIL PROTECTED]> wrote:
    >
    > > >> >> > > Hello,
    >
    > > >> >> > > I am using the following to validate an email field:
    >
    > > >> >> > > Email: { email: true, remote: "/Account/FindEmail", required: 
    > > >> >> > > true }
    >
    > > >> >> > > I am checking if there is already an account with that email.
    >
    > > >> >> > > In my form I also have an input where the user inserts its 
    > > >> >> > > username.
    > > >> >> > > When validating the email I need to send also the Username an not 
    > > >> >> > > only
    > > >> >> > > the email.
    >
    > > >> >> > > Can I do this?
    >
    > > >> >> > > Thanks,
    > > >> >> > > Miguel
    
    

    [jQuery] Re: Update div works in IE but not in FF?

    2008-11-18 Thread Daniel
    
    I did have the same problem as yours. In my case , the old content was
    displayed for a few seconds, then the new content appeared.
    
    Did you take the code from Nettus tutorial. I think you may want to
    try the new version of the code . The link is in the comments. I
    haven't tried it yet so cant give you any example.
    
    I suggest you to use the BlockUI plugin , so instead of just display
    the Loading div , it blocks your interaction with the page until the
    content is fully loaded. You can find it here http://malsup.com/jquery/block/
    
    Daniel.
    
    On Nov 18, 6:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
    wrote:
    > Hi all, i wanted to update a div, depending on a click in my menu.
    > I get both alert test-messages in both browserswith the right text,
    > but AFTER the second alert in Firefox it goes wrong.
    > The original content dissapears, but Instead of placing the new
    > content, inside my content div,
    > the original content shows up again??
    >
    > Usually things goes well in Firefox en IE gives the problem, but now
    > its Firefox which gives me a headache..
    >
    > Please, can someone give me a clue, cause i have tried for hours now,
    > without any result.
    > Thanks in advance for your time
    >
    > Here is the code:
    >
    > $(document).ready(function() {
    >
    >     $('#nav1 li a').click(function(){
    >                 // test alert
    >                 alert("clicked on nav1..");
    >
    >     var toLoad = $(this).attr('href');
    >                 // test alert
    >                 alert("content to load: " + toLoad);
    >     $('#content').hide('normal',loadContent);
    >     $('#load').remove();
    >     $('#wrapper').append('LOADING...');
    >     $('#load').fadeIn('normal');
    >     function loadContent() {
    >         $('#content').load(toLoad,'',showNewContent())
    >     }
    >     function showNewContent() {
    >         $('#content').show('normal',hideLoader());
    >     }
    >     function hideLoader() {
    >         $('#load').fadeOut('normal');
    >     }
    >     return false;
    >
    >     });
    >
    > });
    
    

    [jQuery] Re: would compressing & merging multiple jquery & plugin's violate any license?

    2008-11-10 Thread Daniel Freiman
    http://docs.jquery.com/Licensing
    
    Jquery is released under the MIT license.  In other words, do what ever you
    want.
    
    - Daniel Freiman
    
    Required disclaimer: I am not a lawyer.
    
    On Mon, Nov 10, 2008 at 5:55 PM, henry <[EMAIL PROTECTED]> wrote:
    
    >
    > would compressing & merging multiple jquery & plugin's into 1 JS file
    > violate any license?
    >
    
    

    [jQuery] Re: would compressing & merging multiple jquery & plugin's violate any license?

    2008-11-10 Thread Daniel Freiman
    Actually, it may depend on the license of the plugin, but from jquery's side
    you're fine.
    
    On Mon, Nov 10, 2008 at 10:18 PM, Daniel Freiman <[EMAIL PROTECTED]>wrote:
    
    > http://docs.jquery.com/Licensing
    >
    > Jquery is released under the MIT license.  In other words, do what ever you
    > want.
    >
    > - Daniel Freiman
    >
    > Required disclaimer: I am not a lawyer.
    >
    > On Mon, Nov 10, 2008 at 5:55 PM, henry <[EMAIL PROTECTED]> wrote:
    >
    >>
    >> would compressing & merging multiple jquery & plugin's into 1 JS file
    >> violate any license?
    >>
    >
    >
    
    

    [jQuery] jQuery Validate and Show/Hide problems

    2008-11-05 Thread Daniel
    
    I am using jQuery show/hide functions on click, so when you click on
    the contact link it hides that div and then shows a contact form. Once
    you fill in the contact form and click submit it shows the thanks page
    div.
    
    I am using validation from here: 
    http://bassistance.de/jquery-plugins/jquery-plugin-validation/
    
    The problem is, is that I need it so when you click on submit on the
    contact form page it doesn't show and hide the div if the validation
    has failed as it does now.
    
    Is there anyway of making it so that I can only click the submit
    button or show hide the divs if validation is passed?
    
    Thanks
    
    

    [jQuery] jQuery Show/Hide validation problem

    2008-11-05 Thread Daniel
    
    I am using jQuery show/hide functions on click, so when you click on
    the contact link it hides that div and then shows a contact form. Once
    you fill in the contact form and click submit it shows the thanks page
    div.
    
    I am using validation from here: 
    http://bassistance.de/jquery-plugins/jquery-plugin-validation/
    
    The problem is, is that I need it so when you click on submit on the
    contact form page it doesn't show and hide the div if the validation
    has failed as it does now.
    
    Is there anyway of making it so that I can only click the submit
    button or show hide the divs if validation is passed?
    
    Thanks
    
    

    [jQuery] Re: Tabs ui links

    2008-09-10 Thread Daniel Beard
    
    Hi again,
    
    Just one thing. I noticed that this only works the first time you
    click a link. Any subsequent links open to a new page instead of the
    tab. It was quite easy to fix with livequery though, giving the
    following code:
    
      $(document).ready(function(){
    $('#example > ul').tabs({
    load: function(e, ui) {
    $('a', ui.panel).livequery("click",function() {
    $(ui.panel).load(this.href);
    return false;
    });
    }
    });
       });
    
    ...I hope this is useful for someone!
    
    Cheers,
    
    Daniel
    
    
    On 8 sep, 14:38, Klaus Hartl <[EMAIL PROTECTED]> wrote:
    > No problem - that happens quite a lot. I've no problem with being
    > mistaken with Karl, the jQuery Karl, hehe ;-)
    >
    > --Klaus
    >
    > On Sep 8, 1:20 pm,DanielBeard<[EMAIL PROTECTED]> wrote:
    >
    > > Sorry, I meant Klaus!
    >
    > > I get called David a lot
    >
    > >Daniel
    >
    > > On 7 sep, 11:22, Klaus Hartl <[EMAIL PROTECTED]> wrote:
    >
    > > > You need to ajaxify those links after the content has been loaded:
    >
    > > > $(function() {
    > > > $('#example').tabs({
    > > > load: function(e, ui) {
    > > > $('a', ui.panel).click(function() {
    > > > $(ui.panel).load(this.href);
    > > > return false;
    > > > });
    > > > }
    > > > });
    >
    > > > });
    >
    > > > --Klaus
    >
    > > > On Sep 1, 12:52 pm,DanielBeard<[EMAIL PROTECTED]> wrote:
    >
    > > > > Hi everyone,
    >
    > > > > I am using jQuery UItabsversion 3.0. I am calling thetabscontent
    > > > > via Ajax, but the links inside thetabsdon't open inside thetabs,
    > > > > instead they load into a new page. Is there any way to make my links
    > > > > load via Ajax into the current tab?
    >
    > > > > Thanks,
    >
    > > > >Daniel
    
    

    Re: schema replication 2.4

    2008-09-09 Thread Daniel Paufler
    Hell Again
    
    Unfortunately, i still have a problem to replicate my schema with
    openldap 2.4.
    
    I found one thread in the archives [1], but it did not help me much.
    
    Can anyone give me some hints how to replicate my masster schema to the
    slave, but still be able to change e.g. LogLevel on my slave?
    
    Regards
    
    Daniel
    
    [1]http://www.openldap.org/lists/openldap-software/200702/msg00100.html
    
    Daniel Paufler wrote:
    > ...
    > Now, my whole LDAP dc=tree is aviable on the slave. If i now insert
    > syncrepl for cn=schema,cn=config
    > 
    > ldapadd -W -x -D "cn=admin,cn=config" -f init_slave_config.ldif
    > 
    > --
    > dn: olcDatabase={0}config,cn=config
    > changetype: modify
    > add: olcSyncrepl
    > olcSyncrepl: rid=002 provider=ldap://masterLDAP
    > binddn="cn=admin,cn=config" bindmethod=simple credentials=
    > searchbase="cn=schema,cn=config" type=refreshOnly interval=00:00:00:10
    > ---
    > 
    > When i now want to change the slave daemon loglevel by entering
    > olcLoglevel, i get an error 53: no update referral
    > 
    > summing up, when i insert schema replication, i can not change anythin
    > in cn=config on my slave - not only in cn=schema,cn=config.
    > 
    > Is that default behavior or do i miss something?
    
    
    

    [jQuery] Re: Tabs ui links

    2008-09-08 Thread Daniel Beard
    
    Sorry, I meant Klaus!
    
    I get called David a lot
    
    Daniel
    
    
    On 7 sep, 11:22, Klaus Hartl <[EMAIL PROTECTED]> wrote:
    > You need to ajaxify those links after the content has been loaded:
    >
    > $(function() {
    > $('#example').tabs({
    > load: function(e, ui) {
    > $('a', ui.panel).click(function() {
    > $(ui.panel).load(this.href);
    > return false;
    > });
    > }
    > });
    >
    > });
    >
    > --Klaus
    >
    > On Sep 1, 12:52 pm,DanielBeard<[EMAIL PROTECTED]> wrote:
    >
    > > Hi everyone,
    >
    > > I am using jQuery UItabsversion 3.0. I am calling thetabscontent
    > > via Ajax, but the links inside thetabsdon't open inside thetabs,
    > > instead they load into a new page. Is there any way to make my links
    > > load via Ajax into the current tab?
    >
    > > Thanks,
    >
    > >Daniel
    
    

    [jQuery] UI Datepicker change class on callback

    2008-09-08 Thread Daniel Beard
    
    Hi everyone,
    
    I am using the great UI Datepicker plugin to manage a property rental
    website. Using the "National days" technique, I am able to parse data
    from an XML file and show the days that the property is not available
    in red.
    
    So far so good, but I also need to allow the owners to change those
    days, for which I am using the callback function. I can send an AJAX
    GET to my server with the date selected as a parameter and my
    serverside script can make the change from available to non-available,
    but I also need to change the class of the current selection to red if
    it is non-available and vice-versa without loading the whole calendar
    again. How would this be done?
    
    Thanks,
    
    Daniel
    
    

    [jQuery] Re: Tabs ui links

    2008-09-08 Thread Daniel Beard
    
    Thank you very much Karl, that worked perfectly!
    
    Daniel
    
    On 7 sep, 11:22, Klaus Hartl <[EMAIL PROTECTED]> wrote:
    > You need to ajaxify those links after the content has been loaded:
    >
    > $(function() {
    > $('#example').tabs({
    > load: function(e, ui) {
    > $('a', ui.panel).click(function() {
    > $(ui.panel).load(this.href);
    > return false;
    > });
    > }
    > });
    >
    > });
    >
    > --Klaus
    >
    > On Sep 1, 12:52 pm,DanielBeard<[EMAIL PROTECTED]> wrote:
    >
    > > Hi everyone,
    >
    > > I am using jQuery UItabsversion 3.0. I am calling thetabscontent
    > > via Ajax, but the links inside thetabsdon't open inside thetabs,
    > > instead they load into a new page. Is there any way to make my links
    > > load via Ajax into the current tab?
    >
    > > Thanks,
    >
    > >Daniel
    
    

    [jQuery] Tabs ui links

    2008-09-01 Thread Daniel Beard
    
    Hi everyone,
    
    I am using jQuery UI tabs version 3.0. I am calling the tabs content
    via Ajax, but the links inside the tabs don't open inside the tabs,
    instead they load into a new page. Is there any way to make my links
    load via Ajax into the current tab?
    
    Thanks,
    
    Daniel
    
    

    [jQuery] jCarousel - Assigning a current class to external controls

    2008-07-04 Thread Daniel
    
    Hi Jan I have an example page set up at http://dsagency.eledesign.com/.
    
    I am using two different controls to run the carousel.
    
    1. The List of Articles above the carousel.
    2. The next and previous buttons.
    
    I would like to be able to set a class of current to the list of
    articles so that no matter which controls you use it will highlight in
    the list the current article you are on.
    
    Is this possible?
    
    Thanks in advance for your help.
    
    Dan
    
    

    [jQuery] Modify ID attribute

    2008-06-19 Thread Daniel A.
    
    Hi!, I'm new with jQuery, and I tried to modify the id attribute of a
    div without success. I need to do that because I want to change some
    CSS properties of that div, and I already have the code. So, how can I
    change something like this:
    
    
    
    into this:
    
    
    
    ?
    
    I've already tried with $("#header-blue").attr("id","header-yellow);
    without success. Any ideas?
    
    Thanks in advance.
    
    

    [jQuery] Modify ID attribute

    2008-06-19 Thread Daniel Amselem
    
    
    Hi!, I'm new with jQuery, and I tried to modify the id attribute of a div
    without success. I need to do that because I want to change some CSS
    properties of that div, and I already have the code. So, how can I change
    something like this:
    
    
    
    into this:
    
    
    
    ?
    
    I've already tried with $("#header-blue").attr("id","header-yellow); without
    success. Any ideas?
    
    Thanks in advance.
    -- 
    View this message in context: 
    http://www.nabble.com/Modify-ID-attribute-tp18010518s27240p18010518.html
    Sent from the jQuery General Discussion mailing list archive at Nabble.com.
    
    
    

    [jQuery] [treeview]

    2008-06-12 Thread Daniel
    
    Hi
    
    I've got some troubles with treeview:
    
    http://reunion-industrial.es/reiphp/productos.php
    
    First time it loads it Works perfectly, but when I click on one
    subsubsubfamily and the page reloads, it seems the treeview loads all
    the ítems at the same time. That is visible only a few ms but it makes
    the site ugly…
    Do you know how could I mend this???
    
    Thank you very much
    
    

    [jQuery] Re: jQuery + jCarousel data loading

    2008-06-11 Thread Daniel MacDonald
    
    You might want to try http://www.projectatomic.com/2008/04/
    jquery-flickr/">jQuery Flickr. No server side code necessary, and
    you can apply the Carousel function in a callback after all the Flickr
    result have been returned.
    
    On May 27, 7:27 am, Gary Homewood <[EMAIL PROTECTED]> wrote:
    > I am looking at the jCarousel dynamic examples and I'm a bit confused.
    > I'd like to load the carousel with a feed ofFlickrphotographs,
    > without having to use a server-side file. Is there a way I can use
    > $.getJSON directly?
    >
    > Thanks
    
    

    [jQuery] Re: Hiding after a certain amount of elements are shown?

    2008-06-03 Thread Daniel Murker
    
    Assuming that the divs are siblings and you want everything after the third 
    element hidden, you could probably try the following
    
    $(".divclass:nth-child(3)~.divclass").hide();
    
    -Original Message-
    From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of anthonyd
    Sent: Tuesday, June 03, 2008 4:47 PM
    To: jQuery (English)
    Subject: [jQuery] Hiding after a certain amount of elements are shown?
    
    
    Hello,
    $(".divclass:not(:first)").hide();
    Works perfectly in hiding everything after the first element with that
    class but I need to hide after the third or forth element with that
    class, any suggestions?
    Thanks, Ant.
    
    

    [jQuery] RE: jQuery and tinyMCE help

    2008-06-03 Thread Daniel Murker
    
    I've encountered this myself.  The issue is caused by the fact that the TinyMCE 
    plugin inserts other html elements into the textarea.  What you have to do is 
    change your selector to parse down the node tree from the parent textarea down 
    to the child element you're actually typing into.  Firebug's 'inspect' feature 
    should give you the node path you need for your selector.
    
    -Original Message-
    From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Priest, 
    James (NIH/NIEHS) [C]
    Sent: Wednesday, May 21, 2008 1:43 PM
    To: jquery-en@googlegroups.com
    Subject: [jQuery] jQuery and tinyMCE help
    
    
    I've got a form with several fields and I've added some real simple
    context help using jQuery with focus and blur.
    
    $("[EMAIL PROTECTED], textarea").focus(function() {
       $(this).next('.contexthelp').show();
    });
    
    But not one of the forms is using TinyMCE and I can't for the life of me
    figure out how to interact with it... I simply want my .contexthelp div
    to display when the user clicks anywhere in TinyMCE but so far
    everything I've tried has been unsuccessful.   I've trolled the archives
    but haven't found anything helpful.
    
    Any suggestions?
    
    Jim
    
    

    [jQuery] Re: Autocomplete - clearing the value possible.?

    2008-05-16 Thread Daniel Murker
    Never mind.  I was able to find where the results of the autocomplete were 
    being held and called the 'remove()' function on the proper element
    
    here's the change from the code I presented earlier
    
    
    $('#addToList').click(function(){
    
    var newItem = $("#searchBox").val();
    var temp = $("#listBox").val();
    if (newItem != ''){
    if(temp != ''){
    temp += "\n";
    }
    temp += newItem;
    $("#listBox").val(temp);
    $("#searchBox").val('');
    $(".ac_over").remove();   //remove the 
    previous autocomplete options from the dom.
    
    }
        });
    
    
    
    
    From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel 
    Murker
    Sent: Friday, May 16, 2008 3:32 PM
    To: jquery-en@googlegroups.com
    Subject: [jQuery] Autocomplete - clearing the value possible.?
    
    I have a form with 3 inputs in it.  these three inputs consist of a text field, 
    a button, and a textarea field.
    
    I utilize the jquery plugin found here:
    http://docs.jquery.com/Plugins/Autocomplete
    
    for the text field.
    
    
    Basically, what I do is have the button add the current value from the text 
    field to the text area, and have the enter key trigger a click on the button.
    
    However, after a successful selection from the autocomplete, the value passed 
    when enter is pressed is no longer the current text value, but rather whatever 
    the last auto-complete value was.
    
    flushCache doesn't seem to be working for this... (or maybe I'm using it wrong).
    
    STEPS TO SEE ISSUE USING CODE BELOW:
    
    1) type in 'munch'
    2) press enter
    3) type in letter 'o'
    4) press enter
    5) type in 'munch'
    6) press enter
    7) type in 'munch'
    8) click 'ADD TO LIST'
    
    
    expected output into textarea
    
    munch
    option1
    munch
    munch
    
    actual output into textarea
    
    munch
    option1
    option1
    munch
    
    Any ideas?
    
    
    SAMPLE CODE
    
    
    
    
    
    
    
    
    
    
    $().ready(function(){
    
    var acList = "option1 item2 durka3 wacky4 foo5 bar6".split(" ");
    
    $('#searchBox').autocomplete(acList);
    
    $('#addToList').click(function(){
    
    var newItem = $("#searchBox").val();
    var temp = $("#listBox").val();
    if (newItem != ''){
    if(temp != ''){
    temp += "\n";
    }
    temp += newItem;
    $("#listBox").val(temp);
    $("#searchBox").val('');
    }
    });
    
    $('#searchBox').keydown(function(e){
    
    if (e.which == 13 && $('#searchBox').val() != ''){
    $("#addToList").click();
    
    //return false to prevent form submission
    return false;
    }
    });
    
    });
    
    
    
    
    
    
    
    
    

    [jQuery] Autocomplete - clearing the value possible.?

    2008-05-16 Thread Daniel Murker
    I have a form with 3 inputs in it.  these three inputs consist of a text field, 
    a button, and a textarea field.
    
    I utilize the jquery plugin found here:
    http://docs.jquery.com/Plugins/Autocomplete
    
    for the text field.
    
    
    Basically, what I do is have the button add the current value from the text 
    field to the text area, and have the enter key trigger a click on the button.
    
    However, after a successful selection from the autocomplete, the value passed 
    when enter is pressed is no longer the current text value, but rather whatever 
    the last auto-complete value was.
    
    flushCache doesn't seem to be working for this... (or maybe I'm using it wrong).
    
    STEPS TO SEE ISSUE USING CODE BELOW:
    
    1) type in 'munch'
    2) press enter
    3) type in letter 'o'
    4) press enter
    5) type in 'munch'
    6) press enter
    7) type in 'munch'
    8) click 'ADD TO LIST'
    
    
    expected output into textarea
    
    munch
    option1
    munch
    munch
    
    actual output into textarea
    
    munch
    option1
    option1
    munch
    
    Any ideas?
    
    
    SAMPLE CODE
    
    
    
    
    
    
    
    
    
    
    $().ready(function(){
    
    var acList = "option1 item2 durka3 wacky4 foo5 bar6".split(" ");
    
    $('#searchBox').autocomplete(acList);
    
    $('#addToList').click(function(){
    
    var newItem = $("#searchBox").val();
    var temp = $("#listBox").val();
    if (newItem != ''){
    if(temp != ''){
    temp += "\n";
    }
    temp += newItem;
    $("#listBox").val(temp);
    $("#searchBox").val('');
    }
    });
    
    $('#searchBox').keydown(function(e){
    
    if (e.which == 13 && $('#searchBox').val() != ''){
    $("#addToList").click();
    
    //return false to prevent form submission
    return false;
    }
    });
    
    });
    
    
    
    
    
    
    
    
    

    [jQuery] Re: Tablesorter - Custom Sorts

    2008-05-14 Thread Daniel Eriksson
    I can't get your example to work.
    When I try to debug by adding this line:
    
     var r, v;
     console.log(node.attr("textExtraction"));
     try { v = node.attr("textExtraction"); }
    
    
    I get the error "node.attr is not a function".
    
    /Daniel
    
    
    On Tue, May 13, 2008 at 11:09 PM, Scott <[EMAIL PROTECTED]> wrote:
    
    >
    > I've been working with the Tablesorter plugin recently and had to do
    > something similar. You can make your own textExtraction function and
    > use it to extract an organize the data how you want. In your case I'd
    > probably do something where you parse out just the numbers, zero pad
    > them, concat together and return a parseInt on it. The biggest problem
    > I had was youc an only specify 1 textExtraction function to use so I
    > added an attribute to the table cells to specify the kind of data then
    > my textExtraction function decided what to do based on that.
    >
    > Example:
    > $.tablesorter.defaults.textExtraction = function (node)
    > {
    >var r, v;
    >try { v = node.attr("textExtraction"); }
    >catch(e) { v = "none"; }
    >switch (v)
    >{
    >case "specialdate":
    >//do your stuff and set it to v
    >break;
    >default:
    >v = node.innerHTML;
    >break;
    >}
    >return v;
    > };
    >
    >
    >
    >
    > On May 13, 1:16 pm, Seth - TA <[EMAIL PROTECTED]> wrote:
    > > [Tried posting this, but never saw it go through. Sorry if it
    > > duplicates]
    > >
    > > I am having a couple issues with how to sort a few of my fields.
    > >
    > > The first, and I think most difficult is I have a field which holds
    > > the value of "Empty" or lists state abbreviations. What I'd like it to
    > > do is have "Empty" be grouped together and then sort the state
    > > abbreviations in alpha. I tried the grades demo, but with no success.
    > >
    > > The second is I have an ID field which is constructed by the year and
    > > then a sequential number.
    > > Example - 2008 - 1, 2008 - 2, 2008 - 3, etc.
    > > The problem is that when sorted it sorts like this...
    > > 2008 - 90, 2008 - 9, 2008 - 89
    > >
    > > It does see the 9 as coming after 8 and before 10, but between 90 and
    > > 89. Help with either one is greatly appreciated.
    > >
    > > Seth
    >
    
    

    [jQuery] Re: Tablesorter - Custom Sorts

    2008-05-14 Thread Daniel Eriksson
    
    (I hope I didn't double post this)
    
    I can't get your example to work.
    
    When I try to debug by adding this line:
    
     var r, v;
     console.log(node.attr("textExtraction"));
     try { v = node.attr("textExtraction"); }
    
    
    I get the error "node.attr is not a function".
    
    On May 13, 11:09 pm, Scott <[EMAIL PROTECTED]> wrote:
    > I've been working with the Tablesorter plugin recently and had to do
    > something similar. You can make your own textExtraction function and
    > use it to extract an organize the data how you want. In your case I'd
    > probably do something where you parse out just the numbers, zero pad
    > them, concat together and return a parseInt on it. The biggest problem
    > I had was youc an only specify 1 textExtraction function to use so I
    > added an attribute to the table cells to specify the kind of data then
    > my textExtraction function decided what to do based on that.
    >
    > Example:
    > $.tablesorter.defaults.textExtraction = function (node)
    > {
    >         var r, v;
    >         try { v = node.attr("textExtraction"); }
    >         catch(e) { v = "none"; }
    >         switch (v)
    >         {
    >                 case "specialdate":
    >                         //do your stuff and set it to v
    >                         break;
    >                 default:
    >                         v = node.innerHTML;
    >                         break;
    >         }
    >         return v;
    >
    > };
    >
    > On May 13, 1:16 pm, Seth - TA <[EMAIL PROTECTED]> wrote:
    >
    > > [Tried posting this, but never saw it go through. Sorry if it
    > > duplicates]
    >
    > > I am having a couple issues with how to sort a few of my fields.
    >
    > > The first, and I think most difficult is I have a field which holds
    > > the value of "Empty" or lists state abbreviations. What I'd like it to
    > > do is have "Empty" be grouped together and then sort the state
    > > abbreviations in alpha. I tried the grades demo, but with no success.
    >
    > > The second is I have an ID field which is constructed by the year and
    > > then a sequential number.
    > > Example - 2008 - 1, 2008 - 2, 2008 - 3, etc.
    > > The problem is that when sorted itsortslike this...
    > > 2008 - 90, 2008 - 9, 2008 - 89
    >
    > > It does see the 9 as coming after 8 and before 10, but between 90 and
    > > 89. Help with either one is greatly appreciated.
    >
    > > Seth
    
    

    [jQuery] Tablesorter - Sorting a column with multiple tds

    2008-04-29 Thread Daniel Eriksson
    
    How do you sort a column that contains multiple tds?
    
    Take a look at this example:
    
    
    
    
    first name
    last name
    
    
    
    
      
      peter
      parker
    
    
      
      john
      hood
    
    
    
    
    Clicking on the "first name" header should sort on the second cell of
    each row.
    
    

    [jQuery] Tablesorter - Sorting a column with multiple tds

    2008-04-24 Thread Daniel Eriksson
    
    How do you sort a column that contains multiple tds?
    
    Look at this example:
    
    
    
    
    first name
    last name
    
    
    
    
      
      peter
      parker
    
    
      
      john
      hood
    
    
    
    
    Clicking on the "first name" header should sort on the second cell of
    each
    row.
    
    

    [jQuery] Re: Tabs & Validation

    2008-04-15 Thread Daniel Murker
    
    I had this exact issue once.  It was extremely easy to resolve too.  What I did 
    was incorporate a click event for that tab into the message list of the 
    validator.
    
    messages: {
    Fieldname: {
    required: function(){$("").click();return;}
    }
    
    -Original Message-
    From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nicolas 
    R
    Sent: Sunday, April 13, 2008 1:02 AM
    To: jQuery (English)
    Subject: [jQuery] Re: Tabs & Validation
    
    
    Perhaps you could prevent the user from accessing another tab when
    there are errors on the tab he is currently looking at.
    
    On Apr 12, 1:30 pm, Klaus Hartl <[EMAIL PROTECTED]> wrote:
    > I think in this case you should reconsider using tabs at all. If you
    > want to use tabs you should put error messages on top of the tab pane,
    > so that the errors are visible to the user.
    >
    > --Klaus
    >
    > On Apr 10, 4:50 pm, MarcelloP <[EMAIL PROTECTED]> wrote:
    >
    > > Hi all!
    > > I need a little advice; in a page I have a form with a tabs with 3 tab-
    > > pages, all with input elements and all required; in this form I also
    > > have enabled the splendid Validation plugin.
    > > My concern is this: if a user fill only the inputs of the first tab-
    > > page and leave blank the others, he cannot submit the form 'cause this
    > > is correctly stopped by the validation plugin, but the problem is that
    > > the user cannot see the invalid inputs (highlighted by the Validation)
    > > on the others tabpages 'cause he is on the first.
    >
    > > Please, someone may suggest me the correct way to proceed within?
    > > Thanks in advance.
    >
    > > MarcelloP
    
    

      1   2   >