[jQuery] Re: form submit without page refresh

2008-11-10 Thread Sam Sherlock
this should be your solution

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

2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,



[jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
But , i want to implement in Drupal ,

Am not sure the below code correct,

In this i want to add the JQuery,

?php

function custom3_block($op='list',$delta=0){

switch($op){

case 'list':
$blocks[0]['info'] = t('Custom 3');
return $blocks;

case 'view':

$output[] =t(Bharanikumar);
$output[].=drupal_get_form('myForm');
$output[] .=' script type=text/javascript
// wait for the DOM to be loaded
$(document).ready(function() { alert(Tets)
$(#myForm).ajaxForm(function() {
alert(Thank you for your comment!);
});
});
/script';


$block['content']=theme('hotelsearch_item_list',$output);


return $block;


}

}




function myForm(){

$modpath = drupal_get_path('module','custom3');
drupal_add_js($modpath . '/jquery-1.2.6.js','module');
//$form['#action']=url('comment.php');

$form['name']=array(
 '#type' = 'textfield',
 '#title' = t('name')
);
$form['comment'] = array(
  '#type' = 'textarea',
  '#title' = t('comment'),
  '#required' = TRUE
);
$form['submit'] = array(
  '#input' = TRUE,
  '#name' = 'op',
  '#type' = 'submit',
  '#submit' = TRUE,
  '#value' =t('submit')
);
return $form;
}







On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Re: Splitted list

2008-11-10 Thread IschaGast

Great plugin!!
This does almost what I wanted only one little thing...

At the moment when you have this list: ul class=list_splitted
After the plugin is attached this is the HTML

div class=list_splitted
ul
/ul
/div

I wished my unordered list still had the same class because than is
easier to style with/without js. It then will look always the same.


 I wrote a plugin that does this. It's completely undocumented, because  
 I just wrote it for a friend, but the basic usage would be:

 $('ul.list_splitted').columns({columns: 2});

 You can see a demo here:

 http://plugins.learningjquery.com/columns/

 View source to see what the lists look like before they're columnized.

 The plugin code is here:

 http://plugins.learningjquery.com/columns/jquery.columns.js

 --Karl

 
 Karl Swedbergwww.englishrules.comwww.learningjquery.com

 On Nov 7, 2008, at 4:24 PM, IschaGast wrote:



  Hi,

  I am trying to figure out how I can split a simple unordered list in
  two unordered lists.

  Code:
             ul class=list_splitted
                     lilist item 01/li
                     lilist item 01/li
                     lilist item 01/li
                     lilist item 01/li
                     lilist item 01/li
                     lilist item 01/li
                     lilist item 01/li
                     lilist item 01/li
             /ul

  I can create a div around it and two columns inside it with this code:

  jQuery(function($) {
             $('.list_splitted').wrap('div class=columnsdiv  
  class=column/
  divdiv class=column/div/div')
     });

  But now I have to grab half of the list items and place one half
  inside one column and the rest inside another column. I tried to get
  the length of it with:

  $('.list_splitted li').length;

  But then? I really don't know. I this something that could be easily
  fixed with jQuery. I tried to find some sample code in the internet
  but didn't find it.

  I really hope someone could help... because that would make it a lot
  easier for backend coding.


[jQuery] Re: Resizable textarea

2008-11-10 Thread nmiddleweek

Hello,

I don't think you're ui.resizable.js is loading properly.

See this link for your fixed example: http://www.getdiverted.com/test/test3.html


Also, it's probably better to download the ui.core.js and
ui.resizable.js and put them into your own fodlers on your website,
rather than linking to the jquery.com site...

I think google host jQuery code if you don't want to. Search for the
archives for more info on that one.


Hope that helps...

Cheers,
N




On Nov 10, 11:13 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Hello,

 I can't get the jQuery UI resizable function, in any browsers.

 Here's my code :

  link rel=stylesheet href=http://dev.jquery.com/view/tags/ui/
 latest/themes/flora/flora.all.css type=text/css media=screen
 title=Flora (Default)

 script src=http://code.jquery.com/jquery-latest.js;/script
 script type=text/javascript src=http://dev.jquery.com/view/tags/ui/
 latest/ui/ui.core.js/script
 script type=text/javascript src=scripts/jquery/ui.resizable.js/
 script

 script
   $(document).ready(function() {

     $(#txtArea).resizable({
       handles: all
     });

   });
 /script

 textarea  id=txtArea  test/textarea

 I can't see what I'm missing. In the debugger the ready function is
 hit but the textarea is not converted to a resizable element.

 Can someone help ?


[jQuery] Re: TableSorter Pagination: Move pagination to top

2008-11-10 Thread bharani kumar
hi , r u working in Drupal

On Mon, Nov 10, 2008 at 1:20 PM, ripcurlksm [EMAIL PROTECTED] wrote:



 ... still working on this.. it appears that the pagination div is
 relatively
 positioned, so that if you have 10 results set to show, it will assume the
 vertical height that 10 rows would take up.. as a result, if your last page
 only shows 5 rows remaining, it will still assume that 10 rows are
 printing,
 which is why this white space demonstrated below is showing.

 Am I off on this?
 --
 View this message in context:
 http://www.nabble.com/TableSorter-Pagination%3A-Move-pagination-to-top-tp20353088s27240p20415646.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.




-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] submit form without page reload

2008-11-10 Thread bharani kumar
Hi one and all

Is there any sample snippet for form submit without page refresh,

am working in drupal cms, so the sample snipet must suit for drupal 5

-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Keeping track of the current clicked link

2008-11-10 Thread [EMAIL PROTECTED]

Hi, these are my first attempts with jQuery and I would be glad if
somebody could help me.

My Problem: I'm using the ASP.net MVC framework and wanted to keep
track of the current clicked menu link. The menu links are in the
master page and so is the jscript.

What I tried to do is to attach some code to the click event of my
links (in  a marked list) and attach a selected class to the current
clicked link:
sample code 1

i started with this little jquery script:
$(document).ready(function() {
$(#menu a).click(function() {

$(this).parents(li).addClass(active);
});
});
end sample code 1

but soon found out that because the click function reloads the page it
does apply the css right after the click but looses the class info
after  the (other content's ) page recreation.

I played around with storing the var outside the call but it always
led to the result that all info is lost because I actually navigate to
a new page.

Finally I tried the approach below, where I use the ready function for
the click event so that the page actually is done with the navigation
but again I'll loose the context of the this function - although it
should keep it when I read the documentation of chaining jQuery I
already tried to return the element with this line return $
(this).parents.(li) inside of the click function but that does not
work either. Can somebody help me please? Or is it not possible
because of the actual navigation?

sample code 2

$(document).ready(function() {
$(#menu a).click(function() {

}).ready(function() {

$(this).parents(li).addClass(active);
});
});

end sample code 2


[jQuery] Re: resizable floating text area?

2008-11-10 Thread Rik Lomas

I believe you can use the CSS 'resize' property:

http://www.w3.org/TR/css3-ui/#resize0

textarea { resize: none; }

Rik


2008/11/10 nmiddleweek [EMAIL PROTECTED]:

 Hello,

 Does anyone know how to stop the Google Chrome feature of resizing a
 text area? Although I haven't implemented my own version yet it's
 screwing with my interface :)





 On Nov 9, 8:51 pm, nmiddleweek [EMAIL PROTECTED] wrote:
 Hello,

 What is the best approach to displaying a resizable text area that
 floats ontop of other elements in the middle of the screen or near to
 a specific element?

 The text area can either be already on the form but initially hidden
 or it could be loaded on the fly.

 I've found some dialog plugins but none are resizable and I've seen a
 vertically resizing text area but I can't find a combo of them both?

 Has got any suggestions on which plugins are good to work together to
 achieve this?

 Thanks,
 N.



-- 
Rik Lomas
http://rikrikrik.com


[jQuery] Re: TreeView Plugin by Jörn Zaefferer (Asyn chronous mode)

2008-11-10 Thread garthos

With the toggle-option, i can call a function just for the folder
item.
i want to call a function for the file item too.

i think it's not possible 

Can you help me ?


[jQuery] Re: Can't use selectors in reference to a named object?

2008-11-10 Thread 赵兵
try this:var f=$(form);
$(input,textarea,f).each(function(){
 console.log($(this).attr(name)+'--'+$(this).val());
});

maybe this is what you want!

