[jQuery] Re: Debug says I'm missing a paren, but all parens are matched!

2009-10-07 Thread Giovanni Battista Lenoci


hsfrey ha scritto:

In this line of code, I'm looking for a div whose Id is in variable
b1, and which has an input button field whose value is Show or
Hide, and this line is to toggle those values.


$(([id$=+b1+]) input).attr(value, attr(value)
==Hide?Show:Hide);

This doesn't work, and Firebug gives me the error missing ) after
argument list

Does anyone have an idea what the problem might be?

  
I can't understand what are you trying to do, but for sure there are 
many syntax errors:


$(([id$=+b1+]) input) should be $(#+b1+ input) 

Then 


attr(value, can be changed in .val()

and when you use 

attr(value) ==Hide?Show:Hide); 


I can't understand what value are you looking for, but should be something link 
$('#id').val() or $(this).val().

Bye


--
gianiaz.net - web solutions
via piedo, 58 - 23020 tresivio (so) - italy
+39 347 7196482 



[jQuery] Re: A seemingly simple .load

2009-10-07 Thread Fluffica

Should I take this to mean no one's quite sure?

I know it's kinda rude of me to throw a chunk of code up like that,
but I'm pulling my (prematurely gray) hair out.

On Oct 5, 2:09 pm, Fluffica thomas.james.winstan...@googlemail.com
wrote:
 Good Morning/Afternoon (depending where you are)

 I would usually hate to post chunks of code like this, but I may be
 about to break my monitor.

 I've written a chunk of code, which on an address change, loads page
 content either into a black, or white div. The address change event is
 working, and the if statement to decide if the page is black or white
 is working. However the simple .load statement that follows isn't. I'm
 using the address pluggin (http://www.asual.com/jquery/address/docs/),
 which I suppose could be doing harm. But I can't see how.

 Again, I apologise for posting up what is surely one of those
 Designers trying to code questions, but would be very thankful for
 your help. Will even buy you a drink*

         $.address.change(function() {
                 alertSystem (Address change!);
                 var currentAddress = $.address.path();
                 alertSystem (Current address is +currentAddress);
                 if (currentAddress.substring(0,5) == /work){
                         alertSystem (This page is black);
                         $(#blackArea).load(currentAddress + 
 .blackContent, function(){
                                 alertSystem (Content has been loaded into 
 the black area);
                                 fnc_openBlackSite ();
                         });
                 }else{
                         alertSystem (This page is white);
                         $(div#pageArea).load(currentAddress + 
 .pageContent,'ts=' + Date
 (), function(responseText, textStatus, XMLHttpRequest){
                                 alertSystem (Content has been loaded into 
 the white area);
                                 fnc_openWhiteSite ();
                         });
                 }
                 if (currentAddress.substring(0,6) == /index){
                         $(a#smallLogo).hide();
                 }else{
                         $(a#smallLogo).show();
                 }
     });

 Tom
 *if you're in London.


[jQuery] Toggle Classes

2009-10-07 Thread craigeves

Hi

Can anyone help? I'm trying to toggle a class on the span .arrow when
you click .msg_head. I have several classes of .arrow on the page and
only want to toggle the class of the span within the element i'm
clicking. This is my code - but it doesn't work... any advice?

Thanks

Craig


$(.msg_head).click(function(){
$(this).next(.msg_body).slideToggle(slow);
$(this).next(.arrow).toggleClass(arrow_up);
});



 div class=msg_list
div class=panel
  div class=msg_headDesign supplied by usspan
class=arrow/span/div
  div class=msg_body m10
porem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
p class=lasta href=designsupplied.phpDesign by
you/a/p
  /div
/div
div class=msg_headDesign supplied by youspan
class=arrow/span/div
div class=msg_body
  porem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
  p class=lasta href=design.phpDesign by you/a/
p
/div
  /div


[jQuery] Re: ui.tabs adding an onclick event to a nested tab

2009-10-07 Thread Dylan

UPDATE:

Within the function, I get the parent div elements ID.

var divId = $(this).parents(“div[id^=tabs-]”).attr(“id”);

Then I thought I could use this ID of that div, to select the link
that has that ID as an anchor? But this last part just returns [Object
object]?

  alert($(#tabs ul li a[href=#+ divId +].textContent));
or
  alert($(#tabs ul li a[href=#+ divId +]).textContent);
or
  alert($(#tabs ul li a[href=#+ divId +].textContent));

I thought I would have a reference to the link to grab the content
from it?

I'm sure it will be something simple - any advice? PLEASE :)


On Oct 7, 8:54 am, Dylan dylan.h...@gmail.com wrote:
 Hi,

 I want to send an alert to the user indicating the title of the tab
 they have clicked. This is easy enough in principle using

       $('#tabs').bind('tabsselect', function(event, ui)
           {     alert( 'ui.tab.textContent: ' + ui.tab.textContent );  });

 But I also have a set of tabs within the first tab that I require to
 pass the title of the tab when selected...(taken care of above) BUT I
 need to add the title of the 'parent' tab too!

 The HTML is below, note the 'inner' tabs have dynamic IDs and the 2nd
 to last integer is always the tab id number that it relates to (in the
 example below, tabs-5 is clicked first the user should recieve Tab 5
 text, then when tabVertical-928033-6-5-1 is selected the user should
 receive Tab 5 text, inner tab 1

 Any help/pointers would be excellent - thanks in advance!

 div id=tabs class=ui-tabs ui-widget ui-widget-content ui-corner-
 all
         ul class=ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-
 header ui-corner-all
                 li class=ui-corner-top ui-tabs-selected ui-state-active
                         a href=#tabs-5Tab 5 text/a
                 /li
         /ul
         div id=tabs-1 class=ui-tabs-panel ui-widget-content ui-corner-
 bottom ui-tabs-hide/div
         .
         .
         div id=tabs-5 class=ui-tabs-panel ui-widget-content ui-corner-
 bottom
                 div id=tabVertical-928033-6-5-1 class=ui-tabs ui-widget 
 ui-
 widget-content ui-corner-all ui-tabs-vertical ui-helper-clearfix
                         ul class=ui-tabs-nav ui-helper-reset 
 ui-helper-clearfix ui-widget-
 header ui-corner-all
                                 li class=ui-tabVcontent-nav-item 
 ui-state-default
                                         a 
 href=#tabVcontent-928033-6-5-1inner tab 1/a
                                 /li
                                 .
                                 .
                                 li class=ui-tabVcontent-nav-item 
 ui-state-default ui-tabs-
 selected ui-state-active/li
                         /ul
                         div id=tabVcontent-928033-6-5-1 
 class=ui-tabs-panel ui-widget-
 content ui-corner-bottom ui-tabs-hide style=
                                 pContent here Content here Content here 
 Content here Content
 here Content here /p
                         /div
                         .
                         .
                         div id=tabVcontent-928341-6-5-5 
 class=ui-tabs-panel ui-widget-
 content ui-corner-bottom ui-tabs-hide/div
                 /div
         /div
 /div


[jQuery] Re: ui.tabs adding an onclick event to a nested tab

2009-10-07 Thread Dylan

var divId = $(this).parents(div[id^=tabs-]).attr(id);
var sTag = inner tab:  + $(#tabs ul li a[href=#+ divId 
+]).text
();
sTag = sTag + \nmain tab:  + ui.tab.textContent;
alert(sTag);



On 7 Oct, 10:26, Dylan dylan.h...@gmail.com wrote:
 UPDATE:

 Within the function, I get the parent div elements ID.

 var divId = $(this).parents(“div[id^=tabs-]”).attr(“id”);

 Then I thought I could use this ID of that div, to select the link
 that has that ID as an anchor? But this last part just returns [Object
 object]?

   alert($(#tabs ul li a[href=#+ divId +].textContent));
 or
   alert($(#tabs ul li a[href=#+ divId +]).textContent);
 or
   alert($(#tabs ul li a[href=#+ divId +].textContent));

 I thought I would have a reference to the link to grab the content
 from it?

 I'm sure it will be something simple - any advice? PLEASE :)

 On Oct 7, 8:54 am, Dylan dylan.h...@gmail.com wrote:

  Hi,

  I want to send an alert to the user indicating the title of the tab
  they have clicked. This is easy enough in principle using

        $('#tabs').bind('tabsselect', function(event, ui)
            {     alert( 'ui.tab.textContent: ' + ui.tab.textContent );  });

  But I also have a set of tabs within the first tab that I require to
  pass the title of the tab when selected...(taken care of above) BUT I
  need to add the title of the 'parent' tab too!

  The HTML is below, note the 'inner' tabs have dynamic IDs and the 2nd
  to last integer is always the tab id number that it relates to (in the
  example below, tabs-5 is clicked first the user should recieve Tab 5
  text, then when tabVertical-928033-6-5-1 is selected the user should
  receive Tab 5 text, inner tab 1

  Any help/pointers would be excellent - thanks in advance!

  div id=tabs class=ui-tabs ui-widget ui-widget-content ui-corner-
  all
          ul class=ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-
  header ui-corner-all
                  li class=ui-corner-top ui-tabs-selected ui-state-active
                          a href=#tabs-5Tab 5 text/a
                  /li
          /ul
          div id=tabs-1 class=ui-tabs-panel ui-widget-content ui-corner-
  bottom ui-tabs-hide/div
          .
          .
          div id=tabs-5 class=ui-tabs-panel ui-widget-content ui-corner-
  bottom
                  div id=tabVertical-928033-6-5-1 class=ui-tabs ui-widget 
  ui-
  widget-content ui-corner-all ui-tabs-vertical ui-helper-clearfix
                          ul class=ui-tabs-nav ui-helper-reset 
  ui-helper-clearfix ui-widget-
  header ui-corner-all
                                  li class=ui-tabVcontent-nav-item 
  ui-state-default
                                          a 
  href=#tabVcontent-928033-6-5-1inner tab 1/a
                                  /li
                                  .
                                  .
                                  li class=ui-tabVcontent-nav-item 
  ui-state-default ui-tabs-
  selected ui-state-active/li
                          /ul
                          div id=tabVcontent-928033-6-5-1 
  class=ui-tabs-panel ui-widget-
  content ui-corner-bottom ui-tabs-hide style=
                                  pContent here Content here Content here 
  Content here Content
  here Content here /p
                          /div
                          .
                          .
                          div id=tabVcontent-928341-6-5-5 
  class=ui-tabs-panel ui-widget-
  content ui-corner-bottom ui-tabs-hide/div
                  /div
          /div
  /div


[jQuery] Re: (autocomplete) help about extraparams

2009-10-07 Thread Otniel Zebua
Thanks alex, it works.

On Wed, Oct 7, 2009 at 7:20 AM, alexbodn.gro...@gmail.com wrote:

 please try cacheLength=0 arg to autocomplete.




[jQuery] Re: How to add some string in attributes?

2009-10-07 Thread Teddy

Thanks Liam Potter...

I want this becoz my case in Drupal case... :D

If u know about primary link drupal based on link...
So I override that link became image link based on title link...

If I use css... I must add some line css for that link when I add some
link in Drupal

On Oct 6, 5:10 pm, Liam Potter radioactiv...@gmail.com wrote:
 $(function(){
         $(img).hover(
                 function(){
                         src = $(this).attr(src);
                         var newSrc = src.replace(/.png/, -hover.png);
                         $(this).attr(src,newSrc);
                 },
                 function(){
                         var newSrc = src.replace(/-hover.png/, .png);
                         $(this).attr(src,src);
                 }
         );

 });

 This is untested and certainly not the best way to do this (like I said 
 earlier). You should be using CSS for image rollovers.

 Teddy wrote:
  I mean not like that...

  I mean what ever the src value I want toaddhover when it hover
  and when mouse out I want delete that hover..

  img alt=My Account src=/images/whatever.png/

  and when hover that image I want became like this

  img alt=My Account src=/images/whatever-hover.png/

  and when mouse out that image became
  img alt=My Account src=/images/whatever.png/

  On Sep 28, 9:38 pm, Liam Potter radioactiv...@gmail.com wrote:

  $(function(){
          $(img).bind(mouseover,function(){
                  $(this).attr(src,/images/menu-my-account-hover.png);
          });

  });

  but this is the worst way you can do rollovers. You should be doing this 
  in pure CSS, and the best way would be to use an image sprite.

  Teddy Hong wrote:

  If I have a tag image like this..

  img alt=My Account src=/images/menu-my-account.png/

  and when hover that image I want became like this

  img alt=My Account src=/images/menu-my-account-hover.png/

  How to code this with jquery?

  Thanks


[jQuery] Re: Toggle Classes

2009-10-07 Thread craigeves

I have just updated my code and still no luck :(

Here is my new code... can anyone help?

Thanks, Craig

JS

script type=text/javascript
$(document).ready(function(){
$('.expander_content').hide();
$('.expander h3').click(function () {
$(this).next('.expander_content').slideToggle('slow');
$(this).next('.arrow').toggleClass('arrow_up');
});
});
/script



HTML

!--widget--
  div class=widget
h2Design Services/h2
div class=widget_content
  div class=expander
div class=arrow arrow_up/div
h3Design supplied by us/h3
div class=expander_content
  porem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit/p
/div
  /div
  div class=expander
div class=arrow arrow_up/div
h3Design supplied by us/h3
div class=expander_content
  porem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit/p
/div
  /div
/div
  /div
  !--/widget--










On Oct 7, 10:25 am, craigeves craige...@googlemail.com wrote:
 Hi

 Can anyone help? I'm trying to toggle a class on the span .arrow when
 you click .msg_head. I have several classes of .arrow on the page and
 only want to toggle the class of the span within the element i'm
 clicking. This is my code - but it doesn't work... any advice?

 Thanks

 Craig

 $(.msg_head).click(function(){
                 $(this).next(.msg_body).slideToggle(slow);
                 $(this).next(.arrow).toggleClass(arrow_up);
         });

  div class=msg_list
             div class=panel
               div class=msg_headDesign supplied by usspan
 class=arrow/span/div
               div class=msg_body m10
                 porem ipsum dolor sit amet, consectetuer adipiscing
 elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
                 p class=lasta href=designsupplied.phpDesign by
 you/a/p
               /div
             /div
             div class=msg_headDesign supplied by youspan
 class=arrow/span/div
             div class=msg_body
               porem ipsum dolor sit amet, consectetuer adipiscing
 elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
               p class=lasta href=design.phpDesign by you/a/
 p
             /div
           /div


[jQuery] autocomplete question

2009-10-07 Thread Bjarki

I am looking at the auto-complete demo page, (
http://view.jquery.com/trunk/plugins/autocomplete/demo/ ) on the demo
of remote images.
the Javascript for that is
$(#imageSearch).autocomplete(images.php, {
width: 320,
max: 4,
highlight: false,
scroll: true,
scrollHeight: 300,
formatItem: function(data, i, n, value) {
return img src='images/ + value + '/  + 
value.split(.)[0];
},
formatResult: function(data, value) {
return value.split(.)[0];
}
});

my problem is that when I try to implement this. it will only search
for the data that is first in the string. so if  I have a span +
data.N /span  I have to type in span to see any results, how to I
configure this to just match the data.N ?

function getEmpSuccess(data){
eval(empColl =  + data + ;);
$(input[id$='query']).autocomplete(empColl[E], {
formatItem: function(data) {

var rts = data.N;
rts +='div class=color' + 
data.W + 'nbsp;/divbr /';
rts += sub + data.S + 
/sub;

return rts;
},
formatResult: function(item, value) {
return item.N;
},
selectFirst: false,
max: 5
});
}


[jQuery] (validate) JSON Response for remote method

2009-10-07 Thread zeussolo

Hi all,

I would like to use the remote method to do a validation of user data
but I cannot configure the server-side script to simply return true
or false. It can only return a JSON object like {result:true} or
{result:false}. How do I have to configure the remote method to
handle that?
I tried to add a custom method with $.getJSON but of course, its
result is not available yet when the custom method is called.

$.validator.addMethod('zipcode', function(value) {
$.getJSON('/validate.php', { module: 'validate', action: 'zipcode',
zipcode: value }, function(data) {
// What to do here with data.result?
});
// How to return data.result here?
}, 'Invalid areacode');

Any help highly appreciated!

Thanx,
Chris


[jQuery] Multiple checkbox validation

2009-10-07 Thread OOps

div
ul id=sortable
li id=1span/span
Item1
input type=checkbox id=chk1 value=1 /img
src=images/close.gif
onclick=ClearSearchDataOnClose1() /
/li
li id=2span/span
Item 2
input type=checkbox id=Checkbox1 value=2 /img
src=images/close.gif
onclick=ClearSearchDataOnClose2() //li
li id=3span/span
Item 3input type=checkbox id=Checkbox2 value=3 /
img src=images/close.gif
onclick=ClearSearchDataOnClose3() //li
li id=4span/span
Item 4input type=checkbox id=Checkbox3 value=4 /
img src=images/close.gif
onclick=ClearSearchDataOnClose4() //li
li id=5span/span
Item 5input type=checkbox id=Checkbox4 value=5 /
img src=images/close.gif
onclick=ClearSearchDataOnClose5() //li
li id=6span/span
Item 6input type=checkbox id=Checkbox5 value=6 /
img src=images/close.gif
onclick=ClearSearchDataOnClose6() //li
li id=7span/span
Item 7input type=checkbox id=Checkbox6 value=7 /
img src=images/close.gif
onclick=ClearSearchDataOnClose7() //li
/ul
/div



I need to validate the checkbox given above... My requirement is only
one check box is checked at a time on button submit... If more than
one check box is checked i want to show the alert message. i want to
validate the checkbox using jquery


[jQuery] How make a guiDesigner like ExtJsGuiDesigner with jQuery?

2009-10-07 Thread mssoft.id

Hi friends.
Is there any plugin for jQuery which could do some thing the same as
ExtJsGuiDesigner?
I mean making a Gui(forms, blocks, ...) and then saving the output in
JSON or XML format,
and using that saved files in our site.
Any links or samples? pls help me. tnx.
best wishes.



[jQuery] Re: Split Form field into array

2009-10-07 Thread robert...@gmail.com

It seems straight forward but I still need some advice. I have this so
far just to see if I can split the array twice...but it is not working

$(document).ready(function() {
$(#GetData).click(function() {
var string = $('#PartNum').val().replace(/(\r\n)/g, ~);
 var group = string.split('~');
  $.each(group, function() {
  var values = group.split(' ');
  alert(values);
});

 });
});


On Oct 6, 8:34 pm, James james.gp@gmail.com wrote:
 It should be fairly straightforward.
 Get the content of the text field: $(PartNum).val();
 Use the split() function to split each line by \n (return).
 Then for each of those lines, split it again by   (space).
 (Store all of these in an array(s).)
 Then you can use the join() function to add , (comma) to a list in
 your array.

 On Oct 6, 1:32 pm, robert...@gmail.com robert...@gmail.com wrote:



  I really hope someone can assist:

  I am trying to take a form field:
  textarea name=PartNum cols=15 rows=5  id=PartNum value=/
  textarea

  The user will put in part numbers , space, qty, carraige return ,then
  another entry on the next lineit will look like this:

  bd 2
  bd1200 5

  I want to split this into two querystring variables before submitting
  to next page:

  mypage.asp?Partnum=bd,bd1200Qty=2,5

  I have looked at the serialize() and array functions , but I can't
  figure it out.

  thanks very much- Hide quoted text -

 - Show quoted text -


[jQuery] Paging webservice search results

2009-10-07 Thread Lleoun

Hi all,


I'm having trouble paging from six to six the search results coming
from a webservice, hope someone can help :

Let's see it with an example:

The variable that stores the number of elements of the search results
array is called contentLenght.
 Let's say that contentLenght equals 9. Then I need a div showing 6
elements an another sowing 3 elements.
If contentLenght equals 7, I need a div showing 6 elements an another
showing one element.
If the value of contentLenght is 18, then I need three divs containing
6 elements each.. and so on.

Now the paging itself: if I have just one div there's no need for
paging, but if I have two of more I have to show the page's numbers.
Then when a number is clicked the present div must hide and the div
containing the elements for the page number should show.


Am I right with the approach?
I was about to paste some code but the only way I've come out with the
six to six paging is with a long  if else structure, and I'm sure
there's a smarter way of doing it.


Thanks a ton in advance


[jQuery] Re: autocomplete question

2009-10-07 Thread Bjarki

I found out there is a formatMatch function.

formatMatch: function(row) { return row.N; }

it's just not in the documentation

On Oct 7, 10:50 am, Bjarki bjar...@gmail.com wrote:
 I am looking at the auto-complete demo page, 
 (http://view.jquery.com/trunk/plugins/autocomplete/demo/) on the demo
 of remote images.
 the Javascript for that is
 $(#imageSearch).autocomplete(images.php, {
                 width: 320,
                 max: 4,
                 highlight: false,
                 scroll: true,
                 scrollHeight: 300,
                 formatItem: function(data, i, n, value) {
                         return img src='images/ + value + '/  + 
 value.split(.)[0];
                 },
                 formatResult: function(data, value) {
                         return value.split(.)[0];
                 }
         });

 my problem is that when I try to implement this. it will only search
 for the data that is first in the string. so if  I have a span +
 data.N /span  I have to type in span to see any results, how to I
 configure this to just match the data.N ?

 function getEmpSuccess(data){
         eval(empColl =  + data + ;);
         $(input[id$='query']).autocomplete(empColl[E], {
                                         formatItem: function(data) {

                                                 var rts = data.N;
                                                 rts +='div class=color' + 
 data.W + 'nbsp;/divbr /';
                                                 rts += sub + data.S + 
 /sub;

                                                 return rts;
                                         },
                                         formatResult: function(item, value) {
                                                 return item.N;
                                         },
                                         selectFirst: false,
                                         max: 5
                                 });

 }


[jQuery] Re: JQuery Won't Parse RSS?

2009-10-07 Thread Charlie





Google has a great API for feeds that doesn't require the proxy php you
are using. There are also several jQuery plugins wrapping the google
feed API

http://code.google.com/apis/ajaxfeeds/

NRutman wrote:

  MorningZ, done that.  My approach is exactly what some other folks are
using.  I'm just wondering if anybody has come up across the problems
I'm having with some fields being empty that really aren't empty in
the XML.  Or, that when they specify the XML dataType, JQuery returns
an empty data object.

So yes, I've done a fair amount of homework and Google searching.
Anybody have any problems like these?

Thanks,
-Nate


On Oct 6, 6:18pm, MorningZ morni...@gmail.com wrote:
  
  
Maybe take a look at what people have done in the past?

http://www.google.com/search?q=jquery+rss+reader

It definitely appears do-able

  
  
  






[jQuery] Re: (validate) How to activate validation on first blur?

2009-10-07 Thread Thomas

I believe I've found an acceptable solution that doesn't require
hacking the plugin itself.

I hope I haven't overlooked any unwanted side effects now.

I've instantiated validate like this now, essentially overwriting the
onfocusout handler:

$(myform)
.validate(
onfocusout:
function(element) {
if ( !this.checkable(element) ) {
this.element(element);
}
}
);

The original handler in the actual plugin code looks like this:
onfocusout: function(element) {
if ( !this.checkable(element)  (element.name in 
this.submitted
|| !this.optional(element)) ) {
this.element(element);
}
}


As I said, it seems to behave as required by my client now, but I'm
not entirely sure I've thought of all relevant test cases.



On Oct 7, 12:49 pm, Thomas thpick...@googlemail.com wrote:
 Hello!

 I'm using the validate plugin, and I am loving it.

 Unfortunately, my client would like to show validation errors on form
 fields on blur events every time, as opposed to showing them only if
 the user has previously entered something in the field at least once.

 Before I start hacking inside the plugin, I figured I could ask if
 there is an option that I'm just not seeing to enforce this behavior.

 Thanks for the help!


[jQuery] $('#div').load('url') on ajax success?

2009-10-07 Thread captaincarp


Hi there,
Firstly this forum has been always been so good that's I've never actually
needed to start a thread before because the old threads are so useful!
br /
Now though, i'm stuck!
br /br /

I have ajax which checks a login formbr /
on success I want to create a div and populate it with the contents of
another filebr /

script
$(function(){   
$('#submit').click(function(){  
var data_str = $('#login').serialize(); 
$.ajax({  
type: 'POST',
async: false,
url: 'frames/login/do_login_ajax.php',  // Send the login 
info to this
page
data: data_str,
success: function(caught_frm_ajax){ 
if(caught_frm_ajax == 'SUCCESS')
{

$('.items').append('div class=page id=page2/div');  

$('#page2').load('?php 
echo $dd
?st_pages/user/accounts/frames/user_main/index.php');

$('form#login').fadeOut();

$('#proceeder').fadeIn();   
init_scroll();
}   
else if(caught_frm_ajax == 'ERROR')
{
alert('username and 
password are smegd');
}   
 }   

}); //end ajax  
return false;
}); //end submit event
});

/script
-- 
View this message in context: 
http://www.nabble.com/%24%28%27-div%27%29.load%28%27url%27%29-on-ajax-success--tp25783925s27240p25783925.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Haccordion plugin problem

2009-10-07 Thread khosis

Hi guys, got stuck and looking for help.

I CSSed haccordion to become a vertical slide-out gallery menu, and
needed a way to hide the expanded list (.content) when item is clicked
(when user chooses a photo, see URL below). That was no big deal, just
used JS set the .content width to 0px just like the haccordion script
does, like this:

document.getElementById('c'+albumid).style.width = '0px';

and it works great.

Problem is, when i do this and then mouseover on that haccordion item
again, it won't slide out, still having 0px width.

You can see this problem in action here:
http://1stpage.pl/stuff/hacc/

Thanks in advance if anyone can help.

rgds
K.


[jQuery] Re: Toggle Classes

2009-10-07 Thread captaincarp


Have you tried .addClass() and .removeClass() and setting up a different
action for each, thus simulating toggle?




craigeves wrote:
 
 
 Hi
 
 Can anyone help? I'm trying to toggle a class on the span .arrow when
 you click .msg_head. I have several classes of .arrow on the page and
 only want to toggle the class of the span within the element i'm
 clicking. This is my code - but it doesn't work... any advice?
 
 Thanks
 
 Craig
 
 
 $(.msg_head).click(function(){
   $(this).next(.msg_body).slideToggle(slow);
   $(this).next(.arrow).toggleClass(arrow_up);
   });
 
 
 
  div class=msg_list
 div class=panel
   div class=msg_headDesign supplied by us/div
   div class=msg_body m10
 porem ipsum dolor sit amet, consectetuer adipiscing
 elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
 p class=last designsupplied.php Design by
 you /p
   /div
 /div
 div class=msg_headDesign supplied by you/div
 div class=msg_body
   porem ipsum dolor sit amet, consectetuer adipiscing
 elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
   p class=last design.php Design by you /
 p
 /div
   /div
 
 

-- 
View this message in context: 
http://www.nabble.com/Toggle-Classes-tp25783323s27240p25783933.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Toggle Classes

2009-10-07 Thread Charlie





it's your use of next() that's incorrect. You have 2 cases of HTML now
so explanation a little trickier. Original html .arrow was a descendant
not a sibling, next() looks for siblings so in 1st case changing to
find() or children() would work

Second case HTML, next looks down the DOM and arrow was up the DOM.
siblings() or prev() in place of next() should work

captaincarp wrote:

  
Have you tried .addClass() and .removeClass() and setting up a different
action for each, thus simulating toggle?




craigeves wrote:
  
  

Hi

Can anyone help? I'm trying to toggle a class on the span .arrow when
you click .msg_head. I have several classes of .arrow on the page and
only want to toggle the class of the span within the element i'm
clicking. This is my code - but it doesn't work... any advice?

Thanks

Craig


$(".msg_head").click(function(){
		$(this).next(".msg_body").slideToggle("slow");
		$(this).next(".arrow").toggleClass("arrow_up");
	});



 div class="msg_list"
div class="panel"
  div class="msg_head"Design supplied by us/div
  div class="msg_body m10"
porem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
p class="last" designsupplied.php Design by
you /p
  /div
/div
div class="msg_head"Design supplied by you/div
div class="msg_body"
  porem ipsum dolor sit amet, consectetuer adipiscing
elit orem ipsum dolor sit amet, consectetuer adipiscing elit /p
  p class="last" design.php Design by you /
p
/div
  /div



  
  
  






[jQuery] SimpleModal box in the window that contains an iframe

2009-10-07 Thread Yeuker

Hi Everyone,

I am using Eric Martains Simple Modal dialog box.  Here is my
problem.  I have a page, (which we will call page A) that contains an
iframe (which we will call page B).  I can modify page B, the iframe,
but I can not modify page A, the containing page.

I would like to display the modal dialog box in page A, but have the
code and modal div html in page b.  Is this possible.

This is a tough problem to describe, but hopefully i have done a
decent job.  Any questions, please ask and I will get back to you
asap.

Thanks so much for your help,

Yeuker


[jQuery] Problems with elements shifting when scripts are activated in IE8 (jscrollpane script)

2009-10-07 Thread Shawn - Eclectic Whimsy

Hi there, I'm fumbling through here so I apologize in advance for
being such a newby to javascripts and jquery. I spent the entire day
yesterday getting jscrollpane to work on a site I've been working on
and was SO excited to see that it was working beautifully in firefox
this morning after some editing of the code and figuring a few things
out. Unfortunately in IE8 something is causing all of my elements to
shift up way above where they should be, including the sidebar
navigation which should have nothing to do with the jscrollpane
script. The only reason I'm thinking it must have something to do with
the script is that when I open in IE it looks fine (although with the
ugly browser scrollbar) until I activate the script in the script/
activex pop up bar along the top of the screen.
As soon as I click to allow the scripts it shifts all of my content
up.

I've uploaded the site to a temporary area of my own site here:

http://www.auntiepea.com/ew/OldFarm/index.html

The same thing happens on one of the other pages that I thought I had
finished here:

http://www.auntiepea.com/ew/OldFarm/services.html


I would SO love to be able to use this script but I think I've hit my
level of javascript abilities here. Any advice would be GREATLY
appreciated.

I posted this to the jscrollpane also but thought I'd post here as
well since it was mentioned on the jscrollpane page that I may get a
faster response on this discussion board and I'd really love to figure
this out today if possible.

Thanks so much in advance!


[jQuery] adding filters in the middle of a selector brings Firebugs warning

2009-10-07 Thread BaBna

Hi,

If I am doing this:

alert($(.ivts_thead).find(tr:first).find(td).length);

alert($(.ivts_thead tr:first td).length);

I get in both cases the same result, the expected elements are in my
object, but in the second case, I get a Firebug warning saying
Unknown pseudo-calls or pseudo-element 'first'.

This happens each time I am adding any :filter to any selector which
uses more than one single expression.

Does that mean that I should create my selectors as I did in the first
case? That wouldn't be very handy...

Thanks!

Thomas


[jQuery] Re: adding filters in the middle of a selector brings Firebugs warning

2009-10-07 Thread BaBna

Sorry, the message is Unknown pseudo-class or pseudo-element
'first'.


[jQuery] Re: SimpleModal box in the window that contains an iframe

2009-10-07 Thread BaBna

Are the Simple Modal function and jQuery also in frame B?
If yes, I am not sure, and that sounds like a bad idea...
If not, you should be able to do something like this:
var t = top.window;
var $d = t.$(document.body);
$d.find(#myElement).modal();


On Oct 7, 2:36 pm, Yeuker yeu...@gmail.com wrote:
 Hi Everyone,

 I am using Eric Martains Simple Modal dialog box.  Here is my
 problem.  I have a page, (which we will call page A) that contains an
 iframe (which we will call page B).  I can modify page B, the iframe,
 but I can not modify page A, the containing page.

 I would like to display the modal dialog box in page A, but have the
 code and modal div html in page b.  Is this possible.

 This is a tough problem to describe, but hopefully i have done a
 decent job.  Any questions, please ask and I will get back to you
 asap.

 Thanks so much for your help,

 Yeuker


[jQuery] Re: Multiple checkbox validation

2009-10-07 Thread Rick Faircloth

If you only want to force only one checkbox to be checked at any given time,
why not just use radio inputs?

Rick

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of OOps
Sent: Wednesday, October 07, 2009 2:48 AM
To: jQuery (English)
Subject: [jQuery] Multiple checkbox validation


div
ul id=sortable
li id=1span/span
Item1
input type=checkbox id=chk1 value=1 /img
src=images/close.gif
onclick=ClearSearchDataOnClose1() /
/li
li id=2span/span
Item 2
input type=checkbox id=Checkbox1 value=2 /img
src=images/close.gif
onclick=ClearSearchDataOnClose2() //li
li id=3span/span
Item 3input type=checkbox id=Checkbox2 value=3 /
img src=images/close.gif
onclick=ClearSearchDataOnClose3() //li
li id=4span/span
Item 4input type=checkbox id=Checkbox3 value=4 /
img src=images/close.gif
onclick=ClearSearchDataOnClose4() //li
li id=5span/span
Item 5input type=checkbox id=Checkbox4 value=5 /
img src=images/close.gif
onclick=ClearSearchDataOnClose5() //li
li id=6span/span
Item 6input type=checkbox id=Checkbox5 value=6 /
img src=images/close.gif
onclick=ClearSearchDataOnClose6() //li
li id=7span/span
Item 7input type=checkbox id=Checkbox6 value=7 /
img src=images/close.gif
onclick=ClearSearchDataOnClose7() //li
/ul
/div



I need to validate the checkbox given above... My requirement is only
one check box is checked at a time on button submit... If more than
one check box is checked i want to show the alert message. i want to
validate the checkbox using jquery




[jQuery] Re: Problems with elements shifting when scripts are activated in IE8 (jscrollpane script)

2009-10-07 Thread BaBna

Hey there,
I don't think it has anything to do with the javascript here, it's
your CSS or HTML structure:
you've got DIV and P on the same level, and you must miss some float
or overflow property on some of your DIV.
Basically, your div with the jScrollPaneContainer class is not
pushed below by the blocks before it.


[jQuery] jQuery Sprite Factory

2009-10-07 Thread weepy


A jQuery factory for creating sprites from images. Each sprite created
from a Sprite Factory is assumed to be the same size

Features

* Works from a rectuangluar grid of sprites.
* Fast, good for rendering large numbers of similar sprites
* Preloading CSS for large images (will add the 'loading' class to
the element until the image has been loaded)
* Can use transparent PNGS for IE6 and IE7
* Light mode, using half the number of elements (only suitable for
non-transparent images)

Demo = http://weepy.github.com/sprite-factory

Blog Post = http://blog.parkerfox.co.uk/2009/10/07/jquery-sprite-factory/



[jQuery] Re: jQuery Right click menu

2009-10-07 Thread donovan78

 Hi ,  please   whymy  question   is   not   answer ?
something  is  not  clear  ?  thanks.


[jQuery] Re: jQuery Right click menu

2009-10-07 Thread Jon Banner
you must have asked your question outside of normal support hours.

have you looked into this plugin?

http://abeautifulsite.net/notebook_files/80/demo/jqueryContextMenu.html


2009/10/7 donovan78 djalmabri...@gmail.com


 Hi ,  please   whymy  question   is   not   answer ?
 something  is  not  clear  ?  thanks.


[jQuery] Re: Switch image source during toggle

2009-10-07 Thread Gremlyn1

Bump?

On Oct 5, 3:19 pm, Gremlyn1 greml...@gmail.com wrote:
 Sure, as I said I have the following function in place:
 $j(document).ready(function() {
     $j('#answerbox').hide();

     $j('a.faq').click(function() {
         var faq_id = $j(this).attr('id');
         $j('#faq' + faq_id).slideToggle(fast);
         return false;
     });

 });

 I would like to include a switch between these two images:
 './images/toggle-plus-trans.gif';
 './images/toggle-minus-trans.gif';

 The HTML looks like this:
     h3 class=faqa href=# id=86 class=faq name=86
 style=text-decoration: none;
     img src=../images/toggle-plus-trans.gif alt=Expand Answer
 title=Expand Answer /
     /aThis is my FAQ Question/h3

     div id=faq86 class=answerbox style=display:none;This is my
 FAQ Question/div

 On Oct 2, 11:50 am, James james.gp@gmail.com wrote:

  Could you post your relevant HTML also with some kind of sampleimage
  src and what you would like it to look like after it's been toggled?

  On Oct 2, 6:26 am, Gremlyn1 greml...@gmail.com wrote:

   I have some divs I am toggling and there is a little + signimageI
   want tochangeto a - signimagewhen the toggle event occurs, but
   can't quite figure it out. Here is the toggle code I have (taken from
   a helpful post on here):

   $j(document).ready(function() {
       $j('#answerbox').hide();

       $j('a.faq').click(function() {
           var faq_id = $j(this).attr('id');
           $j('#faq' + faq_id).slideToggle(fast);
           return false;
       });

   });

   Theimageis not contained within the a tag, so I guess I need a
   separate function to callback.


[jQuery] Re: Autocomplete plugin: results as table?

2009-10-07 Thread Maarten

http://autocompleter.mwierda.blackpearl.minus3.nl/demo/table.html
type in 'c' for a grouped result, using a TABLE for the layout.

its mostly the fillList that's altered, see:
http://autocompleter.mwierda.blackpearl.minus3.nl/jquery.autocomplete.js

please let me know if this was helpful or if there are any comments.

On Oct 6, 10:38 am, Maarten maartenwie...@gmail.com wrote:
 FYI: I looked into the source of the autocomplete script and I think
 I'm gonna try to extend it myself.


[jQuery] Problem with box positioning in IE7 when using jquerycyclelite

2009-10-07 Thread bobbykjack

I don't have time to put a real test-case together right now, but just
on the off chance that someone's experienced the same class of
problem:

I'm using jquerycyclelite (http://malsup.com/jquery/cycle/lite/) to
animate a set of linked images. An ancestor element has padding, but
the images seem to ignore that padding when cycled. The relevant code
is:

$slides.css({position: 'absolute', top:0, left:0}).hide().each(function
(i) {
$(this).css('z-index', els.length - i)
});


$(els[first]).css('opacity',1).show(); // opacity bit needed to handle
reinit case

although I can't reproduce the exact problem just by applying those
CSS properties, so I'm guessing it's a side-effect of jquery's hide
() / show(). Sound familiar to anyone?

Thanks,

- Bobby


[jQuery] Accordion in IFrame

2009-10-07 Thread Tom

Hello,

I am working with DotNetNuke and the Accordion widget from JQuery.
The problem is that the DNN-page is loaded in an IFrame so i cannot
acces the accordion.

div class=dvFrame
iframe class=IFrame marginheight=0 marginwidth=0
frameborder=0 runat=server id=frmDNN /iframe
/div

The contents of the IFrame is loaded dynamically.
I have tried to acces it this way:
$(#frmDNN #accordion).accordion({ header: h3 });
and many other ways, but still can't find the solution if it excists.

So can someone help me with this.

Thanx in advance...


[jQuery] (autocomplete)

2009-10-07 Thread Alberto

I'm trying to use the plugin with generated json, but the parse isn't
going very well... My json, that is being produced is something like
that:
[ { id: 9887, nome: Salvador, estado: BA }, { id:
9890, nome: Salvaterra, estado: PA }, { id: 9888,
nome: Salvador das Missões, estado: RS }, { id: 9889,
nome: Salvador do Sul, estado: RS } ]. Is there something
wrong? i tried to pass my formarItem function but did not work, the
plugin is not parsing my json... I looked for some reason into source
code but i did not found.

Thanks,

Alberto


[jQuery] Function run during animation

2009-10-07 Thread Ramon

Hi all, I hope you will be able to help me out.
I was wondering if there is a way to execute a function after every
animation step WITHOUT modifying jQuery core.

Thanks in advance!
Ramon


[jQuery] JQuery And The MIT License Question

2009-10-07 Thread AaronSnobel

I know this might have been asked before but I would like a final and
complete answer as it pertains to my situation.. I have a commercial
webapp that I will be selling I would like to include the jquery
library in my web app under the MIT License. I just wanted to verify
that jquery under the mit licence means including the mit licence
wording with the orginal copyright statements inside the jquery
library and that this included library will not in anyway affect my
own license in the overall webapp and that I can go ahead in a royalty
free manner sell my software without fear of any impending lawsuit
doom from jquery copyright holders? (John Resig)


[jQuery] How to create self-closing media playback? (media plugin, or alternative?)

2009-10-07 Thread cbandes

Hi - for a project I'm working on I want to make a video which will
close itself when playback is complete.

The idea is - on loading the page a container div will appear and auto-
play the video, then when playback is complete the video will be
unloaded and the container will disappear. Invoking the container and
the video player is no problem for me, but I am at a loss when it
comes to detecting the completion of the video - is there a
'completed' event or an 'autounload' option?


[jQuery] Re: Firefox only selecting first element with given class

2009-10-07 Thread Phil

Very odd.  Cleared cache and such when testing.  Doesn't work in 1.3.2
does work in 1.2.6  Good news is I don't need 1.3.2 so problem is
solved more or less.  If i run into it on any other site I may have to
investigate further.  Thanks for looking at it.

On Oct 6, 2:51 pm, Giovanni Battista Lenoci gian...@gmail.com wrote:
 MorningZ ha scritto: Right in the link I provided above to jsbin:

  script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
  jquery.min.js/script

 Same for me.

 Cache problems?

 --
 gianiaz.net - web solutions
 via piedo, 58 - 23020 tresivio (so) - italy
 +39 347 7196482


[jQuery] Re: SimpleModal box in the window that contains an iframe

2009-10-07 Thread Yeuker

Unfortunately yes, both jquery and simplemodal are in the iframe b.

On Oct 7, 9:56 am, BaBna thomas.na...@gmail.com wrote:
 Are the Simple Modal function and jQuery also in frame B?
 If yes, I am not sure, and that sounds like a bad idea...
 If not, you should be able to do something like this:
 var t = top.window;
 var $d = t.$(document.body);
 $d.find(#myElement).modal();

 On Oct 7, 2:36 pm, Yeuker yeu...@gmail.com wrote:



  Hi Everyone,

  I am using Eric Martains Simple Modal dialog box.  Here is my
  problem.  I have a page, (which we will call page A) that contains an
  iframe (which we will call page B).  I can modify page B, the iframe,
  but I can not modify page A, the containing page.

  I would like to display the modal dialog box in page A, but have the
  code and modal div html in page b.  Is this possible.

  This is a tough problem to describe, but hopefully i have done a
  decent job.  Any questions, please ask and I will get back to you
  asap.

  Thanks so much for your help,

  Yeuker- Hide quoted text -

 - Show quoted text -


[jQuery] Grouping tags and surrounding each group with a div

2009-10-07 Thread Lleoun

Hi all,

The code below is producing this:

div id=searchResults
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
/div


But I need to get :

div id=searchResults
div id=div1
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
li class=searchResultsItemh4Title/h4plalala/p/li
/div
div id=div2
li class=searchResultsItemh4Title/h4plalala/p/li
/div
/div

As you may have guessed contentLenght is dynamic, coming from
webservice. For this example its value is 7 but it can be 9 or 23
etc..
The idea is to group the li tags in six surrounded by numbered divs
for each group, just like the previous example.
How can I do it?
Thanks in advance!



script src=http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/
jquery.min.js type=text/javascript/script
  script
  $(document).ready(function(){
  var playlistContentBuilderSearch='';

  var contentLenght = 7;

   for(var i=0;i  contentLenght;i++){

  playlistContentBuilderSearch +=   li
class='searchResultsItem';
playlistContentBuilderSearch += h4Title/
h4;
playlistContentBuilderSearch += plalala/
p;
playlistContentBuilderSearch += /li;

  }
$(#searchResults).html(playlistContentBuilderSearch);
});
  /script/head
  body
div id=searchResults/div
  /body


[jQuery] Re: Function run during animation

2009-10-07 Thread Richard D. Worth
In the second argument to .animate() you can specify a step callback, like
so
$(#myDiv).width(100);
$(#myDiv).animate({ width: 500px }, {
  duration: 500,
  step: function(val, opt) {
console.log(val, opt)
  }
});

The val in above will go from 100 to 500, and opt will contain among others,
a 'prop' member, a string specifying which property is being animated in
that step, in this case 'width'. This is key if for example you had
specified to animate both the width and the height, but you want to handle
each differently.

- Richard

On Wed, Oct 7, 2009 at 12:11 PM, Ramon ramona...@gmail.com wrote:


 Hi all, I hope you will be able to help me out.
 I was wondering if there is a way to execute a function after every
 animation step WITHOUT modifying jQuery core.

 Thanks in advance!
 Ramon



[jQuery] Drag and drop file upload

2009-10-07 Thread Mika Tuupola


This is a request for help from people who have Google Gears  
installed. Could you try the following demo:


http://www.appelsiini.net/demo/gears_upload/demo.html

Just drag and drop image or multiple images to the page and they are  
uploaded. I try to figure out if there are any browsers with which  
this does not work. I already know Gears is broken with FireFox 3.5.x.  
This should be fixed in next Release of Gears.


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



[jQuery] Re: (autocomplete)

2009-10-07 Thread Alberto SOUZA
Hi, i resolved the probleam, actually, i was looking for in the wrong place.
I had to use the parse function to solve the problem when i get json from
the server. Thanks!

On Wed, Oct 7, 2009 at 11:22 AM, Alberto alots@gmail.com wrote:


 I'm trying to use the plugin with generated json, but the parse isn't
 going very well... My json, that is being produced is something like
 that:
 [ { id: 9887, nome: Salvador, estado: BA }, { id:
 9890, nome: Salvaterra, estado: PA }, { id: 9888,
 nome: Salvador das Missões, estado: RS }, { id: 9889,
 nome: Salvador do Sul, estado: RS } ]. Is there something
 wrong? i tried to pass my formarItem function but did not work, the
 plugin is not parsing my json... I looked for some reason into source
 code but i did not found.

 Thanks,

 Alberto



[jQuery] Re: Binding a unique single and double click command

2009-10-07 Thread Sam

Thanks for the help! I nailed it with the following:

 $('.todo_item h2').live('click', function() {
clicks++;
x = $(this);
if (clicks == 1) singleClick = setTimeout(function() { clicks
= 0; showExtra(x); }, 300);
if (clicks == 2) { clearTimeout(singleClick); clicks = 0;
editInPlace(x); };

});


[jQuery] Re: IE: Cursor still displays hourglass symbol after unblocking

2009-10-07 Thread Eeyore145

To MorningZ:

Oh please, rude? Rude is speaking with no context.

There was no ill will, in fact if you actually read posts this group,
a question was asked to the community regarding besides a mouse
listener how to get around this problem in IE in relation to
potenially editing the code.

Bug in this regard might have been mis-construed or interpreted the
wrong way, its doesn't work properly in IE, doesn't mean I'm being
rude or saying the JQuery plug in isn't a great tool.  Many things in
general don't work in IE, its a generic problem that needs to be
worked around or resolved to work WITH IE, nothing more.

So the official bug is in IE? Really, wow it's amazing how rude some
people can be when they weren't involved in the IE development process
and just decide to smash the product (see I can be just as narrow
minded, but I decide not to be).

Regards

On Sep 28, 7:41 am, 34gl3 3y3 geoffrey.vlass...@gmail.com wrote:
 Do you want a quick fix? Edit blockui.js:
 Add
 els[1].style.cursor = 'default';
 After
 var els = full ? $('body').children().filter('.blockUI') : $
 ('.blockUI', el);

 Grtz,

 On Sep 28, 2:08 am, MorningZ morni...@gmail.com wrote:



  around this bug within the actual JQueryBlockUIplugin

  Wow, really?  it's pretty obvious this is IE not changing the cursor
  unless themouseis moved, not a bug in the plugin, as it changes the
  CSS

  Amazing how rude people are using coe provided-to/supported them free
  of charge

  On Sep 27, 10:29 am, Eeyore145 mgkos2...@yahoo.com wrote:

   Thanks Mike, but please let me know if there are any plans to work
   around this bug within the actual JQueryBlockUIplugin.

   Thanks

   On Sep 26, 9:23 am, Mike Alsup mal...@gmail.com wrote:

 I have tried adding to both the overlayCSS and css overrides acursor
 of 'default' but it doesn't seem to do anything.

   http://www.malsup.com/jquery/block/sep26.html- Hide quoted text -

 - Show quoted text -


[jQuery] Unable to detect Ajax cross domain error (Firefox)

2009-10-07 Thread Kris Schoofs

Hi,

Using Firefox 3.5.3 (and firebug) I run the Ajax code below locally
(i.e. not on the same domain as the Ajax URL). Unlike in IE, this code
is not working in Firefox due to cross-domain Ajax restrictions. Of
course, as soon as I upload the code to my PHP server on the same
domain it runs fine.

However, when running the code locally the 'error'-callback never gets
triggered. Instead, the 'success'-callback always get triggered even
though the request clearly failed (as confirmed by the fact that
'OnSuccess' is unable to show any data received from the server). Even
firebug does not report any errors. Somehow, I expected to see an
error like Permission denied to call method XMLHttpRequest.open.

I would feel much more comfortable about my code when I was 100% sure
that I can catch all errors. So, I'm wondering why I'm unable to
detect this obvious error?

$.ajax({
    type: GET,
    url: http://dvd.identifier.cdfreaks.com/alive2.php;;,
    cache: false,
    data: para1=value1para2=value2,
    success: function(data, textStatus)
    {
        $(#container_onsuccess).html(@+Counter+#+data+#+textStatus);
    },
    error: function (XMLHttpRequest, textStatus, errorThrown)
    {
        
$(#container_onerror).html(@+Counter+#+textStatus+#+errorThrown);
    },
    complete: function (XMLHttpRequest, textStatus)
    {
        $(#container_oncomplete).html(@+Counter+#+textStatus);
        Counter++;
        ScheduleNextAjaxRequest();
    }
});

Thanks,

Kris


[jQuery] Ajax related issue

2009-10-07 Thread stevel

I encountered an unusual problem. I have a ajax setup. And clicking a
specified image will call this ajax function.
It goes something like:

jQuery.ajaxSetup({
   'beforeSend': function(xhr) {xhr.setRequestHeader(Accept,text/
javascript)}
})

jQuery.fn.checkmarkClickWithAjax = function(){
   this.click(function(){
   $(this).html(img src='/images/icons/wait.gif' /);
   $.ajax({
   url: this.href,
   dataType: script
   });
   return false;
   });
   return this;
};

$(function(){
$(.checkmark).checkmarkClickWithAjax();
});

The issue I am having is only alternate clicking of checkmark will
call up the click function. For example, The first time I click, I get
a response from the click function within checkmarkClickWithAjax. Then
the next click, it does not. And the next click it does. So what was
happening was first click it calls the href url via ajax, and then
next click it doesn't but went straight to href url the regular way.

I can't figure out why, even after going through the code over and
over again.

Thanks in advance for the help.


[jQuery] Autocomplete plugin - varying the ac_results class for different instances

2009-10-07 Thread Nick

I've been using the jquery autocomplete plugin by Jorn Zaefferer
(thanks for the nice work).

My problem is that results are returned in a class=ac_results, and
I'd like to edit this class name at will with the initialization of
every instances so I can put them into different groups for styling
purposes.

I customized the styling of ac_results using the plugin's css file to
fit me needs, and that worked fine, because so far I needed only one
instance (or rather similarly-styled group of instances).

But now I need a second instance/group with different styling. If I
could specify the class name of the return results with
every .autocomplete initialization, that would solve my problem.
Problem is, I can't figure out if the plugin options permit this. At
one point early on when I started using the plugin, I thought I saw an
option like this, but now I can't find it.

Is this possible? Help much appreciated






[jQuery] Re: Problems with elements shifting when scripts are activated in IE8 (jscrollpane script)

2009-10-07 Thread Shawn - Eclectic Whimsy

Thanks so much BaBna. I think you're right about it not having
anything to do with the javascript itself. I probably should be asking
this in a general web design forum except for that I've never had
issues with this shifting (at least not nearly to this degree) on
sites that haven't included the javascript area so I'm hoping maybe
someone can take a peek at the code and see if something obvious jumps
out that I should be doing differently. Could it be the placement of
the scripts? Or is there an issue with using an editable region of a
template to call on the script. I'm hoping not the latter because I'll
have a number of pages within the site that I'd like to use the
scrolling script and would rather not have to rebuild the navigation
area for each page.

After rebuilding the entire template and index to try and clean up the
issues, hoping this time things would line up properly in IE the way
they do in firefox now the scrollpane/main content area has shifted
below the area where it should be.  I was hoping maybe including a
header and footer (although basically empty boxes) that I could
contain that main content area in the correct area. No such luck. :(

I would be eternally grateful for further direction on which area it
is that's causing my IE issues.

On Oct 7, 11:04 am, BaBna thomas.na...@gmail.com wrote:
 Hey there,
 I don't think it has anything to do with the javascript here, it's
 your CSS or HTML structure:
 you've got DIV and P on the same level, and you must miss some float
 or overflow property on some of your DIV.
 Basically, your div with the jScrollPaneContainer class is not
 pushed below by the blocks before it.


[jQuery] Re: Problems with elements shifting when scripts are activated in IE8 (jscrollpane script)

2009-10-07 Thread Shawn - Eclectic Whimsy

I forgot to include the link again, just so it's handy if anyone can
take a look: http://www.auntiepea.com/ew/OldFarm/index.html


[jQuery] Re: Split Form field into array

2009-10-07 Thread James

I've set up a sample page on JS Bin:
http://jsbin.com/oqeco

Check the source for the code.

On Oct 7, 2:38 am, robert...@gmail.com robert...@gmail.com wrote:
 It seems straight forward but I still need some advice. I have this so
 far just to see if I can split the array twice...but it is not working

 $(document).ready(function() {
 $(#GetData).click(function() {
 var string = $('#PartNum').val().replace(/(\r\n)/g, ~);
  var group = string.split('~');
   $.each(group, function() {
       var values = group.split(' ');
       alert(values);
     });

  });

 });

 On Oct 6, 8:34 pm, James james.gp@gmail.com wrote:

  It should be fairly straightforward.
  Get the content of the text field: $(PartNum).val();
  Use the split() function to split each line by \n (return).
  Then for each of those lines, split it again by   (space).
  (Store all of these in an array(s).)
  Then you can use the join() function to add , (comma) to a list in
  your array.

  On Oct 6, 1:32 pm, robert...@gmail.com robert...@gmail.com wrote:

   I really hope someone can assist:

   I am trying to take a form field:
   textarea name=PartNum cols=15 rows=5  id=PartNum value=/
   textarea

   The user will put in part numbers , space, qty, carraige return ,then
   another entry on the next lineit will look like this:

   bd 2
   bd1200 5

   I want to split this into two querystring variables before submitting
   to next page:

   mypage.asp?Partnum=bd,bd1200Qty=2,5

   I have looked at the serialize() and array functions , but I can't
   figure it out.

   thanks very much- Hide quoted text -

  - Show quoted text -




[jQuery] Re: Problems with elements shifting when scripts are activated in IE8 (jscrollpane script)

2009-10-07 Thread Shawn - Eclectic Whimsy

Update. I figured out which area was causing the issues. Zeroed out
the margins on the main content area and used padding to place the
content where I wanted it. Worked like a charm.

Thanks again BaBna for headin' me in the right direction on this.

On Oct 7, 11:04 am, BaBna thomas.na...@gmail.com wrote:
 Hey there,
 I don't think it has anything to do with the javascript here, it's
 your CSS or HTML structure:
 you've got DIV and P on the same level, and you must miss some float
 or overflow property on some of your DIV.
 Basically, your div with the jScrollPaneContainer class is not
 pushed below by the blocks before it.


[jQuery] cant pass value to ajax call.

2009-10-07 Thread shaded

here is my code.

  $(#ddl_customer).change(function(){
cuslist = $(#ddl_customer).val().join(, );
alert(cuslist);

  });



 $(#ddl_customer).selectChain({
target: market,
url: callback_url,
type: POST,
data: { ajax: true, multsel: 
market_selects, cust_val: cuslist  }
 }).trigger('change');

This is an except from remy sharp's plugin for chaining multiple
select boxes. I want to pass cuslist which is a list of numbers to
the select chain function. which is funcition that uses ajax.

this works on the first time run, does not work after. It keeps
passing the full list and not the updated list. Any idea how to fix?


[jQuery] jquery ajax question?

2009-10-07 Thread rosnovski

Hi y'all,

Please look at this code:

$('ul#navigation li ul lia').click(function(){
var active = $(this).text();
$('#artcontent p').empty();
$.ajax({
type: 'POST',
url: 'homepage/readarticle',
data: $(active).serialize(),
success: function(databack){
   $('#artcontent').append(databack);
   }
})
});

I have a ul li a that are children of parent ul navigation and li.
what I am trying to do is to load an article page. This works but it
reads the database and loads all the articles in my database instead
of the one identified by active. I would like to know what I am doing
wrong or is there a better way to go about this?


[jQuery] Re: Function run during animation

2009-10-07 Thread Ramon

Thank you so much, this is just what I needed :)

Ramon

On 7 oct, 19:40, Richard D. Worth rdwo...@gmail.com wrote:
 In the second argument to .animate() you can specify a step callback, like
 so
 $(#myDiv).width(100);
 $(#myDiv).animate({ width: 500px }, {
   duration: 500,
   step: function(val, opt) {
     console.log(val, opt)
   }

 });

 The val in above will go from 100 to 500, and opt will contain among others,
 a 'prop' member, a string specifying which property is being animated in
 that step, in this case 'width'. This is key if for example you had
 specified to animate both the width and the height, but you want to handle
 each differently.

 - Richard

 On Wed, Oct 7, 2009 at 12:11 PM, Ramon ramona...@gmail.com wrote:

  Hi all, I hope you will be able to help me out.
  I was wondering if there is a way to execute a function after every
  animation step WITHOUT modifying jQuery core.

  Thanks in advance!
  Ramon


[jQuery] Re: jquery ajax question?

2009-10-07 Thread James

$(active).serialize() will not do anything to a text element, only
input elements.
You'd probably want to change your ajax data option to something like:

data: { article:active }

where article will become your field name in your script.
active is your Javascript variable (var active = $(this).text();).
If PHP, $_POST['article']

On Oct 7, 11:41 am, rosnovski rosnov...@gmail.com wrote:
 Hi y'all,

 Please look at this code:

 $('ul#navigation li ul lia').click(function(){
         var active = $(this).text();
         $('#artcontent p').empty();
         $.ajax({
                 type: 'POST',
                 url: 'homepage/readarticle',
                 data: $(active).serialize(),
                 success: function(databack){
                    $('#artcontent').append(databack);
                    }
                 })
         });

 I have a ul li a that are children of parent ul navigation and li.
 what I am trying to do is to load an article page. This works but it
 reads the database and loads all the articles in my database instead
 of the one identified by active. I would like to know what I am doing
 wrong or is there a better way to go about this?


[jQuery] Printing/Manipulating Attribute Values in an Array

2009-10-07 Thread Gil

I am creating an array wherein I am (succesfully) grabbing all child
images based on a parent node and source file name:

var cimage = globals.ref.parent().find('img[src*=blue]:not(:first)')
globals.childImg = cimage;

There are 8 items coming back in the array (there are 8 images).  I
want to be able to see the values of each item in the array, but I am
having difficulty showing the src attribute of each item.  I was able
to succesfully get the objects to list using the below...

for (i=0;iglobals.childImg.length;i++) {
document.write(globals.childImg[i] + br );
}

...but I haven't been able to get a listing of the src attributes
within those objects.  I've tried:

for (i=0;iglobals.childImg.length;i++) {
document.write(globals.childImg[i].attr + br );
}

...which comes back as 8 undefined objects, and...

for (i=0;iglobals.childImg.length;i++) {
document.write(globals.childImg[i].attr('src') + br );
}

Eventually, I want to be able to run an evaluation against the src
values, but am I missing something obvious about being able to get an
array of attributes?

Gil


[jQuery] (validate)

2009-10-07 Thread msimoes

Hello,

I've started to use this plugin within an application I'm building,
but I've noticed some restrictions in usage like:

1. How to remove the label? I just wanted to be able to highlight
the field that is a required or something, and no label. For this I've
create a new boolean option named ignoreLabel with default value as
false ( so it's not ignored ). I verify this each time the show label
is called and insert it within the condition that runs before calling
the showLabel()

Code as follow from line 231 to 233:
ignoreLabel: false,
ignoreTitle: false,
onfocusin: function(element) {

from 598 to 599:
if( this.settings.ignoreLabel === false )
this.showLabel( error.element, error.message );

from 604 to 608:
if (this.settings.success  false === this.settings.ignoreLabel) {
for ( var i = 0; this.successList[i]; i++ ) {
this.showLabel( this.successList[i] );
}
}

I made it this way because this way I can control when I want to show
the label by form. Suggestions?

2. How to remove the errorClass? I just wanted the error class to
work on the fields, and not on the label ( when I want to show it ).
Again, I created a new string option where I define the name of the
class that will work on the label. You can say I could do it by
defining an input.error and a label.error or something, but that way
would me more static.

Code from line 633 to 634:
if( this.settings.labelClass )
label.removeClass().addClass( this.settings.labelClass );

from 640 to 644:
label = $( + this.settings.errorElement + /)
.attr({for:  this.idOrName(element), generated: true})
.html(message || );
if( this.settings.errorLabel )
label.addClass(this.settings.labelClass)

3. I wanted to be able to select where the label would show, when
using radio/checkboxes since the way the code is made, it will always
show after the first item and not the last. With this, for now I'm
stuck. I could use DIV but this is not really the best option since it
will make it DIV for all items and I want to use the label for the
other inputs. Suggestions or is there a way to do this?

4. I have a nice bug :) when I press the submit button and there are
errors within the form, if the error occurs for the second time,
another label is added within the form making me have the same number
of labels as the ones I press the submit button. The code I added
could be reason for this or is it a known bug?


Regards,
-
Miguel Simões


[jQuery] Superfish - How do I make superfish respond to onclick instead of hover?

2009-10-07 Thread Spencer

I am using superfish and I am wondering how I can go about changing
the hover event to click so that when people hover over the links it
doesn't do anything until they click them.

Thanks,
Spencer


[jQuery] jquery ui datepicker and cluetip

2009-10-07 Thread dpoi

Hello,

i am trying to use cluetip to show events schedule when the mouse is
over a datepicker date.

I found this way :

...


 beforeShowDay: function(date) {

 return [dates[date], (dates[date]) ? 'info_evenement' : '',
information_du_jour];

},


onChangeMonthYear: function() {
setTimeout(function()
{
$('.info_evenement').cluetip({cluetipClass: 'jtip',  splitTitle:
'|', showTitle: true});
}, 100);
}


...

information_du_jour is the description of the events of a precise day
(according to date) with a title.

Do you know a simplier or better way to achieve my goal?

Thanks,


[jQuery] Re: jquery ajax question?

2009-10-07 Thread rosnovski

Hey thanks for the reply,

the group lives!!!

I did that and still nothing. I am using codeigniter and I would like
to paste the code incase it sheds more light and maybe a solution?
thanks here it is:

MODEL-
function displayby_name($name) { $this-db-select
(articletitle,articlebody,articleauthor); $this-db-from
('articles'); $this-db-where('articletitle',$name); $Q = $this-db-
get(); if($Q-num_rows()  0){ $text = $Q-result_array(); } echo
$this-db-last_query(); return $text; }

CONTROLLER-
function readarticle() { $articlename = $this-input-post('active');
$output = $this-articles-displayby_name($articlename);

if($output){
$data['article'] = $output;
}
$this-load-view('loadarticle',$data);
}
thanks for the help

On Oct 7, 10:41 pm, rosnovski rosnov...@gmail.com wrote:
 Hi y'all,

 Please look at this code:

 $('ul#navigation li ul lia').click(function(){
         var active = $(this).text();
         $('#artcontent p').empty();
         $.ajax({
                 type: 'POST',
                 url: 'homepage/readarticle',
                 data: $(active).serialize(),
                 success: function(databack){
                    $('#artcontent').append(databack);
                    }
                 })
         });

 I have a ul li a that are children of parent ul navigation and li.
 what I am trying to do is to load an article page. This works but it
 reads the database and loads all the articles in my database instead
 of the one identified by active. I would like to know what I am doing
 wrong or is there a better way to go about this?


[jQuery] Re: jquery ajax question?

2009-10-07 Thread James

 $this-input-post('active')
Is active the right variable? Or did you use article like I put in
to my example?
This is a jQuery group meant for jQuery questions, so I'm trying to
help on the jQuery part, mainly.
Try using Firebug for Firefox to debug the AJAX request, and determine
whether the expected POST data is being sent or not. That should be
your first step.

On Oct 7, 1:18 pm, rosnovski rosnov...@gmail.com wrote:
 Hey thanks for the reply,

 the group lives!!!

 I did that and still nothing. I am using codeigniter and I would like
 to paste the code incase it sheds more light and maybe a solution?
 thanks here it is:

 MODEL-
 function displayby_name($name) { $this-db-select
 (articletitle,articlebody,articleauthor); $this-db-from
 ('articles'); $this-db-where('articletitle',$name); $Q = $this-db-get(); 
 if($Q-num_rows()  0){ $text = $Q-result_array(); } echo

 $this-db-last_query(); return $text; }

 CONTROLLER-
 function readarticle() { $articlename = $this-input-post('active');
 $output = $this-articles-displayby_name($articlename);

         if($output){
                 $data['article'] = $output;
         }
         $this-load-view('loadarticle',$data);
     }
 thanks for the help

 On Oct 7, 10:41 pm, rosnovski rosnov...@gmail.com wrote:

  Hi y'all,

  Please look at this code:

  $('ul#navigation li ul lia').click(function(){
          var active = $(this).text();
          $('#artcontent p').empty();
          $.ajax({
                  type: 'POST',
                  url: 'homepage/readarticle',
                  data: $(active).serialize(),
                  success: function(databack){
                     $('#artcontent').append(databack);
                     }
                  })
          });

  I have a ul li a that are children of parent ul navigation and li.
  what I am trying to do is to load an article page. This works but it
  reads the database and loads all the articles in my database instead
  of the one identified by active. I would like to know what I am doing
  wrong or is there a better way to go about this?




[jQuery] Dynamic values

2009-10-07 Thread Patrick

I'd like to be able to set the size of a jQuery dialog dynamically
when I call it based on the target to be shown. I was considering
adding invalid attributes like the following... where edit_width and
edit_height are parsed and passed right before opening the dialog.

a href=HTMLToOpenInDialog class=DialogEdit edit_width=500
edit_height=250

But it's probably not be the best way. The dialog call is done from a
base page, while the actual content to call is determine from the link
clicked on the widget. When setting the link, I would know the size
needed for the HTMLToOpenInDialog... Any ideas that don't use non-
standard markup or hidden fields?

Thanks,
Patrick


[jQuery] Unexpected $(document).ready() behavior when jQuery is loaded after the page

2009-10-07 Thread Ryan Crumley

I am experiencing unexpected behavior using $(document).ready() on a
page where I inject jQuery after the page has loaded and then attach
listeners to the ready event. The ready() event is never called using
Firefox and Safari however it is called using IE.

Is this a jQuery bug? Is it working as designed? Any suggested work
arounds?

The example at the bottom of the email illustrates the problem. The
example is also available at: 
http://www.damagedsoftware.com/latejqueryready_test.html

Thanks,

Ryan Crumley

html
head
script
function jqueryHasLoaded() {
alert(jquery was loaded. Adding ready listener. Should 
see another
alert from ready.);
$(document).ready(function() {
alert(Hello from read());
});
}

function loadjquery() {
var url = 
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
jquery.js;
var head = document.getElementsByTagName(head)[0], 
done = false;
var script = document.createElement(script);
script.src = url;

script.onload = script.onreadystatechange = function() {
if (!done  (!this.readyState || 
this.readyState == loaded ||
this.readyState == complete)) {
done = true;
jqueryHasLoaded();
}
};

head.appendChild(script);
}
/script

/head
body
input type=button onClick=loadjquery() value=Click to test/
/body
/html


[jQuery] jQuery, Firefox, Flash... The animate()/animation bug: A fix?

2009-10-07 Thread Micky Hulse

Hi,

I posted a message a while back asking about this:

SWF  animate() bug? Reloads swf. :(
http://snipurl.com/sdz0f

But for some reason I can only reply to myself for those messages...
Must be because the thread is old.

Anyway, someone has posted a hackish fix here:

http://dev.jquery.com/ticket/4872

Hopefully this fix will get rolled into a future release of jQuery. :)

Thanks!
Micky


[jQuery] Re: Quick question on image loading

2009-10-07 Thread Mulyadi Oey

Related to this topic -- I have a page that:
* Has a button whose background image will change upon rollover (done
in CSS, using :hover)
* Preloads the rollover image for the button above (done using a
simple jQuery script)

The page can be found at http://test.happypod.com/preloadimage/

The part that I don't quite understand is that when I inspect the page
using Firebug (Net tab):
* Two images are loaded upon page load: signup_ro.png and signup.png.
This is expected and shows that the jQuery script successfully
preloaded the rollover image, signup_ro.png
* When you hover your mouse over the button, there is another request
to fetch signup_ro.png although it is clear that that image has been
preloaded.

Why does the browser fetch signup_ro.png again although that image has
been preloaded? For screenshot, see: 
http://test.happypod.com/preloadimage/firebug.png


[jQuery] Re: Quick question on image loading

2009-10-07 Thread Mulyadi Oey

Related to this topic -- I have a page that:
* Has a button whose background image will change upon rollover (done
in CSS, using :hover)
* Preloads the rollover image for the button above (done using a
simple jQuery script)

The page can be found at http://test.happypod.com/preloadimage/

The part that I don't quite understand is that when I inspect the page
using Firebug (Net tab):
* Two images are loaded upon page load: signup_ro.png and signup.png.
This is expected and shows that the jQuery script successfully
preloaded the rollover image, signup_ro.png
* When you hover your mouse over the button, there is another request
to fetch signup_ro.png although it is clear that that image has been
preloaded.

Why does the browser fetch signup_ro.png again although that image has
been preloaded? For screenshot, see: 
http://test.happypod.com/preloadimage/firebug.png

Thanks.


[jQuery] Image Preloading

2009-10-07 Thread moey

I have a page that:
* Has a button whose background image will change upon rollover (done
in CSS, using :hover)
* Preloads the rollover image for the button above (done using a
simple jQuery script)

The page can be found at http://test.happypod.com/preloadimage/

The part that I don't quite understand is that when I inspect the page
using Firebug (Net tab):
* Two images are loaded upon page load: signup_ro.png and signup.png.
This is expected and shows that the jQuery script successfully
preloaded the rollover image, signup_ro.png
* When you hover your mouse over the button, there is another request
to fetch signup_ro.png although it is clear that that image has been
preloaded.

Why does the browser fetch signup_ro.png again although that image has
been preloaded? For screenshot, see: 
http://test.happypod.com/preloadimage/firebug.png

Thanks.


[jQuery] Re: Quick question on image loading

2009-10-07 Thread Mulyadi Oey

Yes, using a sprite can easily remedy the flickering problem during
rollover. Unfortunately, it won't work in IE6 if you try to position a
sprite PNG file that contains transparency -- this is a separate topic
but you generally need to hack the transparent png file in order to
keep the transparency in IE6.

On Oct 5, 9:39 am, Michael Geary m...@mg.to wrote:
 Instead of changing the background image to a different URL, you should
 create a single image that has them tiled together, and change the div's
 background-position style to select one or the other. That guarantees you an
 instant transition between the two images.

 If you have several images on your page, you can combine all of them into a
 single large image and use the same method to display each individual image.
 This will help your page load faster.

 Search for CSS Sprites and you'll find a lot of information on this
 technique. Here's a good round-up:

 http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites...

 Of course, this won't work if you need to load just any old arbitrary URL
 into your div, but if you're selecting from a specific set of images, CSS
 sprites are perfect.

 -Mike



 On Mon, Oct 5, 2009 at 12:25 AM, Erock ethetenniss...@gmail.com wrote:

  My question is, if I have one image as the background of a div, and I
  set the background of that div to another image, will html load the
  new image before replacing the old one or replace the old image with
  something ugly (say just plain white) and then load it.

  The reason I'm asking is, because my site isn't hosted anywhere, it's
  hard to tell what will happen on a non-local connection when the
  images actually have to be loaded.

  Thanks
  Eric


[jQuery] Re: (validate)

2009-10-07 Thread Bjarki

Hello Miguel,

for part 3, you can use errorPlacement like this.

errorPlacement: function(error, element) {
   if (element.attr('id') === yourItem.attr('id')) {
// insert the error after a given Item
error.insertAfter(givenItem);
}
else {
error.insertAfter(element);
}
}

hope this helps

Regards,
Bjarki Heiðar


On Oct 7, 10:29 pm, msimoes msim...@gmail.com wrote:
 Hello,

 I've started to use this plugin within an application I'm building,
 but I've noticed some restrictions in usage like:

 1. How to remove the label? I just wanted to be able to highlight
 the field that is a required or something, and no label. For this I've
 create a new boolean option named ignoreLabel with default value as
 false ( so it's not ignored ). I verify this each time the show label
 is called and insert it within the condition that runs before calling
 the showLabel()

 Code as follow from line 231 to 233:
         ignoreLabel: false,
         ignoreTitle: false,
         onfocusin: function(element) {

 from 598 to 599:
         if( this.settings.ignoreLabel === false )
             this.showLabel( error.element, error.message );

 from 604 to 608:
         if (this.settings.success  false === this.settings.ignoreLabel) {
                 for ( var i = 0; this.successList[i]; i++ ) {
                         this.showLabel( this.successList[i] );
                 }
         }

 I made it this way because this way I can control when I want to show
 the label by form. Suggestions?

 2. How to remove the errorClass? I just wanted the error class to
 work on the fields, and not on the label ( when I want to show it ).
 Again, I created a new string option where I define the name of the
 class that will work on the label. You can say I could do it by
 defining an input.error and a label.error or something, but that way
 would me more static.

 Code from line 633 to 634:
         if( this.settings.labelClass )
             label.removeClass().addClass( this.settings.labelClass );

 from 640 to 644:
         label = $( + this.settings.errorElement + /)
                 .attr({for:  this.idOrName(element), generated: true})
                 .html(message || );
         if( this.settings.errorLabel )
             label.addClass(this.settings.labelClass)

 3. I wanted to be able to select where the label would show, when
 using radio/checkboxes since the way the code is made, it will always
 show after the first item and not the last. With this, for now I'm
 stuck. I could use DIV but this is not really the best option since it
 will make it DIV for all items and I want to use the label for the
 other inputs. Suggestions or is there a way to do this?

 4. I have a nice bug :) when I press the submit button and there are
 errors within the form, if the error occurs for the second time,
 another label is added within the form making me have the same number
 of labels as the ones I press the submit button. The code I added
 could be reason for this or is it a known bug?

 Regards,
 -
 Miguel Simões


[jQuery] Re: Unexpected $(document).ready() behavior when jQuery is loaded after the page

2009-10-07 Thread MorningZ

While i don't know the answer to your strange issue... as
document.ready fires when, well, when the document is ready  i
do wonder: why the complexity?

You aren't gaining anything except on the first load of the library
(and then the browser caches it), heck even that first load is
probably from cache if you are using the Google Ajax CDN

Again, not the answer to your question I know, but maybe the simple
answer of re-think your process is the solution to cross browser
functionality

On Oct 7, 8:04 pm, Ryan Crumley crum...@gmail.com wrote:
 I am experiencing unexpected behavior using $(document).ready() on a
 page where I inject jQuery after the page has loaded and then attach
 listeners to the ready event. The ready() event is never called using
 Firefox and Safari however it is called using IE.

 Is this a jQuery bug? Is it working as designed? Any suggested work
 arounds?

 The example at the bottom of the email illustrates the problem. The
 example is also available 
 at:http://www.damagedsoftware.com/latejqueryready_test.html

 Thanks,

 Ryan Crumley

 html
 head
         script
                 function jqueryHasLoaded() {
                         alert(jquery was loaded. Adding ready listener. 
 Should see another
 alert from ready.);
                         $(document).ready(function() {
                                 alert(Hello from read());
                         });
                 }

                 function loadjquery() {
                         var url = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
 jquery.js;
                         var head = document.getElementsByTagName(head)[0], 
 done = false;
                         var script = document.createElement(script);
                         script.src = url;

                         script.onload = script.onreadystatechange = 
 function() {
                                 if (!done  (!this.readyState || 
 this.readyState == loaded ||
 this.readyState == complete)) {
                                         done = true;
                                         jqueryHasLoaded();
                                 }
                         };

                         head.appendChild(script);
                 }
         /script

 /head
 body
         input type=button onClick=loadjquery() value=Click to test/
 /body
 /html


[jQuery] Re: Unexpected $(document).ready() behavior when jQuery is loaded after the page

2009-10-07 Thread Ryan Crumley

I put together that example because it is the most simple piece of
code I could create to reproduce the problem. My real process is
actually more complicated and there are real gains to be had for using
document.ready() in this way. Consider the following two cases:

1. If instead of dynamically loading jQuery when clicking a button
what if jQuery was loaded dynamically when the page is loaded?
jqueryHasLoaded() will be called when the jQuery script is done
loading but that does not mean the dom is ready for manipulation. In
this case wrapping the code in $(document).ready() is necessary.

2. What if the code inside jqueryHasLoaded() is actually a 3rd party
piece of javascript that uses $(document).ready() and can not be
changed? The 3rd party code would not work as expected because the
ready event is never fired.

Compare that example to this new one where jQuery is loaded statically
when the page is loaded:

http://www.damagedsoftware.com/earlyjqueryready_test.html

$(document).ready() executes immediately after the button is clicked
because jQuery has marked the page as ready.

I am leaning towards this being an actual bug in jQuery but would like
to hear more expert opinions.

Ryan Crumley



On Oct 7, 8:07 pm, MorningZ morni...@gmail.com wrote:
 While i don't know the answer to your strange issue... as
 document.ready fires when, well, when the document is ready  i
 do wonder: why the complexity?

 You aren't gaining anything except on the first load of the library
 (and then the browser caches it), heck even that first load is
 probably from cache if you are using the Google Ajax CDN

 Again, not the answer to your question I know, but maybe the simple
 answer of re-think your process is the solution to cross browser
 functionality

 On Oct 7, 8:04 pm, Ryan Crumley crum...@gmail.com wrote:



  I am experiencing unexpected behavior using $(document).ready() on a
  page where I inject jQuery after the page has loaded and then attach
  listeners to the ready event. The ready() event is never called using
  Firefox and Safari however it is called using IE.

  Is this a jQuery bug? Is it working as designed? Any suggested work
  arounds?

  The example at the bottom of the email illustrates the problem. The
  example is also available 
  at:http://www.damagedsoftware.com/latejqueryready_test.html

  Thanks,

  Ryan Crumley

  html
  head
          script
                  function jqueryHasLoaded() {
                          alert(jquery was loaded. Adding ready listener. 
  Should see another
  alert from ready.);
                          $(document).ready(function() {
                                  alert(Hello from read());
                          });
                  }

                  function loadjquery() {
                          var url = 
  http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
  jquery.js;
                          var head = 
  document.getElementsByTagName(head)[0], done = false;
                          var script = document.createElement(script);
                          script.src = url;

                          script.onload = script.onreadystatechange = 
  function() {
                                  if (!done  (!this.readyState || 
  this.readyState == loaded ||
  this.readyState == complete)) {
                                          done = true;
                                          jqueryHasLoaded();
                                  }
                          };

                          head.appendChild(script);
                  }
          /script

  /head
  body
          input type=button onClick=loadjquery() value=Click to test/
  /body
  /html


[jQuery] Re: Dynamic values

2009-10-07 Thread Richard D. Worth
You can use the metadata plugin (
http://plugins.jquery.com/project/metadata) to store and retreive the
values like so:
a href=http://some/url/to/open/in/dialog; class=DialogEdit
{width:500,height:250}link text/a

Then something like this should do:

$('.DialogEdit').click(function() {
  var options = $(this).metadata(DialogEdit);
  $('div/div').load(this.href, function() {
$(this).dialog(options);
  });
  return false;
});

- Richard

On Wed, Oct 7, 2009 at 7:59 PM, Patrick pwc1...@gmail.com wrote:


 I'd like to be able to set the size of a jQuery dialog dynamically
 when I call it based on the target to be shown. I was considering
 adding invalid attributes like the following... where edit_width and
 edit_height are parsed and passed right before opening the dialog.

 a href=HTMLToOpenInDialog class=DialogEdit edit_width=500
 edit_height=250

 But it's probably not be the best way. The dialog call is done from a
 base page, while the actual content to call is determine from the link
 clicked on the widget. When setting the link, I would know the size
 needed for the HTMLToOpenInDialog... Any ideas that don't use non-
 standard markup or hidden fields?

 Thanks,
 Patrick


[jQuery] applying jquery to my input submit buttons

2009-10-07 Thread jessie

Hi

Hoping someone can help me.

I have a class for my submit buttons.

.submit {
font-size:11px;
font-weight:bold;
color:#fff;
border:1px solid #878787;
background-color:#878787;
cursor:pointer;
}
.submitHover {
font-size:11px;
font-weight:bold;
color:#fff;
cursor:pointer;
border:1px solid #878787;
background-color:#b9b7b7;
cursor:pointer; }


I also have in my markup the mouseover event
input name=submit type=submit value={LANG_SUBMIT_REVIEW}
class=submit style=margin-top:6px;
onmouseover=this.className='submitHover'
onmouseout=this.className='submit' /

Can i simply this and take out the mouseover event in my markup by
having it in the jquery?

If so how would i go about doing this in my jquery file?

Thanks for your time.

Jess. :)


[jQuery] Re: applying jquery to my input submit buttons

2009-10-07 Thread jessie

Sorry forgot to add

i also have this in my jquery which i don't think it would affect the
input as they are images.

$('input[type=image]').hover(
function () { $(this).attr(src, $(this).attr(src).split('-
off').join('-on')); },
function () { $(this).attr(src, $(this).attr(src).split('-
on').join('-off')); }
);


On Oct 8, 1:35 pm, jessie mi...@optusnet.com.au wrote:
 Hi

 Hoping someone can help me.

 I have a class for my submit buttons.

 .submit {
         font-size:11px;
         font-weight:bold;
         color:#fff;
         border:1px solid #878787;
         background-color:#878787;
         cursor:pointer;}

 .submitHover {
         font-size:11px;
         font-weight:bold;
         color:#fff;
         cursor:pointer;
         border:1px solid #878787;
         background-color:#b9b7b7;
         cursor:pointer; }

 I also have in my markup the mouseover event
 input name=submit type=submit value={LANG_SUBMIT_REVIEW}
 class=submit style=margin-top:6px;
 onmouseover=this.className='submitHover'
 onmouseout=this.className='submit' /

 Can i simply this and take out the mouseover event in my markup by
 having it in the jquery?

 If so how would i go about doing this in my jquery file?

 Thanks for your time.

 Jess. :)


[jQuery] Easy but nice lightbox i can add?

2009-10-07 Thread jessie

Hi

Does anyone know of an easy lightbox i can add to my ecommerce site?
i'd liek to get rid of the prototype one and replace it with jquery.

Thanks
Jess


[jQuery] png fix with jquery ui?

2009-10-07 Thread jessie

Is there such a thing as a jquery ui plugin for png?

Jess


[jQuery] Re: Ajax related issue

2009-10-07 Thread stevel

I found the answer to my own question.
To overcome this problem, I have to use the .live method to bind
current and future elements on the page.
I made the following change to my function to use the .live method.:

jQuery.fn.checkmarkClickWithAjax = function(){
   this.live(click,function(){
   $(this).html(img src='/images/icons/wait.gif' /);
   $.ajax({
   url: this.href,
   dataType: script
   });
   return false;
   });
   return this;
};


For more information see http://docs.jquery.com/Events/live







[jQuery] Re: Hide row if empty

2009-10-07 Thread Wacko Jacko

I am having a bit of trouble with this one. Thanks for your help. I
could get it working if the parent is a div but not if it's an li.

Here's my html:

ul class=member-table
li
divstrongWhy I am involved:/strong/div
div class=answer{tag_why are you involved?}/div
/li
li
divstrongCurrent projects  activities:/strong/div
div class=answer{tag_current projects}/div
/li
li
divstrongMy relevant experience:/strong/div
div class=answer{tag_relevant experience}/div
/li
/ul

Here's my jQuery:

$('.answer').each(function() {
if ($(this).text() == ) {
$(this).parents().hide();
}
});

You said to add ('ul .answer') but this does not seem to make any
difference. I really appreciate your help on this.

Jack

On Oct 1, 3:34 pm, Wacko Jacko jackson.be...@gmail.com wrote:
 Brilliant! I will try this and get back to you.Thanks for your time!

 On Oct 1, 3:21 pm, Charlie Griefer charlie.grie...@gmail.com wrote:

  Assuming you can turn those id's into classes (where you have
  id=database)... you can do the following:

  $(document).ready(function(){
      $('ul .database').each(function() {
          if ($(this).text() == ) {
              $(this).parent().hide();
          }
      });

  });

  On Wed, Sep 30, 2009 at 10:14 PM, Charlie Griefer charlie.grie...@gmail.com

   wrote:
   If you're working with server side data like that, couldn't you just write
   a conditional in whatever language you're using (PHP, CF, ASP, etc) to not
   display the li if no data?

   Also, do you really mean to re-use database as an ID for multiple
   elements?  ID's ought to be unique.

   On Wed, Sep 30, 2009 at 9:43 PM, Wacko Jacko 
   jackson.be...@gmail.comwrote:

   Hi All,

   If I had a list displaying data as follows:

   ul
       li id=itemdivLabel Here/divdiv id=database{content
   here if available from database}/div/li
       li id=itemdivLabel Here/divdiv id=database{content
   here if available from database}/div/li
   /ul

   Could I hide the whole li id=item/li if their is nothing
   available to show from the database in div id=database ?

   Thanks in advance for your help

   Jack

   --
   Charlie Griefer
  http://charlie.griefer.com/

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

  --
  Charlie Grieferhttp://charlie.griefer.com/

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


[jQuery] Re: Unexpected $(document).ready() behavior when jQuery is loaded after the page

2009-10-07 Thread MorningZ

You've got a super serious flaw in your logic


1) It appears you have this sitting on the page... no JS has been
loaded or executed at this point

input type=button onClick=loadjquery() value=Click to test/

2) someone clicks the button, you call loadjquery

3) in there, you seemingly want to add the script tag to the head,
at which point you seem to *hope* that this will run:

$(document).ready(function() {
 alert(Hello from read());
});


But that's the issue, It's way way waaay too late at this point, as
the document was ready (and fired that event) once the HTML was sent
to the browser and ready for DOM manipulation, which was forever ago
at this point (right from the docs: Binds a function to be executed
whenever the DOM is ready to be traversed and manipulated)

there is nothing gained by that method, although i would be curious as
to what you think they may be

the fact it worked on one browser is very much more than likely a
quirk in that browser, not a bug in the library


[jQuery] Re: Unexpected $(document).ready() behavior when jQuery is loaded after the page

2009-10-07 Thread RobG



On Oct 8, 10:04 am, Ryan Crumley crum...@gmail.com wrote:
 I am experiencing unexpected behavior using $(document).ready() on a
 page where I inject jQuery after the page has loaded and then attach
 listeners to the ready event. The ready() event is never called using
 Firefox and Safari however it is called using IE.
[...]
                 function loadjquery() {
                         var url = 
 http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/
 jquery.js;
                         var head = document.getElementsByTagName(head)[0], 
 done = false;
                         var script = document.createElement(script);
                         script.src = url;

                         script.onload = script.onreadystatechange = 
 function() {

There is no onload attribute for script elements defined in HTML 4.01,
therefore you should not expect that a script element will fire a load
event. The fact that some browsers do and some don't should be enough
to tell you that browser behaviour is inconsistent.  You are unlikely
to be able to reliably fix that with script.

If you want a reliable indicator that a script has finished loading
and is ready for use, put a statement at the bottom like:

  var SCRIPT_LOADED = true;


--
Rob