[jQuery] Re: Slidedown menu works in FF and IE but not Chrome, Safari & Opera

2009-08-12 Thread Abi Fadeyi

any solutions for this?

On Jul 28, 2:27 pm, healthyaddiction 
wrote:
> I created a drop down menu (i think i followed a tutorial but it was
> so long ago i can't remember) which works 100% perfectly in firefox
> and internet explorer but not opera, safari andchrome.  I really want
> to get it working in all of them though.  Perhaps you might know what
> the problem will be.
>
> The Jquery Code:
>
>         var $j= jQuery.noConflict();
>
>         $j(document).ready(function(){
>
>         $j(".message_body").hide();
>         //togglemessage_body
>         $j(".message_head").click(function(){
>                 $j(this).next(".message_body").slideToggle(500)
>                 return false;
>         });
>
>         });
>
> The Code for the dropdown menu:
>
> 
>         
>         Prices
>         
>             Our prices are freakin' awesome!
>         
>     
>     
>         Testimonials
>         
>             I love them, they're brilliant!
>             - Business
>         
>     
>     
>         Get a Quote
>         
>             
>             
>                 Name:
>                 
>                 Email:
>                 
>                 Details:
>                 
>                 
>             
>             
>         
>     
> 
>
> Hope you can help!


[jQuery] my jquery form plugin not works

2009-08-12 Thread sunny

this is the code


Edit Organization Department Category

// wait for the DOM to be loaded
$(document).ready(function() {
// bind 'myForm' and provide a simple callback function
$('#orgdepartmentcategory').ajaxForm(function() {
//var pidval;
//pidval = document.getElementById
('hr_tbl_marriages_hr_tbl_particulars_id').value;
alert("Organization Department Category Updated!");
   // $('#lists_id').load('lists/id/'+pidval).fadeIn
("slow");
   // document.getElementById
('orgdepartmentcategory').reset();
});
});

 $form)) ?>
isMultipart() and print 'enctype="multipart/form-data" ' ?>>
getObject()->isNew()): ?>


 
 
 renderLabel()?>
 render()?>
 
 
  

  

   Cancel
  getObject()->isNew()): ?>
 getObject()->getId(), array('method' => 'delete',
'confirm' => 'Are you sure?')) ?>
  
  
  
  
  

  


  

  




[jQuery] jQuery Scrollable Plugin - Removing specific Carousel Panes

2009-08-12 Thread tfat

Hi,

Can anyone who may have used this plugin at: 
http://flowplayer.org/tools/scrollable.html
know how to go about actaully removing a carousel pane from the
carousel group.

As an example, if I have 5 carousel windows - how can I
programmatically remove the  carouosel window 2?

Any help would be much appreciated.

Thanks.
Tony.


[jQuery] How to hide pop is blur

2009-08-12 Thread David .Wu

There is a button control a div show or not, I want when you click
other things then the div will disappear too exclude div itself and
also the show button, how to do that?

[html]


.



..




[JavaScript]

$('#show').click(function(){
$('#popup').toggle();
});



[jQuery] Add / Remove Class help

2009-08-12 Thread Dave Maharaj :: WidePixels.com

I have 2 class options .bookmarked and .not

 

Or

 

My js looks like 

$(".bookmarked,.bookmarked not").click(function() {
var url_id = $(this).attr('id').split('_');
var status = $(this).attr('class');

//alert(status);

$.ajax({
type: "POST",
url:
'/bookmarks/bookmark/'+url_id[1],
success: function(){
if (status = "bookmarked
not") {
//creating a bookmark

$('#b_'+url_id[1]).removeClass('not');
   } else if (status = "bookmarked"){
//deleting the bookmark
   $('#b_'+url_id[1]).addClass('not');
   
   }

}
});
return false;
});

If I click on a ".bookmarked not" link it removes the "not" class, but if I
click on a "bookmarked" link it does not add the "not" class.

Now the bookmarks are being created and deleted in the database...just not
changingthe div class.

Ideas where I went wrong? 

 
Dave



[jQuery] Listmenu - tips for making it faster in IE

2009-08-12 Thread Anoop kumar V
I am using listmenu and it works fantastically well... except only on
firefox.

On IE 7 it is quite slow, the lag is very noticeable - the menu appears
after about 6-7 seconds and the counts come much later after about 8-10
seconds. Since this is an intranet app, I need to ensure that IE 7 works
very well. I have about 2000 elements and they are not at all balanced
across the alphabets...

Are there any tips that I could follow such that the menu displays quicker
in IE? Or at the very least is there a way I can show a "Loading... " text
or an animated gif while the menu loads..

But thank you for this wonderful plugin it is really well made, I only wish
IE would catch up soon ;-)

Thanks,
Anoop


[jQuery] Re: Refresh DIV with full page refresh

2009-08-12 Thread bharani kumar
How the snippet work..there is simply html ...can u plz explain...

On Thu, Aug 13, 2009 at 5:00 AM, Justin Volpato
wrote:

>
> Assuming you are looking to simply reset div1 to its original
> contents, you would save the contents of it to a variable on page load
> and then load it into the div again when you 'refresh' it.
>
> $(function(){
>var div1 = $("#div1").html();
>$("#refreshButton").click(function(){
>$("#div1").html(div1);
>});
> });
>
>
> On Aug 11, 10:58 pm, bharani kumar 
> wrote:
> > Hi All ,
> >
> > How to refresh DIV , without refresh entire page,
> >
> > Am having four DIV ,
> >
> > DIV1,DIV2,DIV3,DIV4
> >
> > I want to refresh only DIV! without affecting the DIV3,DIV4 ,
> >
> > Thanks
>



-- 
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/


[jQuery] Drag and Drop in Tabs

2009-08-12 Thread lionel28


Hi,

I am using jQuery Tabs to make an ajax call for each tab when clicked.

The ajax that displays is like inettuts. 3 or 4 columns of widgets that can
be dragged and dropped.
The problem that I am having, when I put the html of the result directly in
the main page, it works as designed.

When I click on a tab, it displays the page, but all the jquery functions in
that ajax page are gone and I cannot sort, drag and drop anything.

I suspect that the ajax page is not reading the javascripts in the head,
which are on main page. Unfortunately I can't remove them to include them in
ajax pages dynamically because I am also using them for other functions in
main page.

Is there a way to make those ajax pages read the javascripts on that main
page?

Thank you.
-- 
View this message in context: 
http://www.nabble.com/Drag-and-Drop-in-Tabs-tp24945280s27240p24945280.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Drag and Drop in Tabs

2009-08-12 Thread lionel28


Hi,

I am using jQuery Tabs to make an ajax call for each tab when clicked.

The ajax that displays is like inettuts. 3 or 4 columns of widgets that can
be dragged and dropped.
The problem that I am having, when I put the html of the result directly in
the main page, it works as designed.

When I click on a tab, it displays the page, but all the jquery functions in
that ajax page are gone and I cannot sort, drag and drop anything.

I suspect that the ajax page is not reading the javascripts in the head,
which are on main page. Unfortunately I can't remove them to include them in
ajax pages dynamically because I am also using them for other functions in
main page.

Is there a way to make those ajax pages read the javascripts on that main
page?

Thank you.
-- 
View this message in context: 
http://www.nabble.com/Drag-and-Drop-in-Tabs-tp24945278s27240p24945278.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Using jQuery Validation (validate), are there any events when a remote validation call is made

2009-08-12 Thread andypike

Hi all,

I am preparing a form and would like to mimic the functionality of the
Twitter sign up form here: https://twitter.com/signup

