[jquery-ui] Submit prevented form

2010-01-13 Thread Cyril Lopez
Hi,

In a form, there are 2 inputs (type = submit). I prevented the submit in
order to use a dialog.
For example, on the input 1 click event :

$('#mySubmit1').click(
function (e) {
  e.preventDefault();  // prevent the submit action
  [...]
  $dialog.dialog(
{
  [...]
  buttons: {
'Ok': function() { $(this).dialog('close');
$('#mySubmit1').closest('form').submit() },
'Cancel': function() { $(this).dialog('destroy'); }
  }
}
  );
}
  );

If I click submit input 1, I'd like dialog submits my form with input 1.
If I click submit input 2, I'd like dialog submits my form with input 2
(input 1 must not be posted)

In my example code, no one input (type = submit) is posted.
Is there a way to post the value of the clicked submit input ?
Many thanks.

Cyril
-- 

You received this message because you are subscribed to the Google Groups "jQuery UI" group.

To post to this group, send email to jquery...@googlegroups.com.

To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.



Re: [jquery-ui] Submit prevented form

2010-01-13 Thread Cyril Lopez
2010/1/13 Balázs Suhajda suhaj...@gmail.com

 I would suggest using a hidden input or 2.
 Using jquery you can easily set them to be disabled and then they will
 not submit.


Thanks for the tip Balázs !

Cyril




 input name=somename type=hidden value=somevalue/
 then you could use
 $('[name=somename]').attr('disabled','') to enable
 $('[name=somename]').attr('disabled','disabled') to disable

 When you call submit() on a form, there is no submit button being
 clicked, so it doesn't send submit button values.

 On Wed, Jan 13, 2010 at 3:11 PM, Cyril Lopez loveisthe...@gmail.com
 wrote:
  Hi,
 
  In a form, there are 2 inputs (type = submit). I prevented the submit in
  order to use a dialog.
  For example, on the input 1 click event :
 
  $('#mySubmit1').click(
  function (e) {
e.preventDefault();  // prevent the submit action
[...]
$dialog.dialog(
  {
[...]
buttons: {
  'Ok': function() { $(this).dialog('close');
  $('#mySubmit1').closest('form').submit() },
  'Cancel': function() { $(this).dialog('destroy'); }
}
  }
);
  }
);
 
  If I click submit input 1, I'd like dialog submits my form with input 1.
  If I click submit input 2, I'd like dialog submits my form with input 2
  (input 1 must not be posted)
 
  In my example code, no one input (type = submit) is posted.
  Is there a way to post the value of the clicked submit input ?
  Many thanks.
 
  Cyril
 
 
  --
  You received this message because you are subscribed to the Google Groups
  jQuery UI group.
  To post to this group, send email to jquery...@googlegroups.com.
  To unsubscribe from this group, send email to
  jquery-ui+unsubscr...@googlegroups.comjquery-ui%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
  http://groups.google.com/group/jquery-ui?hl=en.
 
 



 --
 Best regards,
 Balázs Suhajda

 --
 You received this message because you are subscribed to the Google Groups
 jQuery UI group.
 To post to this group, send email to jquery...@googlegroups.com.
 To unsubscribe from this group, send email to
 jquery-ui+unsubscr...@googlegroups.comjquery-ui%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/jquery-ui?hl=en.




-- 

You received this message because you are subscribed to the Google Groups "jQuery UI" group.

To post to this group, send email to jquery...@googlegroups.com.

To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.



Re: [jquery-ui] Re: Sortable bug in IE? Any solution

2009-10-30 Thread Cyril Lopez
2009/10/29 Titkov Anton elsoft.to...@gmail.com

 I'm think tah bug connect with that bug
 http://dev.jqueryui.com/ticket/4333


Exactly !
There are few patches on that page. Haven't tested.
Milestone : 1.8...

--

You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.




[jquery-ui] Sortable - Nested lists problem

2009-10-28 Thread Cyril Lopez
Hi,
I'm using sortable() function in order to arrange nested lists.

My html :

ul id=parent_0 class=parents
  li id=child_1Item 1
ul id=parent_1 class=parents
  li id=child_2Item 2/li
/ul
  /li
  li id=child_3Item 3
ul id=parent_2 class=parents
  li id=child_4Item 4/li
/ul
  /li
/ul

My js :

$('.parents').sortable(
  {
items: 'li',
handle: 'span.anchor',
connectWith: '.parents',
dropOnEmpty:true,
helper:'clone',
placeholder: 'holder',
delay:0,
opacity: 0.4,
forcePlaceholderSize:true,
update: function(event, ui) {
  $.post('myUrl.html',$(this).
sortable('serialize',{ key: 'positions[]' }));
}
  }
);

- When I drag child_4 to parent_0 I have 2 serialized posts, great.
- When I drag child_2 to parent_2 I have 3 serialized post, the root ul, and
the two others ul which receives or removes elements.
- The problem : when I drag child_1 to parent_2 (as child_4 sibling) I have
only 1 serialized post, the root ul. But I want parent_2 serialization too !

