[jQuery] Click function dosen't work, after append new html data.

2009-03-11 Thread sure

Hi all,
  I am new to jquery. My close  click event function dosen't
work, when ever i append new html data to my div. Intially it is
working fine with static data. Please help me to fix this problem.

$(function()
{
$(#addrow).click(function()
{
alert($(#mainlayout .row).length);
var len = parseInt($(#mainlayout .row).length);
var html =div id=\row1\ class=\row\ul 
class=\ulpanel
\lidiv class=\close\ img src=\images/delete.png\ //
divdiv1/div/lilidiv class=\close\img src=\images/
delete.png\ //divdiv2/div/lilidiv class=\close\img
src=\images/delete.png\ //divdiv3/div/li/ul/div;
$(#mainlayout).append(html);
//$(.ulpanel li).draggable();
});

$(.close).click(function()
{

//alert($(this).parent().parent().parent().attr(class));
//alert(parseInt($(.ulpanel li).length));
if($(.ulpanel li).length==1)
   $(this).parent().parent().parent().remove();
else
$(this).parent().remove();
});

});

with Regards
sure


[jQuery] How to reload page after specific time period

2009-03-11 Thread Bluesapphire

Hi!
How can I reload page [05 seconds gap] after successful ajax reply
from server. Like youtube shows SUCCESS message and then whole page is
refreshed after a while.

Thanks in advance


[jQuery] Re: How to reload page after specific time period

2009-03-11 Thread sure

After receving success, you can do like this.

setTimeout(yourfunction(),5000);

Regards
sure
On Mar 11, 12:18 pm, Bluesapphire michealg...@gmail.com wrote:
 Hi!
     How can I reload page [05 seconds gap] after successful ajax reply
 from server. Like youtube shows SUCCESS message and then whole page is
 refreshed after a while.

 Thanks in advance


[jQuery] Re: grouped select boxes

2009-03-11 Thread sure

Hi,
  var val1 = $(#seasonmember).children(option:selected).attr
(value);
  var val2 = $(#season).children(option:selected).attr(value);
  validate both val1,val2

Regards
sure
On Mar 11, 10:57 am, Mark King m...@ampersand.net.au wrote:
 Hi.

 I have two select boxes for differrent classes of tickets , like so:

 select name=seasonmember id=seasonmember
 option value=00/option
 option value=11/option
 option value=22/option
 option value=33/option
 option value=44/option
 option value=55/option
 /select
 select name=season id=season
 option value=00/option
 option value=11/option
 option value=22/option
 option value=33/option
 option value=44/option
 option value=55/option
 /select

 I want to validate that at least one ticket has been purchased. I
 would like to try to do this with the validate plugin, more for the
 purposes of RD than anything else (I could write some code to just
 add up the values, but that's not really the point).

 How would I go about doing this?

 Thanks,
 Mark


[jQuery] Re: Get Textbox-value and write to table-cell (td/td)

2009-03-11 Thread Josh Powell

*shrugs* up to you, brian means to use string.splice(a); where a =
number of characters before the index that is tacked on. so if the
name/id is foo_1, foo_2 then you'll do:

$('[id^=foo_]').change(function() {
$('[name=post-amount_' + $(this).attr('id').slice(3)  + ]').val($
(this).val());
});

I personally find this kind of string munging difficult to read and
maintain.  Could just be personal preference though.  Good luck.

Josh Powell

On Mar 10, 10:39 pm, Eric Gun gunawan.e...@gmail.com wrote:
 @mkmanning: Well done!! Your script works well. Thanks, and great
 job! :)

 @brian-263: Thanks for the idea. Yup, i'm using PHP as i said before.
 Therefore, i need those '[]'.
 Anyway, i'm still curious with what you mean by 'parse out the index
 from each of the IDs ...'. I'm not really sure how to do it. If you
 don't mind, can you give me an example script?

 @Josh Powell: Thanks for being the first one to reply my post :)
 I'm sorry, but i'm afraid i agree with brian-263 about better not
 making up new attribute instead of optimizing pre-defined ones.

 @all: Maybe i was wrong to explain my problem when i used the word
 'instantly' (as this is my first post :) In fact, the 'deal-post'
 table is located in different tab panel with the 'deal-summary' one
 (i'm using JQuery UI plugin for tabs). So, i will drop the 'keyup'
 event and also forget about autocomplete plugins for now. I will use
 the 'change' event instead, as i think it's enough for me.

 Thanks guys!!!

 On Mar 10, 4:07 pm, Eric Gun gunawan.e...@gmail.com wrote:

  Sorry guys, just had a couple days off.
  I will look forward to your answers and reply back here soon.

  Thanks for concerning,

  Regards,

  On Mar 8, 8:22 am, mkmanning michaell...@gmail.com wrote:

   With the markup example in the OP, use this:

   var dp = $('#deal-post tbody tr');
   dp.find('input[name^=dealAmount]').keyup(function(){
           var amount =  $(this);
           $('#deal-summary tbody tr:eq('+dp.index(amount.closest('tr'))
   +')').find('td.inc-current').text(amount.val());

   });

   On Mar 7, 4:10 pm, brian bally.z...@gmail.com wrote:

On Sat, Mar 7, 2009 at 6:21 PM, Josh Powell seas...@gmail.com wrote:

 6 of one... half dozen of another...

I don't buy that. I've suggested using an attribute whose purpose is
well defined. Making up attributes that aren't represented by the
DOCTYPE is a bad idea. Don't get me wrong--I've done it before. Though
always to store temporary info. Happily, we have data for that, now.
The OP's needs, though, are to identify table cells as being connected
to specific text inputs. That's what ID is for.


[jQuery] Re: How do I adapt this code for multiple uses?

2009-03-11 Thread IanR

Thanks guys for both of your replies they are equally valuable. I have
never delved into creating plugins yet I suppose I should really. I
tried with this code but missed the last part which was include it in
a div.

Thanks for the help, Ian.


[jQuery] Re: JQuery Form Validation Fancybox

2009-03-11 Thread Jörn Zaefferer

Dunno about Fancybox, but you can use the remote method to check the
username: http://docs.jquery.com/Plugins/Validation/Methods/remote

Jörn

On Tue, Mar 10, 2009 at 11:53 PM, MonkeyBall2010
hughes.timo...@gmail.com wrote:

 You'll have to forgive me if this question sounds easy but I am fairly
 new to jQuery so I'm still learning things here.

 I'm trying to do the following:

 -Display a signup form with the Fancybox plugin (working)
 -Validate the form, currently using the bassistance Validation plugin
 (working)
 -Dynamically check a MySQL database, via AJAX, to see if the username
 is already taken ()
 -Once the form checks out then I want to upload the information to
 MySQL

 The problems I am having right now are as follows:

 -The validation script will function correctly on the standalone
 webpage. However, when I try to open the webpage via the Fancybox
 plugin the validation ceases to work. The submit button will refresh
 the webpage and the validation doesn't fire. Does anyone why this
 happend?
 -I really haven't used AJAX before so I don't know if this whole
 shabang will work or where I should start. Can these two things
 (Validation, Fancybox) be combined? If so, is the way that I proposed
 a valid way to combine them or can I change what I am doing to
 something more efficient?

 Thanks!



[jQuery] Re: [validate] grouped select boxes

2009-03-11 Thread Jörn Zaefferer

Using the validation plugin, set a required-rule for each field, after
removing the value from the 0-option, that is, change it to option
value0/option

Jörn

On Wed, Mar 11, 2009 at 6:57 AM, Mark King m...@ampersand.net.au wrote:

 Hi.

 I have two select boxes for differrent classes of tickets , like so:

 select name=seasonmember id=seasonmember
 option value=00/option
 option value=11/option
 option value=22/option
 option value=33/option
 option value=44/option
 option value=55/option
 /select
 select name=season id=season
 option value=00/option
 option value=11/option
 option value=22/option
 option value=33/option
 option value=44/option
 option value=55/option
 /select

 I want to validate that at least one ticket has been purchased. I
 would like to try to do this with the validate plugin, more for the
 purposes of RD than anything else (I could write some code to just
 add up the values, but that's not really the point).

 How would I go about doing this?

 Thanks,
 Mark



[jQuery] Re: add li to ul

2009-03-11 Thread Elmar

Sure. There is a small difficulty in that this code is supposed to run
an iPhone/Webkit and some API´s don´t make sense in a standard web
enviroment. But basically you can just strip all that exra bits and
pieces and just run it in a browser. I should actually do this myself
and see if it is an issue with Webkit or a conflict with some other
library... hm... I´ll post it anyway.

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

html xmlns=http://www.w3.org/1999/xhtml;
head

titletest/title

meta name=viewport content=width=320; initial-scale=1.0;
maximum-scale=1.0; user-scalable=0;/
meta name=apple-touch-fullscreen content=yes /
meta name=apple-mobile-web-app-capable content=yes /

style type=text/css media=screen@import css/jqtouch.css;/
style
link rel=apple-touch-icon href=jqtouch.png /

script src=js/phonegap.js type=text/javascript
charset=utf-8/script
script src=js/jquery.js type=text/javascript
charset=utf-8/script
script src=js/jqtouch.navigate.js type=text/javascript
charset=utf-8/script
script src=js/jqtouch.animate.js type=text/javascript
charset=utf-8/script
script type=text/javascript charset=utf-8
$(function(){

// $.fn.itouch.preloadImages(['iui/toolbar.png', 'iui/
selection.png']);
$('#backButton').goback();
$('ul li a').drilldown();

})

var getLocation = function() {
  var suc = function(p){
//alert(p.latitude +   + p.longitude);
//$('#home ul').append('liplease show 
up/li');
//$('#homeul').append('lior that one/li');
//var test = $(limaybe that 
one/li).appendTo($(#home));
$('ul#home').html('lilast chance/li');
alert($('ul#home').html());
  };
  var fail = function(){};
  navigator.geolocation.getCurrentPosition(suc,fail);
}

var preventBehavior = function(e) {
  e.preventDefault();
};

function init(){
  getLocation();
}

  /script
/head
body onload=init();
div class=toolbar
h1 id=pageTitlegTracks/h1
a id=backButton class=button href=#/a
a class=button flip href=#settingsSettings/a
/div

ul id=home title=gTracks selected=true
lia href=#trackerTracker/a/li
/ul

ul id=tracker title=Tracking Data
li id=trackFirst/li
/ul

/body
/html

Thanks a lot,
Elmar

On Mar 11, 12:32 am, mkmanning michaell...@gmail.com wrote:
 @Elmar, there's nothing wrong with your jQuery; there is with
 Joseph's: creating a closingLIwon't work :(

 Could you show where in your script you're trying to append theLI?

 On Mar 10, 4:03 pm, Joseph Le Brech jlebr...@hotmail.com wrote:

  $(/li).appendTo(#myList).html(Please show up);

  the one you used those should also work tho.

   Date: Tue, 10 Mar 2009 14:18:57 -0700
   Subject: [jQuery]addli to ul
   From: elsch...@googlemail.com
   To: jquery-en@googlegroups.com

   Hi there,
   I am probably trying the most basic example and failed in my attemps
   so far. I would like toaddnew li´s to an existing ul with
   jQuery. What I am trying to do:

   in my script:
   ...
   $('#myList').append('liplease show up/li');
   ...

   in my HTML:
   ...
   ulid=myList title=someTitle selected=true
           lia href=#internalLinkexisting link/a/li
   /ul
   ...

   But although I ask really nicely, the newliwill never show up. The
   homeulis found correctly by jQuery and I can output it´s contents.

   What am I doing wrong?
   Thanks a lot!

  _
  Twice the fun—Share photos while you chat with Windows Live Messenger. 
  Learn 
  more.http://www.microsoft.com/uk/windows/windowslive/products/messenger.aspx


[jQuery] Re: Click function dosen't work, after append new html data.

2009-03-11 Thread errant

That's because events are binded to existing elements.

If you're using 1.3.x, take a look at live method:
http://docs.jquery.com/Events/live#typefn. With previous versions,
livequery plugin may be helpful: http://docs.jquery.com/Plugins/livequery

On 11 мар, 09:25, sure sure.2...@gmail.com wrote:
 Hi all,
           I am new to jquery. My close  click event function dosen't
 work, when ever i append new html data to my div. Intially it is
 working fine with static data. Please help me to fix this problem.

 $(function()
 {
 $(#addrow).click(function()
                 {
                         alert($(#mainlayout .row).length);
                         var len = parseInt($(#mainlayout .row).length);
                         var html =div id=\row1\ class=\row\ul 
 class=\ulpanel
 \lidiv class=\close\ img src=\images/delete.png\ //
 divdiv1/div/lilidiv class=\close\img src=\images/
 delete.png\ //divdiv2/div/lilidiv class=\close\img
 src=\images/delete.png\ //divdiv3/div/li/ul/div;
                         $(#mainlayout).append(html);
                         //$(.ulpanel li).draggable();
                 });

 $(.close).click(function()
                 {
                         
 //alert($(this).parent().parent().parent().attr(class));
                         //alert(parseInt($(.ulpanel li).length));
                         if($(.ulpanel li).length==1)
                            $(this).parent().parent().parent().remove();
                         else
                                 $(this).parent().remove();
                 });

 });

 with Regards
 sure


[jQuery] Re: Click function dosen't work, after append new html data.

2009-03-11 Thread sure

Hi errant,
  Thank you very much for quick reply. Now it works good using
live method. Your solution saves my lot of time.

with Regards
sure.

On Mar 11, 1:32 pm, errant d.cheka...@gmail.com wrote:
 That's because events are binded to existing elements.

 If you're using 1.3.x, take a look at live 
 method:http://docs.jquery.com/Events/live#typefn. With previous versions,
 livequery plugin may be helpful:http://docs.jquery.com/Plugins/livequery

 On 11 мар, 09:25, sure sure.2...@gmail.com wrote:

  Hi all,
            I am new to jquery. My close  click event function dosen't
  work, when ever i append new html data to my div. Intially it is
  working fine with static data. Please help me to fix this problem.

  $(function()
  {
  $(#addrow).click(function()
                  {
                          alert($(#mainlayout .row).length);
                          var len = parseInt($(#mainlayout .row).length);
                          var html =div id=\row1\ class=\row\ul 
  class=\ulpanel
  \lidiv class=\close\ img src=\images/delete.png\ //
  divdiv1/div/lilidiv class=\close\img src=\images/
  delete.png\ //divdiv2/div/lilidiv class=\close\img
  src=\images/delete.png\ //divdiv3/div/li/ul/div;
                          $(#mainlayout).append(html);
                          //$(.ulpanel li).draggable();
                  });

  $(.close).click(function()
                  {
                          
  //alert($(this).parent().parent().parent().attr(class));
                          //alert(parseInt($(.ulpanel li).length));
                          if($(.ulpanel li).length==1)
                             $(this).parent().parent().parent().remove();
                          else
                                  $(this).parent().remove();
                  });

  });

  with Regards
  sure




[jQuery] Re: [validate] grouped select boxes

2009-03-11 Thread Mark King

I did this in the end (created a div called errorcontainer obviously).

$(document).ready(function(){
var container = $(#errorcontainer);
container.hide();
$(#regform).validate({
submitHandler: function(form) {
if ($(#seasonmember).val()==0  
$(#season).val()==0) {
container.show();
}
else {
form.submit();
}
}
});
});


On Mar 11, 6:13 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Using the validation plugin, set a required-rule for each field, after
 removing the value from the 0-option, that is, change it to option
 value0/option

 Jörn

 On Wed, Mar 11, 2009 at 6:57 AM, Mark King m...@ampersand.net.au wrote:

  Hi.

  I have two select boxes for differrent classes of tickets , like so:

  select name=seasonmember id=seasonmember
  option value=00/option
  option value=11/option
  option value=22/option
  option value=33/option
  option value=44/option
  option value=55/option
  /select
  select name=season id=season
  option value=00/option
  option value=11/option
  option value=22/option
  option value=33/option
  option value=44/option
  option value=55/option
  /select

  I want to validate that at least one ticket has been purchased. I
  would like to try to do this with the validate plugin, more for the
  purposes of RD than anything else (I could write some code to just
  add up the values, but that's not really the point).

  How would I go about doing this?

  Thanks,
  Mark


[jQuery] Re: Open a Pop Up Window Using jQuery

2009-03-11 Thread .Nil

Hi,

I wish to pop up a div using jquery Apppreciate if you send the
code, if possible.

On Mar 11, 2:16 am, MorningZ morni...@gmail.com wrote:
 is there any compelling reason to *not* use window.open, which any
 jQuery solution will ultimately use anyways?

 or are you looking for a modal div  (which blockUI can do, jqModal
 can do, jQuery UI can do, etc)

 On Mar 10, 2:46 pm, .Nil nileshd.kulka...@gmail.com wrote:



  Hi,

  How Could I open a open a pop window using jQuery?

  ~.Nil- Hide quoted text -

 - Show quoted text -


[jQuery] Unable to remove append data to div using remove() method.

2009-03-11 Thread sure

Hi all,
   I am unable to remove html data after append html data to div,
I can remove initially data using this function successfully with out
getting any problem.

Jquery
-
$(function(){
$(#addrow).live(click,function()
{
var len = parseInt($(#mainlayout .row).length);
alert(len);
var rlen = len+1;
var html =div id=\row+rlen+\ class=\row\ul 
class=\ulpanel
\lidiv class=\close\ img src=\images/delete.png\ //
divdiv1/div/lilidiv class=\close\img src=\images/
delete.png\ //divdiv2/div/lilidiv class=\close\img
src=\images/delete.png\ //divdiv3/div/li/ul/div;
$(#mainlayout).append(html);
$(.row).not(:last).resizable({handles:s});
$(#row+rlen+ .ulpanel li).draggable();
});

$(.close).live(click,function()
{
var id = $(this).parent().parent().parent().attr(id);
//alert(id);
//alert(parseInt($(.ulpanel li).length));
if($(.ulpanel li).length==1)
   $(this).parent().parent().parent().remove();
else
$(this).parent().remove();
});
});

Html data
--
div class=mainlayout id=mainlayout

  div class=row ui-resizable id=row1
!--div class=closeimg src=images/delete.png 
//div--
ul class=ulpanel
li class=ui-draggable
div class=closeimg 
src=images/delete.png//div
div1/div
/li
li class=ui-draggable
div class=closeimg 
src=images/delete.png//div
div2/div
/li
li class=ui-draggable
div class=closeimg 
src=images/delete.png//div
div3/div
/li
/ul
!--div id=panel1 class=paneldiv 
class=closeimg
src=images/delete.png //div1/div
div id=panel1 class=paneldiv class=closeimg 
src=images/
delete.png //div2/div
div id=panel1 class=paneldiv class=closeimg 
src=images/
delete.png //div3/div--
  div class=ui-resizable-handle ui-resizable-s unselectable=on
style=-moz-user-select: none;//div

!--div id=spt2 class=spliter
  div id=row2 class=row
div class=closeimg src=images/delete.png //div
div id=panel1 class=paneldiv class=closeimg 
src=images/
delete.png //div4/div
div id=panel1 class=paneldiv class=closeimg 
src=images/
delete.png //div5/div
div id=panel1 class=paneldiv class=closeimg 
src=images/
delete.png //div6/div
  /div
/div--
div class=row ui-resizable id=row2ul class=ulpanelli
class=ui-draggablediv class=closeimg src=images/delete.png/
/divdiv1/div/lili class=ui-draggablediv
class=closeimg src=images/delete.png//divdiv2/div/lili
class=ui-draggablediv class=closeimg src=images/delete.png/
/divdiv3/div/li/uldiv class=ui-resizable-handle ui-
resizable-s unselectable=on style=-moz-user-select: none;//
divdiv class=row id=row3ul class=ulpanelli class=ui-
draggablediv class=closeimg src=images/delete.png//
divdiv1/div/lili class=ui-draggablediv class=closeimg
src=images/delete.png//divdiv2/div/lili class=ui-
draggablediv class=closeimg src=images/delete.png//
divdiv3/div/li/ul/div/div

with Regards
sure.



[jQuery] Re: [validate] grouped select boxes

2009-03-11 Thread Mark King

I did this in the end (created a div called errorcontainer obviously).

$(document).ready(function(){
var container = $(#errorcontainer);
container.hide();
$(#regform).validate({
submitHandler: function(form) {
if ($(#seasonmember).val()==0  
$(#season).val()==0) {
container.show();
}
else {
form.submit();
}
}
});
});


On Mar 11, 6:13 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Using the validation plugin, set a required-rule for each field, after
 removing the value from the 0-option, that is, change it to option
 value0/option

 Jörn

 On Wed, Mar 11, 2009 at 6:57 AM, Mark King m...@ampersand.net.au wrote:

  Hi.

  I have two select boxes for differrent classes of tickets , like so:

  select name=seasonmember id=seasonmember
  option value=00/option
  option value=11/option
  option value=22/option
  option value=33/option
  option value=44/option
  option value=55/option
  /select
  select name=season id=season
  option value=00/option
  option value=11/option
  option value=22/option
  option value=33/option
  option value=44/option
  option value=55/option
  /select

  I want to validate that at least one ticket has been purchased. I
  would like to try to do this with the validate plugin, more for the
  purposes of RD than anything else (I could write some code to just
  add up the values, but that's not really the point).

  How would I go about doing this?

  Thanks,
  Mark


[jQuery] Re: filter(fn)

2009-03-11 Thread Bright Dadson
Thanks Karl,
It worked perfect.

On Tue, Mar 10, 2009 at 7:01 PM, Karl Swedberg k...@englishrules.comwrote:

 if(($out).filter(':contains(Invalid)'))


 That is always going to be true since it returns a jQuery object
 regardless of whether there are any matched elements. Try this instead:
 if(($out).filter(':contains(Invalid)').length)


 --Karl

 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com




 On Mar 10, 2009, at 11:32 AM, brightdad...@googlemail.com wrote:


 Hi Experts,

 I am trying to do something like this;

  $(form#submit).submit(function(){
var name = $('#name').attr('value');
var $out = $(#message);

//Send the request
$.ajax({
type: POST,
url: post.php,
data: oname=+name,
complete: function(data){
$out.html(data.responseText);

if(($out).filter(':contains(Invalid)'))
{
$out.fadeIn();
$(.txtHint:visible).slideDown(slow);
$(.client).hide();
}else if($out).filter(':contains(successfull)')){
  $out.fadeIn();
   }
 to be able to determine what to hide and display depending on the
 result recieved from the query.
 This doesnt not behave as exoected - do any know  exactkly what i am
 doing wrong here?





[jQuery] Re: Open a Pop Up Window Using jQuery

2009-03-11 Thread Richard D. Worth
Here are a few:

* jQuery UI Dialog - http://jqueryui.com/demos/dialog
* Facebox - http://famspam.com/facebox
* FancyBox - http://fancy.klade.lv/
* iBox v2 - http://www.ibegin.com/labs/ibox/
* jqModal - http://dev.iceburg.net/jquery/jqModal/
* jQuery Alert Dialogs - http://abeautifulsite.net/notebook/87
* lightBox - http://leandrovieira.com/projects/jquery/lightbox/
* nyroModal - http://nyromodal.nyrodev.com/
* prettyPhoto - http://www.no*margin*for*errors.com/projects/prettyPhoto/
* SimpleModal - http://www.ericmmartin.com/simplemodal/
* Slimbox 2 - http://www.digitalia.be/software/slimbox2/
* SWIP DOMWIndow - http://swip.codylindley.com/DOMWindowDemo.html
* ThickBox - http://jquery.com/demo/thickbox/

This list is from http://wiki.jqueryui.com/Essential-Controls-List#dialog

Also, you can search the jQuery Plugins site (plugins.jquery.com) for
'dialog' or 'modal' or 'popup':

http://plugins.jquery.com/search/node/dialog+type%3Aproject_project
http://plugins.jquery.com/search/node/modal+type%3Aproject_project
http://plugins.jquery.com/search/node/popup+type%3Aproject_project

and find quite a few more.

- Richard

On Wed, Mar 11, 2009 at 4:33 AM, .Nil nileshd.kulka...@gmail.com wrote:


 Hi,

 I wish to pop up a div using jquery Apppreciate if you send the
 code, if possible.

 On Mar 11, 2:16 am, MorningZ morni...@gmail.com wrote:
  is there any compelling reason to *not* use window.open, which any
  jQuery solution will ultimately use anyways?
 
  or are you looking for a modal div  (which blockUI can do, jqModal
  can do, jQuery UI can do, etc)
 
  On Mar 10, 2:46 pm, .Nil nileshd.kulka...@gmail.com wrote:
 
 
 
   Hi,
 
   How Could I open a open a pop window using jQuery?
 
   ~.Nil- Hide quoted text -
 
  - Show quoted text -


[jQuery] How to prevent third-party CSS code override our CSS

2009-03-11 Thread Nguyễn Quốc Vinh
I'm using sortable of jQuery UI!
My elements  such as UL tag, LI tag(sortable, dragable,..element) may put
into many template!
And each template have thier own CSS, so, that CSS override CSS of my LI tag

Have anyway to clear all CSS apply on our element, then apply new CSS? Or i
must use !important for all property to prevent overriding!

Take a look on two URL:
http://trademerchants.com/delnow/kurei/dnd//themes/hr/html/index.myTemplate.php

http://trademerchants.com/delnow/kurei/dnd//themes/template1/html/index.myTemplate.php

As you can see, li item appeas in other style because each template have
own CSS

Does anyone know how to prevent this?


[jQuery] [Cycle] opts.slideCount Problem

2009-03-11 Thread jeancharles

a fast question :
how to use the opts.slideCount ?


   function onAfter(curr, next, opts){
var msg = ' ' + ( opts.currSlide + 1) + ' / '
+ (opts.slideCount);
$('#counterMedia').html(msg);
};



seems not working easily :

the result in the #counterMedia is :

2 / undefined




the opts.currentSlide works well
but the opts.slideCount not


[jQuery] [validate] jquery validation problem

2009-03-11 Thread exhaler

hi,
i new to jquery, i'm using the jquery validation to validate my form.
using this code
script src=includes/jquery/jquery.validate.js type=text/
javascript/script
script src=includes/jquery/cmxforms.js type=text/javascript/
script

script type=text/javascript
$.validator.setDefaults({
submitHandler: function() { alert(submitted!); }
});

$().ready(function() {
$(#addrest).validate({
rules: {
restname: required
},
messages: {
restname: brfont face=\Arial\ 
style=\font-size: 9pt\ color=
\#96A26F\Please enter your Restaurant Name/font
}
});
});

$(document).ready(function() {
   $('#yes').click(function(){
 $('#tr').hide();
   });
   $('#no').click(function(){
 $('#tr').show();
   });
 });
/scriptscript src=includes/jquery/jquery.validate.js type=text/
javascript/script
script src=includes/jquery/cmxforms.js type=text/javascript/
script

script type=text/javascript
$.validator.setDefaults({
submitHandler: function() { alert(submitted!); }
});

$().ready(function() {
$(#addrest).validate({
rules: {
restname: required
},
messages: {
restname: brfont face=\Arial\ 
style=\font-size: 9pt\ color=
\#96A26F\Please enter your Restaurant Name/font
}
});
});

$(document).ready(function() {
   $('#yes').click(function(){
 $('#tr').hide();
   });
   $('#no').click(function(){
 $('#tr').show();
   });
 });
/script

its working fine under IE7 but when i press the submit button again on
FF or opera the message appears under the old message so i would have
two messages saying this is required... under each other. this keeps
happening every time i press the submit button.
how can i make the message show only once no matter how many times the
submit button is pressed?
thx


[jQuery] Tablesorter with inside delete link

2009-03-11 Thread Dagnan


Hi!

I'm using tablesorter, which content is generated by a $.get (from a php
script) when the page loads.
I want to add to my table a column 'delete' with a delete link (for each row
of course).

The problem is I can't catch the click action with jQuery: nothing happens.
But when the link is outside the php-generated content, I can trigger the
action (displaying for example an alert).

Do you understand the problem? Maybe it's a basic jQuery situation I don't
know.
-- 
View this message in context: 
http://www.nabble.com/Tablesorter-with-inside-delete-link-tp22384016s27240p22384016.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Missing semi-colons in form plugin.

2009-03-11 Thread Mike Alsup

 FYI: Semi-colons are missing on lines 87  605 of the form plugin,
 thus making it hard to compress/obfuscate.

Fixed.

http://www.malsup.com/jquery/form/#download


[jQuery] Re: How to prevent third-party CSS code override our CSS

2009-03-11 Thread sure

Hi,
 Include your css files using @import. It loads at the end of the page
load. And use !important in your css. May i think these will help u.

Regards
sure
On Mar 11, 3:38 pm, Nguyễn Quốc Vinh kureik...@gmail.com wrote:
 I'm using sortable of jQuery UI!
 My elements  such as UL tag, LI tag(sortable, dragable,..element) may put
 into many template!
 And each template have thier own CSS, so, that CSS override CSS of my LI tag

 Have anyway to clear all CSS apply on our element, then apply new CSS? Or i
 must use !important for all property to prevent overriding!

 Take a look on two 
 URL:http://trademerchants.com/delnow/kurei/dnd//themes/hr/html/index.myTe...

 http://trademerchants.com/delnow/kurei/dnd//themes/template1/html/ind...

 As you can see, li item appeas in other style because each template have
 own CSS

 Does anyone know how to prevent this?


[jQuery] jQuery validation plugin -- how to validate an input only if it contains info

2009-03-11 Thread clorentzen

Hi --

I've got a contact form here

http://www.dianlofton.com/contact.shtml

...using the jquery.validate.js plugin. The form has an optional input
for a phone number, which I'd like to have validated -- but only if
there is info in the input. If you look at the source code for that
page, you'll see some commented out code for the phone number
validation. However, when this scripting is active on the page, it
makes the phone number a required field, which is not what I'm after:

$.validator.addMethod(phone, function(ph, element) {
if (ph == null) {
return false;
}
var stripped = ph.replace(/[\s()+-]|ext\.?/gi, );
// 10 is the minimum number of numbers required
return ((/\d{10,}/i).test(stripped));
}, Please enter a valid phone number);

Any help on how to have this field be optional, but still get
validated if the user inputs data, would be greatly appreciated.
Thanks!

--Carl.



[jQuery] [Validate] Validation plugin adding random validation rules depending on message

2009-03-11 Thread Walther

I'm having a strange issue with the validation plugin.

I have a field for the users telephone number, but the only rule that
is set is that it is a required field. However, if you type any
character apart from a number it gives a  Please enter a valid
number error which it shouldn't (as I never told it to validate on
numbers). The message for the required rule is Please enter the
contact telephone number of the payee., if I remove the number in
the message then it works fine.

I am using the metadata plugin to get the validation rules.

How can I stop the validation plugin from automatically adding
validation rules?


[jQuery] Re: Reset individual form objects to their original display state

2009-03-11 Thread Alwin Pacheco

@michaell

  I Haven't see your comment but you're right. In my example I show
two options to get/retrieve the values of the :input fields that I use
trying to set a perspective of the problem. The first one within a
function and a second example directly on a specific field. Saving the
whole input's attributes is perfect you the problem shown


[jQuery] [Announce] jOWL 1.0 released

2009-03-11 Thread David Decraene

I'm happy to announce the release of jOWL version 1.0

jOWL (http://jowl.ontologyonline.org) is a jQuery plugin to load and
visualize semantic information from OWL (Web Ontology Language) files.

This version incorporates smarter reasoning, faster loading and many
other goodies.

David
jOWL semantic javascript library : http://jowl.ontologyonline.org
Visualizing ontologies with treeviews, html templating, touchgraphs
and SPARQL-DL



[jQuery] Re: [Validate] Validation plugin adding random validation rules depending on message

2009-03-11 Thread Walther

I'm not using any class number. The problem only exists if the word
number exists inside the message, what can I remove or change in the
jquery.validate.js file to stop it scanning messages?

I'm not sure where to put the delete line. If I add it in my document
ready function the validation breaks.

Thanks for the quick reply

Walther

On Mar 11, 2:07 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 You probably have added a class number that the plugin picks up as a
 rule. You can remove or replace the class, or remove the number
 method:

 delete $.validator.methods.number;

 Jörn

 On Wed, Mar 11, 2009 at 1:01 PM, Walther waltherl...@gmail.com wrote:

  I'm having a strange issue with the validation plugin.

  I have a field for the users telephone number, but the only rule that
  is set is that it is a required field. However, if you type any
  character apart from a number it gives a  Please enter a valid
  number error which it shouldn't (as I never told it to validate on
  numbers). The message for the required rule is Please enter the
  contact telephone number of the payee., if I remove the number in
  the message then it works fine.

  I am using the metadata plugin to get the validation rules.

  How can I stop the validation plugin from automatically adding
  validation rules?


[jQuery] Re: [Validate] Validation plugin adding random validation rules depending on message

2009-03-11 Thread Jörn Zaefferer

You could configure the metadata plugin to use something else then the
class attribute. Currently you have the word number inside the class
attribute, so the input has the class number, metadata or not.

Jörn

On Wed, Mar 11, 2009 at 1:13 PM, Walther waltherl...@gmail.com wrote:

 I'm not using any class number. The problem only exists if the word
 number exists inside the message, what can I remove or change in the
 jquery.validate.js file to stop it scanning messages?

 I'm not sure where to put the delete line. If I add it in my document
 ready function the validation breaks.

 Thanks for the quick reply

 Walther

 On Mar 11, 2:07 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
 wrote:
 You probably have added a class number that the plugin picks up as a
 rule. You can remove or replace the class, or remove the number
 method:

 delete $.validator.methods.number;

 Jörn

 On Wed, Mar 11, 2009 at 1:01 PM, Walther waltherl...@gmail.com wrote:

  I'm having a strange issue with the validation plugin.

  I have a field for the users telephone number, but the only rule that
  is set is that it is a required field. However, if you type any
  character apart from a number it gives a  Please enter a valid
  number error which it shouldn't (as I never told it to validate on
  numbers). The message for the required rule is Please enter the
  contact telephone number of the payee., if I remove the number in
  the message then it works fine.

  I am using the metadata plugin to get the validation rules.

  How can I stop the validation plugin from automatically adding
  validation rules?


[jQuery] Re: [Validate] Validation plugin adding random validation rules depending on message

2009-03-11 Thread Walther

Ah, that worked. Thanks.

Walther

On Mar 11, 2:15 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 You could configure the metadata plugin to use something else then the
 class attribute. Currently you have the word number inside the class
 attribute, so the input has the class number, metadata or not.

 Jörn

 On Wed, Mar 11, 2009 at 1:13 PM, Walther waltherl...@gmail.com wrote:

  I'm not using any class number. The problem only exists if the word
  number exists inside the message, what can I remove or change in the
  jquery.validate.js file to stop it scanning messages?

  I'm not sure where to put the delete line. If I add it in my document
  ready function the validation breaks.

  Thanks for the quick reply

  Walther

  On Mar 11, 2:07 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com
  wrote:
  You probably have added a class number that the plugin picks up as a
  rule. You can remove or replace the class, or remove the number
  method:

  delete $.validator.methods.number;

  Jörn

  On Wed, Mar 11, 2009 at 1:01 PM, Walther waltherl...@gmail.com wrote:

   I'm having a strange issue with the validation plugin.

   I have a field for the users telephone number, but the only rule that
   is set is that it is a required field. However, if you type any
   character apart from a number it gives a  Please enter a valid
   number error which it shouldn't (as I never told it to validate on
   numbers). The message for the required rule is Please enter the
   contact telephone number of the payee., if I remove the number in
   the message then it works fine.

   I am using the metadata plugin to get the validation rules.

   How can I stop the validation plugin from automatically adding
   validation rules?


[jQuery] Re: JQuery XML Manipulation

2009-03-11 Thread stilwalli




stilwalli wrote:
 
 Hello Developers,
 
 I am using jqGrid plugin of JQuery for displaying data in a grid. I am
 wanting to manipulate the data xml dynamically. For instance say I have an
 xml like
 data
 emplist
 employee
 empcode10/empcode
 empnameraj/empname
 employee
 employee
 empcode20/empcode
 empnamecaj/empname
 employee
 /emplist
 /data
 
 Now when I say add row, I would like to add an data to the row (which I am
 able to do it). But I am not able to get the updated xml. For instance If
 I add data with empcode as 30  name as abc
 
 data
 emplist
 employee
 empcode10/empcode
 empnameraj/empname
 employee
 employee
 empcode20/empcode
 empnamecaj/empname
 employee
 employee
 empcode30/empcode
 empnameABC/empname
 employee
 
 The idea is to get the maniupulated xml data  then sent it to the
 server... Please help
 /emplist
 /data
 
 

-- 
View this message in context: 
http://www.nabble.com/JQuery-XML-Manipulation-tp22448894s27240p22453495.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: jQuery TinyMCE

2009-03-11 Thread Adhip

The problem is that tinyMCE has not added the content to the textarea
which it usually does on the page unload event.

To solve this, call this function before you serialize:

tinyMCE.triggerSave(true,true);

- Adhip.

On Feb 25, 8:10 pm, Dan Vega danv...@gmail.com wrote:
 I am having an issue withtinymceand jquery ajax form submissions. I
 have 2 fields (title/content) and a hidden input (id) that I am
 submitting via ajax.

 when I use serialize

 var form = $(form).serialize();

 title  = My title
 id = 2124245
 content = null

 It seems to be an issue withtinymcebut I if I post using normal form
 it works. I imagine some kind of scopes are butting heads but I have
 no idea. If I take offtinymceand just use the textarea, it works
 great.

 Anyone got any ideas?


[jQuery] slideToggle error in IE

2009-03-11 Thread per.iamso...@gmail.com

I'am using the slideToggle function to toggle all boxes at my page. It
worked in all browser at first, but now I get an error in Internet
Explorer7 (Element is not defined).
I tried to figure out where the problem is, because no javascript
works at all in IE now.
The error is trigged at:

$(.expand).click(function() {

});

The problem only appears when this jQuery code is added so I tried to
find the click event in jQuery to debug the error, without any result.
Where does jQuery loop through all .expand classes?

Best regards
Per Eriksson


[jQuery] Re: ajax post with tinymce

2009-03-11 Thread Adhip

Does this solve your problem?  http://www.crossedconnections.org/w/?p=88

All you have to do is call:

tinyMCE.triggerSave(true,true);

before you make the post call.

On Feb 13, 9:48 pm, david.0pl...@gmail.com david.0pl...@gmail.com
wrote:
 I need to have this:

 function nuovo_articoloPOST(){
         //Se e solo SE il form è stato validato
         if($(#nuovo_articolo).valid()) {

                  //Assegna alle variabili il nome del campo!
                  var imageName = $(#imageName).attr(value);
                  var titolo = $(#titolo).attr(value);
                  var categoria = $(#categoria).attr(value);
                  var abstract = $(#abstract).attr(value);
                  var descrizione = $(#descrizione).attr(value);
                 alert(abstract);alert(descrizione);

                  $(#nuovo_articoloSUBMIT).attr({ disabled:true, value:... 
 });
          $(#nuovo_articoloSUBMIT).blur();
                  //Inviamo la richiesta ajax!
          $.ajax({
              type: POST, url: new.php, data:
 _invia_check=1imageName= + imageName + titolo= + titolo +
 categoria= + categoria + abstract= + abstract +descrizione= +
 descrizione,
                          //Mentre carica il responso!
                          beforeSend: function(){$(#loading).show(fast);},
                          complete: function(){$(#loading).hide(fast);},
              //Richiesta completata! Riscriviamo l' html!
                          success: function(html){$(#new).html(html);}
           });
      }

     return false;

 };

 Problem is that these two:
 var abstract = $(#abstract).attr(value);
  var descrizione = $(#descrizione).attr(value);

 Are tinymce' d. And they don't send anything to value. How can I fix
 this?


[jQuery] Re: ajax post with tinymce

2009-03-11 Thread Adhip

Call this before the $.post call:

tinyMCE.triggerSave(true,true);


On Feb 13, 9:48 pm, david.0pl...@gmail.com david.0pl...@gmail.com
wrote:
 I need to have this:

 function nuovo_articoloPOST(){
         //Se e solo SE il form è stato validato
         if($(#nuovo_articolo).valid()) {

                  //Assegna alle variabili il nome del campo!
                  var imageName = $(#imageName).attr(value);
                  var titolo = $(#titolo).attr(value);
                  var categoria = $(#categoria).attr(value);
                  var abstract = $(#abstract).attr(value);
                  var descrizione = $(#descrizione).attr(value);
                 alert(abstract);alert(descrizione);

                  $(#nuovo_articoloSUBMIT).attr({ disabled:true, value:... 
 });
          $(#nuovo_articoloSUBMIT).blur();
                  //Inviamo la richiesta ajax!
          $.ajax({
              type: POST, url: new.php, data:
 _invia_check=1imageName= + imageName + titolo= + titolo +
 categoria= + categoria + abstract= + abstract +descrizione= +
 descrizione,
                          //Mentre carica il responso!
                          beforeSend: function(){$(#loading).show(fast);},
                          complete: function(){$(#loading).hide(fast);},
              //Richiesta completata! Riscriviamo l' html!
                          success: function(html){$(#new).html(html);}
           });
      }

     return false;

 };

 Problem is that these two:
 var abstract = $(#abstract).attr(value);
  var descrizione = $(#descrizione).attr(value);

 Are tinymce' d. And they don't send anything to value. How can I fix
 this?


[jQuery] Copy a class links to a paragraph works on all browsers but Firefox

2009-03-11 Thread ThomasS

Hello,

at this a href=http://baustelle.besucherring.org/frontend/
karte.htmpage/a I use the following jQuery Script to highlight the
towns at the map when the user is hovering over the items at the
navigation

$(document).ready(function(){
$(#block_2 h2).after(p id=\kartenort\/p);
$(#navi_ring a).hover(function(){
var kort = $(this).text();
var ortcl = $(this).attr(class);
$(#kartenort).html(kort);
$(#kartenort).addClass(ortcl);
},function(){
$(#kartenort).removeClass();
});
});

This works pretty well with Opera, Safari and IE7 but not with Firefox

It would be very nice if anyone could give me an advice what to do.

Thomas


[jQuery] Problem importing XML file

2009-03-11 Thread paulswansea

Hi,

I'm trying to import my sitemap.xml file, and the code below works
when i have the alert('.') placed in there, but the moment I
remove it, the data isn't imported, can anyone help?

$.ajax({
type: GET,
url: /sitemap.xml,
dataType: xml,
success: function(xml) {
var name_text;
alert('got it!'); // 
- IF LINE
REMOVED, CODE BREAKS.
$(xml).find('loc').each(function(){
name_text = $(this).text();
$('#sitemap').append('div' + name_text + 
'/div');
}); //close each(
}
}); //close $.ajax(


[jQuery] Re: jQuery validation plugin -- how to validate an input only if it contains info

2009-03-11 Thread clorentzen

Thank you!

--Carl.

On Mar 11, 7:54 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 add if (this.optional(element)) return true; to the top. See any
 existing validation method for an example, 
 orhttp://docs.jquery.com/Plugins/Validation/Validator/addMethod

 Jörn

 On Wed, Mar 11, 2009 at 12:43 PM, clorentzen carl.lorent...@gmail.com wrote:

  Hi --

  I've got a contact form here

 http://www.dianlofton.com/contact.shtml

  ...using the jquery.validate.js plugin. The form has an optional input
  for a phone number, which I'd like to have validated -- but only if
  there is info in the input. If you look at the source code for that
  page, you'll see some commented out code for the phone number
  validation. However, when this scripting is active on the page, it
  makes the phone number a required field, which is not what I'm after:

  $.validator.addMethod(phone, function(ph, element) {
  if (ph == null) {
  return false;
  }
  var stripped = ph.replace(/[\s()+-]|ext\.?/gi, );
  // 10 is the minimum number of numbers required
  return ((/\d{10,}/i).test(stripped));
  }, Please enter a valid phone number);

  Any help on how to have this field be optional, but still get
  validated if the user inputs data, would be greatly appreciated.
  Thanks!

  --Carl.


[jQuery] Re: Tablesorter with inside delete link

2009-03-11 Thread MorningZ

Showing some code, specifically how you wire up this delete button
would be a help to others helping you


On Mar 11, 6:12 am, Dagnan dag...@gmail.com wrote:
 Hi!

 I'm using tablesorter, which content is generated by a $.get (from a php
 script) when the page loads.
 I want to add to my table a column 'delete' with a delete link (for each row
 of course).

 The problem is I can't catch the click action with jQuery: nothing happens.
 But when the link is outside the php-generated content, I can trigger the
 action (displaying for example an alert).

 Do you understand the problem? Maybe it's a basic jQuery situation I don't
 know.
 --
 View this message in 
 context:http://www.nabble.com/Tablesorter-with-inside-delete-link-tp22384016s...
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Treeview node click behavior

2009-03-11 Thread Ryan

Is there a way to make a node in the treeview expand/collapse ONLY if
the +/- is clicked but not the folder icon or folder name but still
make the node selectable?


[jQuery] live() not working in IE8?

2009-03-11 Thread Todd Rafferty

I have a drop down that is being generated via load() - to be 100%
clear, I'll restate that. The drop down does not exist on the actual
page.  I'm doing this:

$('#orderlineform #productlisting').load('orderProxy.cfm',
{
 mode:'getAvailableProducts'
,ordergrade_id:ordergrade_id
,order_id:order_id
}
);

This is generating the drop down for me and putting it inside the
#produclisting span for me. Now, just attaching a 'change' event on it
wasn't working, so I looked into livequery() (eventually live() ) --
using it works just fine in FireFox, but fails in IE.

$('#orderlineform #product_id').live('change',isRentalActive);
-
function isRentalActive(){
var data = $(#orderlineform #product_id option:selected).metadata
({type:'attr',name:'data'});
alert(data);
return false;
if(data.return_flag == 0){
$('.rental').css(display, table-row-group).show();
}else{
$('.rental').hide();
}
}

Any suggestions as to why this is failing in IE?

Thanks,
~Todd


[jQuery] AutoComplete

2009-03-11 Thread Bright Dadson
Hi Experts,

I am trying to use jQuery get function to develop an autocomplete which will
display suggestion as soon as users starts typing like this;

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
script src=http://code.jquery.com/jquery-latest.js;/script
link rel=stylesheet href=
http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
type=text/css /
link rel=stylesheet href=
http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css;
type=text/css /
script type=text/javascript src=
http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js
/script
script type=text/javascript src=
http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dimensions.js
/script
script type=text/javascript src=
http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js
/script
script
$(document).ready(function(){
var result = $.get(test.php, { data:
q+$(#example).attr('value') },
function(data){
$(#example).html(data);
});

$(#example).autocomplete(result);
});
/script

/head
body
Company name: input id=example /
/body
/html


and my backend php script looks like this;

?php
 $q=$_GET[q];
  $con = mysql_connect('host', 'user', 'password');
  if (!$con)
   {
  die('Could not connect: ' . mysql_error());
  }

  mysql_select_db(database, $con);

   $sql=SELECT company_name FROM company WHERE company_name =
'.$q.';

 $result = mysql_query($sql);

 while($row = mysql_fetch_array($result))
{
echo $row['company_name'];
  }

mysql_close($con);
?

Unfurtunately tthis donot work as required - i donot see any suggestion. Do
anyone know what i am doing wrong here?

Pls help.


[jQuery] Re: AutoComplete

2009-03-11 Thread MorningZ

What is the purpose of the .get() ?

The autocomplete plugin already has the ajax call all wired into it,
there's no need to do that on your own

$(document).ready(function(){
  $(#example).autocomplete(
  test.php
  ).result(function(a,data,c) {
   // variable data has the value the user selected
  });
});



On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
wrote:
 Hi Experts,

 I am trying to use jQuery get function to develop an autocomplete which will
 display suggestion as soon as users starts typing like this;

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 html
     head
         script src=http://code.jquery.com/jquery-latest.js;/script
         link rel=stylesheet 
 href=http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
 type=text/css /
         link rel=stylesheet 
 href=http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...;
 type=text/css /
         script type=text/javascript 
 src=http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgif...
 /script
         script type=text/javascript 
 src=http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dime...
 /script
         script type=text/javascript 
 src=http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...
 /script
         script
             $(document).ready(function(){
                 var result = $.get(test.php, { data:
 q+$(#example).attr('value') },
                 function(data){
                     $(#example).html(data);
                 });

                 $(#example).autocomplete(result);
             });
         /script

     /head
     body
         Company name: input id=example /
     /body
 /html

 and my backend php script looks like this;

 ?php
      $q=$_GET[q];
       $con = mysql_connect('host', 'user', 'password');
       if (!$con)
        {
           die('Could not connect: ' . mysql_error());
       }

       mysql_select_db(database, $con);

        $sql=SELECT company_name FROM company WHERE company_name =
 '.$q.';

      $result = mysql_query($sql);

          while($row = mysql_fetch_array($result))
         {
             echo $row['company_name'];
           }

 mysql_close($con);
 ?

 Unfurtunately tthis donot work as required - i donot see any suggestion. Do
 anyone know what i am doing wrong here?

 Pls help.


[jQuery] Re: AutoComplete

2009-03-11 Thread Joseph Le Brech

you should be sanitising your sql aswell.
 
 Date: Wed, 11 Mar 2009 08:00:23 -0700
 Subject: [jQuery] Re: AutoComplete
 From: morni...@gmail.com
 To: jquery-en@googlegroups.com
 
 
 What is the purpose of the .get() ?
 
 The autocomplete plugin already has the ajax call all wired into it,
 there's no need to do that on your own
 
 $(document).ready(function(){
 $(#example).autocomplete(
 test.php
 ).result(function(a,data,c) {
 // variable data has the value the user selected
 });
 });
 
 
 
 On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
 wrote:
  Hi Experts,
 
  I am trying to use jQuery get function to develop an autocomplete which will
  display suggestion as soon as users starts typing like this;
 
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  http://www.w3.org/TR/html4/loose.dtd;
  html
  head
  script src=http://code.jquery.com/jquery-latest.js;/script
  link rel=stylesheet 
  href=http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
  type=text/css /
  link rel=stylesheet 
  href=http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...;
  type=text/css /
  script type=text/javascript 
  src=http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgif...
  /script
  script type=text/javascript 
  src=http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dime...
  /script
  script type=text/javascript 
  src=http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...
  /script
  script
  $(document).ready(function(){
  var result = $.get(test.php, { data:
  q+$(#example).attr('value') },
  function(data){
  $(#example).html(data);
  });
 
  $(#example).autocomplete(result);
  });
  /script
 
  /head
  body
  Company name: input id=example /
  /body
  /html
 
  and my backend php script looks like this;
 
  ?php
   $q=$_GET[q];
$con = mysql_connect('host', 'user', 'password');
if (!$con)
 {
die('Could not connect: ' . mysql_error());
}
 
mysql_select_db(database, $con);
 
 $sql=SELECT company_name FROM company WHERE company_name =
  '.$q.';
 
   $result = mysql_query($sql);
 
   while($row = mysql_fetch_array($result))
  {
  echo $row['company_name'];
}
 
  mysql_close($con);
  ?
 
  Unfurtunately tthis donot work as required - i donot see any suggestion. Do
  anyone know what i am doing wrong here?
 
  Pls help.

_
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/

[jQuery] Helping IE support Border Radius

2009-03-11 Thread weepy

http://gist.github.com/77516

// Use like : $(.myClass).borderRadius() will attempt to apply
curved corners as per the elements -moz-border-radius attribute
// Good:
// - supports textured forgrounds and backgrounds
// - maintains layouts
// - very easy to use
// - IE6 and IE7
// Bad:
// - not fluid. Reapply if the dimensions change
// - only supports rounding all corners
// - no hover
// - no Opera



[jQuery] Re: AutoComplete

2009-03-11 Thread Bright Dadson
Do i access data like this;

 $(example).html(data);





On Wed, Mar 11, 2009 at 3:11 PM, Joseph Le Brech jlebr...@hotmail.comwrote:

  you should be sanitising your sql aswell.

  Date: Wed, 11 Mar 2009 08:00:23 -0700
  Subject: [jQuery] Re: AutoComplete
  From: morni...@gmail.com
  To: jquery-en@googlegroups.com

 
 
  What is the purpose of the .get() ?
 
  The autocomplete plugin already has the ajax call all wired into it,
  there's no need to do that on your own
 
  $(document).ready(function(){
  $(#example).autocomplete(
  test.php
  ).result(function(a,data,c) {
  // variable data has the value the user selected
  });
  });
 
 
 
  On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
  wrote:
   Hi Experts,
  
   I am trying to use jQuery get function to develop an autocomplete which
 will
   display suggestion as soon as users starts typing like this;
  
   !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   http://www.w3.org/TR/html4/loose.dtd;
   html
   head
   script src=http://code.jquery.com/jquery-latest.js
 /script
   link rel=stylesheet href=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
   type=text/css /
   link rel=stylesheet href=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...;
   type=text/css /
   script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgif...
   /script
   script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dime...
   /script
   script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...
   /script
   script
   $(document).ready(function(){
   var result = $.get(test.php, { data:
   q+$(#example).attr('value') },
   function(data){
   $(#example).html(data);
   });
  
   $(#example).autocomplete(result);
   });
   /script
  
   /head
   body
   Company name: input id=example /
   /body
   /html
  
   and my backend php script looks like this;
  
   ?php
$q=$_GET[q];
 $con = mysql_connect('host', 'user', 'password');
 if (!$con)
  {
 die('Could not connect: ' . mysql_error());
 }
  
 mysql_select_db(database, $con);
  
  $sql=SELECT company_name FROM company WHERE company_name =
   '.$q.';
  
$result = mysql_query($sql);
  
while($row = mysql_fetch_array($result))
   {
   echo $row['company_name'];
 }
  
   mysql_close($con);
   ?
  
   Unfurtunately tthis donot work as required - i donot see any
 suggestion. Do
   anyone know what i am doing wrong here?
  
   Pls help.

 --
 Windows Live Hotmail just got better. Find out 
 more!http://clk.atdmt.com/UKM/go/134665311/direct/01/



[jQuery] Re: .append misbehavior in MSIE7 with cross-window element injection

2009-03-11 Thread Nekura Neko

Thanks Dave!

script type=text/javascript
var newElement = $(li /, opener.document).text(Mod State);
$(opener.document).find(#injectHere).append(newElement);
/script

works great in MSIE7  FF3.

/script On Mar 10, 5:47 pm, Dave Methvin dave.meth...@gmail.com
wrote:
 Try this:

 $(li /, opener.document)

 That way it will create the li element in the right document.

 http://docs.jquery.com/Core/jQuery#htmlownerDocument


[jQuery] Re: AutoComplete

2009-03-11 Thread Joseph Le Brech

you are assigning the html here to what's in data.

 

to access i think is data = $(example).text;

 

try this but breakpoint it in firebug, because in not using firefox right now.
 


Date: Wed, 11 Mar 2009 15:18:10 +
Subject: [jQuery] Re: AutoComplete
From: brightdad...@googlemail.com
To: jquery-en@googlegroups.com

Do i access data like this;

 $(example).html(data); 






On Wed, Mar 11, 2009 at 3:11 PM, Joseph Le Brech jlebr...@hotmail.com wrote:


you should be sanitising your sql aswell.
 
 Date: Wed, 11 Mar 2009 08:00:23 -0700
 Subject: [jQuery] Re: AutoComplete
 From: morni...@gmail.com
 To: jquery-en@googlegroups.com



 
 
 What is the purpose of the .get() ?
 
 The autocomplete plugin already has the ajax call all wired into it,
 there's no need to do that on your own
 
 $(document).ready(function(){
 $(#example).autocomplete(
 test.php
 ).result(function(a,data,c) {
 // variable data has the value the user selected
 });
 });
 
 
 
 On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
 wrote:
  Hi Experts,
 
  I am trying to use jQuery get function to develop an autocomplete which will
  display suggestion as soon as users starts typing like this;
 
  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  http://www.w3.org/TR/html4/loose.dtd;
  html
  head
  script src=http://code.jquery.com/jquery-latest.js;/script
  link rel=stylesheet 
  href=http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
  type=text/css /
  link rel=stylesheet 
  href=http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...;
  type=text/css /
  script type=text/javascript 
  src=http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgif...
  /script
  script type=text/javascript 
  src=http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dime...
  /script
  script type=text/javascript 
  src=http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...
  /script
  script
  $(document).ready(function(){
  var result = $.get(test.php, { data:
  q+$(#example).attr('value') },
  function(data){
  $(#example).html(data);
  });
 
  $(#example).autocomplete(result);
  });
  /script
 
  /head
  body
  Company name: input id=example /
  /body
  /html
 
  and my backend php script looks like this;
 
  ?php
   $q=$_GET[q];
$con = mysql_connect('host', 'user', 'password');
if (!$con)
 {
die('Could not connect: ' . mysql_error());
}
 
mysql_select_db(database, $con);
 
 $sql=SELECT company_name FROM company WHERE company_name =
  '.$q.';
 
   $result = mysql_query($sql);
 
   while($row = mysql_fetch_array($result))
  {
  echo $row['company_name'];
}
 
  mysql_close($con);
  ?
 
  Unfurtunately tthis donot work as required - i donot see any suggestion. Do
  anyone know what i am doing wrong here?
 
  Pls help.




Windows Live Hotmail just got better. Find out more!

_
View your Twitter and Flickr updates from one place – Learn more!
http://clk.atdmt.com/UKM/go/137984870/direct/01/

[jQuery] Re: AutoComplete

2009-03-11 Thread Bright Dadson
I have done something like this;

script
$(document).ready(function(){
$(#example).autocomplete(
test.php
).result(function(a,data,c) {
// variable data has the value the user selected
$(example).html(data);
});
});
/script

and also something like this;

script
$(document).ready(function(){
$(#example).autocomplete(
test.php
).result(function(a,data,c) {
// variable data has the value the user selected
data = $(example).text;
});
});
/script

But still donot see the suggestion for autocomplete from the php, is
anything i am not considering? please help i am really a begininer in this.

my php now looks like this:

?php
$q=$_GET[q];

$con = mysql_connect('host', 'user', 'password');
if (!$con)
{die('Could not connect: ' . mysql_error());}

mysql_select_db(tvoc, $con);
$result = mysql_query(SELECT company_name FROM operator WHERE company_name
= '$q');
if (!$result) {
echo 'Did not get matching result: ' . mysql_error();
exit;
}else{
$row = mysql_fetch_row($result);
echo $row[10];
}
?



On Wed, Mar 11, 2009 at 3:36 PM, Joseph Le Brech jlebr...@hotmail.comwrote:

  you are assigning the html here to what's in data.

 to access i think is data = $(example).text;

 try this but breakpoint it in firebug, because in not using firefox right
 now.

 --
 Date: Wed, 11 Mar 2009 15:18:10 +
 Subject: [jQuery] Re: AutoComplete
 From: brightdad...@googlemail.com

 To: jquery-en@googlegroups.com

 Do i access data like this;

  $(example).html(data);





 On Wed, Mar 11, 2009 at 3:11 PM, Joseph Le Brech jlebr...@hotmail.comwrote:

 you should be sanitising your sql aswell.

  Date: Wed, 11 Mar 2009 08:00:23 -0700
  Subject: [jQuery] Re: AutoComplete
  From: morni...@gmail.com
  To: jquery-en@googlegroups.com

 
 
  What is the purpose of the .get() ?
 
  The autocomplete plugin already has the ajax call all wired into it,
  there's no need to do that on your own
 
  $(document).ready(function(){
  $(#example).autocomplete(
  test.php
  ).result(function(a,data,c) {
  // variable data has the value the user selected
  });
  });
 
 
 
  On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
  wrote:
   Hi Experts,
  
   I am trying to use jQuery get function to develop an autocomplete which
 will
   display suggestion as soon as users starts typing like this;
  
   !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
   http://www.w3.org/TR/html4/loose.dtd;
   html
   head
   script src=http://code.jquery.com/jquery-latest.js
 /script
   link rel=stylesheet href=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
   type=text/css /
   link rel=stylesheet href=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...;
   type=text/css /
   script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgif...
   /script
   script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dime...
   /script
   script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...
   /script
   script
   $(document).ready(function(){
   var result = $.get(test.php, { data:
   q+$(#example).attr('value') },
   function(data){
   $(#example).html(data);
   });
  
   $(#example).autocomplete(result);
   });
   /script
  
   /head
   body
   Company name: input id=example /
   /body
   /html
  
   and my backend php script looks like this;
  
   ?php
$q=$_GET[q];
 $con = mysql_connect('host', 'user', 'password');
 if (!$con)
  {
 die('Could not connect: ' . mysql_error());
 }
  
 mysql_select_db(database, $con);
  
  $sql=SELECT company_name FROM company WHERE company_name =
   '.$q.';
  
$result = mysql_query($sql);
  
while($row = mysql_fetch_array($result))
   {
   echo $row['company_name'];
 }
  
   mysql_close($con);
   ?
  
   Unfurtunately tthis donot work as required - i donot see any
 suggestion. Do
   anyone know what i am doing wrong here?
  
   Pls help.

  --
 Windows Live Hotmail just got better. Find out 
 more!http://clk.atdmt.com/UKM/go/134665311/direct/01/



 --
 Windows Live Hotmail just got better. Find out 
 more!http://clk.atdmt.com/UKM/go/134665311/direct/01/



[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread Brian

How would one go about adapting this to be used with multiple lists on
one page.

I have 3-5 lists on each page and would only like to show the first 3
items of each with the ability to show the others.


On Feb 17, 5:16 am, mofle mofl...@gmail.com wrote:
 I'm using IE6 natively on an XP machine. jQuery 1.3.1.

 Any solution?

 I don't get an error message in IE6, nothing happens when i click the
 link.

 Anyway, thanks for your help ;)

 On Feb 13, 12:09 am, tres treshug...@gmail.com wrote:

  After installing IE6, I didn't have any problems. It works just like
  it should. I have noticed differences in the multiple IEs and the
  actual IE, but those differences we're only when viewing the About
  Internet Explorer in the Help menu and when printing.

  Are you using ie6 in a VM, in it's original state on XP, or with
  multiple IE's? Another question would be, which version of jQuery are
  you using and have you cleared the ie6 cache?

  Sorry that didn't work for you.

  -Trey

  On Feb 13, 9:56 am, tres treshug...@gmail.com wrote:

   I'll install multiple IE's and get back to you.

   -Trey

   On Feb 12, 7:05 pm, mofle mofl...@gmail.com wrote:

Thanks, you're a genius.

But it didn't work in IE6, where I need it.

Any solution?

On Feb 12, 12:32 am, tres treshug...@gmail.com wrote:

 Oh and also Safari 3.1.2 Windows.

 -Trey


[jQuery] Re: AutoComplete

2009-03-11 Thread MorningZ

Those examples don't make any sense

the first one

$(example).html(data);

the input box will already be filled with the data (which keep in
mind is what the user selected)


the second one

data = $(example).text;

the value of data is what the user selected and will already be
inside the input box that is ID'd example


Only use the .result event if you need to do something above and
beyond what the base functionality is

As for your issue, i'd take a guess your results back from the php
page aren't what the plugin is expecting, a tool like Firebug or
Fiddler will show you exactly (1) what's being sent to test.php and
(2) what's being returned to the page from test.php



On Mar 11, 11:47 am, Bright Dadson brightdad...@googlemail.com
wrote:
 I have done something like this;

         script
             $(document).ready(function(){
                 $(#example).autocomplete(
                 test.php
             ).result(function(a,data,c) {
                     // variable data has the value the user selected
                     $(example).html(data);
                 });
             });
         /script

 and also something like this;

         script
             $(document).ready(function(){
                 $(#example).autocomplete(
                 test.php
             ).result(function(a,data,c) {
                     // variable data has the value the user selected
                     data = $(example).text;
                 });
             });
         /script

 But still donot see the suggestion for autocomplete from the php, is
 anything i am not considering? please help i am really a begininer in this.

 my php now looks like this:

 ?php
 $q=$_GET[q];

 $con = mysql_connect('host', 'user', 'password');
 if (!$con)
 {die('Could not connect: ' . mysql_error());}

 mysql_select_db(tvoc, $con);
 $result = mysql_query(SELECT company_name FROM operator WHERE company_name
 = '$q');
 if (!$result) {
     echo 'Did not get matching result: ' . mysql_error();
     exit;}else{

     $row = mysql_fetch_row($result);
     echo $row[10];}

 ?

 On Wed, Mar 11, 2009 at 3:36 PM, Joseph Le Brech jlebr...@hotmail.comwrote:

   you are assigning the html here to what's in data.

  to access i think is data = $(example).text;

  try this but breakpoint it in firebug, because in not using firefox right
  now.

  --
  Date: Wed, 11 Mar 2009 15:18:10 +
  Subject: [jQuery] Re: AutoComplete
  From: brightdad...@googlemail.com

  To: jquery-en@googlegroups.com

  Do i access data like this;

   $(example).html(data);

  On Wed, Mar 11, 2009 at 3:11 PM, Joseph Le Brech 
  jlebr...@hotmail.comwrote:

  you should be sanitising your sql aswell.

   Date: Wed, 11 Mar 2009 08:00:23 -0700
   Subject: [jQuery] Re: AutoComplete
   From: morni...@gmail.com
   To: jquery-en@googlegroups.com

   What is the purpose of the .get() ?

   The autocomplete plugin already has the ajax call all wired into it,
   there's no need to do that on your own

   $(document).ready(function(){
   $(#example).autocomplete(
   test.php
   ).result(function(a,data,c) {
   // variable data has the value the user selected
   });
   });

   On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
   wrote:
Hi Experts,

I am trying to use jQuery get function to develop an autocomplete which
  will
display suggestion as soon as users starts typing like this;

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
    head
        script src=http://code.jquery.com/jquery-latest.js
  /script
        link rel=stylesheet href=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
type=text/css /
        link rel=stylesheet href=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...;
type=text/css /
        script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgif...
/script
        script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dime...
/script
        script type=text/javascript src=
 http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp...
/script
        script
            $(document).ready(function(){
                var result = $.get(test.php, { data:
q+$(#example).attr('value') },
                function(data){
                    $(#example).html(data);
                });

                $(#example).autocomplete(result);
            });
        /script

    /head
    body
        Company name: input id=example /
    /body
/html

and my backend php script looks like this;

?php
     $q=$_GET[q];
      $con = mysql_connect('host', 'user', 'password');
      if (!$con)
       {
          die('Could not connect: ' . mysql_error());
      }

     

[jQuery] Passing arguments to event handler

2009-03-11 Thread vani

I'm trying to pass arguments to a function that's called from within
anonymous function that acts as an event handler for the click event.
The problem is that once a thumbnail(gallery.images[i]) is clicked the
startSlideshow function gets the final iteration's values passed as
the arguments, instead I would like for it to get the values(filename,
folder, width, height) of the loop iteration it was created in.

The code in question is:

  $(_gallery.images[i]).click(function(){
slideshow.startSlideshow(filename, img/gallery/ +
_gallery.subpage + /, w, h)
  });

...the whole loop:

for(i=0; i_gallery.numThumbs; i++){
node = $(_gallery.xmlFileList).find
(picture).get(i);
filename = $(node).attr(filename);
w = $(node).attr(width);
h = $(node).attr(height);

tmbDim = slideshow.scaleFactoring
(w,h,tmbPlaceW,tmbPlaceH);
tmbW = Math.round(tmbDim[0] * 0.85);
tmbH = Math.round(tmbDim[1] * 0.85);

_gallery.images[i] = new Image();
$(_gallery.images[i]).addClass(galleryTmb);
$(_gallery.images[i]).load( function(){
$(this).css({top: Math.round($
(this).parent().height() / 2 - $(this).outerHeight() / 2)});
$(this).css({left: Math.round($
(this).parent().width() / 2 - $(this).outerWidth() / 2)});

$(this).data(mydim, {w:$(this).width(),h:
$(this).height(),ow:$(this).outerWidth(),oh:$(this).outerHeight()});

pulseTmb(this);
});
$(_gallery.images[i]).click(function(){
   slideshow.startSlideshow(filename, img/
gallery/ + _gallery.subpage + /, w, h)
});

currDiv = document.createElement(div);
$(currDiv).addClass(tmbPlace);
$(currDiv).width(tmbPlaceW);
$(currDiv).height(tmbPlaceH);
$(currDiv).append(_gallery.images[i]);

$(#divPicPanel).append(currDiv);

_gallery.images[i].src = thu.aspx?img= +
filename + w= +tmbW + h= + tmbH +path=img/gallery/ +
_gallery.subpage + /;
}

Sorry for poor english(I've been at javascript for 8hrs straight),
please help.


[jQuery] Re: live() not working in IE8?

2009-03-11 Thread Jaggi

Yea the exact same thing happened to me although i think it works for
click events. I had the same problem in ie7 too though. i just decided
to use the old way of event bubbling to get around although the jquery
lot did say they know it has issues.

On Mar 11, 2:19 pm, Todd Rafferty web...@gmail.com wrote:
 I have a drop down that is being generated via load() - to be 100%
 clear, I'll restate that. The drop down does not exist on the actual
 page.  I'm doing this:

         $('#orderlineform #productlisting').load('orderProxy.cfm',
                 {
                          mode:'getAvailableProducts'
                         ,ordergrade_id:ordergrade_id
                         ,order_id:order_id
                 }
         );

 This is generating the drop down for me and putting it inside the
 #produclisting span for me. Now, just attaching a 'change' event on it
 wasn't working, so I looked into livequery() (eventually live() ) --
 using it works just fine in FireFox, but fails in IE.

 $('#orderlineform #product_id').live('change',isRentalActive);
 -
 function isRentalActive(){
         var data = $(#orderlineform #product_id option:selected).metadata
 ({type:'attr',name:'data'});
         alert(data);
         return false;
         if(data.return_flag == 0){
                 $('.rental').css(display, table-row-group).show();
         }else{
                 $('.rental').hide();
         }

 }

 Any suggestions as to why this is failing in IE?

 Thanks,
 ~Todd


[jQuery] Re: add li to ul

2009-03-11 Thread mkmanning

Not sure if this might be related to your problem:
http://groups.google.com/group/jquery-dev/browse_thread/thread/6d3de70e6f2c6ebe/908edb7729c03a3c?lnk=raot

I'd suggest trying to add a LI to the UL using standard DOM methods:
var li = document.createElement('li');
li.appendChild(document.createTextNode('hope this works'));
document.getElementById('home').appendChild(li);

If that works, then it would seem there's a jQuery issue with the DOM
on iPhone.

On Mar 11, 1:27 am, Elmar elsch...@googlemail.com wrote:
 Sure. There is a small difficulty in that this code is supposed to run
 an iPhone/Webkit and some API´s don´t make sense in a standard web
 enviroment. But basically you can just strip all that exra bits and
 pieces and just run it in a browser. I should actually do this myself
 and see if it is an issue with Webkit or a conflict with some other
 library... hm... I´ll post it anyway.

 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
          http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;

 html xmlns=http://www.w3.org/1999/xhtml;
 head

     titletest/title

     meta name=viewport content=width=320; initial-scale=1.0;
 maximum-scale=1.0; user-scalable=0;/
     meta name=apple-touch-fullscreen content=yes /
     meta name=apple-mobile-web-app-capable content=yes /

     style type=text/css media=screen@import css/jqtouch.css;/
 style
     link rel=apple-touch-icon href=jqtouch.png /

     script src=js/phonegap.js type=text/javascript
 charset=utf-8/script
     script src=js/jquery.js type=text/javascript
 charset=utf-8/script
     script src=js/jqtouch.navigate.js type=text/javascript
 charset=utf-8/script
     script src=js/jqtouch.animate.js type=text/javascript
 charset=utf-8/script
     script type=text/javascript charset=utf-8
         $(function(){

             // $.fn.itouch.preloadImages(['iui/toolbar.png', 'iui/
 selection.png']);
             $('#backButton').goback();
             $('ul li a').drilldown();

         })

                 var getLocation = function() {
                   var suc = function(p){
                                 //alert(p.latitude +   + p.longitude);
                                 //$('#home ul').append('liplease show 
 up/li');
                                 //$('#homeul').append('lior that 
 one/li');
                                 //var test = $(limaybe that 
 one/li).appendTo($(#home));
                                 $('ul#home').html('lilast chance/li');
                                 alert($('ul#home').html());
                   };
                   var fail = function(){};
                   navigator.geolocation.getCurrentPosition(suc,fail);
                 }

                 var preventBehavior = function(e) {
                   e.preventDefault();
                 };

                 function init(){
                   getLocation();
                 }

   /script
 /head
 body onload=init();
     div class=toolbar
         h1 id=pageTitlegTracks/h1
         a id=backButton class=button href=#/a
         a class=button flip href=#settingsSettings/a
     /div

     ul id=home title=gTracks selected=true
         lia href=#trackerTracker/a/li
     /ul

         ul id=tracker title=Tracking Data
                 li id=trackFirst/li
     /ul

 /body
 /html

 Thanks a lot,
 Elmar

 On Mar 11, 12:32 am, mkmanning michaell...@gmail.com wrote:

  @Elmar, there's nothing wrong with your jQuery; there is with
  Joseph's: creating a closingLIwon't work :(

  Could you show where in your script you're trying to append theLI?

  On Mar 10, 4:03 pm, Joseph Le Brech jlebr...@hotmail.com wrote:

   $(/li).appendTo(#myList).html(Please show up);

   the one you used those should also work tho.

Date: Tue, 10 Mar 2009 14:18:57 -0700
Subject: [jQuery]addli to ul
From: elsch...@googlemail.com
To: jquery-en@googlegroups.com

Hi there,
I am probably trying the most basic example and failed in my attemps
so far. I would like toaddnew li´s to an existing ul with
jQuery. What I am trying to do:

in my script:
...
$('#myList').append('liplease show up/li');
...

in my HTML:
...
ulid=myList title=someTitle selected=true
        lia href=#internalLinkexisting link/a/li
/ul
...

But although I ask really nicely, the newliwill never show up. The
homeulis found correctly by jQuery and I can output it´s contents.

What am I doing wrong?
Thanks a lot!

   _
   Twice the fun—Share photos while you chat with Windows Live Messenger. 
   Learn 
   more.http://www.microsoft.com/uk/windows/windowslive/products/messenger.aspx


[jQuery] ajax, scripts and bowser cache

2009-03-11 Thread bohne

Hi
I submit data to a page and load response content into a div using an
ajax POST request.
The response can contain new scripts to load and some which have been
already loaded by the main page.  The browser does not sort out
already loaded/cached scripts because jquery adds an additional flag
to the url which looks like '_=1236778004669'. This is also the case
if I define the cache: true, parameter.

This is what my ajax function looks like:

$.ajax({
type: POST,
url: SomeUrl,
cache: true,
data: postData,
success: function(html,status){}
});

The response from server to this is something like:

script type=text/javascript src=JSJQuery7i/jquery.js;/script
Some Content SomeContent

With Firebug I can see that now an additional request is beeing
processed:
http://localhost/JSJQuery/jquery.js_=1236778003896
Although the script has been already loaded/cached


[jQuery] Switching Content in same div

2009-03-11 Thread Desinger

Hi,

Switching content in same div which contains images and text.

As We see a product more views or red and blue
Default loads the red when u click on blue the image and description
changes. same when u click on red.


Help me out here
thanks


[jQuery] jquery validate issues with IE

2009-03-11 Thread phred78

Hi,

I'm sorry if this is a double post but I can't find the original one.

I'm having problems with jquery-validation on IE. It's working fine in
every other browser.

This is the page:

http://www.thecentroexperience.com/de/wellness/contest/28/

It should validate all the fields, but in IE it won't allow the form
to be submitted, even after the inputs have been filled.

Can anyone please check my code and see if I'm missing something?
If you submit the form, please use Test and t...@test.com as name
and e-mail.

Thank you!

Frederico


[jQuery] Re: SimpleModal error in IE7

2009-03-11 Thread ACavers

Eric,

I am having the exact same issue with your (excellent) simplemodal
plugin. Could you please post your original reply to the group to help
others with this same problem?

Many thanks.

On Mar 11, 4:36 am, Eric Martin emarti...@gmail.com wrote:
 Ricardo,

 I believe I responded to your email, please let me know if you were
 unable to resolve this.

 -Eric

 On Mar 10, 8:46 am, Ricardo Garcia Vega

 ricardo.garcia.v...@gmail.com wrote:
  Hi! I\'m using your great plugin, but I have a problem with
  IE7. The problem comes after closing de simplemodal, I then have to
  click twice in the button to open it again, because the first time
  there\'s the js error, wich says: \nodeType\ is null or not a
  object...
  It only happens with IE...
  what can I do?
  Thank you very much in advance!
  Ricardo


[jQuery] jquery-validate issues with IE

2009-03-11 Thread phred78

Hi,

I have been looking for an answer, but for the love of God, can't find
any solution.
I have the validator working perfectly on FF and Safari, but can't get
it to work on IE. It's giving me a serious headache, but I'm sure I'm
missing something obvious.

This is the page I'm talking about:

http://www.thecentroexperience.com/de/wellness/contest/28/

If you click on 'MITMACHEN' it should give you errors on the right
side of the inputs. It works fine in FF but IE just displays the
errors and when I start typing, the errors won't go away, thus the
form doesn't submit.

Can someone please look at the code and figure out what's wrong? If
you submit, please use Test and t...@test.com for name and e-mail.

Thank you!!

Frederico


[jQuery] Validate plugin with radio button in IE 6 7

2009-03-11 Thread Glamorous

Hi everyone,

I have a problem with my validation on my form in IE (6 AND 7)

This is a part of my form:

p
label for=boy class=radiospanboy/spaninput type=radio
id=boy name=sex value=boy //label
label for=girl id=radio_girl class=radiospangirl/
spaninput type=radio id=girl name=sex value=girl //label
/p

My Validation script:

jQuery.validator.addMethod(defaultvalue, function(value,
element) {
return this.optional(element) || element.defaultValue != value;
}, nbsp;);

var text_inputs = $(form input[type=text]);
text_inputs.each(function(){
var input = $(this);
input.click(function(){
if(input.val() == this.defaultValue){
input.val();
}
});
input.blur(function(){
if(input.val() == ){
input.val(this.defaultValue);
}
});
});
$(#person_submit).click(function(){
$(#person_form).submit();
});

$(#person_form).validate({
errorElement: span,
rules: {
firstname: {required: true, defaultvalue: true, 
minlength: 2},
lastname: {required: true, defaultvalue: true, 
minlength: 3},
street: {required: true, defaultvalue: true, minlength: 
2},
nr: {required: true, defaultvalue: true},
zip: {required: true, defaultvalue: true, digits: true,
rangelength: [4, 4]},
city: {required: true, defaultvalue: true, minlength: 
3},
day: {required: true, defaultvalue: true, digits: true, 
range:
[1,31]},
month: {required: true, defaultvalue: true, digits: 
true, range:
[1,12]},
year: {required: true, defaultvalue: true, digits: 
true, range:
[1965,1991]},
sex: {required: true},
email: {required: true, defaultvalue: true, email: 
true},
phone: {required: true, defaultvalue: true, 
rangelength: [9,15]}
},
messages: {
firstname: {required: , defaultvalue: , minlength: 
},
lastname: {required: ,  defaultvalue: , minlength: 
},
street: {required: , defaultvalue: , minlength: },
nr: {required: , defaultvalue: },
zip: {required: , defaultvalue: , digits: , 
rangelength: },
city: {required: , defaultvalue: , minlength: },
day: {required: , defaultvalue: , digits: , 
range: },
month: {required: , defaultvalue: , digits: , 
range: },
year: {required: , defaultvalue: , digits: , 
range: },
sex: {required: You have a sex right? Just click 
ithellip;},
email: {required: , defaultvalue: , email: },
phone: {required: , defaultvalue: , rangelength: }
},
errorPlacement: function(error, element) {
if (element.is(:radio))
error.insertAfter(element.parent(label).next());
else
error.insertAfter(element);
},
submitHandler: function(form){
$(#loading-person).fadeIn('fast');
$.ajax({
type: 'POST',
url: $(form).attr('action'),
data: $(form).serialize(),
dataType: 'json',
success: function(msg){
$('div.form .msg').hide();
$('#msg_' + msg.data).fadeIn();
},
error: function (XMLHttpRequest, textStatus, 
errorThrown) {
$('div.form .msg').hide();
$(msg_error).fadeIn();
},
complete: function(data){
$(#loading-person).fadeOut();
}
});
}
});


When everything is correct filled in and I try to submit it in IE (FF
works fine) then my first label of my radio buttons get focused and it
don't submit it at all... Even when something I picked something...

Anyone that could help me?


[jQuery] jqGrid - display a xml node attribute value in a cell

2009-03-11 Thread Arun Boppudi

I need to display a xml node attribute value in a cell. How can I do
it using the xmlmap?

I have XML like:

rows
   row
  cell1  attribute1=Arun Boppudi /
  cell22/cell2
  cell33/cell3
  cell44/cell4
   /row
   ..
/rows

In the table's first cells I need to display

Arun Boppudi, 2, 3, 4

values respectively.


[jQuery] Switching Content in same div

2009-03-11 Thread Desinger

Hi,

Product page would like to load different contents in same div
For example :

Red product and Blue product

Default it loads red product and when u click on blueimage product
image and discription should load in the same div.

I hope I have conveyd my message clearly




[jQuery] Update DIV

2009-03-11 Thread so.phis.ti.kat

Hello Everyone,

I am looking to see if I should switch to jQuery but first need to
find jQuery's equivalent to Prototype JS's Ajax.Updater; new
Ajax.Updater(id, url, {method: 'post', parameters: pars});

Ajax.Updater allows you to simply update the content of a DIV.

ps.

I did find his plugin called Tabs, http://stilbuero.de/jquery/tabs_3
but was looking to learn how to do it without a plugin.




[jQuery] ajax script resources and bowser cache

2009-03-11 Thread bohne

Hi
I submit data to a page and load content to a div by a ajax POST
request.
The response can contain new scripts to load and some which have been
already load by the main page load.  The browser does not sort out
already loaded/cachedscripts because jquery adds an additional flag to
the url which looks like '_=1236778004669'. This is also the case if
I define cache: true, parameter.

This is what my ajax function looks like:

$.ajax({
type: POST,
url: SomeUrl,
cache: true,
data: postData,
success: function(html,status){}
});

The response from server to this is something like:

script type=text/javascript src=JSJQuery7i/jquery.js;/script
Some Content SomeContent

With Firebug i can see that now an additional request is beeing
processed:
http://localhost/JSJQuery/jquery.js_=1236778003896
Although the script has been already loaded/cached by the browser, but
of cource, not with the _=1236778003896 in the url.


[jQuery] [validate] required field keeps on appearing

2009-03-11 Thread exhaler

hi,
i'm new to jquery, i'm currently using the validation plugin to
validate my forms.
here's my code
script src=includes/jquery/jquery.validate.js type=text/
javascript/script
script src=includes/jquery/cmxforms.js type=text/javascript/
script

script type=text/javascript
   $.validator.setDefaults({
   submitHandler: function() { alert(submitted!); }
   });

   $().ready(function() {
   $(#addrest).validate({
   rules: {
   restname: required
   },
   messages: {
   restname: brfont face=\Arial\
style=\font-size: 9pt\ color=
\#96A26F\Please enter your Restaurant Name/font
   }
   });
   });

   $(document).ready(function() {
  $('#yes').click(function(){
$('#tr').hide();
  });
  $('#no').click(function(){
$('#tr').show();
  });
});
/script
form method=post action=add.php id=addrest class=cmxform
table border=0 width=100% cellpadding=3 cellspacing=0
id=Table6
   tr
   td valign=top align=left
style=width: 98px
   font color=#B9A49B
face=Arial style=font-size: 8pt
   label
for=restnameRestaurant Name/label
   /font
   /td

   td valign=top align=left
style=width: 204px
   input type=text
class=required name=restname id=restname
size=35 style=font-size: 8pt; font-family: Arial; color: #56443D;
background-color:#E1D9D5
   /td
   /tr
/table
/form
the above code is working and shows the required field but when i
press the submit button agian it adds another message under the old
one. also when i type in something the required field doesn't go it
stays.
this happens on opera and FF but not in IE7.
any ideas??
thx


[jQuery] Re: required field keeps on appearing

2009-03-11 Thread exhaler

u can go here http://goingpublic.me/newbr/add.php using FF or opera
and press submit a couple of times and see what happens


[jQuery] Re: AutoComplete

2009-03-11 Thread Bright Dadson
You right!

Quick question though! Do you know how i can make the script pass the
character i type to be passed to the php script which intend return the
search result matching the character in the textbox?

I have type done something like this;

echo Operator; in my php and that is all i see when i start typing in the
textbox but anything relating to the resultset.

Do i need to customize the jQuery further to achieve this or the php results
needs bit more formating?

pls hlp

On Wed, Mar 11, 2009 at 3:59 PM, MorningZ morni...@gmail.com wrote:


 Those examples don't make any sense

 the first one

 $(example).html(data);

 the input box will already be filled with the data (which keep in
 mind is what the user selected)


 the second one

 data = $(example).text;

 the value of data is what the user selected and will already be
 inside the input box that is ID'd example


 Only use the .result event if you need to do something above and
 beyond what the base functionality is

 As for your issue, i'd take a guess your results back from the php
 page aren't what the plugin is expecting, a tool like Firebug or
 Fiddler will show you exactly (1) what's being sent to test.php and
 (2) what's being returned to the page from test.php



 On Mar 11, 11:47 am, Bright Dadson brightdad...@googlemail.com
 wrote:
  I have done something like this;
 
  script
  $(document).ready(function(){
  $(#example).autocomplete(
  test.php
  ).result(function(a,data,c) {
  // variable data has the value the user selected
  $(example).html(data);
  });
  });
  /script
 
  and also something like this;
 
  script
  $(document).ready(function(){
  $(#example).autocomplete(
  test.php
  ).result(function(a,data,c) {
  // variable data has the value the user selected
  data = $(example).text;
  });
  });
  /script
 
  But still donot see the suggestion for autocomplete from the php, is
  anything i am not considering? please help i am really a begininer in
 this.
 
  my php now looks like this:
 
  ?php
  $q=$_GET[q];
 
  $con = mysql_connect('host', 'user', 'password');
  if (!$con)
  {die('Could not connect: ' . mysql_error());}
 
  mysql_select_db(tvoc, $con);
  $result = mysql_query(SELECT company_name FROM operator WHERE
 company_name
  = '$q');
  if (!$result) {
  echo 'Did not get matching result: ' . mysql_error();
  exit;}else{
 
  $row = mysql_fetch_row($result);
  echo $row[10];}
 
  ?
 
  On Wed, Mar 11, 2009 at 3:36 PM, Joseph Le Brech jlebr...@hotmail.com
 wrote:
 
you are assigning the html here to what's in data.
 
   to access i think is data = $(example).text;
 
   try this but breakpoint it in firebug, because in not using firefox
 right
   now.
 
   --
   Date: Wed, 11 Mar 2009 15:18:10 +
   Subject: [jQuery] Re: AutoComplete
   From: brightdad...@googlemail.com
 
   To: jquery-en@googlegroups.com
 
   Do i access data like this;
 
$(example).html(data);
 
   On Wed, Mar 11, 2009 at 3:11 PM, Joseph Le Brech jlebr...@hotmail.com
 wrote:
 
   you should be sanitising your sql aswell.
 
Date: Wed, 11 Mar 2009 08:00:23 -0700
Subject: [jQuery] Re: AutoComplete
From: morni...@gmail.com
To: jquery-en@googlegroups.com
 
What is the purpose of the .get() ?
 
The autocomplete plugin already has the ajax call all wired into it,
there's no need to do that on your own
 
$(document).ready(function(){
$(#example).autocomplete(
test.php
).result(function(a,data,c) {
// variable data has the value the user selected
});
});
 
On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
wrote:
 Hi Experts,
 
 I am trying to use jQuery get function to develop an autocomplete
 which
   will
 display suggestion as soon as users starts typing like this;
 
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 script src=http://code.jquery.com/jquery-latest.js
   /script
 link rel=stylesheet href=
  http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
 type=text/css /
 link rel=stylesheet href=
  http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp..
 .
 type=text/css /
 script type=text/javascript src=
  http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgif.
 ..
 /script
 script type=text/javascript src=
  http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dime.
 ..
 /script
 script type=text/javascript src=
  http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp.
 ..
 /script
 

[jQuery] Re: Update DIV

2009-03-11 Thread mkmanning

In the docs under Ajax, see the load() method.
http://docs.jquery.com/Ajax
http://docs.jquery.com/Ajax/load#urldatacallback

On Mar 11, 8:44 am, so.phis.ti.kat see.marlon@gmail.com wrote:
 Hello Everyone,

 I am looking to see if I should switch to jQuery but first need to
 find jQuery's equivalent to Prototype JS's Ajax.Updater; new
 Ajax.Updater(id, url, {method: 'post', parameters: pars});

 Ajax.Updater allows you to simply update the content of a DIV.

 ps.

 I did find his plugin called Tabs,http://stilbuero.de/jquery/tabs_3
 but was looking to learn how to do it without a plugin.


[jQuery] Re: AutoComplete

2009-03-11 Thread MorningZ

the characters the user types in is already added to the request to
the test.php file and is query string parameter q

if you fire up a tool like Firebug (for FireFox) or Fiddler (for IE)
and you'll see this happening in real time




On Mar 11, 12:35 pm, Bright Dadson brightdad...@googlemail.com
wrote:
 You right!

 Quick question though! Do you know how i can make the script pass the
 character i type to be passed to the php script which intend return the
 search result matching the character in the textbox?

 I have type done something like this;

 echo Operator; in my php and that is all i see when i start typing in the
 textbox but anything relating to the resultset.

 Do i need to customize the jQuery further to achieve this or the php results
 needs bit more formating?

 pls hlp

 On Wed, Mar 11, 2009 at 3:59 PM, MorningZ morni...@gmail.com wrote:

  Those examples don't make any sense

  the first one

  $(example).html(data);

  the input box will already be filled with the data (which keep in
  mind is what the user selected)

  the second one

  data = $(example).text;

  the value of data is what the user selected and will already be
  inside the input box that is ID'd example

  Only use the .result event if you need to do something above and
  beyond what the base functionality is

  As for your issue, i'd take a guess your results back from the php
  page aren't what the plugin is expecting, a tool like Firebug or
  Fiddler will show you exactly (1) what's being sent to test.php and
  (2) what's being returned to the page from test.php

  On Mar 11, 11:47 am, Bright Dadson brightdad...@googlemail.com
  wrote:
   I have done something like this;

           script
               $(document).ready(function(){
                   $(#example).autocomplete(
                   test.php
               ).result(function(a,data,c) {
                       // variable data has the value the user selected
                       $(example).html(data);
                   });
               });
           /script

   and also something like this;

           script
               $(document).ready(function(){
                   $(#example).autocomplete(
                   test.php
               ).result(function(a,data,c) {
                       // variable data has the value the user selected
                       data = $(example).text;
                   });
               });
           /script

   But still donot see the suggestion for autocomplete from the php, is
   anything i am not considering? please help i am really a begininer in
  this.

   my php now looks like this:

   ?php
   $q=$_GET[q];

   $con = mysql_connect('host', 'user', 'password');
   if (!$con)
   {die('Could not connect: ' . mysql_error());}

   mysql_select_db(tvoc, $con);
   $result = mysql_query(SELECT company_name FROM operator WHERE
  company_name
   = '$q');
   if (!$result) {
       echo 'Did not get matching result: ' . mysql_error();
       exit;}else{

       $row = mysql_fetch_row($result);
       echo $row[10];}

   ?

   On Wed, Mar 11, 2009 at 3:36 PM, Joseph Le Brech jlebr...@hotmail.com
  wrote:

 you are assigning the html here to what's in data.

to access i think is data = $(example).text;

try this but breakpoint it in firebug, because in not using firefox
  right
now.

--
Date: Wed, 11 Mar 2009 15:18:10 +
Subject: [jQuery] Re: AutoComplete
From: brightdad...@googlemail.com

To: jquery-en@googlegroups.com

Do i access data like this;

 $(example).html(data);

On Wed, Mar 11, 2009 at 3:11 PM, Joseph Le Brech jlebr...@hotmail.com
  wrote:

you should be sanitising your sql aswell.

 Date: Wed, 11 Mar 2009 08:00:23 -0700
 Subject: [jQuery] Re: AutoComplete
 From: morni...@gmail.com
 To: jquery-en@googlegroups.com

 What is the purpose of the .get() ?

 The autocomplete plugin already has the ajax call all wired into it,
 there's no need to do that on your own

 $(document).ready(function(){
 $(#example).autocomplete(
 test.php
 ).result(function(a,data,c) {
 // variable data has the value the user selected
 });
 });

 On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
 wrote:
  Hi Experts,

  I am trying to use jQuery get function to develop an autocomplete
  which
will
  display suggestion as soon as users starts typing like this;

  !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
  http://www.w3.org/TR/html4/loose.dtd;
  html
      head
          script src=http://code.jquery.com/jquery-latest.js
/script
          link rel=stylesheet href=
   http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css;
  type=text/css /
          link rel=stylesheet href=
   http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomp..
  .
  type=text/css /
          script 

[jQuery] Re: Get Textbox-value and write to table-cell (td/td)

2009-03-11 Thread mkmanning

I believe Brian opted for the suggestion that doesn't involve string
munging; it's just using the natural index of the elements, no slicing
or dicing :)

On Mar 11, 1:01 am, Josh Powell seas...@gmail.com wrote:
 *shrugs* up to you, brian means to use string.splice(a); where a =
 number of characters before the index that is tacked on. so if the
 name/id is foo_1, foo_2 then you'll do:

 $('[id^=foo_]').change(function() {
     $('[name=post-amount_' + $(this).attr('id').slice(3)  + ]').val($
 (this).val());

 });

 I personally find this kind of string munging difficult to read and
 maintain.  Could just be personal preference though.  Good luck.

 Josh Powell

 On Mar 10, 10:39 pm, Eric Gun gunawan.e...@gmail.com wrote:

  @mkmanning: Well done!! Your script works well. Thanks, and great
  job! :)

  @brian-263: Thanks for the idea. Yup, i'm using PHP as i said before.
  Therefore, i need those '[]'.
  Anyway, i'm still curious with what you mean by 'parse out the index
  from each of the IDs ...'. I'm not really sure how to do it. If you
  don't mind, can you give me an example script?

  @Josh Powell: Thanks for being the first one to reply my post :)
  I'm sorry, but i'm afraid i agree with brian-263 about better not
  making up new attribute instead of optimizing pre-defined ones.

  @all: Maybe i was wrong to explain my problem when i used the word
  'instantly' (as this is my first post :) In fact, the 'deal-post'
  table is located in different tab panel with the 'deal-summary' one
  (i'm using JQuery UI plugin for tabs). So, i will drop the 'keyup'
  event and also forget about autocomplete plugins for now. I will use
  the 'change' event instead, as i think it's enough for me.

  Thanks guys!!!

  On Mar 10, 4:07 pm, Eric Gun gunawan.e...@gmail.com wrote:

   Sorry guys, just had a couple days off.
   I will look forward to your answers and reply back here soon.

   Thanks for concerning,

   Regards,

   On Mar 8, 8:22 am, mkmanning michaell...@gmail.com wrote:

With the markup example in the OP, use this:

var dp = $('#deal-post tbody tr');
dp.find('input[name^=dealAmount]').keyup(function(){
        var amount =  $(this);
        $('#deal-summary tbody tr:eq('+dp.index(amount.closest('tr'))
+')').find('td.inc-current').text(amount.val());

});

On Mar 7, 4:10 pm, brian bally.z...@gmail.com wrote:

 On Sat, Mar 7, 2009 at 6:21 PM, Josh Powell seas...@gmail.com wrote:

  6 of one... half dozen of another...

 I don't buy that. I've suggested using an attribute whose purpose is
 well defined. Making up attributes that aren't represented by the
 DOCTYPE is a bad idea. Don't get me wrong--I've done it before. Though
 always to store temporary info. Happily, we have data for that, now.
 The OP's needs, though, are to identify table cells as being connected
 to specific text inputs. That's what ID is for.


[jQuery] Re: Superfish - Horizontal Internet Explorer Width Problem

2009-03-11 Thread Skedoozy

Help?

On Mar 9, 1:28 pm, Skedoozy skedo...@gmail.com wrote:
 I have a horizontal navbar that if the persons screen is under 1024
 wide it sticks out of the table.

 In Firefox it works fine so it's only an IE problem but one I need
 fixed.

 link

 http://dev2.azaz.com/scott/ahno/index_testnav.html

 If you just shrink the browser down until you see the nav break free
 of the table you'll see what I mean. Again, doesn't happen in Firefox.
 IE fix please?


[jQuery] [cycle lite] stop after last image

2009-03-11 Thread id404

hi there,
since im not quite familiar to javascript and jquery, it's kinda hard
stuff for me to figure out how the cycle lite plugin really advances
to the next image. so i'm asking the guys that know what they're
doing:

how can i make the jquery cycle lite-plugin, found at
http://malsup.com/jquery/cycle/lite/, stop after the last image has
been loaded?

i'm sure this is quite simple for people that know what the syntax is
about.

thanks :)


[jQuery] Drag - Drop - with Layers

2009-03-11 Thread Paul Hutson

Hello,

I've been having a problem with the UI.draggable and UI.droppable
functionality.  I've set up my screen like the following :

http://outer-empires.com/images/Screenshots/inGame-SpaceStationHome.jpg

At the bottom of the screen you can see the cargo and hanger area,
people can pick up their resource and move it from one area to the
other.

Now, all of the above works - however, when dragging from the left to
the right, the cloned item slides underneath the background for the
hanger.  Both of the drop zones are the on the same layer (div
wise), moving right to left works fine...

Any ideas at all as to what the problem could be would be much
appreciated - is there a bug with layers in the draggable interface?

Thanks in advance,
Paul Hutson


p.s. As you can see, I'm building a game using an awful lot of
Jquery :)


[jQuery] Re: Update DIV

2009-03-11 Thread Paul Hutson

  Ajax.Updater allows you to simply update the content of a DIV.

If you want to go back to the super simple, you can update the inner
content of a div with:

$(#DIVID).html(CONTENT);

i.e. :
div id=blah/div

script
$(#blah).html(I've just been added to the div blah...);
/script

Therefore, on your callback from the AJAX - as mkmanning has posted -
you could do the update using the items that come back from the ajax.

Regards,
Paul


[jQuery] Re: Superfish - Horizontal Internet Explorer Width Problem

2009-03-11 Thread Paul Hutson

I think it may be the table width your using for the section - you're
saying that you'll allow a 516 pixel width for the table - so it keeps
filling up the space.

If you want it to act like it does in firefox you could fake it by
putting a div on the right hand side of the page in a high up layer
and making sure it's always in the same position as you close the page
up.



[jQuery] Re: AutoComplete

2009-03-11 Thread Bright Dadson
You are absolutely right! it worked.
The only thing is i cannot highlight on individual result. If i click on a
select, the result from the database is taken.

Do you know how to make sure i can hover on a single result and select?

Thanks

On Wed, Mar 11, 2009 at 4:57 PM, MorningZ morni...@gmail.com wrote:


 the characters the user types in is already added to the request to
 the test.php file and is query string parameter q

 if you fire up a tool like Firebug (for FireFox) or Fiddler (for IE)
 and you'll see this happening in real time




 On Mar 11, 12:35 pm, Bright Dadson brightdad...@googlemail.com
 wrote:
  You right!
 
  Quick question though! Do you know how i can make the script pass the
  character i type to be passed to the php script which intend return the
  search result matching the character in the textbox?
 
  I have type done something like this;
 
  echo Operator; in my php and that is all i see when i start typing in
 the
  textbox but anything relating to the resultset.
 
  Do i need to customize the jQuery further to achieve this or the php
 results
  needs bit more formating?
 
  pls hlp
 
  On Wed, Mar 11, 2009 at 3:59 PM, MorningZ morni...@gmail.com wrote:
 
   Those examples don't make any sense
 
   the first one
 
   $(example).html(data);
 
   the input box will already be filled with the data (which keep in
   mind is what the user selected)
 
   the second one
 
   data = $(example).text;
 
   the value of data is what the user selected and will already be
   inside the input box that is ID'd example
 
   Only use the .result event if you need to do something above and
   beyond what the base functionality is
 
   As for your issue, i'd take a guess your results back from the php
   page aren't what the plugin is expecting, a tool like Firebug or
   Fiddler will show you exactly (1) what's being sent to test.php and
   (2) what's being returned to the page from test.php
 
   On Mar 11, 11:47 am, Bright Dadson brightdad...@googlemail.com
   wrote:
I have done something like this;
 
script
$(document).ready(function(){
$(#example).autocomplete(
test.php
).result(function(a,data,c) {
// variable data has the value the user
 selected
$(example).html(data);
});
});
/script
 
and also something like this;
 
script
$(document).ready(function(){
$(#example).autocomplete(
test.php
).result(function(a,data,c) {
// variable data has the value the user
 selected
data = $(example).text;
});
});
/script
 
But still donot see the suggestion for autocomplete from the php, is
anything i am not considering? please help i am really a begininer in
   this.
 
my php now looks like this:
 
?php
$q=$_GET[q];
 
$con = mysql_connect('host', 'user', 'password');
if (!$con)
{die('Could not connect: ' . mysql_error());}
 
mysql_select_db(tvoc, $con);
$result = mysql_query(SELECT company_name FROM operator WHERE
   company_name
= '$q');
if (!$result) {
echo 'Did not get matching result: ' . mysql_error();
exit;}else{
 
$row = mysql_fetch_row($result);
echo $row[10];}
 
?
 
On Wed, Mar 11, 2009 at 3:36 PM, Joseph Le Brech 
 jlebr...@hotmail.com
   wrote:
 
  you are assigning the html here to what's in data.
 
 to access i think is data = $(example).text;
 
 try this but breakpoint it in firebug, because in not using firefox
   right
 now.
 
 --
 Date: Wed, 11 Mar 2009 15:18:10 +
 Subject: [jQuery] Re: AutoComplete
 From: brightdad...@googlemail.com
 
 To: jquery-en@googlegroups.com
 
 Do i access data like this;
 
  $(example).html(data);
 
 On Wed, Mar 11, 2009 at 3:11 PM, Joseph Le Brech 
 jlebr...@hotmail.com
   wrote:
 
 you should be sanitising your sql aswell.
 
  Date: Wed, 11 Mar 2009 08:00:23 -0700
  Subject: [jQuery] Re: AutoComplete
  From: morni...@gmail.com
  To: jquery-en@googlegroups.com
 
  What is the purpose of the .get() ?
 
  The autocomplete plugin already has the ajax call all wired into
 it,
  there's no need to do that on your own
 
  $(document).ready(function(){
  $(#example).autocomplete(
  test.php
  ).result(function(a,data,c) {
  // variable data has the value the user selected
  });
  });
 
  On Mar 11, 10:45 am, Bright Dadson brightdad...@googlemail.com
  wrote:
   Hi Experts,
 
   I am trying to use jQuery get function to develop an
 autocomplete
   which
 will
   display suggestion as soon as users starts typing like this;
 
   !DOCTYPE HTML PUBLIC 

[jQuery] Re: Switching Content in same div

2009-03-11 Thread Paul Hutson

The following will give you a way to do what you want :

script
function UpdateMe(Type)
{
if (Type == Blue)
{
$(#AreaToView).HTML(Blue Stuff);
} else {
$(#AreaToView).HTML(Red Stuff);
};
};
/script

a href=javascript:UpdateMe(Red)Red Product/a | a
href=javascript:UpdateMe(Blue)Blue Product/a

div id=AreaToView
Red Stuff
/div


[jQuery] Re: SimpleModal error in IE7

2009-03-11 Thread Eric Martin

Andrew,

Typically this error is caused by binding issues. The best way to
prevent it is to make sure that you do any binding of elements in the
dialog in the onShow or onOpen callbacks. It is also a good idea to
use the simplemodal-close class on elements that cause the dialog to
close, as opposed to binding and calling $.modal.close() manually.

If that doesn't help, please email me some sample code and/or a link,
and I'll see what I can do to help.

-Eric

On Mar 11, 6:19 am, ACavers andrew.cav...@gmail.com wrote:
 Eric,

 I am having the exact same issue with your (excellent) simplemodal
 plugin. Could you please post your original reply to the group to help
 others with this same problem?

 Many thanks.

 On Mar 11, 4:36 am, Eric Martin emarti...@gmail.com wrote:

  Ricardo,

  I believe I responded to your email, please let me know if you were
  unable to resolve this.

  -Eric

  On Mar 10, 8:46 am, Ricardo Garcia Vega

  ricardo.garcia.v...@gmail.com wrote:
   Hi! I\'m using your great plugin, but I have a problem with
   IE7. The problem comes after closing de simplemodal, I then have to
   click twice in the button to open it again, because the first time
   there\'s the js error, wich says: \nodeType\ is null or not a
   object...
   It only happens with IE...
   what can I do?
   Thank you very much in advance!
   Ricardo


[jQuery] Re: Drag - Drop - with Layers

2009-03-11 Thread Richard D. Worth
We'd love to help with this question over on the jQuery UI list:

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

- Richard

On Wed, Mar 11, 2009 at 12:24 PM, Paul Hutson
hutsonphu...@googlemail.comwrote:


 Hello,

 I've been having a problem with the UI.draggable and UI.droppable
 functionality.  I've set up my screen like the following :

 http://outer-empires.com/images/Screenshots/inGame-SpaceStationHome.jpg

 At the bottom of the screen you can see the cargo and hanger area,
 people can pick up their resource and move it from one area to the
 other.

 Now, all of the above works - however, when dragging from the left to
 the right, the cloned item slides underneath the background for the
 hanger.  Both of the drop zones are the on the same layer (div
 wise), moving right to left works fine...

 Any ideas at all as to what the problem could be would be much
 appreciated - is there a bug with layers in the draggable interface?

 Thanks in advance,
 Paul Hutson


 p.s. As you can see, I'm building a game using an awful lot of
 Jquery :)


[jQuery] Re: Drag - Drop - with Layers

2009-03-11 Thread Paul Hutson

On Mar 11, 6:03 pm, Richard D. Worth rdwo...@gmail.com wrote:
 We'd love to help with this question over on the jQuery UI list:

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

 - Richard

Apologies!, I've posted it over there now.


[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread mkmanning

And that's what I get for skipping the middle; basically the same
solution as tres, just less code (and it works in IE6) :)

On Mar 11, 11:21 am, mkmanning michaell...@gmail.com wrote:
 Here's a completely different (and admittedly problematic) approach.
 Instead of creating new markup with a separate list, you could 'hide'
 the LI's over a certain number with CSS, and then animate the
 container. Here's a quick example:

 JS:
 $(document).ready(function(){
         var ul = $('#myList'), l = ul.children('li'), h = l.height();
         ul.css({'height':(h*5)+'px','overflow':'hidden'});
         $('#myList-toggle').click(function(){
                 
 ul.animate({'height':(ul.height()(h*5)?(h*5):(l.length*h))+'px'});
                 return false;
         });

 });

 HTML:
 a href=# id=myList-toggleShow the rest/a
 ul id=myList
 liItem 1/li
 liItem 2/li
 liItem 3/li
 liItem 4/li
 liItem 5/li
 liItem 6/li
 liItem 7/li
 liItem 8/li
 liItem 9/li
 liItem 10/li
 /ul

 What makes it problematic? Well, if the user resizes the text after
 you've calculated the height, it will be off (so if you want to
 account for that you'd have to include text-resize detection, which
 complicates the script; you'd have to decide if it's worth the extra
 effort).

 On Mar 11, 8:50 am, Brian byano...@gmail.com wrote:

  How would one go about adapting this to be used with multiple lists on
  one page.

  I have 3-5 lists on each page and would only like to show the first 3
  items of each with the ability to show the others.

  On Feb 17, 5:16 am, mofle mofl...@gmail.com wrote:

   I'm using IE6 natively on an XP machine. jQuery 1.3.1.

   Any solution?

   I don't get an error message in IE6, nothing happens when i click the
   link.

   Anyway, thanks for your help ;)

   On Feb 13, 12:09 am, tres treshug...@gmail.com wrote:

After installing IE6, I didn't have any problems. It works just like
it should. I have noticed differences in the multiple IEs and the
actual IE, but those differences we're only when viewing the About
Internet Explorer in the Help menu and when printing.

Are you using ie6 in a VM, in it's original state on XP, or with
multiple IE's? Another question would be, which version of jQuery are
you using and have you cleared the ie6 cache?

Sorry that didn't work for you.

-Trey

On Feb 13, 9:56 am, tres treshug...@gmail.com wrote:

 I'll install multiple IE's and get back to you.

 -Trey

 On Feb 12, 7:05 pm, mofle mofl...@gmail.com wrote:

  Thanks, you're a genius.

  But it didn't work in IE6, where I need it.

  Any solution?

  On Feb 12, 12:32 am, tres treshug...@gmail.com wrote:

   Oh and also Safari 3.1.2 Windows.

   -Trey


[jQuery] Re: jquery validate issues with IE

2009-03-11 Thread James

What if you split your messages up?

messages: {
name: {
 required: Namen eintragen
}
email: {
 required: Eine gültige Email-Adresse eintragen,
 email: Invalid email format
},
/// and so on
}


On Mar 11, 4:00 am, phred78 phre...@gmail.com wrote:
 Hi,

 I'm sorry if this is a double post but I can't find the original one.

 I'm having problems with jquery-validation on IE. It's working fine in
 every other browser.

 This is the page:

 http://www.thecentroexperience.com/de/wellness/contest/28/

 It should validate all the fields, but in IE it won't allow the form
 to be submitted, even after the inputs have been filled.

 Can anyone please check my code and see if I'm missing something?
 If you submit the form, please use Test and t...@test.com as name
 and e-mail.

 Thank you!

 Frederico


[jQuery] Recommend tree widget toolkit

2009-03-11 Thread Tim Johnson

Hello:
If jquery itself does not support a tree widget toolkit,
can anyone recommend one, I've tried dojo but
two problems:
1)doesn't work - even verbatim example
2)No support
3)Very big system

Any comments or  recommendation welcome.
thanks
tim


[jQuery] Re: Switching Content in same div

2009-03-11 Thread ricardobeat

Can't you load both products, each in it's own container, and show/
hide them? That's easier and faster.

div id=products
   div class=red
   /div
   div class=blue style=display:none
   /div
/div

$('#products .blue').show();
$('#products .red').hide();
etc.


On Mar 11, 11:30 am, Desinger p.pad...@gmail.com wrote:
 Hi,

 Product page would like to load different contents in same div
 For example :

 Red product and Blue product

 Default it loads red product and when u click on blueimage product
 image and discription should load in the same div.

 I hope I have conveyd my message clearly


[jQuery] Re: live() not working in IE8?

2009-03-11 Thread ricardobeat

How about

$('#orderlineform #productlisting').load('orderProxy.cfm',
   {
  mode:'getAvailableProducts',
  ordergrade_id:ordergrade_id,
  order_id:order_id
   },
   function(){
  $(this).find('#product_id').change
(isRentalActive);
});

On Mar 11, 11:19 am, Todd Rafferty web...@gmail.com wrote:
 I have a drop down that is being generated via load() - to be 100%
 clear, I'll restate that. The drop down does not exist on the actual
 page.  I'm doing this:

         $('#orderlineform #productlisting').load('orderProxy.cfm',
                 {
                          mode:'getAvailableProducts'
                         ,ordergrade_id:ordergrade_id
                         ,order_id:order_id
                 }
         );

 This is generating the drop down for me and putting it inside the
 #produclisting span for me. Now, just attaching a 'change' event on it
 wasn't working, so I looked into livequery() (eventually live() ) --
 using it works just fine in FireFox, but fails in IE.

 $('#orderlineform #product_id').live('change',isRentalActive);
 -
 function isRentalActive(){
         var data = $(#orderlineform #product_id option:selected).metadata
 ({type:'attr',name:'data'});
         alert(data);
         return false;
         if(data.return_flag == 0){
                 $('.rental').css(display, table-row-group).show();
         }else{
                 $('.rental').hide();
         }

 }

 Any suggestions as to why this is failing in IE?

 Thanks,
 ~Todd


[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread Brian

mkmanning,

I want to thank you for your contribution. I was able to understand
your example better (I just didn't get tres's version) and was able to
come up with the following js/code combo:

$(document).ready(function(){

$('ul').each(function(i) {
var ul = $(this), l = ul.children('li'), h = l.height();
ul.css({'height':(h*3)+'px','overflow':'hidden'});
$(this).siblings('.control').addClass('closed');
$(this).siblings('.control').html('a 
href=#open/a');
});

$('.control').click(function(){
var ul = $(this).parent().children(ul), l =
ul.children('li'), h = l.height();
var me = $(this);

if( me.is('.closed') ) {

ul.parent().children(ul).animate({'height':(ul.height()(h*5)?
(h*5):(l.length*h))+'px'});
me.removeClass('closed');
me.addClass('open');
$(this).html('a href=#close/a');
} else {

//ul.css({'height':(h*3)+'px','overflow':'hidden'});

ul.animate({'height':(h*3)+'px','overflow':'hidden'});
me.removeClass('open');
me.addClass('closed');
$(this).html('a href=#closed/a');
}
return false;
});

});

 div class=ec
ul
  litest 1/li
  litest 2/li
  litest 3/li
  litest 4/li
  litest 5/li
  litest 6/li
  litest 7/li
  litest 8/li
  litest 9/li
/ul
div class=control/div
  /div
  div class=ec
ul
  litest 1/li
  litest 2/li
  litest 3/li
  litest 4/li
  litest 5/li
  litest 6/li
  litest 7/li
  litest 8/li
  litest 9/li
/ul
div class=control/div
  /div

On Mar 11, 2:25 pm, mkmanning michaell...@gmail.com wrote:
 And that's what I get for skipping the middle; basically the same
 solution as tres, just less code (and it works in IE6) :)

 On Mar 11, 11:21 am, mkmanning michaell...@gmail.com wrote:

  Here's a completely different (and admittedly problematic) approach.
  Instead of creating new markup with a separate list, you could 'hide'
  the LI's over a certain number with CSS, and then animate the
  container. Here's a quick example:

  JS:
  $(document).ready(function(){
          var ul = $('#myList'), l = ul.children('li'), h = l.height();
          ul.css({'height':(h*5)+'px','overflow':'hidden'});
          $('#myList-toggle').click(function(){
                  
  ul.animate({'height':(ul.height()(h*5)?(h*5):(l.length*h))+'px'});
                  return false;
          });

  });

  HTML:
  a href=# id=myList-toggleShow the rest/a
  ul id=myList
  liItem 1/li
  liItem 2/li
  liItem 3/li
  liItem 4/li
  liItem 5/li
  liItem 6/li
  liItem 7/li
  liItem 8/li
  liItem 9/li
  liItem 10/li
  /ul

  What makes it problematic? Well, if the user resizes the text after
  you've calculated the height, it will be off (so if you want to
  account for that you'd have to include text-resize detection, which
  complicates the script; you'd have to decide if it's worth the extra
  effort).

  On Mar 11, 8:50 am, Brian byano...@gmail.com wrote:

   How would one go about adapting this to be used with multiple lists on
   one page.

   I have 3-5 lists on each page and would only like to show the first 3
   items of each with the ability to show the others.

   On Feb 17, 5:16 am, mofle mofl...@gmail.com wrote:

I'm using IE6 natively on an XP machine. jQuery 1.3.1.

Any solution?

I don't get an error message in IE6, nothing happens when i click the
link.

Anyway, thanks for your help ;)

On Feb 13, 12:09 am, tres treshug...@gmail.com wrote:

 After installing IE6, I didn't have any problems. It works just like
 it should. I have noticed differences in the multiple IEs and the
 actual IE, but those differences we're only when viewing the About
 Internet Explorer in the Help menu and when printing.

 Are you using ie6 in a VM, in it's original state on XP, or with
 multiple IE's? Another question would be, which version of jQuery are
 you using and have you cleared the ie6 cache?

 Sorry that didn't work for you.

 -Trey

 On Feb 13, 9:56 am, tres treshug...@gmail.com wrote:

  I'll install multiple IE's and get back to you.

  -Trey

  On Feb 12, 7:05 pm, mofle mofl...@gmail.com wrote:

   Thanks, you're a genius.

   But it didn't work in IE6, where I need it.

   Any solution?

   On Feb 12, 12:32 am, tres treshug...@gmail.com wrote:

Oh and also Safari 3.1.2 

[jQuery] Re: required field keeps on appearing

2009-03-11 Thread exhaler

i fixed the issue, turns out putting a form tag inside a table tag
causes this problem


[jQuery] Re: live() not working in IE8?

2009-03-11 Thread Todd Rafferty

I've made too many changes to back up and check to see if this works,
but I appreciate the help. Next time I run into this, I'll attempt
this instead.

On Mar 11, 3:35 pm, ricardobeat ricardob...@gmail.com wrote:
 How about

 $('#orderlineform #productlisting').load('orderProxy.cfm',
    {
       mode:'getAvailableProducts',
       ordergrade_id:ordergrade_id,
       order_id:order_id
    },
    function(){
       $(this).find('#product_id').change
 (isRentalActive);

 });


[jQuery] Re: How to prevent third-party CSS code override our CSS

2009-03-11 Thread ricardobeat

Just wrap your re-usable parts in a container with an ID. IDs have
greater weight on CSS rules, that will usually be enough. putting !
important on all your rules will bloat your code unnecessarily.

See this article on CSS specifity:
http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/

On Mar 11, 7:38 am, Nguyễn Quốc Vinh kureik...@gmail.com wrote:
 I'm using sortable of jQuery UI!
 My elements  such as UL tag, LI tag(sortable, dragable,..element) may put
 into many template!
 And each template have thier own CSS, so, that CSS override CSS of my LI tag

 Have anyway to clear all CSS apply on our element, then apply new CSS? Or i
 must use !important for all property to prevent overriding!

 Take a look on two 
 URL:http://trademerchants.com/delnow/kurei/dnd//themes/hr/html/index.myTe...

 http://trademerchants.com/delnow/kurei/dnd//themes/template1/html/ind...

 As you can see, li item appeas in other style because each template have
 own CSS

 Does anyone know how to prevent this?


[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread Brian

Is there anyway to account for padding on the li of each list? I have
padding which seems to be throwing off the calculations.

On Mar 11, 3:36 pm, Brian byano...@gmail.com wrote:
 mkmanning,

 I want to thank you for your contribution. I was able to understand
 your example better (I just didn't get tres's version) and was able to
 come up with the following js/code combo:

 $(document).ready(function(){

                 $('ul').each(function(i) {
                         var ul = $(this), l = ul.children('li'), h = 
 l.height();
                         ul.css({'height':(h*3)+'px','overflow':'hidden'});
                         $(this).siblings('.control').addClass('closed');
                         $(this).siblings('.control').html('a 
 href=#open/a');
                 });

                 $('.control').click(function(){
                 var ul = $(this).parent().children(ul), l =
 ul.children('li'), h = l.height();
                                 var me = $(this);

                                 if( me.is('.closed') ) {
                                         
 ul.parent().children(ul).animate({'height':(ul.height()(h*5)?
 (h*5):(l.length*h))+'px'});
                                         me.removeClass('closed');
                                         me.addClass('open');
                                         $(this).html('a href=#close/a');
                                 } else {
                                         
 //ul.css({'height':(h*3)+'px','overflow':'hidden'});
                                         
 ul.animate({'height':(h*3)+'px','overflow':'hidden'});
                                         me.removeClass('open');
                                         me.addClass('closed');
                                         $(this).html('a 
 href=#closed/a');
                                 }
                 return false;
         });

 });

  div class=ec
     ul
       litest 1/li
       litest 2/li
       litest 3/li
       litest 4/li
       litest 5/li
       litest 6/li
       litest 7/li
       litest 8/li
       litest 9/li
     /ul
     div class=control/div
   /div
   div class=ec
     ul
       litest 1/li
       litest 2/li
       litest 3/li
       litest 4/li
       litest 5/li
       litest 6/li
       litest 7/li
       litest 8/li
       litest 9/li
     /ul
     div class=control/div
   /div

 On Mar 11, 2:25 pm, mkmanning michaell...@gmail.com wrote:

  And that's what I get for skipping the middle; basically the same
  solution as tres, just less code (and it works in IE6) :)

  On Mar 11, 11:21 am, mkmanning michaell...@gmail.com wrote:

   Here's a completely different (and admittedly problematic) approach.
   Instead of creating new markup with a separate list, you could 'hide'
   the LI's over a certain number with CSS, and then animate the
   container. Here's a quick example:

   JS:
   $(document).ready(function(){
           var ul = $('#myList'), l = ul.children('li'), h = l.height();
           ul.css({'height':(h*5)+'px','overflow':'hidden'});
           $('#myList-toggle').click(function(){
                   
   ul.animate({'height':(ul.height()(h*5)?(h*5):(l.length*h))+'px'});
                   return false;
           });

   });

   HTML:
   a href=# id=myList-toggleShow the rest/a
   ul id=myList
   liItem 1/li
   liItem 2/li
   liItem 3/li
   liItem 4/li
   liItem 5/li
   liItem 6/li
   liItem 7/li
   liItem 8/li
   liItem 9/li
   liItem 10/li
   /ul

   What makes it problematic? Well, if the user resizes the text after
   you've calculated the height, it will be off (so if you want to
   account for that you'd have to include text-resize detection, which
   complicates the script; you'd have to decide if it's worth the extra
   effort).

   On Mar 11, 8:50 am, Brian byano...@gmail.com wrote:

How would one go about adapting this to be used with multiple lists on
one page.

I have 3-5 lists on each page and would only like to show the first 3
items of each with the ability to show the others.

On Feb 17, 5:16 am, mofle mofl...@gmail.com wrote:

 I'm using IE6 natively on an XP machine. jQuery 1.3.1.

 Any solution?

 I don't get an error message in IE6, nothing happens when i click the
 link.

 Anyway, thanks for your help ;)

 On Feb 13, 12:09 am, tres treshug...@gmail.com wrote:

  After installing IE6, I didn't have any problems. It works just like
  it should. I have noticed differences in the multiple IEs and the
  actual IE, but those differences we're only when viewing the About
  Internet Explorer in the Help menu and when printing.

  Are you using ie6 in a VM, in it's original state on XP, or with
  multiple IE's? Another question would be, which version of jQuery 
  are
  you using and have you cleared the ie6 cache?

  Sorry that didn't work for you.

  -Trey

  On Feb 13, 9:56 am, tres treshug...@gmail.com wrote:

   I'll 

[jQuery] Re: JQuery Form Validation Fancybox

2009-03-11 Thread MonkeyBall2010

Thanks! Now how do I use it?!?!

Hahah. Specifically, let's say I wanted to check on the availablility
of an email address. How do I pass that email address to my PHP
script? I couldn't seem to locate an example on the server side
script, only the JS.

Tim

On Mar 11, 3:11 am, Jörn Zaefferer joern.zaeffe...@googlemail.com
wrote:
 Dunno about Fancybox, but you can use the remote method to check the
 username:http://docs.jquery.com/Plugins/Validation/Methods/remote

 Jörn

 On Tue, Mar 10, 2009 at 11:53 PM, MonkeyBall2010



 hughes.timo...@gmail.com wrote:

  You'll have to forgive me if this question sounds easy but I am fairly
  new to jQuery so I'm still learning things here.

  I'm trying to do the following:

  -Display a signup form with the Fancybox plugin (working)
  -Validate the form, currently using the bassistance Validation plugin
  (working)
  -Dynamically check a MySQL database, via AJAX, to see if the username
  is already taken ()
  -Once the form checks out then I want to upload the information to
  MySQL

  The problems I am having right now are as follows:

  -The validation script will function correctly on the standalone
  webpage. However, when I try to open the webpage via the Fancybox
  plugin the validation ceases to work. The submit button will refresh
  the webpage and the validation doesn't fire. Does anyone why this
  happend?
  -I really haven't used AJAX before so I don't know if this whole
  shabang will work or where I should start. Can these two things
  (Validation, Fancybox) be combined? If so, is the way that I proposed
  a valid way to combine them or can I change what I am doing to
  something more efficient?

  Thanks!- Hide quoted text -

 - Show quoted text -


[jQuery] Autocomplete Combobox

2009-03-11 Thread Pedram

Dear folk,
recently I found jQuery plug in that allows you to have a auto
complete Combo box so you could have combo box and a auto complete
functionality at the same time
does anyone has a link . thanks
I really appreciate it


[jQuery] retrieve value with JQuery

2009-03-11 Thread Chuk

Hi.  In one of my functions, I would like to test the value of a
certain field with an id=zipCode.  Here is my current code:

function retrieveCityState()
{
  if ($('#zipCode').value.length  4)
  {
...
  }
}

This test doesn't seem to work.  How do I correctly handle this using
JQuery?  Thanks.


[jQuery] Re: retrieve value with JQuery

2009-03-11 Thread mkmanning

If #zipCode is an input:

$('#zipCode').val().length



On Mar 11, 1:20 pm, Chuk violinssoundc...@gmail.com wrote:
 Hi.  In one of my functions, I would like to test the value of a
 certain field with an id=zipCode.  Here is my current code:

 function retrieveCityState()
 {
   if ($('#zipCode').value.length  4)
   {
     ...
   }

 }

 This test doesn't seem to work.  How do I correctly handle this using
 JQuery?  Thanks.


[jQuery] Re: retrieve value with JQuery

2009-03-11 Thread James

$('#zipCode').val().length

On Mar 11, 10:20 am, Chuk violinssoundc...@gmail.com wrote:
 Hi.  In one of my functions, I would like to test the value of a
 certain field with an id=zipCode.  Here is my current code:

 function retrieveCityState()
 {
   if ($('#zipCode').value.length  4)
   {
     ...
   }

 }

 This test doesn't seem to work.  How do I correctly handle this using
 JQuery?  Thanks.


[jQuery] Safari + triggerTab() = fail

2009-03-11 Thread ZAP

Hello -

I'm using Klaus' Tabs plugin (Version: 2.7.4) with jQuery 1.2.6, but
the triggerTab() function just isn't working for me in Safari 3. No
matter how I create Back and Next buttons or links, Safari instead
tries to load a new page (e.g., http://mydomain.com/?#start) instead
of switching tabs. Clicking the tab headers works as expected in
Safari, and everything works properly in all other tested browsers.

I've tried various methods to make these links work in Safari, such
as:
input type=button id=back2 class=submit value=laquo; back
onclick=$('#formtabs').triggerTab(1);return false;/
a href=# onclick=$('#formtabs').triggerTab(2);return
false;laquo; back/a

What might be the cause of this, and more importantly what might be
the solution?

Thanks in advance for your replies.


ZAP


[jQuery] Re: Only show 5 list item, hide the rest?

2009-03-11 Thread mkmanning

You could add the padding to the calculation, but that's pretty ugly.
Instead you could calculate the height differently, for each LI
element (this would also take into account if any LI's wrapped due to
content length):

CSS:
ul {
width:100px;
}
li{
padding:5px;
}

HTML:
a href=# id=myList-toggleShow the rest/a
ul id=myList
liItem 1/li
liItem 2 and this is really long so it will wrap/li
liItem 3/li
liItem 4/li
liItem 5/li
liItem 6/li
liItem 7/li
liItem 8/li
liItem 9/li
liItem 10/li
/ul

JS:
$(document).ready(function(){
var ul = $('#myList'), ulh = ul.height(), h = 0;
ul.children('li').each(function(i){
if(i===5){return false;}
h += this.offsetHeight;
});
ul.css({'height':h+'px','overflow':'hidden'});
$('#myList-toggle').click(function(){
ul.animate({'height':(ul.height()h?h:ulh)+'px'});
return false;
});
});

On Mar 11, 12:49 pm, Brian byano...@gmail.com wrote:
 Is there anyway to account for padding on the li of each list? I have
 padding which seems to be throwing off the calculations.

 On Mar 11, 3:36 pm, Brian byano...@gmail.com wrote:

  mkmanning,

  I want to thank you for your contribution. I was able to understand
  your example better (I just didn't get tres's version) and was able to
  come up with the following js/code combo:

  $(document).ready(function(){

                  $('ul').each(function(i) {
                          var ul = $(this), l = ul.children('li'), h = 
  l.height();
                          ul.css({'height':(h*3)+'px','overflow':'hidden'});
                          $(this).siblings('.control').addClass('closed');
                          $(this).siblings('.control').html('a 
  href=#open/a');
                  });

                  $('.control').click(function(){
                  var ul = $(this).parent().children(ul), l =
  ul.children('li'), h = l.height();
                                  var me = $(this);

                                  if( me.is('.closed') ) {
                                          
  ul.parent().children(ul).animate({'height':(ul.height()(h*5)?
  (h*5):(l.length*h))+'px'});
                                          me.removeClass('closed');
                                          me.addClass('open');
                                          $(this).html('a 
  href=#close/a');
                                  } else {
                                          
  //ul.css({'height':(h*3)+'px','overflow':'hidden'});
                                          
  ul.animate({'height':(h*3)+'px','overflow':'hidden'});
                                          me.removeClass('open');
                                          me.addClass('closed');
                                          $(this).html('a 
  href=#closed/a');
                                  }
                  return false;
          });

  });

   div class=ec
      ul
        litest 1/li
        litest 2/li
        litest 3/li
        litest 4/li
        litest 5/li
        litest 6/li
        litest 7/li
        litest 8/li
        litest 9/li
      /ul
      div class=control/div
    /div
    div class=ec
      ul
        litest 1/li
        litest 2/li
        litest 3/li
        litest 4/li
        litest 5/li
        litest 6/li
        litest 7/li
        litest 8/li
        litest 9/li
      /ul
      div class=control/div
    /div

  On Mar 11, 2:25 pm, mkmanning michaell...@gmail.com wrote:

   And that's what I get for skipping the middle; basically the same
   solution as tres, just less code (and it works in IE6) :)

   On Mar 11, 11:21 am, mkmanning michaell...@gmail.com wrote:

Here's a completely different (and admittedly problematic) approach.
Instead of creating new markup with a separate list, you could 'hide'
the LI's over a certain number with CSS, and then animate the
container. Here's a quick example:

JS:
$(document).ready(function(){
        var ul = $('#myList'), l = ul.children('li'), h = l.height();
        ul.css({'height':(h*5)+'px','overflow':'hidden'});
        $('#myList-toggle').click(function(){
                
ul.animate({'height':(ul.height()(h*5)?(h*5):(l.length*h))+'px'});
                return false;
        });

});

HTML:
a href=# id=myList-toggleShow the rest/a
ul id=myList
liItem 1/li
liItem 2/li
liItem 3/li
liItem 4/li
liItem 5/li
liItem 6/li
liItem 7/li
liItem 8/li
liItem 9/li
liItem 10/li
/ul

What makes it problematic? Well, if the user resizes the text after
you've calculated the height, it will be off (so if you want to
account for that you'd have to include text-resize detection, which
complicates the script; you'd have to decide if it's worth the extra
effort).

On Mar 11, 8:50 am, Brian byano...@gmail.com wrote:

 How would one go about adapting this to be used with 

[jQuery] [validate] email validation doesn't work!

2009-03-11 Thread mcreisi

hi,
Is there a fix for email validation?
at this time also emails like a...@e.f are valid.
I like that validation script, but it is not really usefull if the
validation of an email doesn't work.

best regards,
mcreisi


[jQuery] jquery

2009-03-11 Thread Pavel Philippenko
Can You please remove me from jquery newsletter


[jQuery] onchange input

2009-03-11 Thread dziobacz

I have:

form method=post action=/rejestracja  table
  input type=text name=sf_guard_user[username]
id=sf_guard_user_username //td
  input type=submit name=register value=Zarejestruj /
/form

p id=information/p


I would like after each change in input 'sf_guard_user_username' write
something between p id=information /p.


What is wrong in my code below:

$(document).ready(function()
{
$('#sf_guard_user_username').onchange(function()
{
   $(#information).html(d);
});
});


??






  1   2   >