[jQuery] Re: Show div as overlay with jdialog

2009-09-18 Thread lanxiazhi
Try jquery-ui,it contains a dialog widget.


[jQuery] Re: ajax xml question

2009-09-18 Thread lanxiazhi
Now you will need to change the header:
header('Content-Type: text/xml; charset=UTF-8');


[jQuery] Re: Multi Combined Selectors

2009-09-18 Thread lanxiazhi
I think what you want is this:
$(this).parent().parent().*find*(:checkbox.list)


[jQuery] Re: ajax xml question

2009-09-18 Thread lanxiazhi
you may request the a.php directly in the browser ,and see if the charactors
display correctly.
2009/9/18 David .Wu chan1...@gmail.com


 it's not work actually.

 On 9月18日, 下午6時19分, lanxiazhi lanxia...@gmail.com wrote:
  Now you will need to change the header:
  header('Content-Type: text/xml; charset=UTF-8');



[jQuery] Re: Paste an image into a tag...

2009-09-18 Thread lanxiazhi
I think this is not possible,because the browser won't let you access the
clipboard for security concerns.
but ,you may provide a facility,that can read image from an url given by the
user,and display it.also allow user to upload images.that would be enough.


[jQuery] Re: How do I extract a part of received data

2009-09-18 Thread lanxiazhi
this :
var elem = $('#section_news', data);
is not the right syntax.


[jQuery] Re: ID naming conventions and $.scrollTo()

2009-09-18 Thread lanxiazhi
--
What would be another
way of clearly identifying an object without the id?

you can specify almost any attribute to  identify a object.
like this:
div identify='!...@#$%^+_)(*'!...@#$%^+_)(*/div