Here are my basic requirements, is this possible with the jQuery
validation plugin (http://docs.jquery.com/Plugins/Validation):

1. When an input has focus, display a hint (I guess I can do this
independently of the plugin)
2. If the input is invalid show a message (I know this can be done)
3. When using a remote ajax validation, show a "checking..." wait
message - not sure about this
4. If the input is valid show an "ok" message - not sure about this

Any hints, tips or ideas would be great.

Thanks in advance

Andy


[jQuery] Different Transition FX for Autoplay vs. Pager

2009-08-12 Thread KevinGoldman

Hi All,

I'm new to this group - hope I'm posting in the correct place.

Is it possible to use one transition effect for the auto playing
transitions, but use a different transition effect when using the
pager?

For example, I want the "fade" effect used as the default transition
effect, but I want the "scrollVert" transition effect used when the
user clicks an item in the Pager.

Thanks!


[jQuery] Re: Table sorter

2009-08-12 Thread Bob Woodard


On Aug 6, 8:56 am, mila  wrote:

>         $("#myTable").tablesorter();
>         $("#myTable").tablesorter();  // had to do that twice for column 
> sorting to work in both directions

Thanks for mentioning this!  I was going crazy seeing this behavior
and couldn't figure it out.


[jQuery] Re: Can I select and/or ?

2009-08-12 Thread Richard D. Worth
Cool. Nice to see it supports colspan and rowspan well. That's fun stuff.
- Richard

On Wed, Aug 12, 2009 at 9:28 PM, rolfsf  wrote:

>
> Thanks for the reply Richard!
> This is a quick prototype, so for the moment I'm using the
> ColumnManager plugin -
> http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html
> It seems to simplify the process a bit, though it's not exactly what
> I'm looking for
> -rolfsf
>
>
>
> On Aug 12, 6:21 pm, "Richard D. Worth"  wrote:
> > Unfortunately you have to get the columns by selecting the n-th cell in
> each
> > row. If you're going to be doing lots of toggling, would be best to add a
> > class to each, like col1, col2, col3; either in the generated html, or on
> > document.ready, so you're not searching over and over, especially if it's
> a
> > large table. Or at the very least, cache the jQuery objects that contain
> > each column of cells, the results of your queries, if the table isn't
> going
> > to change.
> > - Richard
> >
> > On Wed, Aug 12, 2009 at 3:17 PM, rolfsf  wrote:
> >
> > > I've got a table in which I've set up some column groups.
> > > 
> > >
> > > 
> > > 
> > >
> > >
> > >
> > >
> > > 
> > > 
> > >
> > >
> > >
> > >
> > > 
> > > ...
> >
> > > Ideally, I'd like to be able to toggle the visibility of the  > > class="that"> - can I select them as cols in jquery, or do I need to
> > > get at them via the rows?
> >
> > > Thanks!
>


[jQuery] Re: Can I select and/or ?

2009-08-12 Thread rolfsf

Thanks for the reply Richard!
This is a quick prototype, so for the moment I'm using the
ColumnManager plugin - 
http://p.sohei.org/stuff/jquery/columnmanager/demo/demo.html
It seems to simplify the process a bit, though it's not exactly what
I'm looking for
-rolfsf



On Aug 12, 6:21 pm, "Richard D. Worth"  wrote:
> Unfortunately you have to get the columns by selecting the n-th cell in each
> row. If you're going to be doing lots of toggling, would be best to add a
> class to each, like col1, col2, col3; either in the generated html, or on
> document.ready, so you're not searching over and over, especially if it's a
> large table. Or at the very least, cache the jQuery objects that contain
> each column of cells, the results of your queries, if the table isn't going
> to change.
> - Richard
>
> On Wed, Aug 12, 2009 at 3:17 PM, rolfsf  wrote:
>
> > I've got a table in which I've set up some column groups.
> > 
> >    
> > 
> > 
> >    
> >    
> >    
> >    
> > 
> > 
> >    
> >    
> >    
> >    
> > 
> > ...
>
> > Ideally, I'd like to be able to toggle the visibility of the  > class="that"> - can I select them as cols in jquery, or do I need to
> > get at them via the rows?
>
> > Thanks!


[jQuery] Re: Can I select and/or ?

2009-08-12 Thread Richard D. Worth
Unfortunately you have to get the columns by selecting the n-th cell in each
row. If you're going to be doing lots of toggling, would be best to add a
class to each, like col1, col2, col3; either in the generated html, or on
document.ready, so you're not searching over and over, especially if it's a
large table. Or at the very least, cache the jQuery objects that contain
each column of cells, the results of your queries, if the table isn't going
to change.
- Richard

On Wed, Aug 12, 2009 at 3:17 PM, rolfsf  wrote:

>
> I've got a table in which I've set up some column groups.
> 
>
> 
> 
>
>
>
>
> 
> 
>
>
>
>
> 
> ...
>
> Ideally, I'd like to be able to toggle the visibility of the  class="that"> - can I select them as cols in jquery, or do I need to
> get at them via the rows?
>
> Thanks!


[jQuery] Script No Longer Work After JSON loads

2009-08-12 Thread SHiDi

Hi all,

I'm trying to load a content and list of images together with
pagination using jQuery live.

Images and loads are successfully loaded but when I click on list of
numbers to view each image, nothing happen. As for the images, all
being listed but only one being display at the front end.

Here is snippets of my code:
$(".lposts").live("click", function() {
var href = this.href+"?ajax=true";
var image_path = "http://www.projects.com/images/";;

$.getJSON(href, function(data) {
$(".workinfoz")
.empty()
.fadeOut('slow')
.fadeIn(2000)
.html(data.content);
$("#workslides").empty();
$("#workController").empty();
$.each(data.images, function() {
$("#workslides").append('');
});
var flowCount = 1;
while(flowCount <= data.total_images) {
$("#workController").append(''+flowCount+'');
flowCount++;
}
}
);
return false;
});

I'm using jQuery flow to navigate those images.

Thanks in advanced for your helps.

Cheers!


[jQuery] Toggle Help

2009-08-12 Thread Dave Maharaj :: WidePixels.com
I want to build add a "favourites" type widget into my site. Just so a user
can bookmark a post they like. So I have my standard paginated view with
various posts and a star beside each post. 
Solid star = bookmarked, empty star = not bookmarked
 
I have the save/delete bookmark working the star only changes on a page
refresh.
 
How would I use toggle for something like this? So when the user clicks on
the star it changes to the opposite of what it is? And how do I then use the
toggle to determine what star to display on page load?
 
Ideas?
 
Dave


[jQuery] Re: jQueryUI datepicker, select multiple non-contiguous dates?

2009-08-12 Thread Sean McKenna

I needed this type of continguous and non-contiguous date selection
and for this one case I went with the jQuery plugin Datepicker
(jquery.datepick.js)  instead of the jQueryUI Datepicker which I use
elsewhere.  It has a multiSelect option that works great.  Hopefully
this functionality may be included in a future release of the UI
datepicker.

http://keith-wood.name/datepick.html#multi



On Aug 11, 4:10 pm, René  wrote:
> The datepicker function is awesome for selecting a single day, but I
> need to build a date control that allows the selection of both single
> and multiple days (contiguous and non-contiguous).
>
> I found something along the 
> lines:http://www.filamentgroup.com/examples/daterangepicker_v2/index3.php
>
> I would prefer a simpler UI: One calendar. Click once to select a
> single, control-click (or shift-click?) to select additional days. Is
> this possible? Anyone have any suggestions?
>
> ...Rene


[jQuery] Re: Get vars from one event function to another

2009-08-12 Thread Jeffrey Kretz

If both events are bound to the same object, you can use the .data method:

var obj = $('#element')
   .data('info',val)
   .bind('click',do_something)
   .bind('blur',something_else);

function do_something(e)
{
   var el = $(this);
   var info = el.data('info');
   ...
   el.data('results',val2);
} 

function something_else(e)
{
   var el = $(this);
   var info = el.data('info');
   var results = el.data('results');
   ...
}
-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Nic Hubbard
Sent: Wednesday, August 12, 2009 5:05 PM
To: jQuery (English)
Subject: [jQuery] Re: Get vars from one event function to another


Thanks James for that tip.

Still looking for how to pass a var from one event function to
another...

On Aug 12, 4:28 pm, James  wrote:
> I'm not sure I understand what you're trying to do with the change()
> function...
> You know you can get the value of a select just with val(). You don't
> have to loop through each option to find which is selected.
>
> 
>     1
>     2
> 
>
> var myVal = $("#mySelect").val(); // 1 or 2
>
> On Aug 12, 1:18 pm, Nic Hubbard  wrote:
>
> > I am confused about how to do this the right way.
>
> > I have a change event which grabs the value of the selected option
> > list and sets that as a var.  But, I would like to add that to the end
> > of my post string when I submit the form, how would I do this?
>
> > $('select').change(function() {
>
> >         $('select option:selected').each(function() {
>
> >                 var my_val = $(this).val();
>
> >         });//end each
>
> > });//end change
>
> > $('#my_submit').submit(function() {
>
> >         var action = $('form').attr('action');
> >         // How do I get my_val variable into here??
> >         $('form').attr('action', action + 'new_parm=' + my_val);
>
> > });



[jQuery] Re: Get vars from one event function to another

2009-08-12 Thread James

You'd have to set a variable with a scope that both functions can
access. For your case, you probably just set a global variable.

'var' sets a variable.

var my_val = '';

$('select').change(function() {

$('select option:selected').each(function() {
my_val = $(this).val();  // remove the 'var' here
});//end each

});//end change

$('#my_submit').submit(function() {

var action = $('form').attr('action');
// How do I get my_val variable into here??
$('form').attr('action', action + 'new_parm=' + my_val);

On Aug 12, 2:04 pm, Nic Hubbard  wrote:
> Thanks James for that tip.
>
> Still looking for how to pass a var from one event function to
> another...
>
> On Aug 12, 4:28 pm, James  wrote:
>
> > I'm not sure I understand what you're trying to do with the change()
> > function...
> > You know you can get the value of a select just with val(). You don't
> > have to loop through each option to find which is selected.
>
> > 
> >     1
> >     2
> > 
>
> > var myVal = $("#mySelect").val(); // 1 or 2
>
> > On Aug 12, 1:18 pm, Nic Hubbard  wrote:
>
> > > I am confused about how to do this the right way.
>
> > > I have a change event which grabs the value of the selected option
> > > list and sets that as a var.  But, I would like to add that to the end
> > > of my post string when I submit the form, how would I do this?
>
> > > $('select').change(function() {
>
> > >         $('select option:selected').each(function() {
>
> > >                 var my_val = $(this).val();
>
> > >         });//end each
>
> > > });//end change
>
> > > $('#my_submit').submit(function() {
>
> > >         var action = $('form').attr('action');
> > >         // How do I get my_val variable into here??
> > >         $('form').attr('action', action + 'new_parm=' + my_val);
>
> > > });
>
>


[jQuery] Re: Get vars from one event function to another

2009-08-12 Thread Nic Hubbard

Thanks James for that tip.

Still looking for how to pass a var from one event function to
another...

On Aug 12, 4:28 pm, James  wrote:
> I'm not sure I understand what you're trying to do with the change()
> function...
> You know you can get the value of a select just with val(). You don't
> have to loop through each option to find which is selected.
>
> 
>     1
>     2
> 
>
> var myVal = $("#mySelect").val(); // 1 or 2
>
> On Aug 12, 1:18 pm, Nic Hubbard  wrote:
>
> > I am confused about how to do this the right way.
>
> > I have a change event which grabs the value of the selected option
> > list and sets that as a var.  But, I would like to add that to the end
> > of my post string when I submit the form, how would I do this?
>
> > $('select').change(function() {
>
> >         $('select option:selected').each(function() {
>
> >                 var my_val = $(this).val();
>
> >         });//end each
>
> > });//end change
>
> > $('#my_submit').submit(function() {
>
> >         var action = $('form').attr('action');
> >         // How do I get my_val variable into here??
> >         $('form').attr('action', action + 'new_parm=' + my_val);
>
> > });


[jQuery] Re: Problem with js redirect when using getJSON

2009-08-12 Thread James

Have you tried:
window.location = 'http://site2.example.com/';

On Aug 12, 1:36 pm, Grimori  wrote:
> The problem only exists in firefox. Has anyone had this problem
> before?
>
> Thanks.
>
> On Aug 12, 9:14 pm, Grimori  wrote:
>
> > Hi everyone,
>
> > The problem I'm facing is as follows. I'm using a JSON call to check
> > some data before doing a JS redirect to a different page. The redirect
> > works but it's impossible to get back to the initial page using the
> > browser's back button. The initial location is not being stored in the
> > browser's history.
>
> > This is the script simplified. If placed onhttp://site1.example.com/
> > when it's executed it redirects tohttp://site2.example.com/but
> > there's no way to go back tohttp://site1.example.com/usingthe
> > browser's back button.
>
> > 
> > $(document).ready(function(){
> >     $('#click').click(function(){
> >         $.getJSON('index.php?jsoncallback=?', function(msg){
> >             location.href='http://site2.example.com/';
> >         });
> >     });})
>
> > 
>
> > Any help is appreciated.
>
>


[jQuery] Re: Problem with js redirect when using getJSON

2009-08-12 Thread Grimori

The problem only exists in firefox. Has anyone had this problem
before?

Thanks.

On Aug 12, 9:14 pm, Grimori  wrote:
> Hi everyone,
>
> The problem I'm facing is as follows. I'm using a JSON call to check
> some data before doing a JS redirect to a different page. The redirect
> works but it's impossible to get back to the initial page using the
> browser's back button. The initial location is not being stored in the
> browser's history.
>
> This is the script simplified. If placed onhttp://site1.example.com/
> when it's executed it redirects tohttp://site2.example.com/but
> there's no way to go back tohttp://site1.example.com/using the
> browser's back button.
>
> 
> $(document).ready(function(){
>     $('#click').click(function(){
>         $.getJSON('index.php?jsoncallback=?', function(msg){
>             location.href='http://site2.example.com/';
>         });
>     });})
>
> 
>
> Any help is appreciated.


[jQuery] Re: Post variable array

2009-08-12 Thread James

I believe what you're trying to do is what serializeArray() function
in jQuery already does:
http://docs.jquery.com/Ajax/serializeArray

$("button.save").click(function(){
var action = $(this).parent("form").attr("action");
var postThis = $(this).parent("form").serializeArray();

$.post(action, postThis, function(data){
alert("done");
});
return false;
});


On Aug 12, 1:24 pm, cz231  wrote:
> Yeah sure...here's the code:
>
> $("button.save").click(function(){
>                 var action = $(this).parent("form").attr("action");
>
>                 var i = 0;
>                 var size = $(this).siblings("input, select").size();
>                 var nameArray = [];
>                 var valueArray = [];
>                 for (i=0;i                         nameArray[i] = $("[name]:eq("+i+")").attr("name");
>
>                         valueArray[i] = $("[name]:eq("+i+")").val();
>
>                 }
>
>                 var n = 5;
>                 for (n in nameArray){
>                         if(postThis == null){postThis = nameArray[0] + ': "' 
> + valueArray
> [0] +  '"'}
>                         if(n > 0){var postThis = postThis + ',' + 
> nameArray[n] + ': "' +
> valueArray[n] + '"';}
>                         //alert(n);
>                         //alert(nameArray[n]);
>                         //alert(valueArray[n]);
>                 }
>                 postThis = "{" + postThis + "}";
>                 alert(postThis);
>
>                 /*postThis = {Name:"Jimmy", Username:"Something",
> Password:"something", Email:"somethth...@someplace.com"};
>                 $.post(action, postThis, function(data) {
>                     alert('done');
>
>                 });*/
>
>                 $.post(action, postThis, function(data){
>                         alert("done");
>                 });
>                 return false;
>         });
>
> Thanks
>
> On Aug 12, 4:44 pm, James  wrote:
>
> > It's probably possible to not need to use it. But you're not revealing
> > much code to us it's difficult to help.
> > Can you show us how what you put in your variable 'postThis'? How do
> > you create this?
> > If you have postThis as a JSON object to begin with, you don't need
> > the json2.js file.
>
> > On Aug 12, 11:37 am, cz231  wrote:
>
> > > And there's no way to do it without adding another js file?
>
> > > I ask because for this project is pretty important to keep the number
> > > of requests down.
>
> > > On Aug 12, 3:43 pm, James  wrote:
>
> > > > The type you want is JSON (an object).
>
> > > > Include this Javascript file here:http://www.json.org/json2.js
>
> > > > Then use the JSON.parse() function which will convert a String to a
> > > > JSON object. The String has to have a format like a JSON object for it
> > > > to work properly.
>
> > > > var postData = JSON.parse(postThis);
> > > > $.post('somefile.php', postData, function(data) {
> > > >     alert('done');
>
> > > > });
>
> > > > On Aug 12, 9:28 am, cz231  wrote:
>
> > > > > I think I know the problem...My postThis variable ends up being just
> > > > > one big string. How do I convert it to the correct type? (I'm not even
> > > > > sure what type is correct)
>
> > > > > On Aug 12, 2:00 pm, James  wrote:
>
> > > > > > I don't see the problem...
>
> > > > > > Something like this should work:
>
> > > > > > var action = 'somepage.php';
> > > > > > var postThis = {Name:"Jimmy", Username:"Something",
> > > > > > Password:"something", Email:"someth...@someplace.com"};
> > > > > > $.post(action, postThis, function(data) {
> > > > > >     alert('done');
>
> > > > > > });
>
> > > > > > Otherwise, post your real code for us to see what's going on.
>
> > > > > > On Aug 12, 8:52 am, cz231  wrote:
>
> > > > > > > Oops. I'm sorry.
>
> > > > > > > action is the url to be posted to, and postThis is equal to: Name:
> > > > > > > "Jimmy", Username: "Something", Password:
> > > > > > > "something", Email: "someth...@someplace.com"
>
> > > > > > > On Aug 12, 12:51 pm, Jörn Zaefferer 
> > > > > > > 
> > > > > > > wrote:
>
> > > > > > > > What values do the variables "action"  and postThis contain? You
> > > > > > > > describe them as "actions", isn't telling me anything.
>
> > > > > > > > Jörn
>
> > > > > > > > On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > > > > > > > > Hi,
>
> > > > > > > > > I'm using AJAX to submit a form. I'm using the POST method. 
> > > > > > > > > Example:
>
> > > > > > > > > $.post(action, postThis);
>
> > > > > > > > > Both action and postThis are actions. Action is the URL and 
> > > > > > > > > postThis
> > > > > > > > > is the data to be submitted. Right now, this isn't working. I 
> > > > > > > > > know I
> > > > > > > > > can pass the action variable because that has always been 
> > > > > > > > > working. But
> > > > > > > > > how do I put the parameters there as a variable? It will work 
> > > > > > > > > if I
> > > > > > > > > express the parameters like this:
>
> > > > > > > > > $.post(action

[jQuery] Re: Refresh DIV with full page refresh

2009-08-12 Thread Justin Volpato

Assuming you are looking to simply reset div1 to its original
contents, you would save the contents of it to a variable on page load
and then load it into the div again when you 'refresh' it.

$(function(){
var div1 = $("#div1").html();
$("#refreshButton").click(function(){
$("#div1").html(div1);
});
});


On Aug 11, 10:58 pm, bharani kumar 
wrote:
> Hi All ,
>
> How to refresh DIV , without refresh entire page,
>
> Am having four DIV ,
>
> DIV1,DIV2,DIV3,DIV4
>
> I want to refresh only DIV! without affecting the DIV3,DIV4 ,
>
> Thanks


[jQuery] Re: Get vars from one event function to another

2009-08-12 Thread James

I'm not sure I understand what you're trying to do with the change()
function...
You know you can get the value of a select just with val(). You don't
have to loop through each option to find which is selected.


1
2


var myVal = $("#mySelect").val(); // 1 or 2

On Aug 12, 1:18 pm, Nic Hubbard  wrote:
> I am confused about how to do this the right way.
>
> I have a change event which grabs the value of the selected option
> list and sets that as a var.  But, I would like to add that to the end
> of my post string when I submit the form, how would I do this?
>
> $('select').change(function() {
>
>         $('select option:selected').each(function() {
>
>                 var my_val = $(this).val();
>
>         });//end each
>
> });//end change
>
> $('#my_submit').submit(function() {
>
>         var action = $('form').attr('action');
>         // How do I get my_val variable into here??
>         $('form').attr('action', action + 'new_parm=' + my_val);
>
> });
>
>


[jQuery] Re: Post variable array

2009-08-12 Thread cz231

Yeah sure...here's the code:

$("button.save").click(function(){
var action = $(this).parent("form").attr("action");

var i = 0;
var size = $(this).siblings("input, select").size();
var nameArray = [];
var valueArray = [];
for (i=0;i 0){var postThis = postThis + ',' + nameArray[n] 
+ ': "' +
valueArray[n] + '"';}
//alert(n);
//alert(nameArray[n]);
//alert(valueArray[n]);
}
postThis = "{" + postThis + "}";
alert(postThis);


/*postThis = {Name:"Jimmy", Username:"Something",
Password:"something", Email:"somethth...@someplace.com"};
$.post(action, postThis, function(data) {
alert('done');

});*/

$.post(action, postThis, function(data){
alert("done");
});
return false;
});

Thanks

On Aug 12, 4:44 pm, James  wrote:
> It's probably possible to not need to use it. But you're not revealing
> much code to us it's difficult to help.
> Can you show us how what you put in your variable 'postThis'? How do
> you create this?
> If you have postThis as a JSON object to begin with, you don't need
> the json2.js file.
>
> On Aug 12, 11:37 am, cz231  wrote:
>
> > And there's no way to do it without adding another js file?
>
> > I ask because for this project is pretty important to keep the number
> > of requests down.
>
> > On Aug 12, 3:43 pm, James  wrote:
>
> > > The type you want is JSON (an object).
>
> > > Include this Javascript file here:http://www.json.org/json2.js
>
> > > Then use the JSON.parse() function which will convert a String to a
> > > JSON object. The String has to have a format like a JSON object for it
> > > to work properly.
>
> > > var postData = JSON.parse(postThis);
> > > $.post('somefile.php', postData, function(data) {
> > >     alert('done');
>
> > > });
>
> > > On Aug 12, 9:28 am, cz231  wrote:
>
> > > > I think I know the problem...My postThis variable ends up being just
> > > > one big string. How do I convert it to the correct type? (I'm not even
> > > > sure what type is correct)
>
> > > > On Aug 12, 2:00 pm, James  wrote:
>
> > > > > I don't see the problem...
>
> > > > > Something like this should work:
>
> > > > > var action = 'somepage.php';
> > > > > var postThis = {Name:"Jimmy", Username:"Something",
> > > > > Password:"something", Email:"someth...@someplace.com"};
> > > > > $.post(action, postThis, function(data) {
> > > > >     alert('done');
>
> > > > > });
>
> > > > > Otherwise, post your real code for us to see what's going on.
>
> > > > > On Aug 12, 8:52 am, cz231  wrote:
>
> > > > > > Oops. I'm sorry.
>
> > > > > > action is the url to be posted to, and postThis is equal to: Name:
> > > > > > "Jimmy", Username: "Something", Password:
> > > > > > "something", Email: "someth...@someplace.com"
>
> > > > > > On Aug 12, 12:51 pm, Jörn Zaefferer 
> > > > > > wrote:
>
> > > > > > > What values do the variables "action"  and postThis contain? You
> > > > > > > describe them as "actions", isn't telling me anything.
>
> > > > > > > Jörn
>
> > > > > > > On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > > > > > > > Hi,
>
> > > > > > > > I'm using AJAX to submit a form. I'm using the POST method. 
> > > > > > > > Example:
>
> > > > > > > > $.post(action, postThis);
>
> > > > > > > > Both action and postThis are actions. Action is the URL and 
> > > > > > > > postThis
> > > > > > > > is the data to be submitted. Right now, this isn't working. I 
> > > > > > > > know I
> > > > > > > > can pass the action variable because that has always been 
> > > > > > > > working. But
> > > > > > > > how do I put the parameters there as a variable? It will work 
> > > > > > > > if I
> > > > > > > > express the parameters like this:
>
> > > > > > > > $.post(action, {Name: "Jimmy", Username: "Something", Password:
> > > > > > > > "something", Email: "someth...@someplace.com" });
>
> > > > > > > > Any help would be greatly appreciated.


[jQuery] Get vars from one event function to another

2009-08-12 Thread Nic Hubbard

I am confused about how to do this the right way.

I have a change event which grabs the value of the selected option
list and sets that as a var.  But, I would like to add that to the end
of my post string when I submit the form, how would I do this?

$('select').change(function() {

$('select option:selected').each(function() {

var my_val = $(this).val();

});//end each

});//end change

$('#my_submit').submit(function() {

var action = $('form').attr('action');
// How do I get my_val variable into here??
$('form').attr('action', action + 'new_parm=' + my_val);

});


[jQuery] Re: Menu and sub Menu

2009-08-12 Thread bhu Boue vidya

i like superfish

http://users.tpg.com.au/j_birch/plugins/superfish/

On Aug 12, 8:22 pm, bharani kumar 
wrote:
> Hi All.
>
> Am looking very simple menu and sub menu jquery plugin ,
>
> I looked some plugins , that are lot of JS include files are used ,
>
> So i dont want lot js includes ,
>
> thanks


[jQuery] Re: jquery password compare....URGENT HELP!!

2009-08-12 Thread Joel Polsky
Any one have an answer


On Wed, Aug 12, 2009 at 9:49 AM, PictureMan  wrote:

> Can anyone see what's wrong with this:
> The behavior that is happening is that it does validate and
> compare..but DOESN'T CHECK FOR LENGTH.
>
> Password: {required: true, minlength: 6},
>retypePassword: {
>equalTo: "#Password"
>}
>}
>
>
> Here's the docs, but it doesn't mention minlength.
> http://docs.jquery.com/Plugins/Validation/Methods/equalTo#other
>
> So I added to it like this:
> http://docs.jquery.com/Plugins/Validation/Methods/minlength
>
>
> Thanks!!


[jQuery] Re: IE8 Selector Bug?

2009-08-12 Thread gentry

I must have something screwy with my page (it has a lot going on), as
I'm unable to reproduce this on a test page. I'll dig some more and
see if I can figure what's causing the issue before filing a bug
report.

On Aug 12, 2:28 pm, John Resig  wrote:
> gentry -
>
> Yes please!
>
> --John
>
> On Wed, Aug 12, 2009 at 5:15 PM, gentry  wrote:
>
> > I got it to work by changing to this:
>
> > $('#Row_1>td>input[type=text]').each(function() {
> >        $(this).val('');
> >  });
>
> > John - Still want a bug filed for this?
>
> > Thanks,
> > Shane
>
> > On Aug 12, 11:50 am, John Resig  wrote:
> > > It looks similar to the one above, but different. I'll try and check in
> > to
> > > them both.
>
> > > gentry - can you file a bug for the issue you found, preferably with a
> > full
> > > test case?
>
> > > --John
>
> > > On Wed, Aug 12, 2009 at 2:21 PM, Jeffrey Kretz  > >wrote:
>
> > > > My guess is its related to a problem I ran into with the Sizzle child
> > > > selectors in 1.3.x
>
> > > > I opened a ticket about a month ago
>
> > > >http://dev.jquery.com/ticket/4917
>
> > > > But it hasn't been reviewed yet.
>
> > > > JK
>
> > > > -Original Message-
> > > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com]
> > On
> > > > Behalf Of gentry
> > > > Sent: Wednesday, August 12, 2009 10:26 AM
> > > > To: jQuery (English)
> > > > Subject: [jQuery] IE8 Selector Bug?
>
> > > > Anybody know why this doesn't work in IE8 with jQuery version 1.2.6?
> > > > It works in the latest jQuery version but I can't move to it yet
> > > > because of some other issues. I'm trying to clear all the textboxes in
> > > > a table row but only the 1st textbox gets cleared in IE8.
>
> > > > $('#Row_1 input[type=text]').each(function() {
> > > >        $(this).val('');
> > > >  });


[jQuery] Re: jQuery.ready after document has loaded

2009-08-12 Thread John Resig
We just landed some code in the latest nightly versions of jQuery to
auto-detect if the page has already loaded. You can try it here:
http://code.jquery.com/jquery-nightly.js

--John


On Wed, Aug 12, 2009 at 5:14 PM, ujamu  wrote:

>
> I have developed a FF extension that loads a few JavaScript files
> (one of which is jQuery) and attaches them to any given page being
> viewed by the user.
> The loading of the js files can ether happen during or after the web
> page had been loaded into the browser.
> Obviously, once the js files get loaded, I want to start doing some
> stuff and I wanted to use the jQuery.ready method to determine when
> the js code can start performing whatever needs to be done. However,
> it does not seem to get fired if the extension only starts loading
> the
> js files after the web page has already been fully loaded. Generally,
> there does not seem to be a method in FF that tells me if the web
> page
> is loaded or not but rather, only an event that can get fired upon
> page load.
> Am I missing something? if not, is there a workaround?
>


[jQuery] Re: Post variable array

2009-08-12 Thread James

It's probably possible to not need to use it. But you're not revealing
much code to us it's difficult to help.
Can you show us how what you put in your variable 'postThis'? How do
you create this?
If you have postThis as a JSON object to begin with, you don't need
the json2.js file.

On Aug 12, 11:37 am, cz231  wrote:
> And there's no way to do it without adding another js file?
>
> I ask because for this project is pretty important to keep the number
> of requests down.
>
> On Aug 12, 3:43 pm, James  wrote:
>
> > The type you want is JSON (an object).
>
> > Include this Javascript file here:http://www.json.org/json2.js
>
> > Then use the JSON.parse() function which will convert a String to a
> > JSON object. The String has to have a format like a JSON object for it
> > to work properly.
>
> > var postData = JSON.parse(postThis);
> > $.post('somefile.php', postData, function(data) {
> >     alert('done');
>
> > });
>
> > On Aug 12, 9:28 am, cz231  wrote:
>
> > > I think I know the problem...My postThis variable ends up being just
> > > one big string. How do I convert it to the correct type? (I'm not even
> > > sure what type is correct)
>
> > > On Aug 12, 2:00 pm, James  wrote:
>
> > > > I don't see the problem...
>
> > > > Something like this should work:
>
> > > > var action = 'somepage.php';
> > > > var postThis = {Name:"Jimmy", Username:"Something",
> > > > Password:"something", Email:"someth...@someplace.com"};
> > > > $.post(action, postThis, function(data) {
> > > >     alert('done');
>
> > > > });
>
> > > > Otherwise, post your real code for us to see what's going on.
>
> > > > On Aug 12, 8:52 am, cz231  wrote:
>
> > > > > Oops. I'm sorry.
>
> > > > > action is the url to be posted to, and postThis is equal to: Name:
> > > > > "Jimmy", Username: "Something", Password:
> > > > > "something", Email: "someth...@someplace.com"
>
> > > > > On Aug 12, 12:51 pm, Jörn Zaefferer 
> > > > > wrote:
>
> > > > > > What values do the variables "action"  and postThis contain? You
> > > > > > describe them as "actions", isn't telling me anything.
>
> > > > > > Jörn
>
> > > > > > On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > > > > > > Hi,
>
> > > > > > > I'm using AJAX to submit a form. I'm using the POST method. 
> > > > > > > Example:
>
> > > > > > > $.post(action, postThis);
>
> > > > > > > Both action and postThis are actions. Action is the URL and 
> > > > > > > postThis
> > > > > > > is the data to be submitted. Right now, this isn't working. I 
> > > > > > > know I
> > > > > > > can pass the action variable because that has always been 
> > > > > > > working. But
> > > > > > > how do I put the parameters there as a variable? It will work if I
> > > > > > > express the parameters like this:
>
> > > > > > > $.post(action, {Name: "Jimmy", Username: "Something", Password:
> > > > > > > "something", Email: "someth...@someplace.com" });
>
> > > > > > > Any help would be greatly appreciated.
>
>


[jQuery] Re: Post variable array

2009-08-12 Thread cz231

And there's no way to do it without adding another js file?

I ask because for this project is pretty important to keep the number
of requests down.

On Aug 12, 3:43 pm, James  wrote:
> The type you want is JSON (an object).
>
> Include this Javascript file here:http://www.json.org/json2.js
>
> Then use the JSON.parse() function which will convert a String to a
> JSON object. The String has to have a format like a JSON object for it
> to work properly.
>
> var postData = JSON.parse(postThis);
> $.post('somefile.php', postData, function(data) {
>     alert('done');
>
> });
>
> On Aug 12, 9:28 am, cz231  wrote:
>
> > I think I know the problem...My postThis variable ends up being just
> > one big string. How do I convert it to the correct type? (I'm not even
> > sure what type is correct)
>
> > On Aug 12, 2:00 pm, James  wrote:
>
> > > I don't see the problem...
>
> > > Something like this should work:
>
> > > var action = 'somepage.php';
> > > var postThis = {Name:"Jimmy", Username:"Something",
> > > Password:"something", Email:"someth...@someplace.com"};
> > > $.post(action, postThis, function(data) {
> > >     alert('done');
>
> > > });
>
> > > Otherwise, post your real code for us to see what's going on.
>
> > > On Aug 12, 8:52 am, cz231  wrote:
>
> > > > Oops. I'm sorry.
>
> > > > action is the url to be posted to, and postThis is equal to: Name:
> > > > "Jimmy", Username: "Something", Password:
> > > > "something", Email: "someth...@someplace.com"
>
> > > > On Aug 12, 12:51 pm, Jörn Zaefferer 
> > > > wrote:
>
> > > > > What values do the variables "action"  and postThis contain? You
> > > > > describe them as "actions", isn't telling me anything.
>
> > > > > Jörn
>
> > > > > On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > > > > > Hi,
>
> > > > > > I'm using AJAX to submit a form. I'm using the POST method. Example:
>
> > > > > > $.post(action, postThis);
>
> > > > > > Both action and postThis are actions. Action is the URL and postThis
> > > > > > is the data to be submitted. Right now, this isn't working. I know I
> > > > > > can pass the action variable because that has always been working. 
> > > > > > But
> > > > > > how do I put the parameters there as a variable? It will work if I
> > > > > > express the parameters like this:
>
> > > > > > $.post(action, {Name: "Jimmy", Username: "Something", Password:
> > > > > > "something", Email: "someth...@someplace.com" });
>
> > > > > > Any help would be greatly appreciated.


[jQuery] Re: IE8 Selector Bug?

2009-08-12 Thread John Resig
gentry -

Yes please!

--John


On Wed, Aug 12, 2009 at 5:15 PM, gentry  wrote:

>
> I got it to work by changing to this:
>
> $('#Row_1>td>input[type=text]').each(function() {
>$(this).val('');
>  });
>
> John - Still want a bug filed for this?
>
> Thanks,
> Shane
>
> On Aug 12, 11:50 am, John Resig  wrote:
> > It looks similar to the one above, but different. I'll try and check in
> to
> > them both.
> >
> > gentry - can you file a bug for the issue you found, preferably with a
> full
> > test case?
> >
> > --John
> >
> > On Wed, Aug 12, 2009 at 2:21 PM, Jeffrey Kretz  >wrote:
> >
> >
> >
> > > My guess is its related to a problem I ran into with the Sizzle child
> > > selectors in 1.3.x
> >
> > > I opened a ticket about a month ago
> >
> > >http://dev.jquery.com/ticket/4917
> >
> > > But it hasn't been reviewed yet.
> >
> > > JK
> >
> > > -Original Message-
> > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com]
> On
> > > Behalf Of gentry
> > > Sent: Wednesday, August 12, 2009 10:26 AM
> > > To: jQuery (English)
> > > Subject: [jQuery] IE8 Selector Bug?
> >
> > > Anybody know why this doesn't work in IE8 with jQuery version 1.2.6?
> > > It works in the latest jQuery version but I can't move to it yet
> > > because of some other issues. I'm trying to clear all the textboxes in
> > > a table row but only the 1st textbox gets cleared in IE8.
> >
> > > $('#Row_1 input[type=text]').each(function() {
> > >$(this).val('');
> > >  });
>