On Mon, Nov 10, 2008 at 8:09 PM, Pete [EMAIL PROTECTED] wrote:


 The following doesn't work as expected and I don't understand why--can
 someone explain, please?

 $('form').each( function() {
var thisForm = $(this);
alert(thisForm.attr('id') + ' [' + $('thisForm
  :input.required').length + '/' + $('thisForm  *').length + ']');
 )};

 That I'm expecting the above to do is alert whenever a form is found
 in the page, stating that form's ID value and how many of it's total
 inputs are classed as 'required'.  But all I get is e.g. login [0/0]
 and I don't understand why.

 Can jQuery not use my thisForm object in this way?  If not, how can I
 store a reference and then call selections based on that object?

 Thanks in advance.  I've been using jQuery for a little while now and
 find it hugely useful, but stuff like this still utterly confuses me.




-- 
zhaobing

Mobile:13824354001
Email:[EMAIL PROTECTED] [EMAIL PROTECTED]


[jQuery] Re: form submit without page refresh

2008-11-10 Thread Sam Sherlock
whats the html - I saw the link and that form did not appear to have the
event applied to the form

perhaps this could be solved by checking that the id of the form is myForm.
I know nothing of drupal

I can check back to the link since its logged my ip and now tells me I have
already voted visit the site etc

2008/11/10 bharani kumar [EMAIL PROTECTED]

 But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/



[jQuery] Re: TreeView Plugin by Jörn Zaefferer (Asynch ronous mode)

2008-11-10 Thread Jörn Zaefferer
In that case just bind a click event to each item, or the tree itself
and check event.target.

Jörn

On Mon, Nov 10, 2008 at 2:41 PM, garthos [EMAIL PROTECTED] wrote:

 With the toggle-option, i can call a function just for the folder
 item.
 i want to call a function for the file item too.

 i think it's not possible 

 Can you help me ?


[jQuery] How do I move contents from different frames in a frameset with Jquery?? Tried and can't get it to work!

2008-11-10 Thread BananaHead

Hello!

I have tried this with the advice of a few in #jquery channel on
Freenode and I cant get this to work.

Here is my situation:

I have a frameset with 2 frames: One's frame source is frame1.html
(with Id of bottomFrame) and frame2.html ( with id of mainFrame).

mainFrame source (frame2.html) has a div tag with the id of adDiv
and this div tag contains an Iframe.
bottomFrame source (frame1.html) has a div tag with the id of
destinationDiv.

I am trying to move the contents of adDiv (the iframe) from
frame2.html to destinationDiv (frame1.html). I cant get it to work.
I have tried the frameReady plugin (dunno if this is its purpose), but
I cant get anything to work. Can i achieve this by only using jquery?

Here is the code:

//==

titleUntitled Document/title
   script type=text/javascript src=jquery-1.2.6.js/script
   script

   $(document).ready(function(){

$(#mainFrame).find(#adDiv iframe).appendTo( $
(#bottomFrame).find(#destinationDiv) );
});

/script
/head

frameset rows=50,50 frameborder=no border=0 framespacing=0
  frame src=frame2.html id=mainFrame title=mainFrame /
  frame src=frame1.html scrolling=No noresize=noresize
id=bottomFrame title=bottomFrame /
/frameset
noframesbody
/body
/noframes/html

I have also tried contents().find , but I have no idea how to work all
this out. Im a noob yet with Jquery.

Is the frameReady needed and what syntax? I have tried the same above
code (and contents().find ) and I cant get anything to work.

I would love is somebody could guide me on how to get this to work!

Thanks
Eric


[jQuery] Replyyyyy Re: [jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
Hi...

What happen?

Any Greate drupal please try to spend a min..thanks


On Mon, Nov 10, 2008 at 6:22 PM, bharani kumar 
[EMAIL PROTECTED] wrote:

 But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/




-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Re: Can't use selectors in reference to a named object?

2008-11-10 Thread Pete

zhaobing, you are a legend!

I followed your example and modified my code as follows:

$('form').each( function() {
var thisForm = $(this);
alert(thisForm.attr('id') + ' [' + $(':input.required',
thisForm).length
+ '/' + $(':input', thisForm).length + ']');
});


On Nov 10, 1:13 pm, 赵兵 [EMAIL PROTECTED] wrote:
 try this:var f=$(form);
 $(input,textarea,f).each(function(){
  console.log($(this).attr(name)+'--'+$(this).val());

 });

 maybe this is what you want!



 On Mon, Nov 10, 2008 at 8:09 PM, Pete [EMAIL PROTECTED] wrote:

  The following doesn't work as expected and I don't understand why--can
  someone explain, please?

  $('form').each( function() {
 var thisForm = $(this);
 alert(thisForm.attr('id') + ' [' + $('thisForm
   :input.required').length + '/' + $('thisForm  *').length + ']');
  )};

  That I'm expecting the above to do is alert whenever a form is found
  in the page, stating that form's ID value and how many of it's total
  inputs are classed as 'required'.  But all I get is e.g. login [0/0]
  and I don't understand why.

  Can jQuery not use my thisForm object in this way?  If not, how can I
  store a reference and then call selections based on that object?

  Thanks in advance.  I've been using jQuery for a little while now and
  find it hugely useful, but stuff like this still utterly confuses me.

 --
 zhaobing

 Mobile:13824354001
 Email:[EMAIL PROTECTED] [EMAIL PROTECTED]


[jQuery] Re: LiveQuery

2008-11-10 Thread elev3n

Hi Brandon
Thanks very much for your help. For some reason I was thinking that
livequery would except events like load... I was also missing the
extra function() inside the livequery call. With this I can now use
livequery in other places where ajax is refreshing parts of the page.

Thanks as well for the link... looks like a great resource (going in
my feed reader).

All the best

Scott

On Nov 10, 2:00 pm, Brandon Aaron [EMAIL PROTECTED] wrote:
 Here is how you'd write those utilizing Live Query.
 $('.hover_info').livequery(function() { $(this).hide(); });

 $('.file').livequery(funcion() {
     $(this).hover(function() {
         $(this).find('.hover_info').slideDown(220);
     }, function() {
         $(this).find('.hover_info').slideUp(220);
     });

 But ... let me see if I can help you optimize the hover a little. Instead of
 using the hover helper method, I'd just bind the mouseenter and mouseleave
 events manually like this.

 $('.file').livequery('mouseenter mouseleave', function(event) {
     $('.hover_info', this)[ slide + (event.type == mouseenter ? Down :
 Up) ](220);

 });

 And finally, I'd recommend that you use the technique found at this Learning
 jQuery post to hide your .hover_info via CSS when JS is 
 enabled.http://www.learningjquery.com/2008/10/1-awesome-way-to-avoid-the-not-...

 Hiding something should typically be the job of your CSS. :)

 --
 Brandon Aaron

 On Mon, Nov 10, 2008 at 6:11 AM, elev3n [EMAIL PROTECTED] wrote:

  Hi All,
  I was wondering if someone could help me translate this code:

  $('.hover_info').hide();

  $('.file').hover(
         function() {
                 $(this).find('.hover_info').slideDown(220);
         },
         function() {
                 $(this).find('.hover_info').slideUp(220);
         }
  );

  into something that works with the livequery plugin (http://
  brandonaaron.net/docs/livequery/). Both of these are called on page
  load. Everything I try seems to be throwing errors. I have tried along
  the line of:

  $('.hover_info').livequery().hide();
  $('.hover_info').livequery('load',hide());

  Any tips would be greatly appreciated.

  Thanks




[jQuery] Delaying a .css until an animation on a different div is done?

2008-11-10 Thread CodingCyborg

Hey,
I have a button set up to fade out and then hide a div within a div.
The parent div has a 1px border, but it looks odd to have the border
float while the inside div fades away. I would like to set it up so
the border goes to none then after the inside div fades and hides
the border goes back to 1px solid black.

$('.miniThis').click(function(){
$(this).parents(.window).css(border,none);
if($(this).parents(h1).siblings(.content).css(opacity) == 
0)
{
$(this).parents(h1).siblings(.content)
.show()
.animate({opacity: 1}, 300);
} else {
$(this).parents(h1).siblings(.content)
.animate({opacity: 0}, 300)
.hide(1);
}
$(this).parents(.draggableWindow).css(border,1px solid 
black);
});

I've tried using setTimeout and .animate instead of css, but both
to no prevail.
Help is highly appreciated,
-CodingCyb.org


[jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
Hi u see , in that page is loading / redirecting  know,

But my thing is without page reloading to submit the form,


Got my point , one more thing , am having some jquery script , which working
fine (without page refresh to form submiting)

But i need the help in, i want to use the jquery in Drupal,


On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have the
 event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I have
 already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

 But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
Hi u see , in that page is loading / redirecting  know,

But my thing is without page reloading to submit the form,


Got my point , one more thing , am having some jquery script , which working
fine (without page refresh to form submiting)

But i need the help in, i want to use the jquery in Drupal,


On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have the
 event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I have
 already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

 But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-10 Thread OutOfTouch

Hi Mike,

Have you been able to reproduce a similar error using php and FF?
Maybe you could try with an empty container like me and load the
slides with some data from the server, very similar to your add6
example.

Thank You!




[jQuery] Re: form submit without page refresh

2008-11-10 Thread Sam Sherlock
I think we are misunderstand each other a bit

I asked to see you html - I saw the example and the form is not submitted by
ajax

I was asking if your form has an  id of myForm eg

form id=myForm

would also be helpful if you could post link to example does not store ip's
after submitting

2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi u see , in that page is loading / redirecting  know,

 But my thing is without page reloading to submit the form,


 Got my point , one more thing , am having some jquery script , which
 working fine (without page refresh to form submiting)

 But i need the help in, i want to use the jquery in Drupal,


 On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have the
 event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I
 have already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

  But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]
 


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/



[jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
 script type=text/javascript src=jquery-1.2.6.js/script what is use
of this script,

I removed this script,

Output same, no changes,

Thanks

2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi u see , in that page is loading / redirecting  know,
 But my thing is without page reloading to submit the form,


 Got my point , one more thing , am having some jquery script , which
 working fine (without page refresh to form submiting)

 But i need the help in, i want to use the jquery in Drupal,


 On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have the
 event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I
 have already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

  But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] [EMAIL PROTECTED]
 


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/




-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Re: form submit without page refresh

2008-11-10 Thread Sam Sherlock

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

script


thats jquery - you'll need that for jquery to work.  also you'll need to be
accessing the form plugin


see my previous message :)


2008/11/10 bharani kumar [EMAIL PROTECTED]

  script type=text/javascript src=jquery-1.2.6.js/script what is use
 of this script,

 I removed this script,

 Output same, no changes,

 Thanks


 2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi u see , in that page is loading / redirecting  know,
 But my thing is without page reloading to submit the form,


 Got my point , one more thing , am having some jquery script , which
 working fine (without page refresh to form submiting)

 But i need the help in, i want to use the jquery in Drupal,


 On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have the
 event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I
 have already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

  But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] 
 [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/




 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/



[jQuery] Re: Panel Interface for webpage?

2008-11-10 Thread Rene Veerman


Shawn wrote:


Thanks Rene. Didn't find anything promising there though... but great 
resource!


Shawn

Then you're gonna have to code it yourself.. pretty please release it as 
a plugin :)




[jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
Hi here is my module, i want to add the JQuery into this module,

that is form submit without page refresh ,

2008/11/10 bharani kumar [EMAIL PROTECTED]

 I thing confusing you,

 I tel what i want ?

 I want to submit form without page refresh,

 Is there any best link other then wha u given last,

 One more thing am having some script,


 But am expecting help is, i want to implement into drupal,,,



 2008/11/10 Sam Sherlock [EMAIL PROTECTED]

 I think we are misunderstand each other a bit

 I asked to see you html - I saw the example and the form is not submitted
 by ajax

 I was asking if your form has an  id of myForm eg

 form id=myForm

 would also be helpful if you could post link to example does not store
 ip's after submitting


 2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi u see , in that page is loading / redirecting  know,

 But my thing is without page reloading to submit the form,


 Got my point , one more thing , am having some jquery script , which
 working fine (without page refresh to form submiting)

 But i need the help in, i want to use the jquery in Drupal,


 On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have the
 event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I
 have already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

  But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] 
 [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/




-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


custom.module
Description: Binary data


[jQuery] Re: jCarousel, localScroll, other options?

2008-11-10 Thread genius switch

That works nicely on your demo, it's what i'm trying to achieve. As
for the two easing scripts, one is for the lava script i'm using for
the navigation. I wonder if that's causing a conflict.

Ay yay yay! LOL!

On Nov 10, 9:13 am, Ariel Flesler [EMAIL PROTECTED] wrote:
 You don't need to include both easing scripts.

 As for the nice animation... maybe you were using another easing eq ?
 They all use jQuery's fx module so they're not likely to work differently.

 Maybe it's the flash embed, I don't know.
 Check this:http://demos.flesler.com/jquery/scrollTo/

 It's the plugin that does the animations. Try clicking the TOC, you'll
 see the easing working well in it.

 On Sun, Nov 9, 2008 at 8:46 PM, genius switch



 [EMAIL PROTECTED] wrote:

  I did see this, cycle is really nice, but is it more relevant to
  images and not really for content? Also, i didn't dig into it deeply
  yet mostly i just bookmarked it for future use... but if it's limited
  to markup having to be in a list, then that would be what steered me
  away from jCarousel. Otherwise cycle is really nice and i'll be using
  it in the future for images.

  ... and i'd hate to scrap work or start over a third time. I'm hoping
  i can get the easing to work perfectly here.

  - C

  On Nov 9, 12:30 pm, Pixelstuff [EMAIL PROTECTED] wrote:
  Not to scrap any work you've already done, but the Cycle plugin might
  work also.http://malsup.com/jquery/cycle/

  And there are tons of demo pages of what it can do. It's a very
  extensive plugin.

  On Nov 8, 12:27 pm, Ariel Flesler [EMAIL PROTECTED] wrote:

   Check LocalScroll's docs. That issue when setting the hash is the
   expected behavior.

   It's not recommended to combine the option hash when scrolling
   something else than the window, or scrolling just in 1 direction.
   There's nothing to do about that I think, it's one or the other.

   On Sat, Nov 8, 2008 at 12:40 PM, genius switch

   [EMAIL PROTECTED] wrote:

Ok, I was able to debug both items. 1) The flash piece itself is the
problem, not swfobject. Keep in mind, what you see here is very ugly
right now since we're just starting dev, the clunky ugly flash piece
is causing the problem here, and 2) the page jump only happens because
the page itself is so tall. If I take away the whole bottom content
and the page no longer creates a scrollbar in the browser window, the
problem is fixed.

That said, I'm not quite sure how i'll fix the second issue. I haven't
had enough coffee yet... perhaps some absolute positioning of the top
elements, and some top padding of the sections. Hmm... what do you
think?

- C

On Nov 8, 12:25 am, genius switch [EMAIL PROTECTED] wrote:
I'm almost there, i don't understand why it anchors the page to that
section though (if you notice it moves the whole page up some). Also,
a strange little bug in the easing scripting. I'm not sure if i'd call
it a bug, but a conflict. I am using swfobject to put the flash on the
page and it makes the easing effect not work. If I remove swfobject it
works fine.

   http://www.geniusswitchstudio.com/v2/template.htm

by the way thanks for all your awesome help!

- C

On Nov 7, 10:33 pm, Ariel Flesler [EMAIL PROTECTED] wrote:

 Also... whatever you put inside the $( ) should be one or more
 elements containing the links.

 Just in case, try:
 $(function() {
   $.localScroll({
 easing:'easeOutQuart'
   });

 });

 On Fri, Nov 7, 2008 at 9:29 PM, genius switch

 [EMAIL PROTECTED] wrote:

  I'm doing something wrong of course... man why do I stink at
  javascript?

 script type='text/javascript' src='includes/scripts/
  jquery-1.2.6.min.js'/script
 script type='text/javascript' 
  src='includes/scripts/jquery.easing.
  1.3.js'/script
 script type='text/javascript' 
  src='includes/scripts/jquery.scrollTo-
  min.js'/script
 script type='text/javascript' src='includes/scripts/
  jquery.localscroll-min.js'/script
 script type='text/javascript' 
  src='includes/scripts/init.js'/
  script
 script type=text/javascript
 $(function() {
 $(#content).localScroll({
 easing:'easeOutQuart',
 }
 });
 });
 /script

  On Nov 6, 1:29 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
  You include the easing plugin after jQuery, then when you call 
  LocalScroll:

  $(...).localScroll(
  
  easing:'easeOutQuart',
  

  });

  You can chose any equation, by name.

  On Thu, Nov 6, 2008 at 3:21 PM, genius switch

  [EMAIL PROTECTED] wrote:

   Thanks Ariel! I will give that a shot this weekend and let you 
   know
   how I do. I know plugging in 

[jQuery] Re: Panel Interface for webpage?

2008-11-10 Thread Richard D. Worth
This doesn't cover everything you've asked for, but may be a starting point:

