[jQuery] Re: how can i make in joomla 1.5 - superfish expand or close on click

2009-07-12 Thread ironwiller

HAS ANYONE DONE WHAT I ASK? is this SO difficult


On Jul 5, 12:52 pm, ironwiller orfn...@googlemail.com wrote:
 hi, i need SPECIFIC guide how to make the superfish vertical menu toexpandor 
 close on click and not on hover. has anyone done it? please
 explain the steps you did..

 ty in advanced


[jQuery] Getting the current page HTML URL via JQuery variable

2009-07-12 Thread Alexandru Adrian Dinulescu
I am trying to get the current page HTML URL (the one at the top in the
address box) and place it in a variable. Any help ?

---
Alexandru Dinulescu
Web Developer
(X)HTML/CSS Specialist
Expert Guarantee Certified Developer
XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
RentACoder Profile:
http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323

XHTML/CSS/jQuery Blog - http://alexd.adore.ro/blog
MainWebsite: http://alexd.adore.ro


[jQuery] Re: jCarousel Appears Vertical then Horizontal

2009-07-12 Thread Sparky12

Hi Jonathan,

Thanks so much for the response. Yeah, I tried this and it partially
solves the problem (no probs in safari) - but it seems that IE and
Firefox still have the vertical rendering issue?

Do you know anything else I could try ?

Thanks


[jQuery] Form with Ajax Load Content combined with onClick

2009-07-12 Thread Erik

Is it possible to combine the following?


form action=https://www.expressdb.com/edp/?
AppKey=3905B91021BD0A1490189D249874B317AAD9067B method=post
enctype=multipart/form-data


[jQuery] Re: Form with Ajax Load Content combined with onClick

2009-07-12 Thread András Csányi

2009/7/12 Erik eriks...@mac.com:

 Is it possible to combine the following?


 form action=https://www.expressdb.com/edp/?
 AppKey=3905B91021BD0A1490189D249874B317AAD9067B method=post
 enctype=multipart/form-data

I suggest you, try it! :)

-- 
- -
--  Csanyi Andras  -- http://sayusi.hu -- Sayusi Ando
--  Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] Re: Superfish - Align sub menus to top

2009-07-12 Thread Charlie





Following will return the index of li you are hovering over within it's
UL

  onBeforeShow: function() {
 var parentIndex=
$(this).parent("li").parent("ul").find("li").index($(this).parent("li"));
 // use parentIndex to calculate offset for
(this)- per API *this* is the UL about to be shown
  } 



galilee99 wrote:

  Hi, any tips on how to count the number of li's??

On Jul 8, 11:51am, Charlie charlie...@gmail.com wrote:
  
  
you can use onBeforeShow to insert function to calculate offset for css. Number of li's x height of li etc
Use "(this)" to refer to ul about to open and apply css to it
galilee99 wrote:Hi, I'm trying to setup a vertical menu where the submenus align to the top of the parent ul rather than the parent li. as in this image:http://nickjacobs.net.nz/tmp/superfish.pngbut not sure where to start?? any help appreciated.

  
  
  






[jQuery] Re: Getting the current page HTML URL via JQuery variable

2009-07-12 Thread Charlie





use native _javascript_

var url ="">
alert(url);

Alexandru Adrian Dinulescu wrote:
I am trying to get the current page HTML URL (the one at
the top in the address box) and place it in a variable. Any help ?
  
---
Alexandru Dinulescu
Web Developer
(X)HTML/CSS Specialist
Expert Guarantee Certified Developer
XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053
CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619
RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323
  
XHTML/CSS/jQuery Blog - http://alexd.adore.ro/blog
MainWebsite: http://alexd.adore.ro
  






[jQuery] Re: Form with Ajax Load Content combined with onClick

2009-07-12 Thread Erik

I already did and no luck :-(

Any suggestions?

Erik

On Jul 12, 8:14 am, András Csányi sayusi.a...@gmail.com wrote:
 2009/7/12 Erik eriks...@mac.com:



  Is it possible to combine the following?

  form action=https://www.expressdb.com/edp/?
  AppKey=3905B91021BD0A1490189D249874B317AAD9067B method=post
  enctype=multipart/form-data

 I suggest you, try it! :)

 --
 - -
 --  Csanyi Andras  --http://sayusi.hu-- Sayusi Ando
 --  Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] Re: Jquery index question

2009-07-12 Thread Charlie





active class is on the a tag not li so example doesn't
work

try this:

var arr = [ ];
   $(".active").each(function() {
   
indexLi=$(this).parents(".buttons").children("li").index($(this).parent("li"));

arr.push(indexLi);
   });
   alert(arr);


Dave Ward wrote:

  I don't think there's a shortcut in jQuery to do exactly that.  You
could iterate over them and build the array like this though:

var arr = [ ];

$(".buttons li").each(function(i, item) {
  if ($(item).hasClass("active")) {
arr.push(i);
  }
});

On Jul 11, 1:33pm, yo2lux yo2...@gmail.com wrote:
  
  
I have a HTML list:

ul class="buttons"
 lia href="" class="active"Home/a/li
 lia href=""About/a/li
 lia href="" class="active"News/a/li
/ul

I want to obtain the index only for the elements with class="active".
For example I want to create an array with value "0" for Home and "2"
for News (the indexes).

Is possible to do this with jquery?
Thanks!

  
  
  






[jQuery] Re: Form with Ajax Load Content combined with onClick

2009-07-12 Thread András Csányi

2009/7/12 Erik eriks...@mac.com:

 I already did and no luck :-(

 Any suggestions?

there is another two way:
- change the method to get
- use hidden fields to send special data

These are good for you?

-- 
- -
--  Csanyi Andras  -- http://sayusi.hu -- Sayusi Ando
--  Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] install Supersubs in Superfish. How?