and use
$([identif...@#$%^+_)(*])
to fetch the element!


[jQuery] Re: Convert AJAX XML response to HTML

2009-09-18 Thread lanxiazhi
 $.ajax({
   type: POST,
   url: some.php,
   data: name=Johnlocation=Boston,
   success: function(msg){
 alert( Data Saved:  + msg );
   }
 });
http://docs.jquery.com/Ajax/jQuery.ajax#options


[jQuery] Re: catching when a div is updated through js

2009-09-18 Thread lanxiazhi
As far as I know,there is not such method.
but when the data come back through rjs,then you append it to the div,just
do one more thing:

$(table).trigger(update);


[jQuery] Re: catching when a div is updated through js

2009-09-18 Thread lanxiazhi
if use a ajax call,it's like this:
$.ajax({
   type: POST,
   url: some.php,
   data: name=Johnlocation=Boston,
   success: function(data){
 $(table).append(data);
 $(table).trigger(update);...
   }
 });

hope helps.


[jQuery] Re: ajax xml question

2009-09-17 Thread lanxiazhi
specify content type to xml:

header(Content-type: text/xml);
if ($_GET['weather']) {
...


[jQuery] Re: Reconciling Tablesorter behavior in IE and FF

2009-09-17 Thread lanxiazhi
I think that,you won't need to sort by a image,neither the user will.It
makes no sense.just add class={sorter: false} to the th in thead.


[jQuery] Re: Is there an onChange method?

2009-09-17 Thread lanxiazhi
you code defined when to enable,disable a button/field,so add the code
there.


[jQuery] Re: is there a JQuery solution for multiple sticky tooltips?

2009-09-17 Thread lanxiazhi
if no better solution out there,implement one yourself, it seems not so
complicated.


[jQuery] Re: is there a JQuery solution for multiple sticky tooltips?

2009-09-17 Thread lanxiazhi
or extend clueTip..


[jQuery] Re: Troubles with appending page title and url to social link

2009-09-16 Thread lanxiazhi
You may add these tow lines before set the attr:
var url=document.URL;
var title=document.title;

besides,URL and title is not properties of the window object,you cannot
refer to them directly.

2009/9/17 amuhlou amysch...@gmail.com


 where are the title and url variables coming from?


 On Sep 16, 9:05 pm, Jacques j...@whistlerwebandprint.com wrote:
  Hi everyone I am trying to append the full page url and contents of
  the title tag to some social bookmarking links I have the code below
  but it does not seem to be working can anyone see what I am doing
  wrong or point me in the right direction?
 
  html xmlns=http://www.w3.org/1999/xhtml;
  head
  meta http-equiv=Content-Type content=text/html; charset=utf-8 /
  titletest social/title
  script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/
  jquery.min.js type=text/javascript/script
  /head
  body
  div class=share
ul
  li class=deliciousa href=# id=shareit-delicious
  target=_blankshare with delicious/a/li
  li class=stumbleupona href=# id=shareit-stumbleupon
  target=_blankshare with stumbleupon/a/li
/ul
  /div
  script type=text/javascript
  $(document).ready(function(){
  $('#shareit-delicious').attr('href', '
 http://del.icio.us/post?
  v=4nouijump=closeurl=' + url + 'title=' + title);
  $('#shareit-stumbleupon').attr('href', '
 http://www.stumbleupon.com/
  submit?url=' + url + 'title=' + title);
  });
  /script
  /body
  /html



[jQuery] Re: selecting elements that match a regular expression

2009-09-16 Thread lanxiazhi
Yes,you can do this.
$([id*=wrap_]).click(
  function()
 {
var id=$(this).attr(id);
var targetId=elem_+getNum(id);
$(#+targetId).toggle();
 }
);

2009/9/17 macsig sigbac...@gmail.com


 Hello guys,
 is there a way to select elements that match a regular expression?

 I have a set of divs with id = wrap_n where n is a progressive and I
 need to select them and for each 1 I have to add a function that
 togggle the elem_n div.

 Thanks


 Sig


[jQuery] Re: (validate) temporary deactivate validate listener of fields

2009-09-16 Thread lanxiazhi
Refer to documentation.

2009/9/17 Sandler smike...@gmail.com


 Hi, im loading data via json dynamical from the server. Now i try to
 optimate the speed of my application and so i want to disable the
 validate of the fields during the data loading from the server.
 Is there a simple solution to this? like validate = false
 Thanks a lot and greets from austria!

 Sandler



[jQuery] Re: (autocomplete) how to have autocomplete use dynamic data (for implementing a search engine's entry field)

2009-09-16 Thread lanxiazhi
your server routine is just a web page,wait for the browser to request.you
set up the autocomplete like this:
$(..).autocomplete(web_page_url,{options..}).every time when the user press
a key,autocomplete will make a request to your web page,you fetch the
parameter  q,and you will know what the user have put in the autocomplete
textfield.then you run your routine,and at last,write the response like
this:
fog
fox
one item a line,so autocomplete will know.

the autocomplete plugin bundle file comes with some .php files,that is
server-side code,you can review it.


[jQuery] Re: previous value ands remote validation

2009-08-27 Thread lanxiazhi
I think what you want is this:$('#FieldA').blur(
 $('#FieldB').val($('#FieldA').val());
$('#FieldB').valid();
);


[jQuery] Re: SimpleModal autoresize on demand?

2009-08-27 Thread lanxiazhi
Hello,Try this:
$('#dialog').dialog('option',{width:500})

Hope this helps,good luck
lanxiazhi


[jQuery] Re: how to access the value of multiple textbox of same name.

2009-08-27 Thread lanxiazhi
var values=$('input[name=location[]]').map(function()
{
  return $(this).val()
}
).get();
this will return an array of values.
2009/8/27 Rupak rupakn...@gmail.com


 Hi all.

 I have n number of text box (n may be any number) with same name. And
 I want to access the value of all the text box of that name.

 Ex-:

 input type=text name=location[] /
 input type=text name=location[] /
 input type=text name=location[] /


 or is there any other way to access the value of the text box. Either
 by class or any othe property


 Thanks
 Rupak


[jQuery] Re: focus() killed by return false;

2009-08-27 Thread lanxiazhi
function loginCallback() {//add a callback function to this animation,where
the focus take place.
   $(#login_form).show(slide, null, 1000);   }


[jQuery] Re: Problem using PUT HTTP method with $.ajax

2009-08-27 Thread lanxiazhi
maybe you should change it:
$.ajax({
   dataType: xml,
   data:{xmldata:d},
   success: postSave,
   url: saveURL,
   type: PUT,
   beforeSend: diagnoser.credManager.getAuthSetterCurrent()
   });


[jQuery] Re: How can I select an element's parent?

2009-08-02 Thread lanxiazhi
hello,I hope this helps:
$(#product_links li a).click(
function()
{
 alert($(this).parent().attr(class));
}

);




 On Aug 1, 11:39 am, macsig sigbac...@gmail.com wrote:
  Hello guys,
  I'm trying to update a script I found out there in order to fit better
  my needs.
 
  The first step I want to update is the capability to bind a dynamic
  number of anchors.
  Right now with the HTML below
 
  ul id=product_links
 li class=first aFIRST/a/li
 li class=secondSECOND/a/li
 li class=thirdaTHIRD/a/li
  /ul
 
  I have the script below:
 
   $(#product_links .first a ).bind(click, function(){ pupup_element
  (first); });
   $(#product_links .second a ).bind(click, function(){ pupup_element
  (second);});
   $(#product_links .third a ).bind(click, function(){ pupup_element
  (third);});
 
  It works fine but since the number of anchors changes dynamically
  (through RoR) I'd like to have just 1 line that binds all the anchors.
  So here 2 questions for you:
 
  - how can I select an element's parent?
  - Does the code below work?
 
$(#product_links a ).bind(click, function(){ pupup_elemet
  (this.PARENT.id);});
 
  basically I want to bind all the anchors within the product_links list
  to popup_element function that takes as a parameter the ID of the
  anchor parent. In my case the id of the list item.
 
  Thanks and have a nice weekend.
 
  Sig


[jQuery] jquery not work when firebug in on

2009-08-02 Thread lanxiazhi
windows xp
firefox 3.0.6
jquery:1.3.2(latest release)
script:
$(document).ready(
function()
{
$(a).click(
function(event)
{
alert(Click);
}
);
}
);
when i turn the firebuf off,it works well.
Please help.
thanks.