http://ui.jquery.com/repository/real-world/layout/

- Richard

On Sun, Nov 9, 2008 at 10:12 PM, Shawn [EMAIL PROTECTED] wrote:

  I'm not sure if I've seen a plugin for this, or even a website, but
 thought I'd ask here before creating custom code

 We're looking to have panels (aka widgets) on the page. (A dashboard
 perhaps?) Each panel is a given size - say 100x100, has a title bar, and
 minimize/maximize options, and a Show More link at the bottom of the
 panel. The web page may have many panels (scrolling the page as needed).

 Each of these panels would (presumably) contain the output from various
 applications within the Intranet.

 There is a little more logic involved - manadatory panels, etc - but this
 covers the core.

 I'm looking for any tips/suggestions on this... I can build something (ajax
 calls, iframes, etc... should be pretty straight forward), but would rather
 not have to, unless really needed. Thanks for any responses.

 Shawn




[jQuery] Re: Ready event is getting fired - each time i click on a link in the page

2008-11-10 Thread Mayurnath Puli
Thanks Mike. It is working.

--Mayur
On Sat, Nov 8, 2008 at 5:55 PM, Mike Alsup [EMAIL PROTECTED] wrote:


  My objective is to hide all the images except the first one in the
  table and show them only if i click on the link associated with the
  image. But what is happening is all the images are getting hidden,
  which i donot want.
 
  Also when i click on the link the image will be displayed for a split
  of a second but disappears because the page is getting loaded and
  hence the ready event is getting called again. Please let me know if
  there is anything wrong with the code.

 Two problems:

 1.)  Your selector for the first image is wrong.  You have this:

$(img:not(first)).hide();

 but it should be this (note the extra colon):

$(img:not(:first)).hide();

 You could also do the same thing like this:

$(img:gt(0)).hide();


 2.  Your click handlers need to return false to prevent the default
 browser behavior (which is to load the linked page).

 So your click handlers that look like this:

$(a#tpt).click(function()
{
$(img#firstimg).show();
});

 become this:

$(a#tpt).click(function()
{
$(img#firstimg).show();
return false;
});


 Mike


[jQuery] make something draggable?

2008-11-10 Thread nmiddleweek

hello,

I've got some code like this:

div id=libNotePad
form id=libNotePadForminput type=hidden value=
id=libNotePadRef name=libNotePadRef
div id=libNotePadTitleimg src=/web/javascript/layouts/
fieldSideTab/but_image_notepad.gif alt=libNotePad style=padding-
top:2px; padding-left:2px; padding-right:4px; vertical-align:text-
bottom; /Edit Comments/div
textarea id=libNotePadTextArea name=libNotePadTextArea 
cols=
rows=loading data.../textarea
div id=libNotePadButtonAreainput class=libNotePadButton
name=libNotePadButtonCancel type=button value=Cancel
onclick=saveNotePad();input class=libNotePadButton
name=libNotePadButtonOK type=button value=OK
onclick=cancelNotePad();/div
/form
/div

... and I wanted to set the #libNotePadTitle to be draggable so it
moves everything within the #libNotePad container but the only thing
that moved was the #libNotePadTitle :-)

I've got around it by setting the #libNotePad to be draggable and
luckily the TEXT AREA isn't working with the drag, nor the buttons but
the #libNotePadButtonArea does work but I don't want it to.

What's the correct way to achieve this?


Thanks,
N


[jQuery] Re: resizable floating text area?

2008-11-10 Thread nmiddleweek

Hello,

Does anyone know how to stop the Google Chrome feature of resizing a
text area? Although I haven't implemented my own version yet it's
screwing with my interface :)





On Nov 9, 8:51 pm, nmiddleweek [EMAIL PROTECTED] wrote:
 Hello,

 What is the best approach to displaying a resizable text area that
 floats ontop of other elements in the middle of the screen or near to
 a specific element?

 The text area can either be already on the form but initially hidden
 or it could be loaded on the fly.

 I've found some dialog plugins but none are resizable and I've seen a
 vertically resizing text area but I can't find a combo of them both?

 Has got any suggestions on which plugins are good to work together to
 achieve this?

 Thanks,
 N.


[jQuery] ActsAsTreeTable plugin IE 6 issue

2008-11-10 Thread invincible_virus

Hi,

I am using ActsAsTreeTable plugin to convert my table into a tree. It
works fine in FF2  IE7. But the expand  collapse images don't show
up in IE6.
Tree collapse/expand works fine if I click on the left edge imagining
the images to be there.

Any idea, how to fix this.
Here's the link to plugin -
http://plugins.jquery.com/project/acts_as_tree_table

Thanks,
Saurabh


[jQuery] Re: jCarousel, localScroll, other options?

2008-11-10 Thread Ariel Flesler

You don't need to include both easing scripts.

As for the nice animation... maybe you were using another easing eq ?
They all use jQuery's fx module so they're not likely to work differently.

Maybe it's the flash embed, I don't know.
Check this: http://demos.flesler.com/jquery/scrollTo/

It's the plugin that does the animations. Try clicking the TOC, you'll
see the easing working well in it.

On Sun, Nov 9, 2008 at 8:46 PM, genius switch
[EMAIL PROTECTED] wrote:

 I did see this, cycle is really nice, but is it more relevant to
 images and not really for content? Also, i didn't dig into it deeply
 yet mostly i just bookmarked it for future use... but if it's limited
 to markup having to be in a list, then that would be what steered me
 away from jCarousel. Otherwise cycle is really nice and i'll be using
 it in the future for images.

 ... and i'd hate to scrap work or start over a third time. I'm hoping
 i can get the easing to work perfectly here.

 - C

 On Nov 9, 12:30 pm, Pixelstuff [EMAIL PROTECTED] wrote:
 Not to scrap any work you've already done, but the Cycle plugin might
 work also.http://malsup.com/jquery/cycle/

 And there are tons of demo pages of what it can do. It's a very
 extensive plugin.

 On Nov 8, 12:27 pm, Ariel Flesler [EMAIL PROTECTED] wrote:

  Check LocalScroll's docs. That issue when setting the hash is the
  expected behavior.

  It's not recommended to combine the option hash when scrolling
  something else than the window, or scrolling just in 1 direction.
  There's nothing to do about that I think, it's one or the other.

  On Sat, Nov 8, 2008 at 12:40 PM, genius switch

  [EMAIL PROTECTED] wrote:

   Ok, I was able to debug both items. 1) The flash piece itself is the
   problem, not swfobject. Keep in mind, what you see here is very ugly
   right now since we're just starting dev, the clunky ugly flash piece
   is causing the problem here, and 2) the page jump only happens because
   the page itself is so tall. If I take away the whole bottom content
   and the page no longer creates a scrollbar in the browser window, the
   problem is fixed.

   That said, I'm not quite sure how i'll fix the second issue. I haven't
   had enough coffee yet... perhaps some absolute positioning of the top
   elements, and some top padding of the sections. Hmm... what do you
   think?

   - C

   On Nov 8, 12:25 am, genius switch [EMAIL PROTECTED] wrote:
   I'm almost there, i don't understand why it anchors the page to that
   section though (if you notice it moves the whole page up some). Also,
   a strange little bug in the easing scripting. I'm not sure if i'd call
   it a bug, but a conflict. I am using swfobject to put the flash on the
   page and it makes the easing effect not work. If I remove swfobject it
   works fine.

  http://www.geniusswitchstudio.com/v2/template.htm

   by the way thanks for all your awesome help!

   - C

   On Nov 7, 10:33 pm, Ariel Flesler [EMAIL PROTECTED] wrote:

Also... whatever you put inside the $( ) should be one or more
elements containing the links.

Just in case, try:
$(function() {
  $.localScroll({
easing:'easeOutQuart'
  });

});

On Fri, Nov 7, 2008 at 9:29 PM, genius switch

[EMAIL PROTECTED] wrote:

 I'm doing something wrong of course... man why do I stink at
 javascript?

script type='text/javascript' src='includes/scripts/
 jquery-1.2.6.min.js'/script
script type='text/javascript' 
 src='includes/scripts/jquery.easing.
 1.3.js'/script
script type='text/javascript' 
 src='includes/scripts/jquery.scrollTo-
 min.js'/script
script type='text/javascript' src='includes/scripts/
 jquery.localscroll-min.js'/script
script type='text/javascript' 
 src='includes/scripts/init.js'/
 script
script type=text/javascript
$(function() {
$(#content).localScroll({
easing:'easeOutQuart',
}
});
});
/script

 On Nov 6, 1:29 pm, Ariel Flesler [EMAIL PROTECTED] wrote:
 You include the easing plugin after jQuery, then when you call 
 LocalScroll:

 $(...).localScroll(
 
 easing:'easeOutQuart',
 

 });

 You can chose any equation, by name.

 On Thu, Nov 6, 2008 at 3:21 PM, genius switch

 [EMAIL PROTECTED] wrote:

  Thanks Ariel! I will give that a shot this weekend and let you 
  know
  how I do. I know plugging in localScroll will be simple enough, 
  but
  I'm not sure about the easing. I'm quite bad at javascript... 
  which is
  why I love jquery. Even a simple HTML/CSS developer and web 
  designer
  such as myself can get stuff up and running fast :)

  - C

  On Nov 6, 8:33 am, Ariel Flesler [EMAIL PROTECTED] wrote:
  Sure, LocalScroll too. Both 

[jQuery] panoramic photo viewer

2008-11-10 Thread halil

hi,

is there any jquery  application about showing 360 percent panoramic
photo viewer. The photo is taken with cat eye photo machine so i has
to use flash panoramic viewer but it is not free. is there any
application created with jquery plugins. can you help me about this
problem.


[jQuery] Re: Panel Interface for webpage?

2008-11-10 Thread Shawn
Thanks Rene.  Didn't find anything promising there though... but great 
resource!

Shawn

On Sunday 09 November 2008 21:46:01 Rene Veerman wrote:
 Shawn wrote:
  I'm not sure if I've seen a plugin for this, or even a website, but
  thought I'd ask here before creating custom code
 
  We're looking to have panels (aka widgets) on the page. (A
  dashboard perhaps?) Each panel is a given size - say 100x100, has a
  title bar, and minimize/maximize options, and a Show More link at
  the bottom of the panel. The web page may have many panels (scrolling
  the page as needed).
 
  Each of these panels would (presumably) contain the output from
  various applications within the Intranet.
 
  There is a little more logic involved - manadatory panels, etc - but
  this covers the core.
 
  I'm looking for any tips/suggestions on this... I can build something
  (ajax calls, iframes, etc... should be pretty straight forward), but
  would rather not have to, unless really needed. Thanks for any responses.
 
  Shawn

 you might wanna check http://ajaxrain.com




[jQuery] Re: jQuery Uploader Flash player 10 fix

2008-11-10 Thread Gilles (Webunity)

Going to squash the latest bugs today, if i got my VPC up and running
so i can use visual studio to debug IE6. Got my SharePoint
certification last week so that week was crazy ;)

On Nov 9, 4:12 pm, Crazy-Achmet [EMAIL PROTECTED] wrote:
 Hey Gilles,

 how is it going? Is there something to see? ;)


[jQuery] Re: mouseover text for select option

2008-11-10 Thread hschulz

Hi,
thanks for your answer, but your code has the same behavior as my
code.

I try to go into details to explain the error.

When you open the dropdown an move the mouse over option 2 it shows
the valiue of option 2, but when you move the mouse over option 3
(from option 2) it shows the value of option 2 again.