2009-07-12 Thread Mike

Hello,

Sorry, I'm lost. I installed Superfish, use the menus, everything is
ok. Great coding! Now, how can Supersubs be enabled in Joomla? I
cannot find a tweak in the Superfish backend module? Does any file
have to be edited by hand? Any tip is welcome!

Greetings,

Mike


[jQuery] Can this plugin be structured better?

2009-07-12 Thread Harvey

Hey,

I'm in the process of developing a new plugin but the way I have
structured the codes doesn't seem quite right to me so I'm hoping
someone might be able to offer a better way to do it.

The plugin itself has different behaviour if called on different types
of elements (images, divs etc) with a range of shared functions used
across all element types.

This is the basic structure I have so far:

(function ($) {
   $.fn.editable = function (options) {
  var defaults = {
 // default value declarations
  }

  var opts = $.extend(defaults, options);

  return this.each(function () {
 var $this = $(this); // Cache a jQuery version of this
 var tag   = $this.get(0).tagName;

 switch(tag) {
case 'DIV': initDiv();break;
case 'IMG': initImage();  break;
 }

 function initDiv () {
// initialise the plugin to work with divs
 }

 function initImage () {
// initialise the plugin to work with images
 }

 // functions used by divs only
 function divFunction () {
// body...
 }

 // functions used by images only
 function imageFunction () {
// body...
 }

 // functions used by divs and images
 function sharedFunction () {
// body...
 }

  });
   }
})(jQuery);


The reason it does seem right to me is because any instance of the
plugin called on a div will also contain all the code that is used if
it was an image even though the code won't be used.

Can any offer something better?


[jQuery] Re: Superfish - Align sub menus to top

2009-07-12 Thread allenm541

Use .length()

For example:
var length = $('#something ul li').length();


On Jul 11, 9:25 pm, galilee99 he...@nickjacobs.net.nz wrote:
 Hi, any tips on how to count the number of li's??

 On Jul 8, 11:51 am, Charlie charlie...@gmail.com wrote:

  you can use onBeforeShow to insert function to calculate offset for css. 
  Number of li's x height of li etc
  Use (this) to refer to ul about to open and apply css to it
  galilee99 wrote:Hi, I'm trying to setup a vertical menu where the submenus 
  align to the top of the parent ul rather than the parent li. as in this 
  image:http://nickjacobs.net.nz/tmp/superfish.pngbutnot sure where to 
  start?? any help appreciated.


[jQuery] Best way to structure this plugin

2009-07-12 Thread Harvey

Hey,

I'm in the process of developing a new plugin but the way I have
structured the codes doesn't seem quite right to me so I'm hoping
someone might be able to offer a better way to do it.

The plugin itself has different behaviour if called on different types
of elements (images, divs etc) it has a range of shared functions used
across all element types and some function specific to certain
elements.

This is the basic structure I have so far:

(function ($) {
   $.fn.editable = function (options) {
  var defaults = {
 // default value declarations
  }

  var opts = $.extend(defaults, options);

  return this.each(function () {
 var $this = $(this); // Cache a jQuery version of this
 var tag   = $this.get(0).tagName;

 switch(tag) {
case 'DIV': initDiv();break;
case 'IMG': initImage();  break;
 }

 function initDiv () {
// initialise the plugin to work with divs
 }

 function initImage () {
// initialise the plugin to work with images
 }

 // functions used by divs only
 function divFunction () {
// body...
 }

 // functions used by images only
 function imageFunction () {
// body...
 }

 // functions used by divs and images
 function sharedFunction () {
// body...
 }

  });
   }
})(jQuery);

The reason it does seem right to me is because any instance of the
plugin called on a div will also contain all the code that is used if
it was an image even though the code won't be used.

Can any offer something better?


[jQuery] Re: Superfish conflicht with Header Image for Joomla 1.5

2009-07-12 Thread deboni

The superfish menu is being used here.

http://www2.sdnag.com/

Meanwhile I found at least one error in the superfish.js. This script
is not using the no-conflict function.

The superfish menu in itself is a great module but when using it in
Joomla 1.5, it causes a lot of problems and there is no support
provided for this mootools vs. jquery issue.



On Jun 25, 6:12 pm, Charlie charlie...@gmail.com wrote:
 the majority of the problems with superfish integration into Joomla are css 
 issues. The existing template menu css doesn't get removed when you install 
 superfish and some of the template css conflicts with superfish
 providing a link would help
 deboni wrote:Thanks! that seems to be the right approach. However I have no 
 idea how I should implement that into Joomla. Maybe it has been done before? 
 On Jun 19, 9:52 pm, Theodore Nizyl...@gmail.comwrote:I don't know the 
 details behind your specific problem, but a solution may be found at the 
 following link:http://docs.jquery.com/Using_jQuery_with_Other_LibrariesTeddy 
 On Fri, Jun 19, 2009 at 2:42 PM, debonides...@debonis.chwrote:HiI'm using 
 your superfish menu on a joomla website. It works perfect, but there seems to 
 be a conflict with another module which is using mootools.They say the 
 mootols (seems to be standard on Joomla 1.5) and jquery can not be mixed.Do 
 you know of any workaround for that problem?The menu is being used here?Best 
 regardsSilvio


[jQuery] Re: Getting the current page HTML URL via JQuery variable

2009-07-12 Thread Zac Witte

you don't need jquery - just window.location

alert(window.location);

On Jul 12, 4:50 am, Alexandru Adrian Dinulescu alex.d.a...@gmail.com
wrote:
 I am trying to get the current page HTML URL (the one at the top in the
 address box) and place it in a variable. Any help ?

 ---
 Alexandru Dinulescu
 Web Developer
 (X)HTML/CSS Specialist
 Expert Guarantee Certified Developer
 XHTML:http://www.expertrating.com/transcript.asp?transcriptid=1879053
 CSS :http://www.expertrating.com/transcript.asp?transcriptid=1870619
 RentACoder 
 Profile:http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInf...

 XHTML/CSS/jQuery Blog -http://alexd.adore.ro/blog
 MainWebsite:http://alexd.adore.ro