[jQuery] Re: IE8 Selector Bug?

2009-08-12 Thread gentry

I got it to work by changing to this:

$('#Row_1>td>input[type=text]').each(function() {
$(this).val('');
 });

John - Still want a bug filed for this?

Thanks,
Shane

On Aug 12, 11:50 am, John Resig  wrote:
> It looks similar to the one above, but different. I'll try and check in to
> them both.
>
> gentry - can you file a bug for the issue you found, preferably with a full
> test case?
>
> --John
>
> On Wed, Aug 12, 2009 at 2:21 PM, Jeffrey Kretz wrote:
>
>
>
> > My guess is its related to a problem I ran into with the Sizzle child
> > selectors in 1.3.x
>
> > I opened a ticket about a month ago
>
> >http://dev.jquery.com/ticket/4917
>
> > But it hasn't been reviewed yet.
>
> > JK
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> > Behalf Of gentry
> > Sent: Wednesday, August 12, 2009 10:26 AM
> > To: jQuery (English)
> > Subject: [jQuery] IE8 Selector Bug?
>
> > Anybody know why this doesn't work in IE8 with jQuery version 1.2.6?
> > It works in the latest jQuery version but I can't move to it yet
> > because of some other issues. I'm trying to clear all the textboxes in
> > a table row but only the 1st textbox gets cleared in IE8.
>
> > $('#Row_1 input[type=text]').each(function() {
> >        $(this).val('');
> >  });


[jQuery] jQuery.ready after document has loaded

2009-08-12 Thread ujamu

I have developed a FF extension that loads a few JavaScript files
(one of which is jQuery) and attaches them to any given page being
viewed by the user.
The loading of the js files can ether happen during or after the web
page had been loaded into the browser.
Obviously, once the js files get loaded, I want to start doing some
stuff and I wanted to use the jQuery.ready method to determine when
the js code can start performing whatever needs to be done. However,
it does not seem to get fired if the extension only starts loading
the
js files after the web page has already been fully loaded. Generally,
there does not seem to be a method in FF that tells me if the web
page
is loaded or not but rather, only an event that can get fired upon
page load.
Am I missing something? if not, is there a workaround?


[jQuery] Re: Dropdown menu Issue

2009-08-12 Thread amuhlou

perhaps something like unbinding the hover would work

http://docs.jquery.com/Events/unbind

On Aug 12, 12:29 pm, Xenongasman  wrote:
> Any ideas?
>
> On Aug 8, 2:18 pm, Xenongasman  wrote:
>
> > Yes it does work fine, except that the animations will repeat
> > themselves if you move on and off again quickly.
> > So to remedy that I changed the script to:
> > 
> >         $(function(){
> >                 $('#menu li').hover(
> >             function() {
> >                     
> > $(this).find('ul:first').css({display:"none"}).stop().slideDown
> > ();
> >                 },
> >         function(){
> >                     $(this).find('ul:first').stop().slideUp('slow');
> >                 });
> >         });
>
> > 
>
> > Then try it and move over one menu then the other very quickly and
> > you'll see what i explained. And it also adds a artifact in IE7.
> > I suppose i could leave it as is and not use stop() but I just wanted
> > to know if someone knew how to fix this.


[jQuery] Re: Transforming input as it's typed

2009-08-12 Thread Richard D. Worth
jQuery UI widgets have built-in support for the metadata plugin. It part of
the jQuery UI Core and "just works" :). That said, I haven't tested this
with this plugin.
- Richard

On Wed, Aug 12, 2009 at 4:25 PM, Brett Ritter  wrote:

>
> On Wed, Aug 12, 2009 at 4:14 PM, Richard D. Worth
> wrote:
> > You might take a look at the mask plugin by Andrew Powell in the jQuery
> UI
> > Labs
> > http://wiki.jqueryui.com/mask
>
> Indeed I might!  This looks very interesting.  The only feature that
> calls to me that I don't see supported is metadata in the markup, and
> I'll dig around the metadata plugin to see if it's automagical
> (haven't worked with it yet).  Masked input had been interesting but
> lacked the transformation aspect, this takes care of that.
>
> Very interesting, thank you!
>
> (That said, if anyone has critiques off my code I'm still interested
> from a learning perspective)
> --
> Brett Ritter / SwiftOne
> swift...@swiftone.org
>


[jQuery] Re: live() or click

2009-08-12 Thread jlcox

Use "live" if you have to bind events to elements that don't
necessarily exist at the completion of document.load, e.g., you're
loading ajax content and want to bind to elements that are dynamically
added to your document. If the elements exist at the completion of
document.load, then just use "click".


[jQuery] Re: Post variable array

2009-08-12 Thread James

The type you want is JSON (an object).

Include this Javascript file here:
http://www.json.org/json2.js

Then use the JSON.parse() function which will convert a String to a
JSON object. The String has to have a format like a JSON object for it
to work properly.

var postData = JSON.parse(postThis);
$.post('somefile.php', postData, function(data) {
alert('done');
});

On Aug 12, 9:28 am, cz231  wrote:
> I think I know the problem...My postThis variable ends up being just
> one big string. How do I convert it to the correct type? (I'm not even
> sure what type is correct)
>
> On Aug 12, 2:00 pm, James  wrote:
>
> > I don't see the problem...
>
> > Something like this should work:
>
> > var action = 'somepage.php';
> > var postThis = {Name:"Jimmy", Username:"Something",
> > Password:"something", Email:"someth...@someplace.com"};
> > $.post(action, postThis, function(data) {
> >     alert('done');
>
> > });
>
> > Otherwise, post your real code for us to see what's going on.
>
> > On Aug 12, 8:52 am, cz231  wrote:
>
> > > Oops. I'm sorry.
>
> > > action is the url to be posted to, and postThis is equal to: Name:
> > > "Jimmy", Username: "Something", Password:
> > > "something", Email: "someth...@someplace.com"
>
> > > On Aug 12, 12:51 pm, Jörn Zaefferer 
> > > wrote:
>
> > > > What values do the variables "action"  and postThis contain? You
> > > > describe them as "actions", isn't telling me anything.
>
> > > > Jörn
>
> > > > On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > > > > Hi,
>
> > > > > I'm using AJAX to submit a form. I'm using the POST method. Example:
>
> > > > > $.post(action, postThis);
>
> > > > > Both action and postThis are actions. Action is the URL and postThis
> > > > > is the data to be submitted. Right now, this isn't working. I know I
> > > > > can pass the action variable because that has always been working. But
> > > > > how do I put the parameters there as a variable? It will work if I
> > > > > express the parameters like this:
>
> > > > > $.post(action, {Name: "Jimmy", Username: "Something", Password:
> > > > > "something", Email: "someth...@someplace.com" });
>
> > > > > Any help would be greatly appreciated.
>
>


[jQuery] Re: html in xml tag

2009-08-12 Thread Seth

no and i did not see it on jquery docs .. i will search on it now :)

On Aug 12, 11:18 pm, Michael Lawson  wrote:
> Just leave the html in there as it is
>
> have you tried the contents() function yet?
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone:  1-276-206-8393
> E-mail:  mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
>   From:       Seth                                  
>                                                  
>
>   To:         "jQuery (English)"                  
>                                                  
>
>   Date:       08/12/2009 04:13 PM                                             
>                                                  
>
>   Subject:    [jQuery] Re: html in xml tag                                    
>                                                 
>
> yes basicaly i want to read the content of description but to keep the
> formatting elements from htmletc
>
> On Aug 12, 11:03 pm, Michael Lawson  wrote:
>
>
>
>
>
> > Scratch that, my bad.  On closer look its not RSS :)  (its the first
> thing
> > that comes to mind when i see  followed by )
>
> > My previous question still stands though, are you just wanting to read
> the
> > contents of the description field?
>
> > cheers
>
> > Michael Lawson
> > Development Lead, Global Solutions, ibm.com
> > Phone:  1-276-206-8393
> > E-mail:  mjlaw...@us.ibm.com
>
> > 'Whether one believes in a religion or not,
> > and whether one believes in rebirth or not,
> > there isn't anyone who doesn't appreciate kindness and compassion..'
>
> >   From:       Michael Lawson/Raleigh/Contr/i...@ibmus
>
> >   To:         jquery-en@googlegroups.com
>
> >   Cc:         "jQuery (English)" 
>
> >   Date:       08/12/2009 04:01 PM
>
> >   Subject:    [jQuery] Re: html in xml tag
>
> > It looks like you're using an RSS feed given the xml format, so you
> > probably want to use the CDATA sections anyways so that RSS readers don't
> > get confused by the HTML tags.
>
> > Now, maybe I just don't understand exactly what you're trying to
> > accomplish? Are you saying you want to just read the contents of the
> > description field?
>
> > cheers
>
> > Michael Lawson
> > Development Lead, Global Solutions, ibm.com
> > Phone: 1-276-206-8393
> > E-mail: mjlaw...@us.ibm.com
>
> > 'Whether one believes in a religion or not,
> > and whether one believes in rebirth or not,
> > there isn't anyone who doesn't appreciate kindness and compassion..'
>
> > Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you
> > Michael for your reply however wrapping the data intro  ---08/12/2009
> > 03:48:48 PM---Thank you Michael for your reply however wrapping the data
> > intro 
> >  From:              Seth 
>
> >  To:                "jQuery (English)" 
>
> >  Date:              08/12/2009 03:48 PM
>
> >  Subject:           [jQuery] Re: html in xml tag
>
> > Thank you Michael for your reply however wrapping the data intro  > [CDATA[]] don't work ... i have try that before i just did not mention
> > it, if anybody has other ideas or some suggestions i will appreciate
> > it, i'm sure somebody has done this before i just hope he is here on
> > forum :D
>
> > Thanks!
>
> > On Aug 12, 6:59 pm, Michael Lawson  wrote:
>
> > > Try wrapping your html text in a CDATA section so that the xml parser
> > > doesn't strip them out
>
> > > cheers
>
> > > Michael Lawson
> > > Development Lead, Global Solutions, ibm.com
> > > Phone:  1-276-206-8393
> > > E-mail:  mjlaw...@us.ibm.com
>
> > > 'Whether one believes in a religion or not,
> > > and whether one believes in rebirth or not,
> > > there isn't anyone who doesn't appreciate kindness and compassion..'
>
> > >   From:       Seth 
>
> > >   To:         "jQuery (English)" 
>
> > >   Date:       08/12/2009 11:41 AM
>
> > >   Subject:    [jQuery] html in xml tag
>
> > > Hi guys,
>
> > > I have an XML file like this
>
> > > 
> > > 
> > >              
> > >                          Lorem ipsum
> > >                          Lorem ipsum dolor sit amet,
> > > consectetur adipisicing
> > > elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> > > aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> > > laboris nisi ut aliquip ex ea commodo consequat.
> > >                          images/coal.jpg
> > >              
> > > 
> > > . etc
>
> > > now on  tag i need to enter some formating elements like
> > >bold etc, if i enter html elements this line "desc = $
> > > (this).find("description").text();" will strip all my html code ..
> > > probably because of the .text() function at the end, my question is
> > > what function to try at the end because .html() is not working like
> > > this "desc = $(this).find("description").html();" is not working ..
> > > basically i need to be able to read the

[jQuery] Re: Transforming input as it's typed

2009-08-12 Thread Brett Ritter

On Wed, Aug 12, 2009 at 4:14 PM, Richard D. Worth wrote:
> You might take a look at the mask plugin by Andrew Powell in the jQuery UI
> Labs
> http://wiki.jqueryui.com/mask

Indeed I might!  This looks very interesting.  The only feature that
calls to me that I don't see supported is metadata in the markup, and
I'll dig around the metadata plugin to see if it's automagical
(haven't worked with it yet).  Masked input had been interesting but
lacked the transformation aspect, this takes care of that.

Very interesting, thank you!

(That said, if anyone has critiques off my code I'm still interested
from a learning perspective)
-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson

Just leave the html in there as it is

have you tried the contents() function yet?

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Seth   
   
  To: "jQuery (English)"   
   
  Date:   08/12/2009 04:13 PM  
   
  Subject:[jQuery] Re: html in xml tag 
   






yes basicaly i want to read the content of description but to keep the
formatting elements from htmletc

On Aug 12, 11:03 pm, Michael Lawson  wrote:
> Scratch that, my bad.  On closer look its not RSS :)  (its the first
thing
> that comes to mind when i see  followed by )
>
> My previous question still stands though, are you just wanting to read
the
> contents of the description field?
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone:  1-276-206-8393
> E-mail:  mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
>   From:       Michael Lawson/Raleigh/Contr/i...@ibmus

>
>   To:         jquery-en@googlegroups.com

>
>   Cc:         "jQuery (English)" 

>
>   Date:       08/12/2009 04:01 PM

>
>   Subject:    [jQuery] Re: html in xml tag

>
> It looks like you're using an RSS feed given the xml format, so you
> probably want to use the CDATA sections anyways so that RSS readers don't
> get confused by the HTML tags.
>
> Now, maybe I just don't understand exactly what you're trying to
> accomplish? Are you saying you want to just read the contents of the
> description field?
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone: 1-276-206-8393
> E-mail: mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
> Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you
> Michael for your reply however wrapping the data intro  03:48:48 PM---Thank you Michael for your reply however wrapping the data
> intro 
>  From:              Seth 

>
>  To:                "jQuery (English)" 

>
>  Date:              08/12/2009 03:48 PM

>
>  Subject:           [jQuery] Re: html in xml tag

>
> Thank you Michael for your reply however wrapping the data intro  [CDATA[]] don't work ... i have try that before i just did not mention
> it, if anybody has other ideas or some suggestions i will appreciate
> it, i'm sure somebody has done this before i just hope he is here on
> forum :D
>
> Thanks!
>
> On Aug 12, 6:59 pm, Michael Lawson  wrote:
>
>
>
> > Try wrapping your html text in a CDATA section so that the xml parser
> > doesn't strip them out
>
> > cheers
>
> > Michael Lawson
> > Development Lead, Global Solutions, ibm.com
> > Phone:  1-276-206-8393
> > E-mail:  mjlaw...@us.ibm.com
>
> > 'Whether one believes in a religion or not,
> > and whether one believes in rebirth or not,
> > there isn't anyone who doesn't appreciate kindness and compassion..'
>
> >   From:       Seth 
>
> >   To:         "jQuery (English)" 
>
> >   Date:       08/12/2009 11:41 AM
>
> >   Subject:    [jQuery] html in xml tag
>
> > Hi guys,
>
> > I have an XML file like this
>
> > 
> > 
> >              
> >                          Lorem ipsum
> >                          Lorem ipsum dolor sit amet,
> > consectetur adipisicing
> > elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> > aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> > laboris nisi ut aliquip ex ea commodo consequat.
> >                          images/coal.jpg
> >              
> > 
> > . etc
>
> > now on  tag i need to enter some formating elements like
> >bold etc, if i enter html elements this line "desc = $
> > (this).find("description").text();" will strip all my html code ..
> > probably because of the .text() function at the end, my question is
> > what function to try at the end because .html() is not working like
> > this "desc = $(this).find("description").html();" is not working ..
> > basically i need to be able to read the html elements too so i can
> > display in the div that will display the info ... dose anybody know
> > some jquery function that dose that ?
>
> > Thanks!
>
> >  graycol.gif
> > < 1KViewDownload
>
> >  ecblank.

[jQuery] Re: Transforming input as it's typed

2009-08-12 Thread Richard D. Worth
You might take a look at the mask plugin by Andrew Powell in the jQuery UI
Labs
http://wiki.jqueryui.com/mask

Demo:

http://jquery-ui.googlecode.com/svn/branches/labs/mask/demos/mask/default.html

Source:
http://jquery-ui.googlecode.com/svn/branches/labs/mask/ui/ui.mask.js

It's based on the jquery.maskedinput.js plugin by Josh Bush (
http://digitalbush.com/projects/masked-input-plugin/).

- Richard

On Wed, Aug 12, 2009 at 4:07 PM, Brett Ritter  wrote:

>
> My workplace has a lot of people doing manual entry.  I'm looking to
> provide some friendly automatic formatting of data as they type it.
>
> I have working code (thus far) but I want to ensure I'm doing things
> in a sane way (there's a surprising amount you can do insanely that
> still works :) ).
>
> Here's a function below that transforms a phone number - the worker
> enters the digits(only), the field reflects (and could also accept)
> the fully formatted version (e.g. (123) 456-7890 ).
> I'm building this towards a plugin model (ala masked input with happy
> coexistence with validate)
>
>$("#example").keyup(function(){
>var val = $(this).val();
>if(/^[-\d\(\) ]*$/.test(val)){
>var base = val.replace(/[-\(\) ]/g, '');
>var size = base.length;
>if(size < 3){  // Area code
>// Leave unchanged
>}
>else if (size < 6){
>val = "(" + base.slice(0,3) + ") " +
> base.slice(3);
>}
>else if(size < 11){
>val = "(" + base.slice(0,3) + ") " +
> base.slice(3,6) + "-" + base.slice(6);
>}
>$(this).val(val);
>}
>});
>
> Comments appreciated.
> --
> Brett Ritter / SwiftOne
> swift...@swiftone.org
>


[jQuery] Re: html in xml tag

2009-08-12 Thread Seth

yes basicaly i want to read the content of description but to keep the
formatting elements from htmletc

On Aug 12, 11:03 pm, Michael Lawson  wrote:
> Scratch that, my bad.  On closer look its not RSS :)  (its the first thing
> that comes to mind when i see  followed by )
>
> My previous question still stands though, are you just wanting to read the
> contents of the description field?
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone:  1-276-206-8393
> E-mail:  mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
>   From:       Michael Lawson/Raleigh/Contr/i...@ibmus                         
>                                                  
>
>   To:         jquery-en@googlegroups.com                                      
>                                                 
>
>   Cc:         "jQuery (English)"                  
>                                                  
>
>   Date:       08/12/2009 04:01 PM                                             
>                                                  
>
>   Subject:    [jQuery] Re: html in xml tag                                    
>                                                 
>
> It looks like you're using an RSS feed given the xml format, so you
> probably want to use the CDATA sections anyways so that RSS readers don't
> get confused by the HTML tags.
>
> Now, maybe I just don't understand exactly what you're trying to
> accomplish? Are you saying you want to just read the contents of the
> description field?
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone: 1-276-206-8393
> E-mail: mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
> Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you
> Michael for your reply however wrapping the data intro  03:48:48 PM---Thank you Michael for your reply however wrapping the data
> intro 
>  From:              Seth                         
>
>  To:                "jQuery (English)"         
>
>  Date:              08/12/2009 03:48 PM                                    
>
>  Subject:           [jQuery] Re: html in xml tag                          
>
> Thank you Michael for your reply however wrapping the data intro  [CDATA[]] don't work ... i have try that before i just did not mention
> it, if anybody has other ideas or some suggestions i will appreciate
> it, i'm sure somebody has done this before i just hope he is here on
> forum :D
>
> Thanks!
>
> On Aug 12, 6:59 pm, Michael Lawson  wrote:
>
>
>
> > Try wrapping your html text in a CDATA section so that the xml parser
> > doesn't strip them out
>
> > cheers
>
> > Michael Lawson
> > Development Lead, Global Solutions, ibm.com
> > Phone:  1-276-206-8393
> > E-mail:  mjlaw...@us.ibm.com
>
> > 'Whether one believes in a religion or not,
> > and whether one believes in rebirth or not,
> > there isn't anyone who doesn't appreciate kindness and compassion..'
>
> >   From:       Seth 
>
> >   To:         "jQuery (English)" 
>
> >   Date:       08/12/2009 11:41 AM
>
> >   Subject:    [jQuery] html in xml tag
>
> > Hi guys,
>
> > I have an XML file like this
>
> > 
> > 
> >              
> >                          Lorem ipsum
> >                          Lorem ipsum dolor sit amet,
> > consectetur adipisicing
> > elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> > aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> > laboris nisi ut aliquip ex ea commodo consequat.
> >                          images/coal.jpg
> >              
> > 
> > . etc
>
> > now on  tag i need to enter some formating elements like
> >bold etc, if i enter html elements this line "desc = $
> > (this).find("description").text();" will strip all my html code ..
> > probably because of the .text() function at the end, my question is
> > what function to try at the end because .html() is not working like
> > this "desc = $(this).find("description").html();" is not working ..
> > basically i need to be able to read the html elements too so i can
> > display in the div that will display the info ... dose anybody know
> > some jquery function that dose that ?
>
> > Thanks!
>
> >  graycol.gif
> > < 1KViewDownload
>
> >  ecblank.gif
> > < 1KViewDownload
>
>
>
>  graycol.gif
> < 1KViewDownload
>
>  ecblank.gif
> < 1KViewDownload