On 4 Nov., 18:55, ricardobeat [EMAIL PROTECTED] wrote:
 use $(#fooinfo).html( $(#fooselect).val() ); to get the current
 selection text!

 On Nov 4, 1:36 pm, hschulz [EMAIL PROTECTED] wrote:

  Hello,

  i want to display some additional information in a div, while
  selecting an option from a select.
  It works so far, except that it always display the previous mouseover
  text.

  the used html
      form
          div id=fooinfoqwertz/div
          select id=fooselect name=foo
              option value=foo option 2 option 2/option
              option value=foo option 3 option 3/option
              option value=foo option 4 option 4/option
              option value=foo option 5 option 5/option
              option value=foo option 6 option 6/option
          /select
      /form

  and the script
    $(document).ready(function(){
       $(#fooselect option).mouseover(function() {
         $(#fooinfo).html($(#fooselect option:selected).text());
      });
   });

  Any suggestions

  Thanks
  hschulz


[jQuery] Recursion Issues with jQuery

2008-11-10 Thread gd

Hello,

I am trying to get a feature accomplished and Recursion seems to me
like the most obvious solution. I have written some functions designed
for the same. These functions call each other and themselves at
depending on the situation. Here are they:

Search.method (
'process_search_node',
function (context, string, status) {

var me=this;

alert('preocess_search_node called!');

var lstring = string;
if(status != 'break') {
/* Process Child */
/* Child does not exist */
if(!me.process_child_for_search_node(context, string)) {

lstring += ' ( Q )';
me.process_sibling_for_search_node(context, lstring);
}
/* Child Exists */
else {

lstring += ' (';
me.process_search_node(context, lstring, '');
}
}
else {
alert(lstring); /*** I need all the calls to
stop the first time it reaches here and return the value of lstring to
the test variable (See below where the function
'process_search_node' is triggered) ***/
return false;
}
 }
);

Search.method (
'process_child_for_search_node',
function (context, string) {

var me=this;

alert('process_child_for_search_node called!');

/* If it has an immediate Child Search Panel */
var immediate_child = context.children(':nth-
child(2)').children(':nth-child(1)').children(':nth-child(1)');
if(immediate_child.hasClass('query_stage_wrapper')) {

var lstring = string + ' (';
me.process_search_node(immediate_child, lstring, '');
}
else
return false;
}
);

Search.method (
'process_sibling_for_search_node',
function (context, string) {

var me=this;

alert('process_sibling_for_search_node called!');

/* If it has a Sibling Search Panel */
var sibling = context.next(':first');
if(sibling.hasClass('query_stage_wrapper')) {

var lstring = string;
me.process_search_node(sibling, lstring, '');
}
else {

if(me.get_parent_search_panel(context)) {

var lstring = string + ' )';
 
me.process_sibling_for_search_node(me.get_parent_search_panel(context),
lstring);
}
else {

var lstring = string;
if(!me.process_search_node(context, lstring,
'break'));
alert('returned false');
}
}
}
);


The call the triggers the above set of functions is:

var test = me.process_search_node($('div.query_stage_wrapper:first'),
string, '');

I would be very grateful to you if you could point me out the place
where I am going wrong.

Thanks for reading my post.


[jQuery] Re: Problems with Multiple File Upload

2008-11-10 Thread BB

Maybe you should first learn how to upload one file with PHP:
http://de2.php.net/manual/en/features.file-upload.php

and the the multiple way:
http://de2.php.net/manual/en/features.file-upload.multiple.php

Instead of $_POST use $_FILES

On 9 Nov., 23:32, dmackerman [EMAIL PROTECTED] wrote:
 I am having a slight problem with the multiple file upload plugin,
 found here:http://www.fyneworks.com/jquery/multiple-file-upload/#tab-Support

 Here is my HTML form:

     form id=uploadForm enctype=multipart/form-data
 action=upload.php method=POST class=edit
    fieldset
             legendYour file/legend
                 ol
                     li
                         label for=choosefileChoose an image to
 upload:/label
                                 input type=file class=multi
 name=images[]
                     /li
                 /ol
         /fieldset
         input type=submit name=submit value=Send /
     /form

 And here is upload.php:

 ?
 session_start();
 $files = $_POST[images];
 print_r($files);
 ?

 As you can see I am just trying to test out the processing of the
 files, but I get an error on line 3:

 Notice: Undefined index: images in c:\Inetpub\wwwroot\356\dackerma
 \Project2\upload.php

 Why am I getting this error? I named the input field correctly, and
 included all of the files.


[jQuery] Re: [validate] Repeated error tags

2008-11-10 Thread Jörn Zaefferer
Does the input have a name-attribute? Did you customize the message display?

A testpage would help.

Jörn

On Mon, Nov 10, 2008 at 3:26 PM, La_PaRCa [EMAIL PROTECTED] wrote:

 I have the following problem:

 If I try to submit a for multiple times, and the same field is
 invalid, each time I will get a new error tag and the old one doesnt
 clear. So after a while I will have multiple error tags with the same
 message for a given field.

 Any ideas how I could fix this or what could be causing it?



[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-10 Thread Mike Alsup

 Have you been able to reproduce a similar error using php and FF?
 Maybe you could try with an empty container like me and load the
 slides with some data from the server, very similar to your add6
 example.

You need to make this a little easier for me, I don't have time to
write all the code needed to simulate your situation.  Please post a
public demo somewhere that shows the problem.  Thanks.


[jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
u got it, what i am expecting

2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi here is my module, i want to add the JQuery into this module,
 ,
 that is form submit without page refresh ,

 2008/11/10 bharani kumar [EMAIL PROTECTED]

 I thing confusing you,

 I tel what i want ?

 I want to submit form without page refresh,

 Is there any best link other then wha u given last,

 One more thing am having some script,


 But am expecting help is, i want to implement into drupal,,,



 2008/11/10 Sam Sherlock [EMAIL PROTECTED]

 I think we are misunderstand each other a bit

 I asked to see you html - I saw the example and the form is not submitted
 by ajax

 I was asking if your form has an  id of myForm eg

 form id=myForm

 would also be helpful if you could post link to example does not store
 ip's after submitting


 2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi u see , in that page is loading / redirecting  know,

 But my thing is without page reloading to submit the form,


 Got my point , one more thing , am having some jquery script , which
 working fine (without page refresh to form submiting)

 But i need the help in, i want to use the jquery in Drupal,


 On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have
 the event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I
 have already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

  But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]
  wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] 
 [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do
 this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/




 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/




-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Am I using 'this' too often?

2008-11-10 Thread George

Being newbie in JavaScript I am trying to code my own helper object
that does pagination.
So here is a snippet of my code.

MyData.prototype = {
 blablabla...
   PageUp: function() {
this.iFrom += this.pageSize;
this.CheckPageIndex();
},


CheckPageIndex: function() {
if( this.iFrom = this.data.length )
this.iFrom = Math.floor((this.data.length - 1)/
this.pageSize) * this.pageSize;


if( this.iFrom  0 )
this.iFrom = 0;
}



}


Why do I need to call CheckPageIndex using this.CheckPageIndex when
called from PageUp? It's in the same object...

Without 'this' I get an error 'CheckPageIndex is undefined'. Coming
from object oriented languages like C++ I have a trouble
understanding
it.
Or am I doing it wrong and there is a way not to specify 'this' to
many times?

Thanks
George


[jQuery] Re: Finding an input's label

2008-11-10 Thread MorningZ

Keep in mind that the selector is simply a *string*, so you need to
feed it a string... .

$(label[for=' + this.attr(id) + ']).attr('class', 'error');


On Nov 10, 11:24 am, Pete [EMAIL PROTECTED] wrote:
 What's the easiest way to find an input's label?  I'm trying to
 evaluate this along the lines of the following, but this doesn't work:

 $('label[for=this.attr(id)]').attr('class', 'error');

 Any help appreciated.


[jQuery] problem when mousing onto selec object option list (relatedTarget?)

2008-11-10 Thread clorentzen

Hi --

I'm working on a site with a nav area that exposes panels/menus when a
parent li is hovered over -- using hover(). Some of these panels
contain forms, including select objects. When I click a select in
one of these nav menus, and then mouse over the options, it causes the
containing menu panel to disappear. I assume this is because the
browsers don't consider the option menu part of the select, and
therefore not contained within the parent li, so it reacts as if the
parent li is no longer being hovered over...?

Is there any fix for this? Via some Google searching it sounds like
this has something to do with the relatedTarget property, but I am not
sure how to come up with a fix that will keep the li as still
registering as hovered.

Thanks!


[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-10 Thread OutOfTouch


On Nov 10, 10:02 am, Mike Alsup [EMAIL PROTECTED] wrote:
  Have you been able to reproduce a similar error using php and FF?
  Maybe you could try with an empty container like me and load the
  slides with some data from the server, very similar to your add6
  example.

 You need to make this a little easier for me, I don't have time to
 write all the code needed to simulate your situation.  Please post a
 public demo somewhere that shows the problem.  Thanks.

I would put up a public demo if I could, but I can't or I would lose
my job.
You already have 90% of the code required in your add6 example and the
JS code I posted, the only thing is you don't need to do the fancy
prev/next shiftAndPop with the array because in my JS the images are
loaded all at once using the data from the server, when a valid value
in the dropdown is selected. The only code you would have to write is
some php method to take in a parameter to give you the images data
array for the selected value in the dropdown.
Would it help if I donated some money to your project? I probably can
donate $50.00 US dollars. Do you have a paypal link on your site
anywhere?


[jQuery] Issue with jquery(selector, context) and Chrome

2008-11-10 Thread Paul DelRe

I'm using the Forms plugin to do an ajax submit which then grabs a div
with a table to display on the page.  The response callback function
is as follows:

code
function(response){
var results = jQuery(div#results, response).html();

if(results == null){
// To handle if the session expired
window.location.reload();
}
jQuery(div#results).html(results);
...
}
/code

I've put response to console.log (using FireBug Lite) to verify that
the proper response is being sent, but jQuery(div#results,
response).html() is returning null.  I've also tried text(), which
returns an empty string.

Any thoughts or solutions handled in the past?  Thank you.


[jQuery] Cycle plugin + position:absolute

2008-11-10 Thread Lenni

Hi,

I'm trying out the malsup's cycle plugin and really like it. It seems
to interfere with my formatting though. My demo is at
http://vocabforbreakfast.railsplayground.net/jqfade/.

How can I center the div with the images when the cycle plugin sets
the position property to absolute?

Thanks
Lenni

PS: Sorry if this is should have been posted in a CSS group instead.


[jQuery] 2 forms with SimpleModal

2008-11-10 Thread Xtophe

Hi,

I've a small question.

My page containes a list of articles. For each article, I've some
options.

One of this option is send to a friend and an other one is more
information.

Each option use the SimpleModal form.

1) I've a problem : how can I associate a different form for each
button?
2) how can I send a variable to this form?

Many thanks for your help.

Regards, Christophe


[jQuery] [validate] Repeated error tags

2008-11-10 Thread La_PaRCa

I have the following problem:

If I try to submit a for multiple times, and the same field is
invalid, each time I will get a new error tag and the old one doesnt
clear. So after a while I will have multiple error tags with the same
message for a given field.

Any ideas how I could fix this or what could be causing it?


[jQuery] Re: JSON parser?

2008-11-10 Thread Mike Alsup

 Does jQuery comes with a built-in JSON parser?
 I need a FROM JSON function as an alternative to using eval.

No it does not.  I recommend Doug Crockford's json2.js script:

http://www.json.org/js.html



[jQuery] Re: Cycle Plugin: Multiple pagers

2008-11-10 Thread Mike Alsup

 Is it possible to use multiple pagers for one slideshow.
 Eg. a pager above the slides and a pager below the slides.
 One pager could be a number pager and the other an image pager or both
 the same.

You could create a 2nd pager using code like that shown in this demo:

http://www.malsup.com/jquery/cycle/goto2.html




[jQuery] Event Capture Architecture

2008-11-10 Thread saqib

I am developing an application in which I have to define click events
for many elements( the list may go up to hundreds). So what would be
the best way to capture these event

Either using a *
 bind( $('*') );
and in click function get the id of target element and code
accordingly


OR use a separate bind method for every element.
$('#elementID').click(function(){
bind( );
});


[jQuery] Re: form submit without page refresh

2008-11-10 Thread Sam Sherlock
working example with json

2 files first index.html

!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; xml:lang=en-US
lang=en-US

head

title malsup jquery form to php /title

script type=text/javascript src=
http://www.malsup.com/jquery/jquery-1.2.6.js;/script
script type=text/javascript src=
http://www.malsup.com/jquery/form/jquery.form.js;/script

script type=text/javascript
// wait for the DOM to be loaded
$(document).ready(function() {
// bind 'myForm' and provide a simple callback function


$('#myForm').submit(function(){
// submit the form
$(this).ajaxSubmit({
// dataType identifies the expected content
type of the server response
'dataType': 'json',
// success identifies the function to invoke
when the server response
// has been received
'success': function (data){
msgText = 'pThank You ' + data.myName
+ '/p';
$('#msg').html(msgText);
}
});
return false;
});
});
/script

/head

body

div id=msg/div

form action=test.php id=myForm method=get
name input type= value= name=myName /
input type=submit value=say hello to yourself /
/form

/body

/html

--

test.php

?php

// test.php

$response = Array(myName = $_GET['myName'], success = 1);

echo json_encode($response);


?

as I say I don't know how to implement it in drupal - all the info you need
is at that link (with that and drupal docs)

2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi here is my module, i want to add the JQuery into this module,

 that is form submit without page refresh ,

 2008/11/10 bharani kumar [EMAIL PROTECTED]

 I thing confusing you,

 I tel what i want ?

 I want to submit form without page refresh,

 Is there any best link other then wha u given last,

 One more thing am having some script,


 But am expecting help is, i want to implement into drupal,,,



 2008/11/10 Sam Sherlock [EMAIL PROTECTED]

 I think we are misunderstand each other a bit

 I asked to see you html - I saw the example and the form is not submitted
 by ajax

 I was asking if your form has an  id of myForm eg

 form id=myForm

 would also be helpful if you could post link to example does not store
 ip's after submitting


 2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi u see , in that page is loading / redirecting  know,

 But my thing is without page reloading to submit the form,


 Got my point , one more thing , am having some jquery script , which
 working fine (without page refresh to form submiting)

 But i need the help in, i want to use the jquery in Drupal,


 On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have
 the event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I
 have already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

  But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, 

[jQuery] Re: mouseover text for select option

2008-11-10 Thread Karl Swedberg

Hi hschulz,

Here is a message I posted a while back in response to a similar  
question:


Maybe someone else is aware of a workaround to this limitation of  
IE, but I haven't found one.


... If you take a look at the MSDN reference page for onmouseover  
[1], you'll see that option is not included in the list of  
elements that this event applies to:


Applies To

	A, ADDRESS, APPLET, AREA, B, BDO, BIG, BLOCKQUOTE, BODY,  
BUTTON, CAPTION, CENTER, CITE, CODE, CUSTOM, DD, DFN, DIR, DIV, DL,  
document, DT, EM, EMBED, FIELDSET, FONT, FORM, hn, HR, I, IMG,  
INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT  
type=image, INPUT type=password, INPUT type=radio, INPUT  
type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND,  
LI, LISTING, MAP, MARQUEE, MENU, nextID, NOBR, OL, P, PLAINTEXT,  
PRE, RT, RUBY, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB,  
SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL,  
VAR, XMP





[1] http://msdn.microsoft.com/en-us/library/ms536949(VS.85).aspx



It should work in Firefox and Safari, but I suspect you were hoping  
for a more universal solution. Sorry to be the bearer of bad news.


--Karl


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




On Nov 10, 2008, at 5:50 AM, hschulz wrote:



Hi,
thanks for your answer, but your code has the same behavior as my
code.

I try to go into details to explain the error.

When you open the dropdown an move the mouse over option 2 it shows
the valiue of option 2, but when you move the mouse over option 3
(from option 2) it shows the value of option 2 again.



On 4 Nov., 18:55, ricardobeat [EMAIL PROTECTED] wrote:

use $(#fooinfo).html( $(#fooselect).val() ); to get the current
selection text!

On Nov 4, 1:36 pm, hschulz [EMAIL PROTECTED] wrote:


Hello,



i want to display some additional information in a div, while
selecting an option from a select.
It works so far, except that it always display the previous  
mouseover

text.



the used html
form
div id=fooinfoqwertz/div
select id=fooselect name=foo
option value=foo option 2 option 2/option
option value=foo option 3 option 3/option
option value=foo option 4 option 4/option
option value=foo option 5 option 5/option
option value=foo option 6 option 6/option
/select
/form



and the script
  $(document).ready(function(){
 $(#fooselect option).mouseover(function() {
   $(#fooinfo).html($(#fooselect option:selected).text());
});
 });



Any suggestions



Thanks
hschulz




[jQuery] Re: JSON parser?

2008-11-10 Thread Mike Alsup

 Really? I thought it had because jQuery evaluates JSON internally
 (e.g.: getJSON method).

Correct, it 'evals' json, it does not parse it.  From the httpData
function:

if ( type == json )
data = eval(( + data + ));




[jQuery] Finding an input's label

2008-11-10 Thread Pete

What's the easiest way to find an input's label?  I'm trying to
evaluate this along the lines of the following, but this doesn't work:

$('label[for=this.attr(id)]').attr('class', 'error');

Any help appreciated.


[jQuery] Re: TableSorter Pagination: Move pagination to top

2008-11-10 Thread ripcurlksm


no I am not using drupal, its a page I made using PHP and MySQL



bharanikumariyerphp wrote:
 
 hi , r u working in Drupal
 
 On Mon, Nov 10, 2008 at 1:20 PM, ripcurlksm [EMAIL PROTECTED]
 wrote:
 


 ... still working on this.. it appears that the pagination div is
 relatively
 positioned, so that if you have 10 results set to show, it will assume
 the
 vertical height that 10 rows would take up.. as a result, if your last
 page
 only shows 5 rows remaining, it will still assume that 10 rows are
 printing,
 which is why this white space demonstrated below is showing.

 Am I off on this?
 --
 View this message in context:
 http://www.nabble.com/TableSorter-Pagination%3A-Move-pagination-to-top-tp20353088s27240p20415646.html
 Sent from the jQuery General Discussion mailing list archive at
 Nabble.com.


 
 
 -- 
 உங்கள் நண்பன்
 பரணி  குமார்
 
 Regards
 B.S.Bharanikumar
 
 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/
 
 

-- 
View this message in context: 
http://www.nabble.com/TableSorter-Pagination%3A-Move-pagination-to-top-tp20353088s27240p20424030.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: JSON parser?

2008-11-10 Thread Jeffrey Kretz

Is there a problem with using the eval function?

I'm curious why you would need an alternative that would add overhead.

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Monday, November 10, 2008 9:05 AM
To: jQuery (English)
Subject: [jQuery] Re: JSON parser?


 Really? I thought it had because jQuery evaluates JSON internally
 (e.g.: getJSON method).

Correct, it 'evals' json, it does not parse it.  From the httpData
function:

if ( type == json )
data = eval(( + data + ));





[jQuery] Re: Am I using 'this' too often?

2008-11-10 Thread Olivier Percebois-Garve
you may want to have a look here http://docs.jquery.com/Plugins/Authoring

On Mon, Nov 10, 2008 at 5:20 PM, George [EMAIL PROTECTED] wrote:


 Being newbie in JavaScript I am trying to code my own helper object
 that does pagination.
 So here is a snippet of my code.

 MyData.prototype = {
  blablabla...
   PageUp: function() {
this.iFrom += this.pageSize;
this.CheckPageIndex();
},


CheckPageIndex: function() {
if( this.iFrom = this.data.length )
this.iFrom = Math.floor((this.data.length - 1)/
 this.pageSize) * this.pageSize;


if( this.iFrom  0 )
this.iFrom = 0;
}



 }


 Why do I need to call CheckPageIndex using this.CheckPageIndex when
 called from PageUp? It's in the same object...

 Without 'this' I get an error 'CheckPageIndex is undefined'. Coming
 from object oriented languages like C++ I have a trouble
 understanding
 it.
 Or am I doing it wrong and there is a way not to specify 'this' to
 many times?

 Thanks
 George


[jQuery] Re: JSON parser?

2008-11-10 Thread Jeffrey Kretz

I just answered my own question.  Are you trying to parse JSON provided from
another source?  I.e. not one of your own server pages?

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Monday, November 10, 2008 9:05 AM
To: jQuery (English)
Subject: [jQuery] Re: JSON parser?


 Really? I thought it had because jQuery evaluates JSON internally
 (e.g.: getJSON method).

Correct, it 'evals' json, it does not parse it.  From the httpData
function:

if ( type == json )
data = eval(( + data + ));





[jQuery] Re: Finding an input's label

2008-11-10 Thread Pete

Thanks, MorningZ. Tidied up your quote nesting and it worked a treat.

Bit of a braindead moment for me... I sometimes forget how painfully
simple and elegant jQuery is. :)


[jQuery] Re: JSON parser?

2008-11-10 Thread Mike Alsup

 Is there a problem with using the eval function?

 I'm curious why you would need an alternative that would add overhead.

Security is the main problem.  If you trust the source completely then
eval is fine.  Parser's like Doug's json2 also let you pass in a
replacement function so you can massage the data as it's parsed if you
need to.


[jQuery] has anyone come across a plugin like this ?

2008-11-10 Thread CliffordSean


see the breadcrumb on here :
http://www.biocompare.com/ProductDetails/386912/1/Mutation-Generation-System-Kit-MGS-Kit-from-Finnzymes-Oy.html
has anyone come across a plugin like this ?

tnx
sean
-- 
View this message in context: 
http://www.nabble.com/has-anyone-come-across-a-plugin-like-this---tp20406388s27240p20406388.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Sliding effect not working

2008-11-10 Thread briandichiara

What could be the problem here? I am using the easing plugin to have a
panel slide up out of sight, or down into sight and it was working
before, but now it's not. The panel just quickly goes to the desired
position with no effects. Would other elements on the page affect
this? I am using the latest version of both jQuery and the Easing
plugin. Am I using the animate function incorrectly? Here's the code
I'm using:

function toggleAlert(){
$(#toggle).blur();
$(#alert).animate( {
top: (($(#toggle).html() == show) ? -15px : 
-163px)
}, 1000, easeInOutElastic);

setTimeout(function(t){
$(#toggle).html((($(#toggle).html() == show) ? 
hide :
show));
$(#alert).toggleClass(hide);
$(#alert).toggleClass(show);
}, 500);

return false;
}

$(document).bind(ready, function(r){
$(#toggle).bind(click, function(c){ return toggleAlert(); });
});


[jQuery] Resizable textarea

2008-11-10 Thread [EMAIL PROTECTED]

Hello,

I can't get the jQuery UI resizable function, in any browsers.

Here's my code :


 link rel=stylesheet href=http://dev.jquery.com/view/tags/ui/
latest/themes/flora/flora.all.css type=text/css media=screen
title=Flora (Default)

script src=http://code.jquery.com/jquery-latest.js;/script
script type=text/javascript src=http://dev.jquery.com/view/tags/ui/
latest/ui/ui.core.js/script
script type=text/javascript src=scripts/jquery/ui.resizable.js/
script

script
  $(document).ready(function() {

$(#txtArea).resizable({
  handles: all
});

  });
/script


textarea  id=txtArea  test/textarea


I can't see what I'm missing. In the debugger the ready function is
hit but the textarea is not converted to a resizable element.

Can someone help ?


[jQuery] Re: jQuery Uploader Flash player 10 fix

2008-11-10 Thread Alexandre Plennevaux

Gilles, you might be interested in this to debug IE if you don't own a
copy of visual studio, or don't want to set up the whole x gigs of it
:) :

http://www.berniecode.com/blog/2007/03/08/how-to-debug-javascript-with-visual-web-developer-express/


you only need visual web studio express, and it does a fine job at
that. it's also a fine javascript, xhtml and CSS editor

On Mon, Nov 10, 2008 at 10:20 AM, Gilles (Webunity)
[EMAIL PROTECTED] wrote:

 Going to squash the latest bugs today, if i got my VPC up and running
 so i can use visual studio to debug IE6. Got my SharePoint
 certification last week so that week was crazy ;)

 On Nov 9, 4:12 pm, Crazy-Achmet [EMAIL PROTECTED] wrote:
  Hey Gilles,
 
  how is it going? Is there something to see? ;)


[jQuery] Re: Am I using 'this' too often?

2008-11-10 Thread George

I had looked there probably 10 times :)
Are you implying that I need to convert my code to being Plug-In?
Other than that I do not see how this page 
http://docs.jquery.com/Plugins/Authoring
answers my question...
Sorry, but please spell it out for me.

The Plug-In would be the next step for me.. But as of now I am trying
to nail down the use of 'this' in JavaScript as it's a bit different
from what I am used to.


George.

On Nov 10, 11:43 am, Olivier Percebois-Garve [EMAIL PROTECTED]
wrote:
 you may want to have a look herehttp://docs.jquery.com/Plugins/Authoring



 On Mon, Nov 10, 2008 at 5:20 PM, George [EMAIL PROTECTED] wrote:

  Being newbie in JavaScript I am trying to code my own helper object
  that does pagination.
  So here is a snippet of my code.

  MyData.prototype = {
   blablabla...
    PageUp: function() {
         this.iFrom += this.pageSize;
         this.CheckPageIndex();
     },

     CheckPageIndex: function() {
         if( this.iFrom = this.data.length )
             this.iFrom = Math.floor((this.data.length - 1)/
  this.pageSize) * this.pageSize;

         if( this.iFrom  0 )
             this.iFrom = 0;
     }

  }

  Why do I need to call CheckPageIndex using this.CheckPageIndex when
  called from PageUp? It's in the same object...

  Without 'this' I get an error 'CheckPageIndex is undefined'. Coming
  from object oriented languages like C++ I have a trouble
  understanding
  it.
  Or am I doing it wrong and there is a way not to specify 'this' to
  many times?

  Thanks
  George- Hide quoted text -

 - Show quoted text -


[jQuery] Re: form submit without page refresh

2008-11-10 Thread Sam Sherlock
you could change the example to work with another data type

if you don't have json php ext - its included in php 5.2+ (something like
that)

so either

   1. upgrade php - or use a php class for json
   2. make the json as a basic print {'myName': $myName}
   3. use another data type xml for example

perhaps its reloading because the test script has errors



here is the same example working with xml as datatype

2 files again index.html first

!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; xml:lang=en-US
lang=en-US

head

title malsup jquery form to php /title

script type=text/javascript src=
http://www.malsup.com/jquery/jquery-1.2.6.js;/script
script type=text/javascript src=
http://www.malsup.com/jquery/form/jquery.form.js;/script

script type=text/javascript
// wait for the DOM to be loaded
$(document).ready(function() {
// bind 'myForm' and provide a simple callback function


$('#myForm').submit(function(){
// submit the form
$(this).ajaxSubmit({
// dataType identifies the expected content
type of the server response
// success identifies the function to invoke
when the server response
// has been received
'success': function (data){
var msgText = $('message', data).text();
$('#msg').html(msgText);
}
});
return false;
});
});
/script

/head

body

div id=msg/div

form action=test.php id=myForm method=get
name input type= value= name=myName /
input type=submit value=say hello to yourself /
/form

/body

/html



---

test.php now
?php

// test.php

$response = Array(myName = $_GET['myName'], success = 1);

// echo json_encode($response);


?rootmessage?php
echo {$_GET['myName']};
?/message   /root

2008/11/10 bharani kumar [EMAIL PROTECTED]

 How to approach other for this problem,(With Drupal)


 2008/11/10 bharani kumar [EMAIL PROTECTED]

 I Got

 : *Fatal error*: Call to undefined function json_encode() in *C:\Program
 Files\xampp\htdocs\source\ajaxformsubmit\sample2\test.php* on line *7*


 One more thing the form is redirecting,Redirecting also similar to page
 reloading,

 I don' t want to reload the page,

 Here i attached the zip, test it,

 code working fine,





 2008/11/10 Sam Sherlock [EMAIL PROTECTED]

 working example with json

 2 files first index.html

 !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; xml:lang=en-US
 lang=en-US

 head

 title malsup jquery form to php /title

 script type=text/javascript src=
 http://www.malsup.com/jquery/jquery-1.2.6.js;/script
 script type=text/javascript src=
 http://www.malsup.com/jquery/form/jquery.form.js;/script

 script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() {
 // bind 'myForm' and provide a simple callback function


 $('#myForm').submit(function(){
 // submit the form
 $(this).ajaxSubmit({
 // dataType identifies the expected
 content type of the server response
 'dataType': 'json',
 // success identifies the function to
 invoke when the server response
 // has been received
 'success': function (data){
 msgText = 'pThank You ' +
 data.myName + '/p';
 $('#msg').html(msgText);
 }
 });
 return false;
 });
 });
 /script

 /head

 body

 div id=msg/div

 form action=test.php id=myForm method=get
 name input type= value= name=myName /
 input type=submit value=say hello to yourself /
 /form

 /body

 /html

 --

 test.php

 ?php

 // test.php

 $response = Array(myName = $_GET['myName'], success = 1);

 echo json_encode($response);


 ?

 as I say I don't know how to implement it in drupal - all the info you
 need is at that link (with that and drupal docs)


 

[jQuery] Re: JSON parser?

2008-11-10 Thread weepy

User : http://code.google.com/p/jquery-json/


On 10 Nov, 17:19, Mike Alsup [EMAIL PROTECTED] wrote:
  Is there a problem with using the eval function?

  I'm curious why you would need an alternative that would add overhead.

 Security is the main problem.  If you trust the source completely then
 eval is fine.  Parser's like Doug's json2 also let you pass in a
 replacement function so you can massage the data as it's parsed if you
 need to.


[jQuery] Re: form submit without page refresh

2008-11-10 Thread bharani kumar
I thing confusing you,

I tel what i want ?

I want to submit form without page refresh,

Is there any best link other then wha u given last,

One more thing am having some script,


But am expecting help is, i want to implement into drupal,,,



2008/11/10 Sam Sherlock [EMAIL PROTECTED]

 I think we are misunderstand each other a bit

 I asked to see you html - I saw the example and the form is not submitted
 by ajax

 I was asking if your form has an  id of myForm eg

 form id=myForm

 would also be helpful if you could post link to example does not store ip's
 after submitting


 2008/11/10 bharani kumar [EMAIL PROTECTED]

 Hi u see , in that page is loading / redirecting  know,

 But my thing is without page reloading to submit the form,


 Got my point , one more thing , am having some jquery script , which
 working fine (without page refresh to form submiting)

 But i need the help in, i want to use the jquery in Drupal,


 On Mon, Nov 10, 2008 at 7:18 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 whats the html - I saw the link and that form did not appear to have the
 event applied to the form

 perhaps this could be solved by checking that the id of the form is
 myForm.  I know nothing of drupal

 I can check back to the link since its logged my ip and now tells me I
 have already voted visit the site etc

 2008/11/10 bharani kumar [EMAIL PROTECTED]

  But , i want to implement in Drupal ,

 Am not sure the below code correct,

 In this i want to add the JQuery,

 ?php

 function custom3_block($op='list',$delta=0){

 switch($op){

 case 'list':
 $blocks[0]['info'] = t('Custom 3');
 return $blocks;

 case 'view':

 $output[] =t(Bharanikumar);
 $output[].=drupal_get_form('myForm');
 $output[] .=' script type=text/javascript
 // wait for the DOM to be loaded
 $(document).ready(function() { alert(Tets)
 $(#myForm).ajaxForm(function() {
 alert(Thank you for your comment!);
 });
 });
 /script';


 $block['content']=theme('hotelsearch_item_list',$output);


 return $block;


 }

 }




 function myForm(){

 $modpath = drupal_get_path('module','custom3');
 drupal_add_js($modpath . '/jquery-1.2.6.js','module');
 //$form['#action']=url('comment.php');

 $form['name']=array(
  '#type' = 'textfield',
  '#title' = t('name')
 );
 $form['comment'] = array(
   '#type' = 'textarea',
   '#title' = t('comment'),
   '#required' = TRUE
 );
 $form['submit'] = array(
   '#input' = TRUE,
   '#name' = 'op',
   '#type' = 'submit',
   '#submit' = TRUE,
   '#value' =t('submit')
 );
 return $form;

 }







 On Mon, Nov 10, 2008 at 6:19 PM, Sam Sherlock [EMAIL PROTECTED]wrote:

 this should be your solution

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

 2008/11/10 [EMAIL PROTECTED] 
 [EMAIL PROTECTED]


 Hi Friends

 I just want to submit the form without page refresh i want to do this
 using j query,


 Am actually working in DRUPAL ,Tell me how to implement this in
 drupal,





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





 --
 உங்கள் நண்பன்
 பரணி  குமார்

 Regards
 B.S.Bharanikumar

 POST YOUR OPINION
 http://bharanikumariyer.hyperphp.com/