After hours on Google search I found several plugins like :
- http://www.b-hind.eu/jquery/index.php
- http://code.google.com/p/nestedsortables/wiki/NestedSortableDocumentation
- http://code.google.com/p/nestedsortables/

Does it means my need is impossible with UI sortable/serialize functions ?

Thanks for any help

--
Cyril, Nethik

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



Re: [jquery-ui] Re: Sortable bug in IE? Any solution

2009-10-28 Thread Cyril Lopez
2009/10/20 Tobias Herrmann t.herrm...@alkacon.com


 Hi,

 in your example a sub element is also part of a parent. So in IE sorting
 a sub element also causes the parent to be sorted. You can avoid this
 problem by defining a handle at least on the parent list. You may put
 text and link of the parent li into a span and use the option 'handle':
 ' span'.

 Greetings, T


Thanks for your response Tobias.
Maybe it works with ulli but not for me.

My html :
div
  div
span class=movToolMove Img/span
img src=My img/
  /div
  span class=movToolMove container/span
/div

My handle is '.movTool' and the drag action messes up in IE.
Thanks for any help

--
Cyril, Nethik




 Cyril Lopez schrieb:
  2009/10/19 Blunk djbl...@gmail.com mailto:djbl...@gmail.com
 
 
  Hi everyone, im need some help here with IE compatibility.
  I have a small script that uses sortable jquery ui to sort two
  different UL.
  It works perfectly on Firefox/Safari/Chrome but on IE when you move a
  sub li the animation messes up.
  If anyone could take a look at it and tell me if there is any
  solution.
 
  The demo is here: http://blunk.com.ar/dev/sort/
  Add a Parent with the link, then two or more Subs and try to sort
  those.
 
  Thanks
 
 
  I was about to post this issue. I have exactly the same problem on IE
  7/8 (6?).
  If anyone knows how to fix it...
 
  Cyril, Nethik
 
 
  

 --~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups
 jQuery UI group.
 To post to this group, send email to jquery-ui@googlegroups.com
 To unsubscribe from this group, send email to
 jquery-ui+unsubscr...@googlegroups.comjquery-ui%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/jquery-ui?hl=en
 -~--~~~~--~~--~--~---



--

You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en.




[jquery-ui] Re: Sortable bug in IE? Any solution

2009-10-19 Thread Cyril Lopez
2009/10/19 Blunk djbl...@gmail.com


 Hi everyone, im need some help here with IE compatibility.
 I have a small script that uses sortable jquery ui to sort two
 different UL.
 It works perfectly on Firefox/Safari/Chrome but on IE when you move a
 sub li the animation messes up.
 If anyone could take a look at it and tell me if there is any
 solution.

 The demo is here: http://blunk.com.ar/dev/sort/
 Add a Parent with the link, then two or more Subs and try to sort
 those.

 Thanks


I was about to post this issue. I have exactly the same problem on IE 7/8
(6?).
If anyone knows how to fix it...

Cyril, Nethik

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



[jquery-ui] Re: sortable serialize

2009-10-19 Thread Cyril Lopez
2009/10/18 wings david.mira...@gmail.com


 take a look at this:
 http://stackoverflow.com/questions/187073/jquery-sortables

 On Oct 8, 1:55 pm, Bert b...@oostdesign.nl wrote:
  jQuery(.sortable).sortable({ connectWith: .sortable }):
 
  Next I want to have some array (in php) like this:
 
  array(
  'block_1' = array(
   0 = 1,
   1 = 2,
   2 = 3
  ),
  'block_2' = array(
   0 = 4
  ),
  'block_3' = array(
   0 = 5,
   1 = 6
  )
  )
 


Try :

$('.sortable').sortable(
  {
[...]
update: function(event, ui) {
  $.post('/url.html',$(this).sortable('serialize'),
function(data){
  [...]
});
}
  }
);

Cyril, Nethik

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



[jquery-ui] Re: onChangeMonthYear and inline datepicker

2009-08-19 Thread Cyril
2009/8/18 Jörn Zaefferer joern.zaeffe...@googlemail.com


 As a workaround, you could set that option after init:

 $('#options #date').datepicker({
   minDate: 0,
   maxDate: +2Y,
   regional: $('html').attr('lang'),
   changeMonth: true,
   changeYear: true,
   showOtherMonths: true,
   hideIfNoPrevNext: true,
   dateFormat: 'yy-mm-dd',
   defaultDate: new Date($('ul.events li:first span.date').attr
 ('title')),
   beforeShowDay: highlightEventDates,
   onSelect: showEventsOnDate
 }).datepicker(option, { onChangeMonthYear: showEventsFromMonth });



Hello,
Why your regional option isn't in the doc (
http://jqueryui.com/demos/datepicker/) ?
Thanks.


-- 
Lopez Cyril - Nethik

http://www.nethik.fr
http://www.blogalwarming.com
http://www.libratoi.net

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