[jQuery] Re: html in xml tag

2009-08-12 Thread Seth

sorry you are right :) not knowing everything is not very helpful,
well i'm playing a bit with jquery and i made 1 page and 1 file with
xml data .. the xml you have seen it above now i try to read the data
from xml and insert it in to the html page, i will have a name witch
will be the title of the page 1 image and description, now the
description i want to be able to enter html code so i can format the
text like bold, italic, list, ol, li, p, etc, and by having more items
that means i can have more pages and like this i can build an entire
website with out sql or php or whatever language, it's just and idea
that i'm trying out, and this is the thing where i got stuck .. i
can't read html from xml .. if i enter html info in xml like  
 etc my scripts are working but they strip the html tags thats
because of the .text() function at the end of this line "desc = $
(this).find("description").text();" so they work but no formatting, if
i enter 

[jQuery] Transforming input as it's typed

2009-08-12 Thread Brett Ritter

My workplace has a lot of people doing manual entry.  I'm looking to
provide some friendly automatic formatting of data as they type it.

I have working code (thus far) but I want to ensure I'm doing things
in a sane way (there's a surprising amount you can do insanely that
still works :) ).

Here's a function below that transforms a phone number - the worker
enters the digits(only), the field reflects (and could also accept)
the fully formatted version (e.g. (123) 456-7890 ).
I'm building this towards a plugin model (ala masked input with happy
coexistence with validate)

$("#example").keyup(function(){
var val = $(this).val();
if(/^[-\d\(\) ]*$/.test(val)){
var base = val.replace(/[-\(\) ]/g, '');
var size = base.length;
if(size < 3){  // Area code
// Leave unchanged
}
else if (size < 6){
val = "(" + base.slice(0,3) + ") " + 
base.slice(3);
}
else if(size < 11){
val = "(" + base.slice(0,3) + ") " + 
base.slice(3,6) + "-" + base.slice(6);
}
$(this).val(val);
}   
});

Comments appreciated.
-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson

Scratch that, my bad.  On closer look its not RSS :)  (its the first thing
that comes to mind when i see  followed by )

My previous question still stands though, are you just wanting to read the
contents of the description field?

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Michael Lawson/Raleigh/Contr/i...@ibmus   
   
  To: jquery-en@googlegroups.com   
   
  Cc: "jQuery (English)"   
   
  Date:   08/12/2009 04:01 PM  
   
  Subject:[jQuery] Re: html in xml tag 
   





It looks like you're using an RSS feed given the xml format, so you
probably want to use the CDATA sections anyways so that RSS readers don't
get confused by the HTML tags.

Now, maybe I just don't understand exactly what you're trying to
accomplish? Are you saying you want to just read the contents of the
description field?

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone: 1-276-206-8393
E-mail: mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'

Inactive hide details for Seth ---08/12/2009 03:48:48 PM---Thank you
Michael for your reply however wrapping the data intro 
   
   
 To:"jQuery (English)" 
   
   
 Date:  08/12/2009 03:48 PM
   
   
 Subject:   [jQuery] Re: html in xml tag   
   






Thank you Michael for your reply however wrapping the data intro  wrote:
> Try wrapping your html text in a CDATA section so that the xml parser
> doesn't strip them out
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone:  1-276-206-8393
> E-mail:  mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
>   From:       Seth 

>
>   To:         "jQuery (English)" 

>
>   Date:       08/12/2009 11:41 AM

>
>   Subject:    [jQuery] html in xml tag

>
> Hi guys,
>
> I have an XML file like this
>
> 
> 
>              
>                          Lorem ipsum
>                          Lorem ipsum dolor sit amet,
> consectetur adipisicing
> elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> laboris nisi ut aliquip ex ea commodo consequat.
>                          images/coal.jpg
>              
> 
> . etc
>
> now on  tag i need to enter some formating elements like
>bold etc, if i enter html elements this line "desc = $
> (this).find("description").text();" will strip all my html code ..
> probably because of the .text() function at the end, my question is
> what function to try at the end because .html() is not working like
> this "desc = $(this).find("description").html();" is not working ..
> basically i need to be able to read the html elements too so i can
> display in the div that will display the info ... dose anybody know
> some jquery function that dose that ?
>
> Thanks!
>
>  graycol.gif
> < 1KViewDownload
>
>  ecblank.gif
> < 1KViewDownload


<><>