-- 
உங்கள் நண்பன்
பரணி  குமார்

Regards
B.S.Bharanikumar

POST YOUR OPINION
http://bharanikumariyer.hyperphp.com/


[jQuery] Re: JSON parser?

2008-11-10 Thread Gus

Really? I thought it had because jQuery evaluates JSON internally
(e.g.: getJSON method).

On Nov 10, 2:42 pm, Mike Alsup [EMAIL PROTECTED] wrote:
  Does jQuery comes with a built-in JSON parser?
  I need a FROM JSON function as an alternative to using eval.

 No it does not.  I recommend Doug Crockford's json2.js script:

 http://www.json.org/js.html


[jQuery] Applying Body height to inner element using dimension

2008-11-10 Thread squaredeye

I've been toying with a way to add the height of the body (full height
of the web page including scroll area) to an internal wrapper.

My goal is to achieve a 100% height of an inner div.

Any ideas?

Matthew


[jQuery] jQuery getJSON syntax error

2008-11-10 Thread [EMAIL PROTECTED]

hi all,
I have a valid json string returned from the server(checks valid, ok
by jsonlint.org)  But get a syntax error from the browser.

The call looks like:  $.getJSON(url, addData);'

The returned string looks like:
[{EMAIL:[EMAIL PROTECTED],FIRSTNAME:Neal,ID:
80235,LASTNAME:Dombroski,PHONE:9258958113},
{EMAIL:[EMAIL PROTECTED],FIRSTNAME:Flaviomeral,ID:
80236,LASTNAME:UBertitidito,PHONE:4152861138},

both IE and firefox show error, firefox error console says syntax
error followed by the json string.

Can anyone suggest why the syntax error occurs for seemingly valid
string?


[jQuery] Re: Am I using 'this' too often?

2008-11-10 Thread Olivier Percebois-Garve
Well, using the pattern for plugin creation will make your life easier, and
this will make more sense.
Reading your code, it feels like you are using the structuration promoted by
another library


On Mon, Nov 10, 2008 at 6:29 PM, George [EMAIL PROTECTED] wrote:


 I had looked there probably 10 times :)
 Are you implying that I need to convert my code to being Plug-In?
 Other than that I do not see how this page
 http://docs.jquery.com/Plugins/Authoring
 answers my question...
 Sorry, but please spell it out for me.

 The Plug-In would be the next step for me.. But as of now I am trying
 to nail down the use of 'this' in JavaScript as it's a bit different
 from what I am used to.


 George.

 On Nov 10, 11:43 am, Olivier Percebois-Garve [EMAIL PROTECTED]
 wrote:
  you may want to have a look herehttp://docs.jquery.com/Plugins/Authoring
 
 
 
  On Mon, Nov 10, 2008 at 5:20 PM, George [EMAIL PROTECTED] wrote:
 
   Being newbie in JavaScript I am trying to code my own helper object
   that does pagination.
   So here is a snippet of my code.
 
   MyData.prototype = {
blablabla...
 PageUp: function() {
  this.iFrom += this.pageSize;
  this.CheckPageIndex();
  },
 
  CheckPageIndex: function() {
  if( this.iFrom = this.data.length )
  this.iFrom = Math.floor((this.data.length - 1)/
   this.pageSize) * this.pageSize;
 
  if( this.iFrom  0 )
  this.iFrom = 0;
  }
 
   }
 
   Why do I need to call CheckPageIndex using this.CheckPageIndex when
   called from PageUp? It's in the same object...
 
   Without 'this' I get an error 'CheckPageIndex is undefined'. Coming
   from object oriented languages like C++ I have a trouble
   understanding
   it.
   Or am I doing it wrong and there is a way not to specify 'this' to
   many times?
 
   Thanks
   George- Hide quoted text -
 
  - Show quoted text -