[jquery-ui] Re: onChangeMonthYear and inline datepicker

2009-08-19 Thread Cyril Lopez
2009/8/19 Richard D. Worth rdwo...@gmail.com


 On Wed, Aug 19, 2009 at 5:29 AM, Cyril loveisthe...@gmail.com wrote:

 2009/8/18 Jörn Zaefferer joern.zaeffe...@googlemail.com


 As a workaround, you could set that option after init:

 $('#options #date').datepicker({
   minDate: 0,
   maxDate: +2Y,
   regional: $('html').attr('lang'),
   changeMonth: true,
   changeYear: true,
   showOtherMonths: true,
   hideIfNoPrevNext: true,
   dateFormat: 'yy-mm-dd',
   defaultDate: new Date($('ul.events li:first span.date').attr
 ('title')),
   beforeShowDay: highlightEventDates,
   onSelect: showEventsOnDate
 }).datepicker(option, { onChangeMonthYear: showEventsFromMonth });



 Hello,
 Why your regional option isn't in the doc (
 http://jqueryui.com/demos/datepicker/) ?


 It looks like we have a demo that shows it

 http://jqueryui.com/demos/datepicker/#localization

 but it's not documented otherwise. Thanks for pointing this out. Ticket
 created:

 http://dev.jqueryui.com/ticket/4790

 - Richard


Thanks for your response Richard.


-- 
Lopez Cyril - Nethik

http://www.nethik.fr
http://www.blogalwarming.com
http://www.libratoi.net

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



[jquery-ui] Append Result to a p

2009-02-11 Thread Cyril

Hi

I'm having problems appending my results to a paragraph without
refreshing ...
I've done a simple ajax test on my own form but calling google.ca to
do a search . I want to output the result within a DIV on the current
page without refreshing the page. For some reason, it is displaying
the whole result in a new page instead.

Can anyone tell me what I am doing wrong here?

Thanks





!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
html xmlns=http://www.w3.org/1999/xhtml;
head
meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1 /
script language=JavaScript type=text/javascript src=../links/
jquery.js/script
link rel=stylesheet type=text/css href=mycss.css


script language=javascript

$(document).ready(function(){
 $('#submit').click(function(){
$('#container').append('img src=loading-balls.gif
alt=loading ... id=loadingImg/');
var q = $('#q').val();
$.ajax({
url: 'http://www.google.ca/search',
type: GET',
data: 'q=' + q,

success: function(result) {
//console.log(result);
$('#response').remove();
$('#container').append('p id=response' + result + 
'/p');
$('#loadingImg').fadeOut(500);
}
});
return false;

});


});
/script
/head
body

form id=form1 name=form1 method=GET action=http://
www.google.ca/search


  pSearch Criteria
input name=q type=text id=q /
/p
  pSubmit
input type=submit name=Submit value=Submit id=submit /
  /p
  div id=container/div
/form
/body
/html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---



[jquery-ui] Re: jQuery UI download .zip invalid?

2009-01-30 Thread Cyril


I didnt see my post.. so replying again...
I am getting the same error about unexpected end of archive in
winrar , in winzip it does not work either.
I am using  http://ui.jquery.com/download to download.


Thanks


On Jan 30, 9:17 am, Richard D. Worth rdwo...@gmail.com wrote:
 Just to be sure, what url are you at for the download?

 - Richard



 On Fri, Jan 30, 2009 at 9:14 AM, ChrisP idevt...@gmail.com wrote:

  Nope. Still not working.

  I select v1.5.3 and UI Core, Dialog, Resizable, and Draggable.
  Estimated size is 56.34K. When I click d/l it streams the file down to
  the standard Win dialog box in my browser. Interestingly, the file
  size is 35.9K If I either Open or Save the file I get the WinZip
  message Can not open file because it does not appear to be a valid
  archive I have tried multiple combinations of the components
  including All and get the same behavior. I tried deleting all temp
  files etc. just in case as well.

  WinXP w/ latest updates
  IE7

  I have d/l earlier versions successfully. I saw another post where
  someone had the same problem, but then it worked??

  Chris

  On Jan 30, 5:40 am, Paul Bakaus paul.bak...@googlemail.com wrote:
   Works fine for me, even using the native unzip function of Windows XP.
  Could
   you try again, and
   if it's still not working, giving us more information about the download
  and
   your system?

   Thanks,
   Paul

   On Fri, Jan 30, 2009 at 3:53 AM, ChrisP idevt...@gmail.com wrote:

After d/l the jQuery UI .zip file. WinZip says it is an invalid .zip
file? I tried several times and combinations of components. Thoughts?

   --
   Paul Bakaus
   UI Architect
   --http://paulbakaus.comhttp://www.linkedin.com/in/paulbakaus- Hide quoted 
   text -

 - Show quoted text -

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
jQuery UI group.
To post to this group, send email to jquery-ui@googlegroups.com
To unsubscribe from this group, send email to 
jquery-ui+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~--~~~~--~~--~--~---