[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson

It looks like you're using an RSS feed given the xml format, so you
probably want to use the CDATA sections anyways so that RSS readers don't
get confused by the HTML tags.

Now, maybe I just don't understand exactly what you're trying to
accomplish?  Are you saying you want to just read the contents of the
description field?

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'


   
  From:   Seth   
   
  To: "jQuery (English)"   
   
  Date:   08/12/2009 03:48 PM  
   
  Subject:[jQuery] Re: html in xml tag 
   






Thank you Michael for your reply however wrapping the data intro  wrote:
> Try wrapping your html text in a CDATA section so that the xml parser
> doesn't strip them out
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone:  1-276-206-8393
> E-mail:  mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
>   From:       Seth 

>
>   To:         "jQuery (English)" 

>
>   Date:       08/12/2009 11:41 AM

>
>   Subject:    [jQuery] html in xml tag

>
> Hi guys,
>
> I have an XML file like this
>
> 
> 
>              
>                          Lorem ipsum
>                          Lorem ipsum dolor sit amet,
> consectetur adipisicing
> elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> laboris nisi ut aliquip ex ea commodo consequat.
>                          images/coal.jpg
>              
> 
> . etc
>
> now on  tag i need to enter some formating elements like
>bold etc, if i enter html elements this line "desc = $
> (this).find("description").text();" will strip all my html code ..
> probably because of the .text() function at the end, my question is
> what function to try at the end because .html() is not working like
> this "desc = $(this).find("description").html();" is not working ..
> basically i need to be able to read the html elements too so i can
> display in the div that will display the info ... dose anybody know
> some jquery function that dose that ?
>
> Thanks!
>
>  graycol.gif
> < 1KViewDownload
>
>  ecblank.gif
> < 1KViewDownload

<><>

[jQuery] Re: html in xml tag

2009-08-12 Thread Seth

Thank you Michael for your reply however wrapping the data intro  wrote:
> Try wrapping your html text in a CDATA section so that the xml parser
> doesn't strip them out
>
> cheers
>
> Michael Lawson
> Development Lead, Global Solutions, ibm.com
> Phone:  1-276-206-8393
> E-mail:  mjlaw...@us.ibm.com
>
> 'Whether one believes in a religion or not,
> and whether one believes in rebirth or not,
> there isn't anyone who doesn't appreciate kindness and compassion..'
>
>   From:       Seth                                  
>                                                  
>
>   To:         "jQuery (English)"                  
>                                                  
>
>   Date:       08/12/2009 11:41 AM                                             
>                                                  
>
>   Subject:    [jQuery] html in xml tag                                        
>                                                 
>
> Hi guys,
>
> I have an XML file like this
>
> 
> 
>              
>                          Lorem ipsum
>                          Lorem ipsum dolor sit amet,
> consectetur adipisicing
> elit, sed do eiusmod tempor incididunt ut labore et dolore magna
> aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
> laboris nisi ut aliquip ex ea commodo consequat.
>                          images/coal.jpg
>              
> 
> . etc
>
> now on  tag i need to enter some formating elements like
>bold etc, if i enter html elements this line "desc = $
> (this).find("description").text();" will strip all my html code ..
> probably because of the .text() function at the end, my question is
> what function to try at the end because .html() is not working like
> this "desc = $(this).find("description").html();" is not working ..
> basically i need to be able to read the html elements too so i can
> display in the div that will display the info ... dose anybody know
> some jquery function that dose that ?
>
> Thanks!
>
>  graycol.gif
> < 1KViewDownload
>
>  ecblank.gif
> < 1KViewDownload


[jQuery] Re: Post variable array

2009-08-12 Thread cz231

I think I know the problem...My postThis variable ends up being just
one big string. How do I convert it to the correct type? (I'm not even
sure what type is correct)

On Aug 12, 2:00 pm, James  wrote:
> I don't see the problem...
>
> Something like this should work:
>
> var action = 'somepage.php';
> var postThis = {Name:"Jimmy", Username:"Something",
> Password:"something", Email:"someth...@someplace.com"};
> $.post(action, postThis, function(data) {
>     alert('done');
>
> });
>
> Otherwise, post your real code for us to see what's going on.
>
> On Aug 12, 8:52 am, cz231  wrote:
>
> > Oops. I'm sorry.
>
> > action is the url to be posted to, and postThis is equal to: Name:
> > "Jimmy", Username: "Something", Password:
> > "something", Email: "someth...@someplace.com"
>
> > On Aug 12, 12:51 pm, Jörn Zaefferer 
> > wrote:
>
> > > What values do the variables "action"  and postThis contain? You
> > > describe them as "actions", isn't telling me anything.
>
> > > Jörn
>
> > > On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > > > Hi,
>
> > > > I'm using AJAX to submit a form. I'm using the POST method. Example:
>
> > > > $.post(action, postThis);
>
> > > > Both action and postThis are actions. Action is the URL and postThis
> > > > is the data to be submitted. Right now, this isn't working. I know I
> > > > can pass the action variable because that has always been working. But
> > > > how do I put the parameters there as a variable? It will work if I
> > > > express the parameters like this:
>
> > > > $.post(action, {Name: "Jimmy", Username: "Something", Password:
> > > > "something", Email: "someth...@someplace.com" });
>
> > > > Any help would be greatly appreciated.


[jQuery] Re: JSON how to transform an object into an array?

2009-08-12 Thread Stephan Beal

On Aug 12, 8:22 pm, "Michael Geary"  wrote:
> > on the server side, i personally recommend using the json2.js
> > API (i.e. JSON.parse() and JSON.stringify()) over
> > $.getJSON(). getJSON uses an HTTP GET, which is very rude
> > vis-a-vis Apache logs (because all your JSON gets logged
> > there in urlencoded form).
>
> No, that's wrong. Yes, $.getJSON() does do a GET, but that has no effect at
> all on the *download* format, which is what Mark is asking about given his
> use of json_encode.

It's not wrong, but it could have been worded better. First, i wrote
"server side" instead of "client side", which is just downright wrong.
i wasn't referring to the download format, but to the type of request.
Requests *always* come from the client, so the direction of the
exchange was implicit (to the server as opposed to from the server).

> Your downloaded JSON data will not show up in any Apache logs (unless, I
> suppose, if you have some kind of ultra-verbose logging turned on that logs

i didn't mean to imply that it would. i was only referring to the GET
parameters sent from the client. Those get logged.



[jQuery] Can I select and/or ?

2009-08-12 Thread rolfsf

I've got a table in which I've set up some column groups.















...

Ideally, I'd like to be able to toggle the visibility of the  - can I select them as cols in jquery, or do I need to
get at them via the rows?

Thanks!


[jQuery] Re: FadeOut - Pause - FadeIn (Force jQuery to wait for fade event to complete before continuing)

2009-08-12 Thread webhead81

Cheesy or not, that's a really clever solution, and I like it!

Unfortunately, since I'm not acting on the same element, but rather, a
different element that changes over time, I modified your (excellently
cheesy) example:

// The below function repeatedly gets called, to do the rotating
function show_next_rotating_item(t)
{
//Fade out our current image.
jQuery(t).fadeOut(2000);
//Swap the current image with the next one in the list.
var next_rotating_item = jQuery(t).siblings('.rotating_item:random');
if(!next_rotating_item.attr('class')){
next_rotating_item = jQuery('#rotating_items
div.rotating_item:first');
}
//Pause for 2 seconds while JavaScript tries to animate "foo" for 2
seconds, THEN fade in.
next_rotating_item.animate({foo: 1}, 2000).fadeIn(1000);
//Set our varaible for the next item in rotation.
showing = next_rotating_item;
}

Everything works now!

I really appreciate all the help.

For future reference, should there be anybody out there want a
javascript image rotator, and is looking for a way to pause, delay,
sleep, wait, or otherwise halt the serial execution of code so that
you can add some space between your fade in and fade out, this is one
way to do it.

PROBLEM SOLVED!
Thanks Karl. :)

On Aug 12, 1:05 pm, Karl Swedberg  wrote:
> If you're acting on the same element, you can just chain the effects:
>
> jQuery(t).fadeOut(2000).fadeIn(1000);
>
> That should fade out the element(s) represented by variable t and then  
> fade them back in.
>
> If you need to pause in between the fadeOut and the fadeIn, a cheesy  
> but effective way to do it (and I'm all for cheesy) would be something  
> like this:
>
> jQuery(t).fadeOut(2000).animate({foo: 1}, 2000).fadeIn(1000);
>
> Note the arbitrary property in the animate() option's object literal.  
> jQuery will try to animate the foo property, whatever that is. But it  
> doesn't matter. It will take 2000ms trying to do it. Then it will fade  
> the element back in.
>
> --Karl
>
> 
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Aug 11, 2009, at 7:31 PM, webhead81 wrote:
>
>
>
> > My apologies is this is a double post - It seems Google Groups just
> > dropped my last message (I'm not even sure how that's possible), so
> > here goes.
>
> > A little over a year ago, user Iminay requested help in getting some
> > of his code to properly pause after a fade event before continuing
> > with execution:
>
> >http://groups.google.com/group/jquery-en/browse_thread/thread/bbe0471...
>
> > It seems he was able to resolve his problem after two extremely
> > helpful responses were posted. Unfortunately, I haven't had the same
> > success, and even after trying to follow the solutions posted by David
> > McFarland or Karl Swedberg, I'm still confused and unable to modify
> > their code to solve this particular problem.
>
> > Specifically, I have a jQuery-based image rotator that is mostly
> > governed by this chunk of code:
>
> > // The below function repeatedly gets called by setInterval
> > ("show_next_rotating_item(showing)", 5000), to do the rotating
> > function show_next_rotating_item(t)
> > {
> >    jQuery(t).fadeOut(2000);
>
> >    var next_rotating_item = jQuery(t).siblings('.rotating_item:random');
> >    if(!next_rotating_item.attr('class')){
> >            next_rotating_item = jQuery('#rotating_items
> > div.rotating_item:first');
> >    }
> >    //Pause for some user defined amount of time HERE!
> >    next_rotating_item.fadeIn(1000);
> >    showing = next_rotating_item;
> > }
>
> > As you can see, it's a fairly simple chunk of code... And as indicated
> > by the comment, I'm trying to pause in between a fadeOut() and fadeIn
> > () function call.
>
> > I've tried adapting David and Karl's suggestions, but I haven't had
> > much success. I've also looked into setTimeout(), but it seems that
> > function doesn't produce the desired behavior - it does indeed execute
> > the passed function after a specified delay, but doesn't seem to do it
> > in a serial fashion. That is, it seems to spin the execution of that
> > function off into another process, continue on with the next line of
> > code, and then executing the spun-off function in parallel after the
> > appropriate delay.
>
> > In other languages I'm familiar with, there have always been a sleep
> > (), wait(), pause(), etc. function that one can call to pause the
> > serial execution of a function for a given amount of time. How might
> > one achieve that here?
>
> > In the solutions posted by David and Karl in the aforementioned link,
> > there was mention of "callback functions". I read up on how they work,
> > but I don't see how I can apply them to this situation. The code those
> > two posted is much more... complex... than what I can read, and I was
> > hoping someone could make it a bit more simple.
>
> > While theirs is nice and compact, it's less human/programmer-r

[jQuery] Re: Post variable array

2009-08-12 Thread James

I don't see the problem...

Something like this should work:

var action = 'somepage.php';
var postThis = {Name:"Jimmy", Username:"Something",
Password:"something", Email:"someth...@someplace.com"};
$.post(action, postThis, function(data) {
alert('done');
});

Otherwise, post your real code for us to see what's going on.

On Aug 12, 8:52 am, cz231  wrote:
> Oops. I'm sorry.
>
> action is the url to be posted to, and postThis is equal to: Name:
> "Jimmy", Username: "Something", Password:
> "something", Email: "someth...@someplace.com"
>
> On Aug 12, 12:51 pm, Jörn Zaefferer 
> wrote:
>
> > What values do the variables "action"  and postThis contain? You
> > describe them as "actions", isn't telling me anything.
>
> > Jörn
>
> > On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > > Hi,
>
> > > I'm using AJAX to submit a form. I'm using the POST method. Example:
>
> > > $.post(action, postThis);
>
> > > Both action and postThis are actions. Action is the URL and postThis
> > > is the data to be submitted. Right now, this isn't working. I know I
> > > can pass the action variable because that has always been working. But
> > > how do I put the parameters there as a variable? It will work if I
> > > express the parameters like this:
>
> > > $.post(action, {Name: "Jimmy", Username: "Something", Password:
> > > "something", Email: "someth...@someplace.com" });
>
> > > Any help would be greatly appreciated.
>
>


[jQuery] Re: AJAX and JSON

2009-08-12 Thread Joey Derrico
Actually I am sending data to the server from a form so post is needed. But
I do agree that normally get is teh better method if you don't need to send
data to a server.

Joey

On Wed, Aug 12, 2009 at 2:27 PM, Michael Geary  wrote:

>
> > > From: Michael Geary
> > > Just use $.getJSON() or $.ajax() with the 'json' or 'jsonp'
> > > dataType as needed.
>
> > From: Stephan Beal
> > Speaking of: i recommend AGAINST using getJSON() because it
> > muddles up my Apache logs horribly (the JSON gets encoded in
> > the request, which gets logged as urlencoded garbage). JSON
> > should, IMO, be sent over POST.
>
> I just replied to a similar point in another thread, but just for anyone
> who
> is reading this thread...
>
> Your point is well taken about *uploading* JSON data with POST instead of
> GET. In that case, using JSON.stringify() and putting the data in a POST
> would be a very good idea. (If you're updating data on the server, then you
> should be using POST instead of GET anyway, even if you weren't using
> JSON.)
>
> But if you're just *downloading* JSON data and not updating state on the
> server, then you may as well just use a GET. The query parameters from the
> GET will show up in your server log, but those aren't that lengthy in a
> typical GET request.
>
> -Mike
>
>


[jQuery] Re: Post variable array

2009-08-12 Thread cz231

Oops. I'm sorry.

action is the url to be posted to, and postThis is equal to: Name:
"Jimmy", Username: "Something", Password:
"something", Email: "someth...@someplace.com"

On Aug 12, 12:51 pm, Jörn Zaefferer 
wrote:
> What values do the variables "action"  and postThis contain? You
> describe them as "actions", isn't telling me anything.
>
> Jörn
>
> On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> > Hi,
>
> > I'm using AJAX to submit a form. I'm using the POST method. Example:
>
> > $.post(action, postThis);
>
> > Both action and postThis are actions. Action is the URL and postThis
> > is the data to be submitted. Right now, this isn't working. I know I
> > can pass the action variable because that has always been working. But
> > how do I put the parameters there as a variable? It will work if I
> > express the parameters like this:
>
> > $.post(action, {Name: "Jimmy", Username: "Something", Password:
> > "something", Email: "someth...@someplace.com" });
>
> > Any help would be greatly appreciated.


[jQuery] Re: IE8 Selector Bug?

2009-08-12 Thread John Resig
It looks similar to the one above, but different. I'll try and check in to
them both.

gentry - can you file a bug for the issue you found, preferably with a full
test case?

--John


On Wed, Aug 12, 2009 at 2:21 PM, Jeffrey Kretz wrote:

>
> My guess is its related to a problem I ran into with the Sizzle child
> selectors in 1.3.x
>
> I opened a ticket about a month ago
>
> http://dev.jquery.com/ticket/4917
>
> But it hasn't been reviewed yet.
>
> JK
>
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> Behalf Of gentry
> Sent: Wednesday, August 12, 2009 10:26 AM
> To: jQuery (English)
> Subject: [jQuery] IE8 Selector Bug?
>
>
> Anybody know why this doesn't work in IE8 with jQuery version 1.2.6?
> It works in the latest jQuery version but I can't move to it yet
> because of some other issues. I'm trying to clear all the textboxes in
> a table row but only the 1st textbox gets cleared in IE8.
>
> $('#Row_1 input[type=text]').each(function() {
>$(this).val('');
>  });
>
>


[jQuery] Re: Bind Validate to button click event

2009-08-12 Thread Rockinelle

That did the trick, thank you.
-Eric

On Aug 12, 11:31 am, Jörn Zaefferer 
wrote:
> Try this:
>
>  $('#searchButton').click(function(){
>           if ($('#testBlog').valid())
>                formDoAjaxSubmit();
>        });
>
> Jörn
>
>
>
> On Wed, Aug 12, 2009 at 8:04 PM, Rockinelle wrote:
>
> > I am walking into an existing form that uses a custom ajax request to
> > display search results at the button of the page. This is triggered by
> > clicking a form button. I want to trigger the validation on this same
> > click event rather than a submit event. I am just using basic
> > validation at the moment.
>
> > 
> > $(document).ready(function(){
> >        $('#testBlog').validate();
>
> >        $('#searchButton').click(function(){
> >                formDoAjaxSubmit();
> >        });
> > });
> > 
>
> > 
> >         > title="Please Select a Category" style="width:610px" >
> >                
> >                
> >                
> >                
> >         
> >          > id="searchButton">
> > 


[jQuery] Re: Bind Validate to button click event

2009-08-12 Thread Jörn Zaefferer

Try this:

 $('#searchButton').click(function(){
  if ($('#testBlog').valid())
   formDoAjaxSubmit();
   });

Jörn

On Wed, Aug 12, 2009 at 8:04 PM, Rockinelle wrote:
>
> I am walking into an existing form that uses a custom ajax request to
> display search results at the button of the page. This is triggered by
> clicking a form button. I want to trigger the validation on this same
> click event rather than a submit event. I am just using basic
> validation at the moment.
>
>
> 
> $(document).ready(function(){
>        $('#testBlog').validate();
>
>        $('#searchButton').click(function(){
>                formDoAjaxSubmit();
>        });
> });
> 
>
> 
>         title="Please Select a Category" style="width:610px" >
>                
>                
>                
>                
>         
>          id="searchButton">
> 
>


[jQuery] Re: IE8 Selector Bug?

2009-08-12 Thread amuhlou

Not confirming or disconfirming that it is a bug, but using the attr()
method worked for me

$('#Row_1 input[type=text]').each(function() {
$(this).attr('value','');
 });

On Aug 12, 1:25 pm, gentry  wrote:
> Anybody know why this doesn't work in IE8 with jQuery version 1.2.6?
> It works in the latest jQuery version but I can't move to it yet
> because of some other issues. I'm trying to clear all the textboxes in
> a table row but only the 1st textbox gets cleared in IE8.
>
> $('#Row_1 input[type=text]').each(function() {
>         $(this).val('');
>  });


[jQuery] Re: AJAX and JSON

2009-08-12 Thread Michael Geary

> > From: Michael Geary
> > Just use $.getJSON() or $.ajax() with the 'json' or 'jsonp' 
> > dataType as needed.

> From: Stephan Beal
> Speaking of: i recommend AGAINST using getJSON() because it 
> muddles up my Apache logs horribly (the JSON gets encoded in 
> the request, which gets logged as urlencoded garbage). JSON 
> should, IMO, be sent over POST.

I just replied to a similar point in another thread, but just for anyone who
is reading this thread...

Your point is well taken about *uploading* JSON data with POST instead of
GET. In that case, using JSON.stringify() and putting the data in a POST
would be a very good idea. (If you're updating data on the server, then you
should be using POST instead of GET anyway, even if you weren't using JSON.)

But if you're just *downloading* JSON data and not updating state on the
server, then you may as well just use a GET. The query parameters from the
GET will show up in your server log, but those aren't that lengthy in a
typical GET request.

-Mike



[jQuery] Re: JSON how to transform an object into an array?

2009-08-12 Thread Michael Geary

> > From: Mark
> > $event = json_encode($super_array);

> From: Stephan Beal
> How about simply:
> $event = '['.$event.']';

If $event contains the JSON encoded object from the previous message, then
this code would not convert that object into a JSON array. It would simply
create an array of one element, where that element is the original object.
Probably not what Mark wants.

Mark, PHP uses a single Array type for both numerically-indexed arrays (like
an Array in JavaScript) *and* for associative arrays (like an Object in
JavaScript). So the json_encode function inspects the array to see whether
it has only numeric indexes or has other properties as well, and then it
generates either a JSON array or object depending.

If you want a JSON array to be output, make sure your PHP array is a simple
array, e.g.:

array( 'x', 'y', 'z' )

and *not* an associative array, e.g:

array( 'a' => 'x', 'b' => 'y', 'c' => 'z' )

> on the server side, i personally recommend using the json2.js 
> API (i.e. JSON.parse() and JSON.stringify()) over 
> $.getJSON(). getJSON uses an HTTP GET, which is very rude 
> vis-a-vis Apache logs (because all your JSON gets logged 
> there in urlencoded form).

No, that's wrong. Yes, $.getJSON() does do a GET, but that has no effect at
all on the *download* format, which is what Mark is asking about given his
use of json_encode.

Your downloaded JSON data will not show up in any Apache logs (unless, I
suppose, if you have some kind of ultra-verbose logging turned on that logs
the entire content of all HTTP responses). The Apache logs will include all
the query parameters sent up with an HTTP *request*, but not all the content
of each response.

So if you are *uploading* JSON data to your server, yes, it's a good idea to
use JSON.stringify() and put it in a POST. If you are merely querying the
server with ordinary (typically fairly small) query parameters, then using a
GET will not clutter your logs.

Also, how would you use json2.js on your server? Mark's server is running
PHP, not JavaScript. json2.js is JavaScript code to run in the browser.

-Mike



[jQuery] Re: IE8 Selector Bug?

2009-08-12 Thread Jeffrey Kretz

My guess is its related to a problem I ran into with the Sizzle child
selectors in 1.3.x

I opened a ticket about a month ago

http://dev.jquery.com/ticket/4917

But it hasn't been reviewed yet.

JK


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of gentry
Sent: Wednesday, August 12, 2009 10:26 AM
To: jQuery (English)
Subject: [jQuery] IE8 Selector Bug?


Anybody know why this doesn't work in IE8 with jQuery version 1.2.6?
It works in the latest jQuery version but I can't move to it yet
because of some other issues. I'm trying to clear all the textboxes in
a table row but only the 1st textbox gets cleared in IE8.

$('#Row_1 input[type=text]').each(function() {
$(this).val('');
 });



[jQuery] Trigger validate on button click event

2009-08-12 Thread Rockinelle

I am trying to trigger validation on a form that is using custom ajax
request that is processed when a button is clicked. I have scoured the
docs and I'm not clear how I can trigger validation on this click. The
form is using basic validation at the moment.

$(document).ready(function(){
$('#testForm').validate();

$('#searchButton').click(function(){
formDoAjaxSubmit();
});
});


  
...
...
...
  





[jQuery] Hooking up click() callbacks in IE with an 'each' loop

2009-08-12 Thread Greg Johnston

Hi all,

I've been working on a project using jQuery that runs just fine in FF,
Safari, Chrome, Opera...you know the deal. IE is patchy at best.

One of my central problems is this bit of code:

$(".item").each(function() {
$(this).find(".openlink").click(bodyCallback);
});

As you can imagine, the page includes a number of DIVs of class
'item', each of which has a child item of class 'openlink'. The goal
here is to link up a callback, defined earlier, to each of these
'openlink' children. HTML setup is roughly like this:







[...content...]



Now, the issue is that, in any other browser, clicking on the
'openlink' properly calls the callback. In Internet Explorer (this is
IE8, have not tested with IE7 or, God forbid, IE6 yet), the callback
for the LAST 'item' DIV is called, whenever ANY 'openlink' is clicked.

Each callback's action is dependent on exactly what element it is
connected to. In other words, the callback includes a line:

var idnum = $(this).parents(".item").attr("id").replace("item-div-",
"");

It then uses this idnum for various purposes.

When I click ANY 'openlink', therefore 'idnum' comes out to the ID of
the last 'item' DIV on the page.

Is there a known bug with interaction between 'each' and events? Is
there something I'm doing wrong?

Any ideas would be greatly appreciated.

Thanks,
Greg Johnston


[jQuery] Problem with js redirect when using getJSON

2009-08-12 Thread Grimori

Hi everyone,

The problem I'm facing is as follows. I'm using a JSON call to check
some data before doing a JS redirect to a different page. The redirect
works but it's impossible to get back to the initial page using the
browser's back button. The initial location is not being stored in the
browser's history.

This is the script simplified. If placed on http://site1.example.com/
when it's executed it redirects to http://site2.example.com/ but
there's no way to go back to http://site1.example.com/ using the
browser's back button.


$(document).ready(function(){
$('#click').click(function(){
$.getJSON('index.php?jsoncallback=?', function(msg){
location.href='http://site2.example.com/';
});
});
})


Any help is appreciated.


[jQuery] jCarousel - Accordian clash

2009-08-12 Thread andy marshall

Hi there. Hoping this is the right place to be asking this.

I'm developing a website using an accordian and a carousel (http://
sorgalla.com/projects/jcarousel/).
The accordian has 2-4 items in it, one of which is a vertically
carouselled list of comments.

If I've set the accordian to start on an item that isn't the one with
the carousel in it, I'm finding I'm getting the following error
message:

"jCarousel: No width/height set for items. This will cause an infinite
loop. Aborting..."

I'm assuming this is because the carousel requires you to specify the
height and width of its list items, and whilst you can do this, the
accordian initialising with the carousel hidden has set inline heights
to 0 hence the error being thrown.

Does anyone have any suggestions on how to fix this one?
Please bear in mind, I have been using jquery for only a few weeks and
am still very new to it, and have no significant javascript
experience, so any suggestions will have to be explained in pretty
simple terms!

Thanks.


[jQuery] IE8 Selector Bug?

2009-08-12 Thread gentry

Anybody know why this doesn't work in IE8 with jQuery version 1.2.6?
It works in the latest jQuery version but I can't move to it yet
because of some other issues. I'm trying to clear all the textboxes in
a table row but only the 1st textbox gets cleared in IE8.

$('#Row_1 input[type=text]').each(function() {
$(this).val('');
 });


[jQuery] Bind Validate to button click event

2009-08-12 Thread Rockinelle

I am walking into an existing form that uses a custom ajax request to
display search results at the button of the page. This is triggered by
clicking a form button. I want to trigger the validation on this same
click event rather than a submit event. I am just using basic
validation at the moment.



$(document).ready(function(){
$('#testBlog').validate();

$('#searchButton').click(function(){
formDoAjaxSubmit();
});
});








 
 



[jQuery] Re: FadeOut - Pause - FadeIn (Force jQuery to wait for fade event to complete before continuing)

2009-08-12 Thread Karl Swedberg

If you're acting on the same element, you can just chain the effects:

jQuery(t).fadeOut(2000).fadeIn(1000);

That should fade out the element(s) represented by variable t and then  
fade them back in.


If you need to pause in between the fadeOut and the fadeIn, a cheesy  
but effective way to do it (and I'm all for cheesy) would be something  
like this:


jQuery(t).fadeOut(2000).animate({foo: 1}, 2000).fadeIn(1000);

Note the arbitrary property in the animate() option's object literal.  
jQuery will try to animate the foo property, whatever that is. But it  
doesn't matter. It will take 2000ms trying to do it. Then it will fade  
the element back in.



--Karl


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




On Aug 11, 2009, at 7:31 PM, webhead81 wrote:



My apologies is this is a double post - It seems Google Groups just
dropped my last message (I'm not even sure how that's possible), so
here goes.

A little over a year ago, user Iminay requested help in getting some
of his code to properly pause after a fade event before continuing
with execution:

http://groups.google.com/group/jquery-en/browse_thread/thread/bbe0471b780e666a

It seems he was able to resolve his problem after two extremely
helpful responses were posted. Unfortunately, I haven't had the same
success, and even after trying to follow the solutions posted by David
McFarland or Karl Swedberg, I'm still confused and unable to modify
their code to solve this particular problem.

Specifically, I have a jQuery-based image rotator that is mostly
governed by this chunk of code:

// The below function repeatedly gets called by setInterval
("show_next_rotating_item(showing)", 5000), to do the rotating
function show_next_rotating_item(t)
{
jQuery(t).fadeOut(2000);

var next_rotating_item = jQuery(t).siblings('.rotating_item:random');
if(!next_rotating_item.attr('class')){
next_rotating_item = jQuery('#rotating_items
div.rotating_item:first');
}
//Pause for some user defined amount of time HERE!
next_rotating_item.fadeIn(1000);
showing = next_rotating_item;
}

As you can see, it's a fairly simple chunk of code... And as indicated
by the comment, I'm trying to pause in between a fadeOut() and fadeIn
() function call.

I've tried adapting David and Karl's suggestions, but I haven't had
much success. I've also looked into setTimeout(), but it seems that
function doesn't produce the desired behavior - it does indeed execute
the passed function after a specified delay, but doesn't seem to do it
in a serial fashion. That is, it seems to spin the execution of that
function off into another process, continue on with the next line of
code, and then executing the spun-off function in parallel after the
appropriate delay.

In other languages I'm familiar with, there have always been a sleep
(), wait(), pause(), etc. function that one can call to pause the
serial execution of a function for a given amount of time. How might
one achieve that here?

In the solutions posted by David and Karl in the aforementioned link,
there was mention of "callback functions". I read up on how they work,
but I don't see how I can apply them to this situation. The code those
two posted is much more... complex... than what I can read, and I was
hoping someone could make it a bit more simple.

While theirs is nice and compact, it's less human/programmer-readable,
and that's what I need right now.

Does anyone have any ideas? I'm sorry if the solution is obvious or
self-evident... I'm not as proficient at JavaScript as I am at some
other languages and I'm still learning.




[jQuery] Re: JSON how to transform an object into an array?

2009-08-12 Thread Michael Geary
You don't need to eval the JSON data. Let jQuery do it for you. Simply
change $.get to $.getJSON. Or, if you prefer, use $.ajax with
dataType:'json' for more flexibility (such as the ability to have an error
callback).
 
Regarding the array vs. object coming from the server, that would be a
question of how you write your PHP code. It wouldn't be affected by jQuery
one way or the other.
 
-Mike



  _  

From: Dhruva Sagar

I think this is what you are looking for 


data = eval ( '(' + data + ')' );


Thanks & Regards,
Dhruva Sagar.


Jonathan Swift
   - "May
you live every day of your life." 


On Wed, Aug 12, 2009 at 3:18 PM, Mark  wrote:



Hi all.
I got an php page who picks up data out of my data base and puts it in
a multidimensinal array. That array is being encoded to Json

$event = json_encode($super_array);

Then i made an javasript get funtion to get that array to my main
page.

function get(){
$.get("../position of my file/test.php", function(data){
   alert (""+data);
   });

The var data doesn't give me an array it gives me an object while i
programmed it to give me an array (inplace of force_object):

{"5":
{"id":"5","title":"test","start_datum":"6161616","end_datum":"663461","afspr
aak_type":"memo"},"10":
{"id":"10","title":"bla","start_datum":"4819028","end_datum":"8230948","afsp
raak_type":"verjaardag"}}

What i need to have is that it gives me an array that looks something
like this:

[
 {
id:5,
title:test,
start_datum:6161616,
end_datum: 663461,
afspraak_type: Memo
 }
 {
id:10,
title:bla,
   start_datum: 4819028,
   end_datum:8230948,
   afspraak_type:Verjaardag
 }
]
What is the best way to get to this?

Mark






[jQuery] Re: Post variable array

2009-08-12 Thread Jörn Zaefferer

What values do the variables "action"  and postThis contain? You
describe them as "actions", isn't telling me anything.

Jörn

On Wed, Aug 12, 2009 at 7:40 PM, cz231 wrote:
>
> Hi,
>
> I'm using AJAX to submit a form. I'm using the POST method. Example:
>
> $.post(action, postThis);
>
> Both action and postThis are actions. Action is the URL and postThis
> is the data to be submitted. Right now, this isn't working. I know I
> can pass the action variable because that has always been working. But
> how do I put the parameters there as a variable? It will work if I
> express the parameters like this:
>
> $.post(action, {Name: "Jimmy", Username: "Something", Password:
> "something", Email: "someth...@someplace.com" });
>
> Any help would be greatly appreciated.
>
>


[jQuery] Re: Error when trying to download jquery

2009-08-12 Thread Brett Ritter

On Wed, Aug 12, 2009 at 1:43 PM, mrbutler wrote:
> Sorry, shouldn't have said 'run'.  After I save jquery-1.3.2.min.js, I
> right click on it, select open,
> then the error pops up.

That's running :)

Jquery is a javascript library, meaning that it's a plain text file
that can't be executed.
If it linked to via an HTML document, which is in turn loaded and
parsed by a browser, the library functions are available to any
javascript on that page.

If you pick "open with", say, notepad, you can see the jquery (which
will not be remotely interesting to look at, particularly the .min.js
version).

The jquery.com site has some good tutorials to get started with it,
but don't expect the file itself to "do" anything.
-- 
Brett Ritter / SwiftOne
swift...@swiftone.org


[jQuery] Re: form plugin not working

2009-08-12 Thread Scott Grizzard

- Scott Grizzard
sc...@scottgrizzard.com
http://www.scottgrizzard.com/

-Original Message-
From: sunny 

Date: Wed, 12 Aug 2009 07:04:01 
To: jQuery (English)
Subject: [jQuery] form plugin not working




New Organization Building Floor

//wait for the DOM to be loaded
  $(document).ready(function() {
// bind 'myForm' and provide a simple callback function
$('#orgbuildfloor').ajaxForm(function() {
alert("Organization Building Floor saved!");
   // document.getElementById('orgbuildfloor').reset();
  });
});

 $form)) ?>
isMultipart() and print
'enctype="multipart/form-data" ' ?>>
getObject()->isNew()): ?>


 
  
  
  renderLabel()?>:
  render()?>
  
  
  

  

   Cancel
  getObject()->isNew()): ?>
 getObject()->getId(), array('method' => 'delete',
'confirm' => 'Are you sure?')) ?>
  
  
   
  

  


  

  


Organization Building Floor List



  Id
  Building
  Floor description


$org_building_floor): ?>
">
  getId
() ?>
  getBuildingId() ?>
  getFloorDescription() ?>








[jQuery] Re: Old cookie data sent in AJAX request?

2009-08-12 Thread Stephan Beal

On Aug 12, 5:41 pm, "Michael Price" 
wrote:
> If, however, I submit an AJAX post request to add a product to the shopping
> cart on this site, it doesn't work. Investigating the AJAX behind this shows
> that two copies of every cookie named above is being sent - the first copies
> have older and now incorrect data in them, and are followed by the CORRECT
> data. Looks a bit like this:

If i'm not mistaken, this has to do with the path the cookies are set
for (i had a similar problem). Make sure that ALL of your cookie-set()
operations are using the same options for setting the cookie.


[jQuery] Re: Error when trying to download jquery

2009-08-12 Thread mrbutler

Sorry, shouldn't have said 'run'.  After I save jquery-1.3.2.min.js, I
right click on it, select open,
then the error pops up.


On Aug 12, 10:23 am, Liam Potter  wrote:
> you don't open and run jquery...what are you attempting here?
>
>
>
> mrbutler wrote:
> > IE7  version 7.0.5730.11
>
> > Open and run jquery-1.3.2.min.js
>
> > Error pops up:
>
> >  ---
> > Windows Script Host
> > ---
> > Script:    C:\Documents and Settings\it.mjb\Local Settings\Temporary
> > Internet Files\Content.IE5\F59KSW92\jquery-1.3.2.min[1].js
> > Line:      12
> > Char:      6947
> > Error:     'document' is undefined
> > Code:      800A1391
> > Source:    Microsoft JScript runtime error
>
> > ---
> > OK
> > ---
>
> > On Aug 12, 8:12 am, "Richard D. Worth"  wrote:
>
> >> Can you share some more details, and maybe a sample page? What browser(s)
> >> are you using? Could you put together the code you're trying on jsbin.com,
> >> so we can see what you're seeing:http://jsbin.com/
>
> >> - Richard
>
> >> On Wed, Aug 12, 2009 at 9:00 AM, mrbutler  wrote:
>
> >>> Still the same error when I run from either of the links.
>
> >>> On Aug 12, 2:29 am, "Richard D. Worth"  wrote:
>
>  I didn't have the same issue. Anyway, here are the direct links, for
> download:
>  Minified:http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js
>
>  Uncompressed:http://jqueryjs.googlecode.com/files/jquery-1.3.2.js
>
>  - Richard
>
>  On Tue, Aug 11, 2009 at 3:32 PM, mrbutler  wrote:
>
> > I receive an error:  'document' is undefined, when I try to run the
> > jquerydownload.- Hide quoted text -
>
>  - Show quoted text -- Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


[jQuery] Post variable array

2009-08-12 Thread cz231

Hi,

I'm using AJAX to submit a form. I'm using the POST method. Example:

$.post(action, postThis);

Both action and postThis are actions. Action is the URL and postThis
is the data to be submitted. Right now, this isn't working. I know I
can pass the action variable because that has always been working. But
how do I put the parameters there as a variable? It will work if I
express the parameters like this:

$.post(action, {Name: "Jimmy", Username: "Something", Password:
"something", Email: "someth...@someplace.com" });

Any help would be greatly appreciated.



[jQuery] Re: Citation for jQuery

2009-08-12 Thread Jörn Zaefferer

Hi Nathaniel,

what exactly do you want to cite? Its not clear from your question.

Regards
Jörn

On Tue, Aug 11, 2009 at 9:15 PM, Nathaniel wrote:
>
> Hello Devs:
>
> I'm preparing an academic paper in which I want to cite jQuery and
> jQuery UI.  Is there a specific publication you would recommend? At
> present I've got "jQuery Reference Guide" by Caffer and Swedberg, but
> perhaps there's an article somewhere which is more appropriate?
>
> Just want to give credit where it's due.
>
> --Nathaniel Tagg
>


[jQuery] Re: Dropdown menu Issue

2009-08-12 Thread Xenongasman

Any ideas?

On Aug 8, 2:18 pm, Xenongasman  wrote:
> Yes it does work fine, except that the animations will repeat
> themselves if you move on and off again quickly.
> So to remedy that I changed the script to:
> 
>         $(function(){
>                 $('#menu li').hover(
>             function() {
>                     
> $(this).find('ul:first').css({display:"none"}).stop().slideDown
> ();
>                 },
>         function(){
>                     $(this).find('ul:first').stop().slideUp('slow');
>                 });
>         });
>
> 
>
> Then try it and move over one menu then the other very quickly and
> you'll see what i explained. And it also adds a artifact in IE7.
> I suppose i could leave it as is and not use stop() but I just wanted
> to know if someone knew how to fix this.


[jQuery] Re: html in xml tag

2009-08-12 Thread Michael Lawson
Try wrapping your html text in a CDATA section so that the xml parser
doesn't strip them out

cheers

Michael Lawson
Development Lead, Global Solutions, ibm.com
Phone:  1-276-206-8393
E-mail:  mjlaw...@us.ibm.com

'Whether one believes in a religion or not,
and whether one believes in rebirth or not,
there isn't anyone who doesn't appreciate kindness and compassion..'



   
  From:   Seth
   

   
  To: "jQuery (English)"
   

   
  Date:   08/12/2009 11:41 AM   
   

   
  Subject:[jQuery] html in xml tag  
   

   






Hi guys,

I have an XML file like this



 
 Lorem ipsum
 Lorem ipsum dolor sit amet,
consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.
 images/coal.jpg
 

. etc

now on  tag i need to enter some formating elements like
   bold etc, if i enter html elements this line "desc = $
(this).find("description").text();" will strip all my html code ..
probably because of the .text() function at the end, my question is
what function to try at the end because .html() is not working like
this "desc = $(this).find("description").html();" is not working ..
basically i need to be able to read the html elements too so i can
display in the div that will display the info ... dose anybody know
some jquery function that dose that ?

Thanks!

<><>

[jQuery] Old cookie data sent in AJAX request?

2009-08-12 Thread Michael Price
Hi all,

Having a bit of a strange problem and I'm not altogether sure whether it's
jQuery related or something to do with the awful, awful code it's part of,
but I thought I'd post up here to see if I could get some help figuring that
out J

 

I've got a webpage which has three cookies on it, cart_id, user_data and
user_other. Navigating around the pages and using the Firefox Web Developer
Toolbar shows these cookies are fine, one of each is set, and they're the
correct values. 

 

If, however, I submit an AJAX post request to add a product to the shopping
cart on this site, it doesn't work. Investigating the AJAX behind this shows
that two copies of every cookie named above is being sent - the first copies
have older and now incorrect data in them, and are followed by the CORRECT
data. Looks a bit like this:

 

cart_id=4a6b2bec89523599aa20a6ff7cc148f7; user_data=12%7C; user_other=1;
PHPSESSID=4c20e081a27ccba42a1f1009905f6f56

; session_id=a56c7977d215631d6f9eebadab534089; user_data=5%7C424235235;
user_other=0; cart_id=4e77b0

044b97d0ba322a4641ee2fcf6b

 

As you can see, cart_id, user_data and user_other are there twice. PHP is
evidently picking up the first copy of each cookie - the older, incorrect
ones - and using these. Meaning the products go into the wrong cart and I've
got myself a bit of a problem.

 

Has something like this ever happened to anyone else - and was it something
in your own code, or a weird jQuery glitch?

 

Because it will probably be relevant, we're talking about jQuery 1.2.6 here.

 

Regards,

Michael Price



[jQuery] html in xml tag

2009-08-12 Thread Seth

Hi guys,

I have an XML file like this




Lorem ipsum
Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.
images/coal.jpg


. etc

now on  tag i need to enter some formating elements like
   bold etc, if i enter html elements this line "desc = $
(this).find("description").text();" will strip all my html code ..
probably because of the .text() function at the end, my question is
what function to try at the end because .html() is not working like
this "desc = $(this).find("description").html();" is not working ..
basically i need to be able to read the html elements too so i can
display in the div that will display the info ... dose anybody know
some jquery function that dose that ?

Thanks!


[jQuery] form plugin not working

2009-08-12 Thread sunny


New Organization Building Floor

//wait for the DOM to be loaded
  $(document).ready(function() {
// bind 'myForm' and provide a simple callback function
$('#orgbuildfloor').ajaxForm(function() {
alert("Organization Building Floor saved!");
   // document.getElementById('orgbuildfloor').reset();
  });
});

 $form)) ?>
isMultipart() and print
'enctype="multipart/form-data" ' ?>>
getObject()->isNew()): ?>


 
  
  
  renderLabel()?>:
  render()?>
  
  
  

  

   Cancel
  getObject()->isNew()): ?>
 getObject()->getId(), array('method' => 'delete',
'confirm' => 'Are you sure?')) ?>
  
  
   
  

  


  

  