[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-10 Thread Mike Alsup

 The only code you would have to write is
 some php method to take in a parameter to give you the images data
 array for the selected value in the dropdown.

http://jquery.malsup.com/cycle/sets.html

1) Starts with an empty slideshow
2) Binds change event on select element
3) Loads slideshow data based on selected value in select element
4) Uses prev/next navigation



[jQuery] Re: OnBeforeUnload and jQuery

2008-11-10 Thread manwood

Thanks Karl. I can see the potential issues with providing a hook at
the point a user tries to leave a page. I will try your other
suggestion though. Thanks.

On 10 Nov, 01:22, Karl Rudd [EMAIL PROTECTED] wrote:
 Unfortunately you have to use the built in window.onbeforeunload method.

 Yes it does look like crap but it's the standard box and if the
 browsers allowed you to just do anything when someone tried to close a
 window it would be more of a security risk (think uncloseable
 windows).

 The only time you have to use the onbeforeunload is to handle the
 user either closing the window on using some of the other browser
 buttons (back, forward, etc).

 For everything else you can get away with tagging each link (or
 button) on the page with a handler that checks to see if it should put
 up a dialogue.

 Karl Rudd



 On Mon, Nov 10, 2008 at 10:51 AM, manwood [EMAIL PROTECTED] wrote:

  Hi All

  I am trying to warn a user about unsaved changes when they attempt to
  leave a page. I can catch and prompt using the built in OnBeforeUnload
  dialog, but it looks sh*t and has some annoying standard text that is
  of no use to me. I have tried to bind to the BeforeUnload event using
  jQuery in order to show a modal dialog, but I cannot find any way to
  get it working. Is it even possible?

  Thanks for any advice.

  :)- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Cycle plugin + position:absolute

2008-11-10 Thread Mike Alsup

 I'm trying out the malsup's cycle plugin and really like it. It seems
 to interfere with my formatting though. My demo is 
 athttp://vocabforbreakfast.railsplayground.net/jqfade/.

 How can I center the div with the images when the cycle plugin sets
 the position property to absolute?