[jQuery] Re: Ajax ,dataType and success

2009-07-12 Thread Vjacheslav Trushkin

There is a typo in your code:

data:act=buy,

Closing quote is missing.

On Jul 11, 10:39 pm, raoh hiy...@gmail.com wrote:
 this is my code, a normal code as the examples on jquery.com
 ajax.php can only echo OK1, OK2 or KO, so I wonder why none of
 the if in the success function work ? but the alert before works well
 and i set dataType = text just to be sure. It's like mess is another
 type of variable or what ? Thank you

 $.ajax({
         type:POST,
         url:ajax.php,
         data:act=buy,
         cache:false,
         dataType: text,
         beforeSend: function(){
             // Loading
         },
         success: function(mess){
             var txt = mess;
                         alert(txt);
             if(txt==OK1)
                 alert(txt);
             if(txt==OK2)
                 alert(txt);
             if(txt==KO)
                 alert(txt);

         },
         error: function(){
             // Errore
         }
     });


[jQuery] thickbox+tablesorter

2009-07-12 Thread marksimon

Hi. I have a page that utilizes tablesorter on a table. Works fine. I
have a page that loads the tablesorter page via thickbox. The page
loads fine inside the thickbox, but the tablesorter functionality is
not working.
Any ideas on this issue?
Thanks!


[jQuery] Re: question about identifying what should be updated in an an ajax post

2009-07-12 Thread marksimon

You could try using a hidden field to hold the id. Then you could look
for that field.
$(document).ready(function() {
 $('.favorite').click(function(){
var tid=$('.hiddenfield').text();
alert(tid);
});
});
pa href=# class=favoritesome linkspan
class=hiddenfield109/span/a/p

not sure about prefered method, but that might work

On Jul 11, 5:24 pm, jt j...@arclocal.com wrote:
 I have only used jQuery for fairly simple things and am a little
 stumped on how best to achieve the following. I have a list of items
 (similar to the three items at the bottom) and I want a user to be
 able to assign it as a favorite. I just copied the .post part from the
 docs with the id in html comments but have two related questions:
 1. what is the best way / preferred to get the id of value of the item
 in the list (ie structured into the html - pretty sure an id can't be
 just an integer)?
 2. assuming I wanted to change the class back after a succesful update
 (to say for example is_favorited), what would be a possible way?

 $(function(){
    $('.favorite').click(function(){
       //alert('you want to save');
       //alert(this);
       $.post(test.php, {id: 'how do i get this'},
         function(data){
           alert(Data Loaded:  + data);
         });
     });

 });

 span class='favorite'something/spanbr/!-- 1 --
 span class='favorite'somethone/spanbr/!-- 2 --
 span class='favorite'something other/span!-- 3 --


[jQuery] validate plugin only checking first required input

2009-07-12 Thread Zac Witte

the validate plugin at the form at the below URL is validating as true
as long as the first required input is valid even though subsequent
required fields are invalid. It even gives the invalid class to all
fields correctly but the submitHandler function is triggered anyway.

I have an alert trigger when the form successfully submits and a
little more output for firebug if you want it. Can anyone see anything
wrong with the source code?

http://fpif.ips-dc.org/pressroom

Thanks!


[jQuery] JQuery Editor

2009-07-12 Thread nodarin...@mail.ru

Well.. I've an idea.. what about: make editor for JQuery...

like an Flash.

Flash + ActionScript = HTML + JQuery..

or something like this :D


[jQuery] I need an opinion

2009-07-12 Thread yo2lux

I have a jQuery code:

$(document).ready(function() {
  var xPos = 200;
  var yPos = 50;
  var links = $('.buttons a');

  links.each(function() {
var index = links.index(this);

if ($(this).hasClass('active')) {
  $(this).css('backgroundPosition', -index * xPos + 'px ' + -yPos
+ 'px');
} else {
  $(this).css('backgroundPosition', '-' + index * xPos + 'px ' +
'-0px');
}
  });

Which is the  best way to use:

This code:

  $(this).css('backgroundPosition', -index * xPos + 'px ' + -yPos + 'px');

or this code:
=
 $(this).css('backgroundPosition', '-' + index * xPos + 'px -' + yPos + 'px');

I think, each line do the same thing.. But the first line is shorter
because I use -index, instead of '-' + index.

Thanks!


[jQuery] Re: JQuery Editor

2009-07-12 Thread donb

Since jQuery is simply another layer of code on top of javascript, and
the highly-capable FCK editor is often as simple as adding one line of
script to activate it, I see no advantage to this.  I would never want
a flash-based editor myself.

On Jul 12, 4:21 am, nodarin...@mail.ru nodarin...@mail.ru wrote:
 Well.. I've an idea.. what about: make editor for JQuery...

 like an Flash.

 Flash + ActionScript = HTML + JQuery..

 or something like this :D


[jQuery] Re: how to detect if user input is a chinese character?

2009-07-12 Thread 刘永杰
this is not jquery function.

2009/7/12 Plant More Tree markth...@gmail.com



 Hi guys,

I got a textarea and I need to detect instantly if user input is a
 chinese character or not. IS there anyway jquery can help this?

 Thanks  Regards,
 Mark
 --
 View this message in context:
 http://www.nabble.com/how-to-detect-if-user-input-is-a-chinese-character--tp24445883s27240p24445883.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




[jQuery] Re: Can this plugin be structured better?

2009-07-12 Thread 刘永杰
why send twice the same email?

2009/7/12 Harvey scottandrewhar...@gmail.com


 Hey,

 I'm in the process of developing a new plugin but the way I have
 structured the codes doesn't seem quite right to me so I'm hoping
 someone might be able to offer a better way to do it.

 The plugin itself has different behaviour if called on different types
 of elements (images, divs etc) with a range of shared functions used
 across all element types.

 This is the basic structure I have so far:

 (function ($) {
   $.fn.editable = function (options) {
  var defaults = {
 // default value declarations
  }

  var opts = $.extend(defaults, options);

  return this.each(function () {
 var $this = $(this); // Cache a jQuery version of this
 var tag   = $this.get(0).tagName;

 switch(tag) {
case 'DIV': initDiv();break;
case 'IMG': initImage();  break;
 }

 function initDiv () {
// initialise the plugin to work with divs
 }

 function initImage () {
// initialise the plugin to work with images
 }

 // functions used by divs only
 function divFunction () {
// body...
 }

 // functions used by images only
 function imageFunction () {
// body...
 }

 // functions used by divs and images
 function sharedFunction () {
// body...
 }

  });
   }
 })(jQuery);


 The reason it does seem right to me is because any instance of the
 plugin called on a div will also contain all the code that is used if
 it was an image even though the code won't be used.

 Can any offer something better?



[jQuery] Re: jCarousel Appears Vertical then Horizontal

2009-07-12 Thread MorningZ

How about using display: none on the ul list and then removing
that CSS property when jCarousel is done doing it's thing?

There is going to be time in between the HTML being generated and
getting to the script to set it up


On Jul 12, 6:28 am, Sparky12 timo...@gmail.com wrote:
 Hi Jonathan,

 Thanks so much for the response. Yeah, I tried this and it partially
 solves the problem (no probs in safari) - but it seems that IE and
 Firefox still have the vertical rendering issue?

 Do you know anything else I could try ?

 Thanks


[jQuery] Re: install Supersubs in Superfish. How?

2009-07-12 Thread Charlie





have you tried the inputs in :VARIABLE WIDTH SUB-MENUS (BETA) ?

It applies a sizing script to superfish but I have no experience with it

Short of that working might have to manually install superfish in
template to use supersubs

Mike wrote:

  Hello,

Sorry, I'm lost. I installed Superfish, use the menus, everything is
ok. Great coding! Now, how can Supersubs be enabled in Joomla? I
cannot find a tweak in the Superfish backend module? Does any file
have to be edited by hand? Any tip is welcome!

Greetings,

Mike

  






[jQuery] Re: Superfish conflicht with Header Image for Joomla 1.5

2009-07-12 Thread Charlie





jquery plugins aren't written for specific use in Joomla or any other
CMS, web app etc that uses multiple libraries. It's up to user to sort
those issues out.

You do have noConflict here!
http://www2.sdnag.com/plugins/system/sc_jquery/jquery.no.conflict.js. 

The script is working fine. You can see it in the delay when you move
from one item to another. Any button background changes are purely CSS
problems. Other than that you mention "conflicts" but no details

If Mootols plugin not working that's not a jquery issue, be better
resolving that on a mootools list, or convert to jquery plugin

deboni wrote:

  The superfish menu is being used here.

http://www2.sdnag.com/

Meanwhile I found at least one error in the superfish.js. This script
is not using the "no-conflict" function.

The superfish menu in itself is a great module but when using it in
Joomla 1.5, it causes a lot of problems and there is no support
provided for this mootools vs. jquery issue.



On Jun 25, 6:12pm, Charlie charlie...@gmail.com wrote:
  
  
the majority of the problems with superfish integration into Joomla are css issues. The existing template menu css doesn't get removed when you install superfish and some of the template css conflicts with superfish
providing a link would help
deboni wrote:Thanks! that seems to be the right approach. However I have no idea how I should implement that into Joomla. Maybe it has been done before? On Jun 19, 9:52pm, Theodore Nizyl...@gmail.comwrote:I don't know the details behind your specific problem, but a solution may be found at the following link:http://docs.jquery.com/Using_jQuery_with_Other_LibrariesTeddy On Fri, Jun 19, 2009 at 2:42 PM, debonides...@debonis.chwrote:HiI'm using your superfish menu on a joomla website. It works perfect, but there seems to be a conflict with another module which is using mootools.They say the mootols (seems to be standard on Joomla 1.5) and jquery can not be mixed.Do you know of any workaround for that problem?The menu 
is being used here?Best regardsSilvio

  
  
  






[jQuery] Re: Form with Ajax Load Content combined with onClick

2009-07-12 Thread Erik

A little more detail and example would be great.

Erik


On Jul 12, 9:08 am, András Csányi sayusi.a...@gmail.com wrote:
 2009/7/12 Erik eriks...@mac.com:



  I already did and no luck :-(

  Any suggestions?

 there is another two way:
 - change the method to get
 - use hidden fields to send special data

 These are good for you?

 --
 - -
 --  Csanyi Andras  --http://sayusi.hu-- Sayusi Ando
 --  Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] Re: Form with Ajax Load Content combined with onClick

2009-07-12 Thread András Csányi

2009/7/12 Erik eriks...@mac.com:

 A little more detail and example would be great.

First:
But, I'm not sure this is working fine.

form action=https://www.expressdb.com/edp/?
AppKey=3905B91021BD0A1490189D249874B317AAD9067B method=GET
enctype=multipart/form-data

Secondly:
form action=https://www.expressdb.com/edp/; method=post
enctype=multipart/form-data
input type=hidden name=AppKey
value=3905B91021BD0A1490189D249874B317AAD9067B
/form

I hope it helps you.
-- 
- -
--  Csanyi Andras  -- http://sayusi.hu -- Sayusi Ando
--  Bízzál Istenben és tartsd szárazon a puskaport!.-- Cromwell


[jQuery] send table with input elements to server

2009-07-12 Thread david

Hi all,

I have a table of input elements which i create through a javascript
widget.
When i press submit i want to make an action and a part of the output
should be the same unchanged tables with the values in it.
I don't know how to accomplish it.
At first i used the html() function, but it does not pass the table
with the html values inserted as i would like.
Has anyone an idea how to make it ?

Thanks,
David


[jQuery] Dynamic Links

2009-07-12 Thread mnaveed

Hi,
I am new to JQuery, can anyone help how to generate dynamic links. I
have a loop which generate some links and for each, an onclick event
is attached, calling a javascript method with some arguments. some
thing like this,

for(x = 0; xitems.length; x++)
  a href=# onclick=getData(items[x].id); Get data /a

how can i generate such a grid using Jquery. Actually i have to
display an overlay on each click, and data will be loaded dynamically
in the overlay, so how can i pass the ID to the method?

Thanks


[jQuery] Re: how to detect if user input is a chinese character?

2009-07-12 Thread Plant More Tree


i am jus asking if there's anyway we can check if user input is chinese
character.


刘永杰 wrote:
 
 this is not jquery function.
 
 2009/7/12 Plant More Tree markth...@gmail.com
 


 Hi guys,

I got a textarea and I need to detect instantly if user input is a
 chinese character or not. IS there anyway jquery can help this?

 Thanks  Regards,
 Mark
 --
 View this message in context:
 http://www.nabble.com/how-to-detect-if-user-input-is-a-chinese-character--tp24445883s27240p24445883.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.


 
 

-- 
View this message in context: 
http://www.nabble.com/how-to-detect-if-user-input-is-a-chinese-character--tp24445883s27240p24450289.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Seeking a plugin that .... emulates a selectbox but allows for more styling

2009-07-12 Thread sso

I'm looking for a selectbox plugin.  Preferably something that doesn't
actually use the select element.
Suggestions?


[jQuery] Re: Dynamic Links

2009-07-12 Thread brian

On Sun, Jul 12, 2009 at 12:46 PM, mnaveedmnaveed...@gmail.com wrote:

 Hi,
 I am new to JQuery, can anyone help how to generate dynamic links. I
 have a loop which generate some links and for each, an onclick event
 is attached, calling a javascript method with some arguments. some
 thing like this,

 for(x = 0; xitems.length; x++)
  a href=# onclick=getData(items[x].id); Get data /a

 how can i generate such a grid using Jquery. Actually i have to
 display an overlay on each click, and data will be loaded dynamically
 in the overlay, so how can i pass the ID to the method?


Do you want to create the links? Where do you want them appended? One
after the other? Or should they be appended to individual elements? If
the latter, and let's say you have a structure like so:

div class=Items id=item_0foo /div
div class=Items id=item_1foo /div
div class=Items id=item_2foo /div
div class=Items id=item_3foo /div
div class=Items id=item_4foo /div

... you needn't create the loop yourself. You could do something like:

$(function()
{
$('.Items').each(function()
{
$('a href=# title=click me for dataget data/a')
.click(function()
{
alert($(this).parent().attr('id'));
})
.appendTo($(this));
});
});

Note that this inside the click handler refers to the link, while
the appendTo($(this)) refers to the div.


[jQuery] Re: question about identifying what should be updated in an an ajax post

2009-07-12 Thread brian

On Sat, Jul 11, 2009 at 8:24 PM, jtj...@arclocal.com wrote:


 I have only used jQuery for fairly simple things and am a little
 stumped on how best to achieve the following. I have a list of items
 (similar to the three items at the bottom) and I want a user to be
 able to assign it as a favorite. I just copied the .post part from the
 docs with the id in html comments but have two related questions:
 1. what is the best way / preferred to get the id of value of the item
 in the list (ie structured into the html - pretty sure an id can't be
 just an integer)?
 2. assuming I wanted to change the class back after a succesful update
 (to say for example is_favorited), what would be a possible way?

 $(function(){
   $('.favorite').click(function(){
      //alert('you want to save');
      //alert(this);
      $.post(test.php, {id: 'how do i get this'},
        function(data){
          alert(Data Loaded:  + data);
        });
    });
 });


 span class='favorite'something/spanbr/!-- 1 --
 span class='favorite'somethone/spanbr/!-- 2 --
 span class='favorite'something other/span!-- 3 --


span class=favorite id=favorite_x...

You can either parse out the integer in JS or pass the entire
favorite_x string to the PHP script to parse it out there.

$(function(){
$('.favorite').click(function()
{
var fave_id = $(this).attr('id').substr(9);
$.post(
test.php,
{id: fave_id},
function(data)
{
alert(Data Loaded:  + data);
}
);
});
});

$(function(){
$('.favorite').click(function()
{
$.post(
test.php,
{id: $(this).attr('id')},
function(data)
{
alert(Data Loaded:  + data);
}
);
});
});


[jQuery] Re: Seeking a plugin that .... emulates a selectbox but allows for more styling

2009-07-12 Thread MorningZ

Found links like this

http://www.headcircus.com/uiguy/selectboxfactory2.1/selectboxfactory.html

by Googling select box with style

http://www.google.com/search?q=jquery+select+with+style



On Jul 12, 1:00 pm, sso strongsilent...@gmail.com wrote:
 I'm looking for a selectbox plugin.  Preferably something that doesn't
 actually use the select element.
 Suggestions?


[jQuery] Re: Form with Ajax Load Content combined with onClick

2009-07-12 Thread Erik

Still can't get this form to post submit and load a confirmation page
via ajax.

form action=https://www.expressdb.com/edp/?
AppKey=3905B91021BD0A1490189D249874B317AAD9067B method=post
enctype=multipart/form-data

input id=send1  class=field3  src=/images/send1.png
style=cursor: pointer  onclick=this.form.submit(); return true;
ajax_loadContent('nh1_wrap2L','externals/thank_you.htm');return
false

/form


[jQuery] Galleria plugin - can it degrade to thumbnails instead of full-sized images?

2009-07-12 Thread oswaldcobblepot

Hi everyone,

I've been doing some work with jQuery photo galleries and have found
myself running up against this problem again and again (disclaimer:
I'm totally not a javascript expert):

My requirement is to build a gallery/slideshow that can potentially
acommodate hundreds of images at a time.  I realize this is generally
not a good idea, but it presents an interesting dilemma in how that
slideshow can degrade for non-JS users.

The Galleria plugin has the smart preloading options I think would be
necessary, but it degrades to full-sized images.  Do any of you guys
have experience with making it degrade to thumbnails instead, just to
lessen the load on the page?


[jQuery] Re: send table with input elements to server

2009-07-12 Thread Charlie





this isn't exactly clear but sounds like you are taking input values
and want them as straight text in a td of the new table?

how you go about this will depend a lot on the size and structure you
have for markup as well as how much of original goes into new table.
Could be as simple as clone() of the original table, and a $each for
the td's to strip the inputs and change them to text then remove rows
or columns. Very hard to guess what "part of the output" means. There
are numerous methods, clone original ,indexing, working with classes or
ID's to append to new table. 

Posting a sample page of old and new with a little more detail on your
requirements would make solutions a lot easier to identify. If can't
post on server jsbin.com is excellent for this


david wrote:

  Hi all,

I have a table of input elements which i create through a _javascript_
widget.
When i press submit i want to make an action and a part of the output
should be the same unchanged tables with the values in it.
I don't know how to accomplish it.
At first i used the html() function, but it does not pass the table
with the html values inserted as i would like.
Has anyone an idea how to make it ?

Thanks,
David

  






[jQuery] Re: send table with input elements to server

2009-07-12 Thread Charlie








After rereading this, if tables are same size and same config; the
following clones the existing table and strips out all inputs inserting
the values as text in new table

$("#originalTable").clone(function () {

 
$("#originalTable").clone().appendTo("body").attr("id","newTable");
 $("#newTable td").each(function () {
 var newText = $(this).find("input").val(); // get value
from input
 $(this).html(newText); //replace input with new html which
is just text 
 });

Working example http://jsbin.com/uroca

Charlie wrote:
this isn't exactly
clear but sounds like you are taking input values
and want them as straight text in a td of the new table?
  
how you go about this will depend a lot on the size and structure you
have for markup as well as how much of original goes into new table.
Could be as simple as clone() of the original table, and a $each for
the td's to strip the inputs and change them to text then remove rows
or columns. Very hard to guess what "part of the output" means. There
are numerous methods, clone original ,indexing, working with classes or
ID's to append to new table. 
  
Posting a sample page of old and new with a little more detail on your
requirements would make solutions a lot easier to identify. If can't
post on server jsbin.com is excellent for this
  
  
david wrote:
  
Hi all,

I have a table of input elements which i create through a _javascript_
widget.
When i press submit i want to make an action and a part of the output
should be the same unchanged tables with the values in it.
I don't know how to accomplish it.
At first i used the html() function, but it does not pass the table
with the html values inserted as i would like.
Has anyone an idea how to make it ?

Thanks,
David

  
  
  





[jQuery] Re: send table with input elements to server

2009-07-12 Thread Charlie





I think I confused myself and not sure what objective isoh well,
was good practice

Charlie wrote:

  
  
  
After rereading this, if tables are same size and same config; the
following clones the existing table and strips out all inputs inserting
the values as text in new table
  
$("#originalTable").clone(function () {
  
 
$("#originalTable").clone().appendTo("body").attr("id","newTable");
 $("#newTable td").each(function () {
 var newText = $(this).find("input").val(); // get value
from input
 $(this).html(newText); //replace input with new html which
is just text 
 });
  
Working example http://jsbin.com/uroca
  
Charlie wrote:
  this isn't exactly
clear but sounds like you are taking input values
and want them as straight text in a td of the new table?

how you go about this will depend a lot on the size and structure you
have for markup as well as how much of original goes into new table.
Could be as simple as clone() of the original table, and a $each for
the td's to strip the inputs and change them to text then remove rows
or columns. Very hard to guess what "part of the output" means. There
are numerous methods, clone original ,indexing, working with classes or
ID's to append to new table. 

Posting a sample page of old and new with a little more detail on your
requirements would make solutions a lot easier to identify. If can't
post on server jsbin.com is excellent for this


david wrote:

  Hi all,

I have a table of input elements which i create through a _javascript_
widget.
When i press submit i want to make an action and a part of the output
should be the same unchanged tables with the values in it.
I don't know how to accomplish it.
At first i used the html() function, but it does not pass the table
with the html values inserted as i would like.
Has anyone an idea how to make it ?

Thanks,
David

  


  





[jQuery] Re: Jquery index question

2009-07-12 Thread Dave Ward

You're right.

The conditional can be modified more simply to $(item).children
(a).hasClass(active).

On Jul 12, 9:02 am, Charlie charlie...@gmail.com wrote:
 active class is on the a tag not li so example doesn't work
 try this:
                var arr = [ ];
             $(.active).each(function() {
               
 indexLi=$(this).parents(.buttons).children(li).index($(this).parent(li));   
                 
                 arr.push(indexLi);             
             });
             alert(arr);
 Dave Ward wrote:I don't think there's a shortcut in jQuery to do exactly 
 that. You could iterate over them and build the array like this though: var 
 arr = [ ]; $(.buttons li).each(function(i, item) { if 
 ($(item).hasClass(active)) { arr.push(i); } }); On Jul 11, 1:33 pm, 
 yo2luxyo2...@gmail.comwrote:I have a HTML list: ul class=buttons    
 lia href=# class=activeHome/a/li    lia 
 href=#About/a/li    lia href=# class=activeNews/a/li /ul 
 I want to obtain the index only for the elements with class=active. For 
 example I want to create an array with value 0 for Home and 2 for News 
 (the indexes). Is possible to do this with jquery? Thanks!


[jQuery] Re: validate plugin only checking first required input

2009-07-12 Thread Mean Mike

you might be running into problems because you have spans with the
class required which is one used by jquery.validate
try giving those spans a slightly different class and maybe that will
help

Mean Mike
On Jul 12, 6:12 am, Zac Witte zacwi...@gmail.com wrote:
 the validate plugin at the form at the below URL is validating as true
 as long as the first required input is valid even though subsequent
 required fields are invalid. It even gives the invalid class to all
 fields correctly but the submitHandler function is triggered anyway.

 I have an alert trigger when the form successfully submits and a
 little more output for firebug if you want it. Can anyone see anything
 wrong with the source code?

 http://fpif.ips-dc.org/pressroom

 Thanks!


[jQuery] Re: Dialog: set focus after 'show' animation

2009-07-12 Thread dnagir

Hi Richard,

I added the bug report (4675).

Sorry for posting UI question here.

Cheers,
Dmitriy.


[jQuery] Re: Determine content type in $.post callback

2009-07-12 Thread dnagir

Anybody?
How can I check the ContentType header in the $.post callback?


[jQuery] Auto-submitting an AJAX Form

2009-07-12 Thread phused

Does anyone have some references or samples on auto-submitting forms
using AJAX and the form plugin?

I currently have an accessible UI slider which has a select field, as
you move the slider the select field changes to the according option.
What I'm trying to achieve is whenever the select field has been
changed, the form auto-submits itself using AJAX.

I have tried using the following code but it doesn't work:

$(#speed).change(function() {
$(#slider).submit();
});

This is the HTML code:

form action=action.php method=post
id=slider
fieldset
select name=speed id=speed
option value=3 class=first-
itemRejected/option
option value=1
selected=selectedPending/option
option value=2Approved/
option
/select

buttonSubmit/button

/fieldset
/form

Thanks for your help!


[jQuery] Re: Can't drag items outside Carousel

2009-07-12 Thread menslow

Not sure if you found a solution to this or not, but I'm also having
you exact problem. It's due to the overflow: hidden property on the
carousel wrapper. I'm don't have a solution yet, but I'm working on it
and will post if I figure out a solution.

~Michael





On Jun 13, 11:01 am, VaN fanel@gmail.com wrote:
 Hello,

 I'm trying to merge Carousel and Drag functions, but I'm facing
 problem.

 Here is the jCarousel lite page :http://www.gmarwaha.com/jquery/jcarousellite/

 And here is my project :http://www.wir3d.net/tests/carousel_drag_02.html

 Carousel pager works great, when you click a page, carousel switch to
 the chosen page.

 But if you try to drag an item outside the carousel (green border),
 the item won't go above the carousel border, but underneath.

 Did someone already face this problem ? Any idea how to solve that ?


[jQuery] Struts2, JQuery and JSON result to create a dynamic ajax website

2009-07-12 Thread GF

Hello all,
i wrote a simple guide that explains how to use together Struts2 and
JQuery to create dynamic content with Ajax and JSON.

http://www.zulutown.com/blog/2009/07/12/ajax-dynamic-content-with-struts2-jquery-and-json-plugin/

I hope someone can appreciate it

Thank You


[jQuery] Re: how to detect if user input is a chinese character?

2009-07-12 Thread Steven Yang
hi
are you checking for Chinese specifically? or just non-English?

I remember seeing a solution for non-English somewhere.
Someone told me you can check the first byte or something for Chinese.

not to be mean or anything
But I think its really best if you google it more will faster than sitting
here for answer.
After all this is a jQuery forum


[jQuery] Re: Determine content type in $.post callback

2009-07-12 Thread RobG



On Jul 13, 9:29 am, dnagir dna...@gmail.com wrote:
 Anybody?
 How can I check the ContentType header in the $.post callback?

Try the W3C XMLHttpRequest Object specification:

URL: 
http://www.w3.org/TR/2006/WD-XMLHttpRequest-20060405/#dfn-getresponseheader


--
Rob


[jQuery] Re: jQuery ajax - can i know if the server is alive ?

2009-07-12 Thread Veeru

anybody?


[jQuery] document.ready - how to make sure all js is loaded?

2009-07-12 Thread Veeru

Hi there,
I was wondering if there is something like document.ready; to trigger
after all the DOM+Js is loaded. document.ready is triggered when the
DOM is ready, but the js might be still loading, i would like to
trigger an event only after DOM along with all the JS is loaded. Any
way to do this?

Thanks
Vru


[jQuery] document.ready - how to make sure all js is loaded?

2009-07-12 Thread Veeru

Hi there,
I was wondering if there is something like document.ready; to trigger
after all the DOM+Js is loaded. document.ready is triggered when the
DOM is ready, but the js might be still loading, i would like to
trigger an event only after DOM along with all the JS is loaded. Any
way to do this?

Thanks
Vru


[jQuery] Re: Thick box Parent window

2009-07-12 Thread bharathbhooshan ambati
ok thanks

On Fri, Jul 10, 2009 at 6:29 PM, Rick Faircloth r...@whitestonemedia.comwrote:


 Hi, jazz...

 I'm not sure how best to fit this into your code, but
 you could try this:

 script

 $(document).ready(function() {

  $('#redirect').click(function() {

   TB_remove();
   top.location = /myapp/redirect.jsp;

  });
 });

 /script

 a id=redirectwww.google.com/a

 hth,

 Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
 Behalf Of jazz
 Sent: Friday, July 10, 2009 8:50 AM
 To: jQuery (English)
 Subject: [jQuery] Thick box Parent window


 Hi Folks

 I want to close the thick box window and make the parent window to go
 to a particular url

 can any body suggest me how to solve this..
 a href=/myapp/redirect.jsp  onClick=parent.tb_remove()
 www.google.com/a




-- 
భరత్ భూషణ్ అంబటి


[jQuery] Re: Thick box Parent window

2009-07-12 Thread bharathbhooshan ambati
here is my code:

a href='#' onclick=self.parent.tb_remove(); self.parent.location = '
http://www.google.com/' ;here/a



On Mon, Jul 13, 2009 at 10:02 AM, bharathbhooshan ambati 
bharathbhooshan.amb...@gmail.com wrote:

 ok thanks


 On Fri, Jul 10, 2009 at 6:29 PM, Rick Faircloth 
 r...@whitestonemedia.comwrote:


 Hi, jazz...

 I'm not sure how best to fit this into your code, but
 you could try this:

 script

 $(document).ready(function() {

  $('#redirect').click(function() {

   TB_remove();
   top.location = /myapp/redirect.jsp;

  });
 });

 /script

 a id=redirectwww.google.com/a

 hth,

 Rick

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
 Behalf Of jazz
 Sent: Friday, July 10, 2009 8:50 AM
 To: jQuery (English)
 Subject: [jQuery] Thick box Parent window


 Hi Folks

 I want to close the thick box window and make the parent window to go
 to a particular url

 can any body suggest me how to solve this..
 a href=/myapp/redirect.jsp  onClick=parent.tb_remove()
 www.google.com/a




 --
 భరత్ భూషణ్ అంబటి





-- 
భరత్ భూషణ్ అంబటి


[jQuery] Re: document.ready - how to make sure all js is loaded?

2009-07-12 Thread Michael Geary

If you load your JavaScript with script tags - either inline scripts or
external file references - there is nothing to wait for.  Simply put your
code after all other script tags that you rely on. For example:

script type=text/javascript src=jquery.js
/script

...

script type=text/javascript
function foo() {}
var bar = {};
/script

...

script type=text/javascript
// all of these will alert the expected objects:
alert( jQuery );
alert( foo );
alert( foo );
/script

Do you load your scripts with script tags, or do you have any dynamically
loaded scripts? Those would require different handling.

-Mike

 From: Veeru
 
 Hi there,
 I was wondering if there is something like document.ready; to 
 trigger after all the DOM+Js is loaded. document.ready is 
 triggered when the DOM is ready, but the js might be still 
 loading, i would like to trigger an event only after DOM 
 along with all the JS is loaded. Any way to do this?
 
 Thanks
 Vru
 



[jQuery] Re: jQuery ajax - can i know if the server is alive ?

2009-07-12 Thread Steven Yang
I dont believe there is a way to tell whether the server is alive or not
before you try to connect to it.
if you  listen on the jQuery Ajax event ajaxError
you will be able to get the HttpStatus from the request object.
I am not sure which code means the server is down, but you will be able to
tell.
I am not sure if this is the best practice, but thats how i do similar
things.


[jQuery] Re: document.ready - how to make sure all js is loaded?

2009-07-12 Thread Veeru

Hi Michael
Yes i am using the regular script tags. I understand what you meant.
But considering a situation like this

 script type=text/javascript src=myevents.js
$(document).ready(function(){
..
.
})

lets say myevents is still being loaded and document.ready has already
fired. that would mean, if i have a button and the event is attached
from myevents.js, there is a chance that user clicks the button before
the event is really attached to it.

How can i solve this scenario? How to make the user wait till
myevents.js is loaded?

Thakns
Vru


[jQuery] return false; on links only working on first click in IE

2009-07-12 Thread pedalpete

I've been trying to make my very ajaxy site more SEO friendly, lots of
the returned actions from ajax can be retrieved as a full page, so
it's just a matter of exposing the links.
Up until now I've had 'span' tags which I have now changed to 'a href'
so that the search engines will follow them.

I've added the following code so that if the event should send an ajax
request, it does that, or if it should go get the full page, it does
that.
code
jQuery('a.mixContent').livequery('click',function(){
var vtid=jQuery(this)..parent('div.controller').parent('li').attr
('id');
alert(eventid);
if(eventid!=null){
clicked(getSelected, eventid);
} else {
jQuery.scrollTo('div#selected');
}
return false;
});
/code

This works to prevent the link from being followed in FF, and IE7/8.
The ajax is triggered properly, and all is good.

In IE, if the link is clicked multiple time consecutively, then
everything is fine.
If the link is clicked once, then another link is clicked, then the
user goes back to the previously clicked link, the link is followed,
and the above code is ignored.

Seems that maybe in IE, the livequery needs to be renewed or
something, does that make sense? or is their a way for me to 're-
affirm' the link?

Seems my other option may be to include the link and a span as I had
originally done, and then hide the link via javascript, as I recall
that search engines won't follow links hidden by css.

Anybody have any suggestions on this?


[jQuery] Re: document.ready - how to make sure all js is loaded?

2009-07-12 Thread Steven Yang
i think its best if you do
 script type=text/javascript src=myevents.js/script
script
$(document).ready(function(){
..
.
})
/script

instead of writing your code inside the myevent.js script tag


[jQuery] Re: document.ready - how to make sure all js is loaded?

2009-07-12 Thread Veeru

hi steven
i was just typing a sample code. That's what i am doing, 2 separate
script  tags

 script type=text/javascript src=myevents.js
script
$(document).ready(function(){
..
.
});
/script