Organization Building Floor List



  Id
  Building
  Floor description


$org_building_floor): ?>
">
  getId
() ?>
  getBuildingId() ?>
  getFloorDescription() ?>







[jQuery] Bind window events to iframes problem/bug

2009-08-12 Thread Henrik Tengelin

Hi!
First post here and I am sorry if it's a bit long...
I am using jQuery 1.3.2 and for some reason I am trying to add event
listeners to windows/documents in iframes from the parent window and I
have run into some problems...

Does anyone know why it's possible to bind a listener to the click
event of the document in an iframe but not bind  a listener to the
unload event of the window object (contentWindow) in the same iframe?
At least the unload isn't triggered when the iframe.src is changed.

$(document).ready(function() {
$("#clickable").click(function() {
$("#frame1").attr("src", "frame2.html");
});

addEvents(window);
});

function addEvents(win) {
if (win.contentWindow) {
win = win.contentWindow;
}

$(win.document).bind("click", function() {alert("click");});
$(win).bind("unload", function() {alert("unload");});

var frames = win.document.getElementsByTagName("iframe");
for (var i=0; i < frames.length; i++) {
addEvents(frames[i]);
}
}

Click me


Since it is possible to bind to the click event of the document in the
iframe an unload handler will automatically be registered in IE (to
prevent memory leaks) but this unload handler will not be triggered
when the iframe.src is changed, which in turn will cause an annoying
javascript error (permission denied) when you first alter the
iframe.src and then reload the top window. I have tested with
"beforeunload" with the same result.