Cycle does not set the position of the slide container to absolute.
It sets it to relative.  If you give that container a width and a
margin of auto you can get the centering you want.

.pics {
width: 600px;
margin: auto
}


[jQuery] LiveQuery

2008-11-10 Thread elev3n

Hi All,
I was wondering if someone could help me translate this code:

$('.hover_info').hide();

$('.file').hover(
function() {
$(this).find('.hover_info').slideDown(220);
},
function() {
$(this).find('.hover_info').slideUp(220);
}
);

into something that works with the livequery plugin (http://
brandonaaron.net/docs/livequery/). Both of these are called on page
load. Everything I try seems to be throwing errors. I have tried along
the line of:

$('.hover_info').livequery().hide();
$('.hover_info').livequery('load',hide());

Any tips would be greatly appreciated.

Thanks


[jQuery] Re: Attribute selector with namespace

2008-11-10 Thread Brian J. Cardiff
Thanks. I will need to apply that tiny patch.

Brian J. Cardiff
bcardiff(?)gmail.com
.


On Sun, Nov 9, 2008 at 10:02 AM, Balazs Endresz [EMAIL PROTECTED]wrote:


 There's a ticket on this issue: http://dev.jquery.com/ticket/3023

 On Nov 7, 11:48 pm, Brian J. Cardiff [EMAIL PROTECTED] wrote:
  thanks but that it isn't working in this scenario
 
  for:
  span x:foo=barLorem/span
 
  the expression:
  $('span').filter(function(){return $(this).attr(x:foo);})
  returns the span element
 
  but neither:
  $('[x:foo]')
  no:
  $('[x\\:foo]')
  find it
 
  any clue?
 
  Brian J. Cardiff
  bcardiff(?)gmail.com
  .
 
  On Fri, Nov 7, 2008 at 6:11 PM, MorningZ [EMAIL PROTECTED] wrote:
 
  http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_.
 ..
 
   On Nov 7, 2:06 pm, Brian J. Cardiff [EMAIL PROTECTED] wrote:
Is there a way to specify an AttributeFilter for attributes within a
   certain
namespace? I try some alternatives but it seems that is not
 implemented.
 
For example:
span x:foo=barLorem/span
 
I would need that something like $('[x:foo]') find the span element.
 
Thanks.
Brian J. Cardiff
bcardiff(?)gmail.com
.



[jQuery] Re: JSON parser?

2008-11-10 Thread Gus

I'm evaluating a JSON string that is stored on the client side (in a
hidden field).
I use this string just as a search filter, so I think eval is OK in
this scenario too.
But, as I've been using jQuery a lot recently, I thought I could
leverage some JSON parsing in my code.
Thanks weepy, good hint.

On Nov 10, 3:40 pm, weepy [EMAIL PROTECTED] wrote:
 User :http://code.google.com/p/jquery-json/

 On 10 Nov, 17:19, Mike Alsup [EMAIL PROTECTED] wrote:

   Is there a problem with using the eval function?

   I'm curious why you would need an alternative that would add overhead.

  Security is the main problem.  If you trust the source completely then
  eval is fine.  Parser's like Doug's json2 also let you pass in a
  replacement function so you can massage the data as it's parsed if you
  need to.


[jQuery] Re: Resizable textarea

2008-11-10 Thread [EMAIL PROTECTED]

Right you are ! I was not linking properly to ui.resizable.js. However
I do use my own local version and I think there's an issue with it
because if I link to the online one one dev.jquery.com, it works fine.

Thanks for putting me back on track.

On 10 nov, 13:27, nmiddleweek [EMAIL PROTECTED] wrote:
 Hello,

 I don't think you're ui.resizable.js is loading properly.

 See this link for your fixed 
 example:http://www.getdiverted.com/test/test3.html

 Also, it's probably better to download the ui.core.js and
 ui.resizable.js and put them into your own fodlers on your website,
 rather than linking to the jquery.com site...

 I think google host jQuery code if you don't want to. Search for the
 archives for more info on that one.

 Hope that helps...

 Cheers,
 N

 On Nov 10, 11:13 am, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  Hello,

  I can't get the jQuery UI resizable function, in any browsers.

  Here's my code :

   link rel=stylesheet href=http://dev.jquery.com/view/tags/ui/
  latest/themes/flora/flora.all.css type=text/css media=screen
  title=Flora (Default)

  script src=http://code.jquery.com/jquery-latest.js;/script
  script type=text/javascript src=http://dev.jquery.com/view/tags/ui/
  latest/ui/ui.core.js/script
  script type=text/javascript src=scripts/jquery/ui.resizable.js/
  script

  script
    $(document).ready(function() {

      $(#txtArea).resizable({
        handles: all
      });

    });
  /script

  textarea  id=txtArea  test/textarea

  I can't see what I'm missing. In the debugger the ready function is
  hit but the textarea is not converted to a resizable element.

  Can someone help ?


[jQuery] Re: Am I using 'this' too often?

2008-11-10 Thread Balazs Endresz

The plugin authoring page won't help you much building a class in
javascript.
If you want to use the this keyword less you can use private
variables:
http://javascript.crockford.com/private.html
and there are some more great sources here: http://www.crockford.com/javascript/

But transforming a complex generic js class to a jQuery plugin is
another story as a plugin should generally return a jQuery object.
Some patterns regarding this issue came up here:
http://groups.google.com/group/jquery-en/browse_thread/thread/9dc9be1cc298cbdd

After reading the article on private variables it should be clear, but
briefly the the problem is that if you don't use the this keyword then
CheckPageIndex will be a reference to a variable in the closure
(function) you use it, or if it doesn't exist there then it will be a
global variable. And this way you don't have any closure that could
remember the variable. So you need to define things in a closure
(function).
Anyway, it's much better explained in the article :)

On Nov 10, 6:29 pm, George [EMAIL PROTECTED] wrote:
 I had looked there probably 10 times :)
 Are you implying that I need to convert my code to being Plug-In?
 Other than that I do not see how this 
 pagehttp://docs.jquery.com/Plugins/Authoring
 answers my question...
 Sorry, but please spell it out for me.

 The Plug-In would be the next step for me.. But as of now I am trying
 to nail down the use of 'this' in JavaScript as it's a bit different
 from what I am used to.

 George.

 On Nov 10, 11:43 am, Olivier Percebois-Garve [EMAIL PROTECTED]
 wrote:

  you may want to have a look herehttp://docs.jquery.com/Plugins/Authoring

  On Mon, Nov 10, 2008 at 5:20 PM, George [EMAIL PROTECTED] wrote:

   Being newbie in JavaScript I am trying to code my own helper object
   that does pagination.
   So here is a snippet of my code.

   MyData.prototype = {
    blablabla...
     PageUp: function() {
          this.iFrom += this.pageSize;
          this.CheckPageIndex();
      },

      CheckPageIndex: function() {
          if( this.iFrom = this.data.length )
              this.iFrom = Math.floor((this.data.length - 1)/
   this.pageSize) * this.pageSize;

          if( this.iFrom  0 )
              this.iFrom = 0;
      }

   }

   Why do I need to call CheckPageIndex using this.CheckPageIndex when
   called from PageUp? It's in the same object...

   Without 'this' I get an error 'CheckPageIndex is undefined'. Coming
   from object oriented languages like C++ I have a trouble
   understanding
   it.
   Or am I doing it wrong and there is a way not to specify 'this' to
   many times?

   Thanks
   George- Hide quoted text -

  - Show quoted text -


[jQuery] Re: Keeping track of the current clicked link

2008-11-10 Thread Paul Mills

Hi,
I'm not sure why you are trying to override the click event - because
when you click on a menu item I'd expect a new page to load?

If you want to stop the new page loading, then you need to cancel the
default event for the a tag by adding return false,
$(document).ready(function() {
$(#menu a).click(function() {

$(this).parents(li).addClass(active);
return false;
});
});

I think what you want to do is to identify the menu item for the
current page when the page loads and add the 'active' class to it. Can
you post some sample html code.

Paul

On Nov 10, 8:45 am, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hi, these are my first attempts with jQuery and I would be glad if
 somebody could help me.

 My Problem: I'm using the ASP.net MVC framework and wanted to keep
 track of the current clicked menu link. The menu links are in the
 master page and so is the jscript.

 What I tried to do is to attach some code to the click event of my
 links (in  a marked list) and attach a selected class to the current
 clicked link:
 sample code 1

 i started with this little jquery script:
     $(document).ready(function() {
         $(#menu a).click(function() {

             $(this).parents(li).addClass(active);
         });
     });
 end sample code 1

 but soon found out that because the click function reloads the page it
 does apply the css right after the click but looses the class info
 after  the (other content's ) page recreation.

 I played around with storing the var outside the call but it always
 led to the result that all info is lost because I actually navigate to
 a new page.

 Finally I tried the approach below, where I use the ready function for
 the click event so that the page actually is done with the navigation
 but again I'll loose the context of the this function - although it
 should keep it when I read the documentation of chaining jQuery I
 already tried to return the element with this line return $
 (this).parents.(li) inside of the click function but that does not
 work either. Can somebody help me please? Or is it not possible
 because of the actual navigation?

 sample code 2

 $(document).ready(function() {
     $(#menu a).click(function() {

         }).ready(function() {

             $(this).parents(li).addClass(active);
             });
     });

 end sample code 2


[jQuery] Re: Am I using 'this' too often?

2008-11-10 Thread George

I see your point...
I had discovered recently the lack of JavaScript knowledge. And since
I mostly doing web development I realized that I am missing out a lot.

Unfortunately the object oriented approach JavaScript using is
different from  other object oriented languages I know (C++, C#, Java)
So I am trying to get up to speed with JavaScript and making up my own
problems/tasks. Like I am learning how 'this' works with JavaScript...

So the code I wrote is not promoted by another library :) It's
promoted by my background in C++ and C# mostly :)
So I chose JQuery as a library to use but before I can freely start
using it I want to understand how things work.
Cause as of right now if you tell me to write JQuery from scratch I
will not be ably even to start :)
And even having full source available does not help much since I often
do not understand what is going on




Thanks
George.



On Nov 10, 12:50 pm, Olivier Percebois-Garve [EMAIL PROTECTED]
wrote:
 Well, using the pattern for plugin creation will make your life easier, and
 this will make more sense.
 Reading your code, it feels like you are using the structuration promoted by
 another library



 On Mon, Nov 10, 2008 at 6:29 PM, George [EMAIL PROTECTED] wrote:

  I had looked there probably 10 times :)
  Are you implying that I need to convert my code to being Plug-In?
  Other than that I do not see how this page
 http://docs.jquery.com/Plugins/Authoring
  answers my question...
  Sorry, but please spell it out for me.

  The Plug-In would be the next step for me.. But as of now I am trying
  to nail down the use of 'this' in JavaScript as it's a bit different
  from what I am used to.

  George.

  On Nov 10, 11:43 am, Olivier Percebois-Garve [EMAIL PROTECTED]
  wrote:
   you may want to have a look herehttp://docs.jquery.com/Plugins/Authoring

   On Mon, Nov 10, 2008 at 5:20 PM, George [EMAIL PROTECTED] wrote:

Being newbie in JavaScript I am trying to code my own helper object
that does pagination.
So here is a snippet of my code.

MyData.prototype = {
 blablabla...
  PageUp: function() {
       this.iFrom += this.pageSize;
       this.CheckPageIndex();
   },

   CheckPageIndex: function() {
       if( this.iFrom = this.data.length )
           this.iFrom = Math.floor((this.data.length - 1)/
this.pageSize) * this.pageSize;

       if( this.iFrom  0 )
           this.iFrom = 0;
   }

}

Why do I need to call CheckPageIndex using this.CheckPageIndex when
called from PageUp? It's in the same object...

Without 'this' I get an error 'CheckPageIndex is undefined'. Coming
from object oriented languages like C++ I have a trouble
understanding
it.
Or am I doing it wrong and there is a way not to specify 'this' to
many times?

Thanks
George- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Jquery Cycle Plugin Problem

2008-11-10 Thread Jorge

On 7 nov, 19:00, Mike Alsup [EMAIL PROTECTED] wrote:
  There is a problem with pc memmory when the plugin is working ( Tested
  in a few pcs). At Least you need a 2 core duo for a not problem
  experiencie, but try in a pentium  4 with 1gb of ram... and you will
  Khnow.
  Open the task administrator and test de memmory.

 It's not clear to me whether you think you're seeing a memory leak or
 too much CPU usage.  Can you clarify?

 I'm not seeing a leak.  I've had the main doc page (http://malsup.com/
 jquery/cycle/) open for 15 minutes in IE7 and my memory use is not
 increasing, even with 6 slideshows running.

 CPU usage will certainly spike when the transitions are active -
 there's no way to avoid that; that's just the nature of doing
 animation in JavaScript.  But you can mitigate the problem by using
 faster transitions (lower 'speed' value) and longer timeouts (larger
 'timeout' value).

 Mike

Thanks for the post Mike.

Here is a screen print to explain it:

http//servidorweb.ecomputer.es/JqueryCycle.jpg

In a 2 core duo, the cpu ups to 44% and my memory use is not
increasing too.In this case no problem.

But if you could test in a pentium, the cpu ups to 90-100% and the
memory will increase until the pc will block. I had tested in 2
different pc ( more than 15 minutes but it´s a problem if you have the
window open).

The code:

$(document).ready(function(){
$('#s3').cycle({
fx:'zoom',
speed:  3000 ,
 pause:  3 ,
random:  1
 });
});



[jQuery] form submit without page refresh

2008-11-10 Thread [EMAIL PROTECTED]

Hi Friends

I just want to submit the form without page refresh i want to do this
using j query,


Am actually working in DRUPAL ,Tell me how to implement this in
drupal,


[jQuery] Recursion Issues with jQuery

2008-11-10 Thread jockey_jockey

Hello,

I am not sure if my previous post was really posted.I couldn't see it
here even after about an half an hour since I posted.

I am trying to get a feature accomplished and Recursion seems to me
like the most obvious solution. I have written some functions designed
for the same. These functions call each other and themselves at
depending on the situation. Here are they:

Search.method (
'process_search_node',
function (context, string, status) {

var me=this;

alert('preocess_search_node called!');

var lstring = string;
if(status != 'break') {
   /* Process Child */
   /* Child does not exist */
   if(!me.process_child_for_search_node(context, string)) {

   lstring += ' ( Q )';
   me.process_sibling_for_search_node(context, lstring);
   }
   /* Child Exists */
   else {

   lstring += ' (';
   me.process_search_node(context, lstring, '');
   }
   }
   else {
   alert(lstring); /*** I need all the calls to
stop the first time it reaches here and return the value of lstring to
the test variable (See below where the function
'process_search_node' is triggered) ***/
   return false;
   }
}
);

Search.method (
'process_child_for_search_node',
function (context, string) {

var me=this;

alert('process_child_for_search_node called!');

/* If it has an immediate Child Search Panel */
var immediate_child = context.children(':nth-
child(2)').children(':nth-child(1)').children(':nth-child(1)');
if(immediate_child.hasClass('query_stage_wrapper')) {

var lstring = string + ' (';
me.process_search_node(immediate_child, lstring, '');
}
else
return false;
}
);

Search.method (
'process_sibling_for_search_node',
function (context, string) {

var me=this;

alert('process_sibling_for_search_node called!');

/* If it has a Sibling Search Panel */
var sibling = context.next(':first');
if(sibling.hasClass('query_stage_wrapper')) {

   var lstring = string;
   me.process_search_node(sibling, lstring, '');
   }
   else {

   if(me.get_parent_search_panel(context)) {

   var lstring = string + ' )';

me.process_sibling_for_search_node(me.get_parent_search_panel(context),
lstring);
   }
   else {

   var lstring = string;
   if(!me.process_search_node(context, lstring,
'break'));
   alert('returned false');
   }
   }
   }
);


The call the triggers the above set of functions is:

var test = me.process_search_node($('div.query_stage_wrapper:first'),
string, '');

I would be very grateful to you if you could point me out the place
where I am going wrong.

Thanks for reading my post.


[jQuery] Re: how to load data into a text area?

2008-11-10 Thread nmiddleweek

Thanks Mike,

it's easy when you know how! :-)



On Nov 10, 12:43 am, Mike Alsup [EMAIL PROTECTED] wrote:
  Is it possible to use .load and populate the contents of a TEXT AREA
  or do I have to .load into a hidden DIV and then extract the text from
  the DIV into the TEXT AREA ?

  I'm currently doing this but it's not working...

  $('#libNotePadTextArea').load('/4dcgi/test/test1.4dp');

 Try this instead:

 $.get('/4dcgi/test/test1.4dp', function(data) {
     $('#libNotePadTextArea').val(data);

 });


[jQuery] Re: Jquery Cycle Plugin Problem

2008-11-10 Thread Mike Alsup

 But if you could test in a pentium, the cpu ups to 90-100% and the
 memory will increase until the pc will block. I had tested in 2
 different pc ( more than 15 minutes but it´s a problem if you have the
 window open).

Yes, as I mentioned, JavaScript animation is very CPU intensive.  If
you're concerned about this, use a faster speed value so that your CPU
is not getting crushed for 3 seconds.  The way your code is now it
will animate for 3 seconds every 4 seconds.  That is a very bad idea.
Try using a more reasonable configuration, like speed: 500.

Mike



[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-10 Thread OutOfTouch

On Nov 10, 11:50 am, Mike Alsup [EMAIL PROTECTED] wrote:
  The only code you would have to write is
  some php method to take in a parameter to give you the images data
  array for the selected value in the dropdown.

 http://jquery.malsup.com/cycle/sets.html

 1) Starts with an empty slideshow
 2) Binds change event on select element
 3) Loads slideshow data based on selected value in select element
 4) Uses prev/next navigation

To make a long story short I found the problem but I don't know why it
is a problem, if you look at the javascript I posted in the cycle
method I set the startingslide to 0 when I remove that the problem is
gone.


[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-10 Thread OutOfTouch

On Nov 10, 12:52 pm, OutOfTouch [EMAIL PROTECTED] wrote:
 On Nov 10, 11:50 am, Mike Alsup [EMAIL PROTECTED] wrote:

   The only code you would have to write is
   some php method to take in a parameter to give you the images data
   array for the selected value in the dropdown.

 http://jquery.malsup.com/cycle/sets.html

  1) Starts with an empty slideshow
  2) Binds change event on select element
  3) Loads slideshow data based on selected value in select element
  4) Uses prev/next navigation

 To make a long story short I found the problem but I don't know why it
 is a problem, if you look at the javascript I posted in the cycle
 method I set the startingslide to 0 when I remove that the problem is
 gone.

It is eithier that or the onafter that is causing a problem, sorry I
had them both removed and the problem went away, dang I need to have
the onafter.


[jQuery] Nested carousels

2008-11-10 Thread Ioan Orzetic

I tried to implement nested carousels with jCarousel and I'm not sure
that's possible (it doesn't work for me). Has anyone tried this
before ?

The problem is that for some reason the top carousel doesn't scroll
correctly. It scrolls the first 2 items great but from the third on..
it looks like it scrolls with the width of the elements in the bottom
carousel.

?


[jQuery] Re: How to load only one image at a time using JQuery Cycle Plugin?

2008-11-10 Thread OutOfTouch

It is definately the onAfter that FF doesn't like in this scenario.



[jQuery] text link to fire Jeditable

2008-11-10 Thread RyOnLife

Hello, I am using Jeditable. Currently firing the plugin when the
editable div is double clicked. I'd also like to add a text link
outside of the editable div, and when clicked, it would make the div
editable. Just want to give my users a visual cue for those that
aren't yet aware of the ability to double click. Can someone let me
know how to do this? Thanks!


[jQuery] AJAX Callbacks - How to show Ajax request status using a loading image?

2008-11-10 Thread Shannon

Hi everyone,

I am a newbie in jquery and have been stuck on this all morning. I am
using the following function to perform an AJAX request which loads in
the specified DIV:

function showUser(str)
{
  $('#content1').load(select.php?q=+str);
}

This works fine but I tried to add a loading gif (you know those nice
circles) and I got it kind of working. The gif would show up and go
away when the content was loaded but I had two problems. The image
would show up on first load and just sit there until the user clicked
a link for the AJAX request and the second error was the image would
appear above the paragraph and not make the content go away until the
new request was completed.

Can someone show a simple call to include the loading image so it's
only displayed while the content is being fetched?

I tried this with no success:

$().ajaxSend(function(r,s){
$(#content1).load(Loading data, please wait...);
   });

Thanks.


[jQuery] scrolling menu items...

2008-11-10 Thread PaulC

Hello,

I've got this working but its hard coded.

the menu on right hand side of this site: http://sugarsnap.previewurl.net
needs to scroll through each item as the user clicks the arrows.

This is working but only because I've put fixed heights to scroll -
shich is buggy cross browser.

the code:

$('a.down').click(function(event) {
  $('#folioMenu').scrollTo('+=90px', 800);
  return false;
});

I want to use next and prev but it didnt work:

$('#folioMenu').scrollTo($(.menuItem).next(), 800);

I've tried several variations but no luck.

any thoughts as to how this could be achieved?


[jQuery] Re: AJAX Callbacks - How to show Ajax request status using a loading image?

2008-11-10 Thread Isaak Malik
Hey there,

You're using it partially in the wrong way.

1st:

function showUser(str)
{
 $('#content1').load(select.php?q=+str);
}

No syntax mistake in the code above!

But the bad part is this:

$().ajaxSend(function(r,s){
   $(#content1).load(Loading data, please wait...);
  });

Which will work if you change it into this:

$('#content1').ajaxSend(function(e,r,s)
{
   $(this).html('Loading data, please wait...');
}

This will insert the Loading data, please wait... inside the tag
withid='content1' before
an AJAX request is sent.

-- 
Isaak Malik
Web Developer


[jQuery] Can't use selectors in reference to a named object?

2008-11-10 Thread Pete

The following doesn't work as expected and I don't understand why--can
someone explain, please?

$('form').each( function() {
var thisForm = $(this);
alert(thisForm.attr('id') + ' [' + $('thisForm
 :input.required').length + '/' + $('thisForm  *').length + ']');
)};

That I'm expecting the above to do is alert whenever a form is found
in the page, stating that form's ID value and how many of it's total
inputs are classed as 'required'.  But all I get is e.g. login [0/0]
and I don't understand why.

Can jQuery not use my thisForm object in this way?  If not, how can I
store a reference and then call selections based on that object?

Thanks in advance.  I've been using jQuery for a little while now and
find it hugely useful, but stuff like this still utterly confuses me.


[jQuery] Re: AJAX Callbacks - How to show Ajax request status using a loading image?

2008-11-10 Thread Shannon

Hello Isaak,

Thank you for your kind reply.

I tried this code:

function showUser(str)
{
  $('#content1').load(select.php?q=+str);
  $('#content1').ajaxSend(function(e,r,s)
  {
   $(this).html('Loading data, please wait...');
  }
}

but it caused the AJAX request to stop working. When I remove the $
('#content1').ajaxSend(function(e,r,s) function it works again.
Neither way shows the Loading Data message.

Again, thank you for your time and help.

On Nov 10, 11:39 am, Isaak Malik [EMAIL PROTECTED] wrote:
 Hey there,

 You're using it partially in the wrong way.

 1st:

 function showUser(str)
 {
  $('#content1').load(select.php?q=+str);

 }

 No syntax mistake in the code above!

 But the bad part is this:

 $().ajaxSend(function(r,s){
        $(#content1).load(Loading data, please wait...);
   });

 Which will work if you change it into this:

 $('#content1').ajaxSend(function(e,r,s)
 {
    $(this).html('Loading data, please wait...');

 }

 This will insert the Loading data, please wait... inside the tag
 withid='content1' before
 an AJAX request is sent.

 --
 Isaak Malik
 Web Developer


[jQuery] [validate] group Options question

2008-11-10 Thread christine . panus

I'm trying to apply group options to four fields that need to be treated as if they are one single piece of data.  All the samples seem to show using className to apply the validation, but I'm setting up my validation rules in the validation call which does not appear to be the recommended method.  Is that why I cannot get the group option to work?  It appears as if you have to use the class attribute for grouping to work.  I don't want to setup my rules using the class because I want to put classes in the class attribute.  Are there any examples of the four types of rule implementations?  I see that classes and attributes are the recommended way, but what do those methods look like?http://docs.jquery.com/Plugins/Validation/rules


 Original Message 
Subject: [jQuery] Re: [validate] Repeated error tags
From: "Jörn_Zaefferer" [EMAIL PROTECTED]>
Date: Mon, November 10, 2008 9:58 am
To: jquery-en@googlegroups.com

Does the input have a name-attribute? Did you customize the message display?

A testpage would help.

Jörn

On Mon, Nov 10, 2008 at 3:26 PM, La_PaRCa [EMAIL PROTECTED]> wrote:
>
> I have the following problem:
>
> If I try to submit a for multiple times, and the same field is
> invalid, each time I will get a new error tag and the old one doesnt
> clear. So after a while I will have multiple error tags with the same
> message for a given field.
>
> Any ideas how I could fix this or what could be causing it?
>





  1   2   >