Using win.attachEvent/addEventListener works fine...

/Thank you for your time
Henrik




[jQuery] Re: How to POST using jQuery?

2009-08-12 Thread Mark Smith

Thanks for the ideas. Looks like it's not supported, which might be a
symptom of bad design on my part.

I just have lots of different actions, having a form for each one
seemed messy.

Maybe a suitable workaround would be to have a hidden form on the
page, attach input elements to it as I need them, then finally
call .submit on the form


On Aug 12, 4:09 pm, Liam Potter  wrote:
> He's not using a form at all in this, I don't know why.
>
> Michael Price wrote:
> > Is there any particular reason you HAVE to use Javascript to handle the form
> > submission? If you want to redirect the user to another page after the form
> > submission you may as well submit the form the normal way and use a server
> > side redirect to send them on to the next page.
>
> > Failing that, you could make your form processing script return the next
> > page in it's response, parse for this and then use it - is that feasible?
>
> > SUBMIT FORM
> > PARSE RESPONSE WHICH WILL CONTAIN NEW PAGE URL IN IT
>
> > window.location = newPage;
>
> > Regards,
> > Michael Price
>
> > -Original Message-
> > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
> > Behalf Of Mark Smith
> > Sent: 12 August 2009 16:02
> > To: jQuery (English)
> > Subject: [jQuery] Re: How to POST using jQuery?
>
> > But then the page that gets served to the user with have no parameters
> > posted to it.
>
> > On Aug 12, 3:50 pm, Liam Potter  wrote:
>
> >> well, on the post callback, forward the browser to the page?
>
> >> window.location="/page.php"
>
> >> Mark Smith wrote:
>
> >>> Hi,
>
> >>> I know you can use jquery to post data from a json object ajaxly.
>
> >>> However I want to redirect the browser to the new page (like
> >>> submitting a form) only passing the values explicitly from javascript
> >>> rather than actually submitting a form.
>
> >>> Is this possible using jquery?
>
> >>> Thanks
>
>


[jQuery] Re: add class and remove class from perspective element

2009-08-12 Thread Liam Potter






$(function(){
$("img.images").click(function(){
$("img.images").css({border:'none'});
$(this).css({border:'1px solid #f00'});
});
});



runrunforest wrote:

Hi,

I have 3 image, in turn called img1, img2, img3.

I need a code snippet that will add a border to the image when it is
clicked, and if I click the other image, the border will disappear,
the newly clicked image will have a border.

For short, only image has border at a time and only the image that got
click last will have border. Can you show me the technique to do this
  




[jQuery] Re: Error when trying to download jquery

2009-08-12 Thread Liam Potter


you don't open and run jquery...what are you attempting here?

mrbutler wrote:

IE7  version 7.0.5730.11

Open and run jquery-1.3.2.min.js


Error pops up:


 ---
Windows Script Host
---
Script: C:\Documents and Settings\it.mjb\Local Settings\Temporary
Internet Files\Content.IE5\F59KSW92\jquery-1.3.2.min[1].js
Line:   12
Char:   6947
Error:  'document' is undefined
Code:   800A1391
Source: Microsoft JScript runtime error

---
OK
---


On Aug 12, 8:12 am, "Richard D. Worth"  wrote:
  

Can you share some more details, and maybe a sample page? What browser(s)
are you using? Could you put together the code you're trying on jsbin.com,
so we can see what you're seeing:http://jsbin.com/

- Richard



On Wed, Aug 12, 2009 at 9:00 AM, mrbutler  wrote:



Still the same error when I run from either of the links.
  
On Aug 12, 2:29 am, "Richard D. Worth"  wrote:
  

I didn't have the same issue. Anyway, here are the direct links, for
download:
Minified:http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js

Uncompressed:http://jqueryjs.googlecode.com/files/jquery-1.3.2.js

- Richard

On Tue, Aug 11, 2009 at 3:32 PM, mrbutler  wrote:


I receive an error:  'document' is undefined, when I try to run the
jquery download.- Hide quoted text -
  

- Show quoted text -- Hide quoted text -


- Show quoted text -





[jQuery] Re: Error when trying to download jquery

2009-08-12 Thread mrbutler

IE7  version 7.0.5730.11

Open and run jquery-1.3.2.min.js


Error pops up:


 ---
Windows Script Host
---
Script: C:\Documents and Settings\it.mjb\Local Settings\Temporary
Internet Files\Content.IE5\F59KSW92\jquery-1.3.2.min[1].js
Line:   12
Char:   6947
Error:  'document' is undefined
Code:   800A1391
Source: Microsoft JScript runtime error

---
OK
---


On Aug 12, 8:12 am, "Richard D. Worth"  wrote:
> Can you share some more details, and maybe a sample page? What browser(s)
> are you using? Could you put together the code you're trying on jsbin.com,
> so we can see what you're seeing:http://jsbin.com/
>
> - Richard
>
>
>
> On Wed, Aug 12, 2009 at 9:00 AM, mrbutler  wrote:
>
> > Still the same error when I run from either of the links.
>
> > On Aug 12, 2:29 am, "Richard D. Worth"  wrote:
> > > I didn't have the same issue. Anyway, here are the direct links, for
> > > download:
> > > Minified:http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js
>
> > > Uncompressed:http://jqueryjs.googlecode.com/files/jquery-1.3.2.js
>
> > > - Richard
>
> > > On Tue, Aug 11, 2009 at 3:32 PM, mrbutler  wrote:
>
> > > > I receive an error:  'document' is undefined, when I try to run the
> > > > jquery download.- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -


[jQuery] add class and remove class from perspective element

2009-08-12 Thread runrunforest

Hi,

I have 3 image, in turn called img1, img2, img3.

I need a code snippet that will add a border to the image when it is
clicked, and if I click the other image, the border will disappear,
the newly clicked image will have a border.

For short, only image has border at a time and only the image that got
click last will have border. Can you show me the technique to do this


[jQuery] Re: validation - multiple errorPlacements

2009-08-12 Thread nouky


I did not understand this

Jörn Zaefferer wrote:
> 
> 
> seedy schrieb:
>> Is it possible to use errorPlacement with the validation plugin to have a
>> different placement for each field validated?
>>
>> ie.
>> $('#testForm').validate({
>>  rules:{
>>  firstname:{required:true},
>>  integer:{required:true}
>>  }
>> })
>>
>> I would like to have the error for firstname appended to $('#div1') , and
>> errors for integer before $('#div2')
>>   
> You can use the errorPlacement option for that. Its far from perfect, 
> but allows you to do every placement you can think of.
> 
> One example of the usage of errorPlacement can be found here: 
> http://dev.jquery.com/view/trunk/plugins/validate/demo-test/milk/
> The interesting part:
> 
> |// the errorPlacement has to take the table layout into account 
> errorPlacement: function(error, element) { 
> if ( element.is(":radio") ) 
> error.appendTo( element.parent().next().next() ); 
> else if ( element.is(":checkbox") ) 
> error.appendTo ( element.next() ); 
> else 
> error.appendTo( element.parent().next() ); 
> }, 
> |
> 
> -- Jörn
> 
> 

-- 
View this message in context: 
http://www.nabble.com/validation---multiple-errorPlacements-tp12781506s27240p24938662.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: How to POST using jQuery?

2009-08-12 Thread Liam Potter


He's not using a form at all in this, I don't know why.

Michael Price wrote:

Is there any particular reason you HAVE to use Javascript to handle the form
submission? If you want to redirect the user to another page after the form
submission you may as well submit the form the normal way and use a server
side redirect to send them on to the next page.

Failing that, you could make your form processing script return the next
page in it's response, parse for this and then use it - is that feasible?

SUBMIT FORM
PARSE RESPONSE WHICH WILL CONTAIN NEW PAGE URL IN IT

window.location = newPage;

Regards,
Michael Price

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mark Smith
Sent: 12 August 2009 16:02
To: jQuery (English)
Subject: [jQuery] Re: How to POST using jQuery?


But then the page that gets served to the user with have no parameters
posted to it.

On Aug 12, 3:50 pm, Liam Potter  wrote:
  

well, on the post callback, forward the browser to the page?

window.location="/page.php"

Mark Smith wrote:


Hi,
  
I know you can use jquery to post data from a json object ajaxly.
  
However I want to redirect the browser to the new page (like

submitting a form) only passing the values explicitly from javascript
rather than actually submitting a form.
  
Is this possible using jquery?
  
Thanks
  



  




[jQuery] Re: How to POST using jQuery?

2009-08-12 Thread Michael Price

Is there any particular reason you HAVE to use Javascript to handle the form
submission? If you want to redirect the user to another page after the form
submission you may as well submit the form the normal way and use a server
side redirect to send them on to the next page.

Failing that, you could make your form processing script return the next
page in it's response, parse for this and then use it - is that feasible?

SUBMIT FORM
PARSE RESPONSE WHICH WILL CONTAIN NEW PAGE URL IN IT

window.location = newPage;

Regards,
Michael Price

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Mark Smith
Sent: 12 August 2009 16:02
To: jQuery (English)
Subject: [jQuery] Re: How to POST using jQuery?


But then the page that gets served to the user with have no parameters
posted to it.

On Aug 12, 3:50 pm, Liam Potter  wrote:
> well, on the post callback, forward the browser to the page?
>
> window.location="/page.php"
>
> Mark Smith wrote:
> > Hi,
>
> > I know you can use jquery to post data from a json object ajaxly.
>
> > However I want to redirect the browser to the new page (like
> > submitting a form) only passing the values explicitly from javascript
> > rather than actually submitting a form.
>
> > Is this possible using jquery?
>
> > Thanks
>
>



[jQuery] Re: How to POST using jQuery?

2009-08-12 Thread Mark Smith

But then the page that gets served to the user with have no parameters
posted to it.

On Aug 12, 3:50 pm, Liam Potter  wrote:
> well, on the post callback, forward the browser to the page?
>
> window.location="/page.php"
>
> Mark Smith wrote:
> > Hi,
>
> > I know you can use jquery to post data from a json object ajaxly.
>
> > However I want to redirect the browser to the new page (like
> > submitting a form) only passing the values explicitly from javascript
> > rather than actually submitting a form.
>
> > Is this possible using jquery?
>
> > Thanks
>
>


[jQuery] Re: How to POST using jQuery?

2009-08-12 Thread Liam Potter


well, on the post callback, forward the browser to the page?

window.location="/page.php"

Mark Smith wrote:

Hi,

I know you can use jquery to post data from a json object ajaxly.

However I want to redirect the browser to the new page (like
submitting a form) only passing the values explicitly from javascript
rather than actually submitting a form.

Is this possible using jquery?

Thanks
  




[jQuery] How to POST using jQuery?

2009-08-12 Thread Mark Smith

Hi,

I know you can use jquery to post data from a json object ajaxly.

However I want to redirect the browser to the new page (like
submitting a form) only passing the values explicitly from javascript
rather than actually submitting a form.

Is this possible using jquery?

Thanks


[jQuery] Re: toggle and logic confusion

2009-08-12 Thread Anoop kumar V
Where are you capturing the click event?

You may want to do something like this:

$(function(){
  $('').click(function(event){
$('.hideme').hide();
$(this).find('a.showme').show()
  }
}

If you post your actual html and your click event code if you have one, then
I may be able to help you further..

Thanks,
Anoop


On Wed, Aug 12, 2009 at 7:06 AM, Richard D. Worth  wrote:

>
> On Wed, Aug 12, 2009 at 5:40 AM, Bruce MacKay wrote:
>
>>
>> Yes, you are right - what I described was like an accordion, but I left
>> out the description of the actual links on which the div's are
>> opened/closed.
>>
>> The links exist as 3 buttons in a horizontal list that remains stationery
>> while the divs open/close beneath them.
>
>
> Sounds like tabs:
>
> http://jqueryui.com/demos/tabs/
>
> - Richard
>


[jQuery] Re: Malsup FormPlugin - doesn't Ajax!

2009-08-12 Thread Anxiro

No, I also tried that.

I've just found a solution to the problem;
http://freecss.info/free-css-tutorials/jquery-ajax-contact-form-in-facebox/
It shows how to fix/mod the FaceBox to get it to work with the Form
Plugin.

Thanks for your suggestion, Liam. I appreciate!

On 12 aug, 15:54, Liam Potter  wrote:
> can you not set the form to display:none through the javascript?
>
> Anxiro wrote:
> > Hi there!
>
> > I'm using the Form Plugin by Malsup (http://malsup.com/jquery/form/).
> > I'm using this a lot, so I'm used to all the configs and settings.
> > That's not a problem.
>
> > My problem is, that my DIV (where the FORM is in) has the style:
> > 'display:none'. This is causing the plugin to NOT ajaxForm() it and
> > I'm realy stuck with this. So the form is submitting as a normal form,
> > not Ajax. The 'website' is running on our local servers.
>
> > Can anyone help me with this? Is there a solution available?
>
> > Thank you!
>
> > Frank


[jQuery] Re: How to access the member of $.each() when Key has space?

2009-08-12 Thread RobG



On Aug 12, 2:23 pm, Ming  wrote:
[...]
> For example:
>
> $.each(eval(response),function(key, item) {
>     alert(item.Account); //Work
>     alert(item.Amount); //Work
>     alert(item.Reference Date); //Fail
>
> });
>
> I have try
> alert(item('Reference Date'));
> alert(item['Reference Date']);
> alert(item[0]); //Assume it is on index 0
>
> all of them are not work.

http://www.jibbering.com/faq/faq_notes/square_brackets.html >

--
Rob


  1   2   >