[jQuery] Re: slideDown content disappearing in IE7

2009-03-14 Thread flycast


Sorry. I am actually using the .toggle()
-- 
View this message in context: 
http://www.nabble.com/slideDown-content-disappearing-in-IE7-tp22507968s27240p22512801.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] slideDown content disappearing in IE7

2009-03-13 Thread flycast


My content in my slideDown is disappearing after the slideDown is complete. I
have tried:
zoom:1;
 - this make the h4's display inline.

zoom:1;
display: block;
 - this makes them disappear

min-height: 1%
 - they disappear

The page can be found here:
http://www.trinityacademy.org/summer-sessions
http://www.trinityacademy.org/summer-sessions 
-- 
View this message in context: 
http://www.nabble.com/slideDown-content-disappearing-in-IE7-tp22507968s27240p22507968.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] slideDown/slideUp with media

2009-01-03 Thread flycast

I have a page that I am trying to slideDown and slideUp with a Windows
Media Player object playing. IT works fine in Firefox but not in IE6.
In IE6 when it slides up you can see the containing div slide up but
the player keeps playing.

The idea here is to only load and play the video being asked for by
the user.

Example page at:
http://www.trinityacademy.org/co-curricular/newspaperNew

Click Media file one for the problem child.


[jQuery] Re: Font size in sifr plugin

2008-12-18 Thread flycast

Did you get yours to work? I have not. Looks like it could be a really
great plugin but I think I am going to do this the old fashion
way...images. I can't wait any longer.

On Dec 17, 8:24 am, A Wood alex.c.w...@gmail.com wrote:
 I am having the same problem.  Got the sIfr to work but can't get the
 font size right.

 On Dec 15, 5:43 pm, flycast e...@janasnyder.com wrote:

  Yes. I have also copied the examples at the bottom of this 
  page:http://jquery.thewikies.com/sifr/#description

  And they work except that the resulting swf ends up being very small.
  The text in the Sample text example starts out being 5em but the swf
  that replaces it ends up being about 12px.

  I can get it working but the size is messed up.

  On Dec 15, 10:36 am, banalitis banali...@googlemail.com wrote:

   Have you given line-height alongside font-size a go?

   On 15 Dec, 16:25, flycast e...@janasnyder.com wrote:

I am trying to get the sifr plugin working. It seems to be working
except that I cannot get the size of the font to change except by
using zoom. I have the Gunmetal swf file specified and the font is
changing to the Gunmetal font.

I have tried setting the height using style in the tag and using a
class in a seperate css file. Both times I disables the sifr plugin to
make sure that the styles were taking.

If I use zoom then the text gets cut off.

What is the proper way to control font size?


[jQuery] Making an AJAX hide and show smoothly

2008-12-17 Thread flycast

I am getting some data on a FAQ page using $.post
The problem is that when the server returns the data too fast (most of
the time) the images barely gets time to display and the whole thing
looks very choppy. What I want to do is have the image slideDown
smoothly, display for a certain minimum time and then when the data
returns slideUp the image, replace the image with the returned data
and then slideDown.

I also want to start the request first before I start delaying, that
way it delays for a minimum time period. If the minimum time period is
past when the data returns then it gets displayed immediately.

Here is my code:
// Ajax area
$(ul.questionListlia).click(function(){
//Save the clicked a tag for later use
var $aTag = $(this);
//Check to see if there is already an answer for this question
if( $(this).nextAll('p.answer').length != 0){
//There is already an answer - toggle it
$(this).nextAll('p.answer').slideToggle(slow);
}else{
//There is not an answer - we need to get it.
$($aTag).after('p class=answerimg src=images/loading.gif/
p');
var $answer = $($aTag).next('p.answer');
$($answer).hide();
$($answer).slideDown('slow');
var $start = $(this).attr(href).search(/[0-9]*$/);
var $entryId = $(this).attr(href).substr($start);
$.post(REMOVED+$entryId, function(data){
$($answer).hide('slow');
$($answer).html('p class=answer'+data+'/p');
$($answer).slideDown('slow');
});
}
return false;
});//End of click function
//End of ajax area


[jQuery] Re: Making an AJAX hide and show smoothly

2008-12-17 Thread flycast

Ricardo:

Thanks for the solution. While I waited I also came up with the
following solution. What is basically does is use the callback
functions on the slideUp and slideDown functions. That way the slides
end up completing completly before moving on. I suspect that this is
the reason that these were set up to begin with.

Code:
// Ajax area
$(ul.questionListlia).click(function(){
//Save the clicked a tag for later use
var $aTag = $(this);
//Check to see if there is already an answer for this question
if( $($aTag).nextAll('p.answer').length != 0){
//There is already an answer - toggle it
$($aTag).nextAll('p.answer').slideToggle(slow);
}else{
//There is not an answer - we need to get it.
$($aTag).after('p class=answerimg src=images/loading.gif/
p');
var $answer = $($aTag).next('p.answer');
$($answer).hide();
$($answer).slideDown('slow', function(){
var $start = $($aTag).attr(href).search(/[0-9]*$/);
var $entryId = $($aTag).attr(href).substr($start);
$.post(REMOVED+$entryId, function(data){
$($answer).hide('slow', function(){
$($answer).html('p 
class=answer'+data+'/p');
$($answer).slideDown('slow');
});
});

});
}
return false;
});//End of click function
//End of ajax area

On Dec 17, 1:38 pm, Ricardo Tomasi ricardob...@gmail.com wrote:
 A clunky way of doing it but should work, the callback will take at
 least one second to execute after starting the request:

 // Ajax area
 $(ul.questionListlia).click(function(){
 //Save the clicked a tag for later use
 var $this = $(this);
 //Check to see if there is already an answer for this question
 if( $this.nextAll('p.answer').length != 0){
         //There is already an answer - toggle it
         $this.nextAll('p.answer').slideToggle(slow);

 }else{

         //There is not an answer - we need to get it.
         $aTag.after('p class=answerimg src=images/loading.gif/
 p');
         var $answer = $aTag.next('p.answer');
         $answer.hide();
         $answer.slideDown('slow');
         var $start = $this.attr(href).search(/[0-9]*$/);
         var $entryId = $this.attr(href).substr($start);
         var startTime = new Date().getTime(); //get time before start
 of request
         $.post(REMOVED+$entryId, function(data){
                 var time = new Date().getTime() - startTime; //offset
 from startTime
                 time = (timeDiff  1000) ? 0 : timeDiff; // max 1s
                 seTimeout(function(){ //delay it by the difference to
 1s
                     $answer.hide('slow');
                     $answer.html('p class=answer'+data+'/p');
                     $answer.slideDown('slow');
                },time);
         });

 }
 return false;
 });//End of click function

 //End of ajax area

 On Dec 17, 3:53 pm, flycast e...@janasnyder.com wrote:

  I am getting some data on a FAQ page using $.post
  The problem is that when the server returns the data too fast (most of
  the time) the images barely gets time to display and the whole thing
  looks very choppy. What I want to do is have the image slideDown
  smoothly, display for a certain minimum time and then when the data
  returns slideUp the image, replace the image with the returned data
  and then slideDown.

  I also want to start the request first before I start delaying, that
  way it delays for a minimum time period. If the minimum time period is
  past when the data returns then it gets displayed immediately.

  Here is my code:
  // Ajax area
  $(ul.questionListlia).click(function(){
  //Save the clicked a tag for later use
  var $aTag = $(this);
  //Check to see if there is already an answer for this question
  if( $(this).nextAll('p.answer').length != 0){
          //There is already an answer - toggle it
          $(this).nextAll('p.answer').slideToggle(slow);}else{

          //There is not an answer - we need to get it.
          $($aTag).after('p class=answerimg src=images/loading.gif/
  p');
          var $answer = $($aTag).next('p.answer');
          $($answer).hide();
          $($answer).slideDown('slow');
          var $start = $(this).attr(href).search(/[0-9]*$/);
          var $entryId = $(this).attr(href).substr($start);
          $.post(REMOVED+$entryId, function(data){
                  $($answer).hide('slow');
                  $($answer).html('p class=answer'+data+'/p');
                  $($answer).slideDown('slow');
          });}
  return false;
  });//End of click function

  //End of ajax area


[jQuery] Font size in sifr plugin

2008-12-15 Thread flycast

I am trying to get the sifr plugin working. It seems to be working
except that I cannot get the size of the font to change except by
using zoom. I have the Gunmetal swf file specified and the font is
changing to the Gunmetal font.

I have tried setting the height using style in the tag and using a
class in a seperate css file. Both times I disables the sifr plugin to
make sure that the styles were taking.

If I use zoom then the text gets cut off.

What is the proper way to control font size?


[jQuery] Re: Font size in sifr plugin

2008-12-15 Thread flycast

Yes. I have also copied the examples at the bottom of this page:
http://jquery.thewikies.com/sifr/#description

And they work except that the resulting swf ends up being very small.
The text in the Sample text example starts out being 5em but the swf
that replaces it ends up being about 12px.

I can get it working but the size is messed up.

On Dec 15, 10:36 am, banalitis banali...@googlemail.com wrote:
 Have you given line-height alongside font-size a go?

 On 15 Dec, 16:25, flycast e...@janasnyder.com wrote:

  I am trying to get the sifr plugin working. It seems to be working
  except that I cannot get the size of the font to change except by
  using zoom. I have the Gunmetal swf file specified and the font is
  changing to the Gunmetal font.

  I have tried setting the height using style in the tag and using a
  class in a seperate css file. Both times I disables the sifr plugin to
  make sure that the styles were taking.

  If I use zoom then the text gets cut off.

  What is the proper way to control font size?


[jQuery] Re: Problem with prev() in IE

2008-12-01 Thread flycast

Sure enough! Note to self...make sure that html is valid before
messing with the DOM.
All kidding aside, using a ul without being in a li is something I
have done many times before. The difference here is using javascript
to mess with the DOM. I am new to javascript.

Thanks a bunch.

On Nov 30, 12:03 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 It isn't possible to have an LI sibing right before a UL.  
 That would mean markup like this:

 ul
    liList Item #1/li        -- LI Sibling
    ul                         -- UL
       liList Item #2/li
       liList Item #3/li
    /ul
 /ul

 That is illegal markup.

 Your markup actually looks like this:

 h1Get to know Trinity/h1     -- H1 sibling
 ul                             -- UL
    li
       a href=...About Us/a -- A sibling
       ul                       -- UL
          lia href=...History/a/li
          

 These are the elements you are getting with a $('ul').prev()

 There ARE no LI siblings just before a UL.

 So which elements are you actually trying to get?
 JK

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of flycast
 Sent: Sunday, November 30, 2008 8:42 AM
 To: jQuery (English)
 Subject: [jQuery] Re: Problem with prev() in IE

 No. I am definitely looking for the li sibling right before any
 ul.../ul. I am building menus and submenus. Any ul...ul that
 appears below a li.../li is a submenu. I know that I could add a
 name or class to either the head or subhead. I wouod rather have
 jQuery find these so that I don't have any markup in the HTML
 necessary to make this work.

 On Nov 29, 11:21 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
  Okay, so I stepped through the code.  I'm going to hazard a guess that you
  didn't want the previous element but the parent element.

  $('#LHNav ul').prev() returns an H1 and an array of A elements.

  This is because prev looks for the sibling element just in front of the
  current one.

  $('#LHNav ul').parent('li') will, I believe, return the results you are
  looking for.

  JK

  P.S. IMO, the really odd thing is why FF worked when I believe it should
  have returned an empty set.  Anyone else have any ideas?

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

  Behalf Of flycast
  Sent: Saturday, November 29, 2008 8:29 PM
  To: jQuery (English)
  Subject: [jQuery] Re: Problem with prev() in IE

  Yes...http://www.trinityacademy.org/testNavigation/

  On Nov 29, 6:22 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
   I've used something very similar to that in IE6 without any problems.

   Could you post a demo page?

   JK

   -Original Message-
   From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

   Behalf Of flycast
   Sent: Saturday, November 29, 2008 3:57 PM
   To: jQuery (English)
   Subject: [jQuery] Problem with prev() in IE

   This code works fine in FF and Safari but (surprise, surprise) not in
   IE6.

   $(#LHNav ul).prev('li').each(function(){
   alert(Loop);
   });

   I have narrowed it down to giving prev() some value to filter by. IF I
   try it like this:
   (notice the missing li)

   $(#LHNav ul).prev().each(function(){
   alert(Loop);
   });

   It works fine. Why does IE always have to be so buggy and particular?


[jQuery] Re: Problem with prev() in IE

2008-11-30 Thread flycast

No. I am definitely looking for the li sibling right before any
ul.../ul. I am building menus and submenus. Any ul...ul that
appears below a li.../li is a submenu. I know that I could add a
name or class to either the head or subhead. I wouod rather have
jQuery find these so that I don't have any markup in the HTML
necessary to make this work.

On Nov 29, 11:21 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 Okay, so I stepped through the code.  I'm going to hazard a guess that you
 didn't want the previous element but the parent element.

 $('#LHNav ul').prev() returns an H1 and an array of A elements.

 This is because prev looks for the sibling element just in front of the
 current one.

 $('#LHNav ul').parent('li') will, I believe, return the results you are
 looking for.

 JK

 P.S. IMO, the really odd thing is why FF worked when I believe it should
 have returned an empty set.  Anyone else have any ideas?

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of flycast
 Sent: Saturday, November 29, 2008 8:29 PM
 To: jQuery (English)
 Subject: [jQuery] Re: Problem with prev() in IE

 Yes...http://www.trinityacademy.org/testNavigation/

 On Nov 29, 6:22 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
  I've used something very similar to that in IE6 without any problems.

  Could you post a demo page?

  JK

  -Original Message-
  From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

  Behalf Of flycast
  Sent: Saturday, November 29, 2008 3:57 PM
  To: jQuery (English)
  Subject: [jQuery] Problem with prev() in IE

  This code works fine in FF and Safari but (surprise, surprise) not in
  IE6.

  $(#LHNav ul).prev('li').each(function(){
  alert(Loop);
  });

  I have narrowed it down to giving prev() some value to filter by. IF I
  try it like this:
  (notice the missing li)

  $(#LHNav ul).prev().each(function(){
  alert(Loop);
  });

  It works fine. Why does IE always have to be so buggy and particular?


[jQuery] Re: Problem with prev() in IE

2008-11-30 Thread flycast

By the way...the documentation says that you can add any string
expressing to filter a prev() and next() statement with all browsers
(not just FF and Safari) should return a filtered result.


[jQuery] Problem with prev() in IE

2008-11-29 Thread flycast

This code works fine in FF and Safari but (surprise, surprise) not in
IE6.

$(#LHNav ul).prev('li').each(function(){
alert(Loop);
});

I have narrowed it down to giving prev() some value to filter by. IF I
try it like this:
(notice the missing li)

$(#LHNav ul).prev().each(function(){
alert(Loop);
});

It works fine. Why does IE always have to be so buggy and particular?


[jQuery] Re: Problem with prev() in IE

2008-11-29 Thread flycast

Yes...
http://www.trinityacademy.org/testNavigation/

On Nov 29, 6:22 pm, Jeffrey Kretz [EMAIL PROTECTED] wrote:
 I've used something very similar to that in IE6 without any problems.

 Could you post a demo page?

 JK

 -Original Message-
 From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On

 Behalf Of flycast
 Sent: Saturday, November 29, 2008 3:57 PM
 To: jQuery (English)
 Subject: [jQuery] Problem with prev() in IE

 This code works fine in FF and Safari but (surprise, surprise) not in
 IE6.

 $(#LHNav ul).prev('li').each(function(){
 alert(Loop);
 });

 I have narrowed it down to giving prev() some value to filter by. IF I
 try it like this:
 (notice the missing li)

 $(#LHNav ul).prev().each(function(){
 alert(Loop);
 });

 It works fine. Why does IE always have to be so buggy and particular?


[jQuery] Executing multiple actions on the same selection

2008-11-28 Thread flycast

In some other languages I have had experience with one can use the
following pattern...

object [
.doThis()
.andThis()
.andAlsoThis()
]

Is there a way to do this with jQuery?

$(a){
.hide();
.addClass();
}

***Instead of ***
$(a).hide();
$(a).addClass();


[jQuery] Re: function is not a valid function

2008-11-22 Thread flycast

Answer:

This site is hosted at GoDaddy.com - NOT by my choice! The DNS is
hosted outside GoDaddy. If the A record is not pointed to GoDaddy then
GoDaddy uses something they call previewdns.com. Previewdns.com adds
stylesheets, html and js code to the end of the source code of every
page that gets served. The code gives you a cute popup window that
informs you that you are looking at a preview url.

I have taken this source code to two other sites and tested it there
and...it works fine. I am complety convinced that the added GoDaddy/
previewdns code is interfering with jQuery.

Sorry to be so negative but one more reason to not host at GoDaddy.


[jQuery] Re: function is not a valid function

2008-11-21 Thread flycast

I am sure that I will be embarrassed by what the problem turns out to
be but does anybody have any ideas here? I'm still stuck.


[jQuery] function is not a valid function

2008-11-20 Thread flycast

This code works if I just have the alert(Hello); but take out the $
(a).hide(slow);
The code bombs when it hits any jQuery code inside the document ready.
The script loads when I go the that address alone and it is clear that
the document ready function is working. Any ideas?

script type=text/javascript src=http://www.domain.com/includes/
jquery-1.2.6.min.js/script

script type=text/javascript
$(document).ready(function(){
$(a).hide(slow);
alert(Hello);

})//End of document ready function
/script


[jQuery] Re: Confirming submit using Validate plugin

2008-11-16 Thread flycast

That does not work. This is what I have:

function confSubmit(form) {
if (confirm(Are you sure you want to submit the form?)) {
   $(#employmentForm).submit();
}else{
   return false;
}

}//End of confSubmit function

The form validates and submits anyway. Notice in the title I indicate
that I am using Validate plugin,


[jQuery] Re: Confirming submit using Validate plugin

2008-11-16 Thread flycast

I do not want to post a page publicly. The code is very long.


[jQuery] Re: Confirming submit using Validate plugin

2008-11-16 Thread flycast

Here is the JS code. I have removed a bunch of Validation rules to
shorten it up. The code at the bottom is the problem.

$(document).ready(function(){
   $(#employmentForm).validate({
debug: false,

rules: {
emp_applicationDate: {
required: true,
minlength: 2
}

}, //End of rules section

messages: {
emp_termsAgreed: {
minlength: You must agree to the Terms and 
Conditions above to
submit.
}//End of emp_termsAgreed section
}//End of Messages section


});//End of form validation


//Show the detail for each control that has Query on the end of the
name.
$([name$='Query']).click(function(){
if($(this).val() == Yes){
$([name='+$(this).attr(name)+Yes']).slideDown();
$([name='+$(this).attr(name)+No']).slideUp();
}else{
$([name='+$(this).attr(name)+Yes']).slideUp();
$([name='+$(this).attr(name)+No']).slideDown();
}
});


$([name$='Query']).each(function(){
$([name='+$(this).attr(name)+Yes']).hide();
$([name='+$(this).attr(name)+No']).hide();
});

/*Hide all detail sections - to do this we need to check their value
first.
It is possible that they have already been checked and the page was
just refreshed.
To deal with this we need to close all the detail areas first and
then show the
detail areas that are checked yes.
*/


$([name$='Query']).each(function(){
if ($(this).attr(checked) == true  $(this).attr(value) ==
Yes ){
$([name='+$(this).attr(name)+Yes']).show();
$([name='+$(this).attr(name)+No']).hide();
}
if ($(this).attr(checked) == true  $(this).attr(value) ==
No ){
$([name='+$(this).attr(name)+Yes']).hide();
$([name='+$(this).attr(name)+No']).show();
}
});



//Build names for signature

$([name^='emp_name']).blur(function () {
  $(#namePrompt).text(Example: +$([name='emp_nameLast']).val
());
var middleName = $([name='emp_nameMiddle']).val();
if (middleName.length  0){
  $(#namePrompt).text(Ex: +$([name='emp_nameFirst']).val()+
+$([name='emp_nameMiddle']).val()+ +$([name='emp_nameLast']).val
());
}else{
  $(#namePrompt).text(Ex: +$([name='emp_nameFirst']).val()+
+$([name='emp_nameLast']).val());
}
});

jQuery.validator.addMethod( testvalue,
function(value, params) {
   if (params.checked){
  return true;
   }else{
  return false;
   }
 }, It is required that you read and agree to the Terms and Agreement
above before submitting your application.);

});//End of document ready function

function confSubmit(form) {
if (confirm(Are you sure you want to submit the form?)) {
   $(#employmentForm).submit();
}else{
   return false;
}

}//End of confSubmit function


[jQuery] Re: Confirming submit using Validate plugin

2008-11-16 Thread flycast

Here is the code. I have removed a bunch of Validation rules to make
it shorter. The problem code is at the bottom.

$(document).ready(function(){
   $(#testForm).validate({
debug: false,

rules: {
emp_applicationDate: {
required: true,
minlength: 2
}

}, //End of rules section

messages: {
termsAgreed: {
minlength: You must agree to the Terms and 
Conditions above to
submit.
}//End of emp_termsAgreed section
}//End of Messages section


});//End of form validation


//Show the detail for each control that has Query on the end of the
name.
$([name$='Query']).click(function(){
if($(this).val() == Yes){
$([name='+$(this).attr(name)+Yes']).slideDown();
$([name='+$(this).attr(name)+No']).slideUp();
}else{
$([name='+$(this).attr(name)+Yes']).slideUp();
$([name='+$(this).attr(name)+No']).slideDown();
}
});


$([name$='Query']).each(function(){
$([name='+$(this).attr(name)+Yes']).hide();
$([name='+$(this).attr(name)+No']).hide();
});

/*Hide all detail sections - to do this we need to check their value
first.
It is possible that they have already been checked and the page was
just refreshed.
To deal with this we need to close all the detail areas first and
then show the
detail areas that are checked yes.
*/


$([name$='Query']).each(function(){
if ($(this).attr(checked) == true  $(this).attr(value) ==
Yes ){
$([name='+$(this).attr(name)+Yes']).show();
$([name='+$(this).attr(name)+No']).hide();
}
if ($(this).attr(checked) == true  $(this).attr(value) ==
No ){
$([name='+$(this).attr(name)+Yes']).hide();
$([name='+$(this).attr(name)+No']).show();
}
});



//Build names for signature

$([name^='emp_name']).blur(function () {
  $(#namePrompt).text(Example: +$([name='emp_nameLast']).val
());
var middleName = $([name='emp_nameMiddle']).val();
if (middleName.length  0){
  $(#namePrompt).text(Ex: +$([name='emp_nameFirst']).val()+
+$([name='emp_nameMiddle']).val()+ +$([name='emp_nameLast']).val
());
}else{
  $(#namePrompt).text(Ex: +$([name='emp_nameFirst']).val()+
+$([name='emp_nameLast']).val());
}
});


jQuery.validator.addMethod( testvalue,
function(value, params) {
   if (params.checked){
  return true;
   }else{
  return false;
   }
 }, It is required that you read and agree to the Terms and Agreement
above before submitting.);

});//End of document ready function

function confSubmit(form) {
if (confirm(Are you sure you want to submit the form?)) {
   $(#testForm).submit();
}else{
   return false;
}

}//End of confSubmit function


[jQuery] Re: Confirming submit using Validate plugin

2008-11-16 Thread flycast

Thanks!

I am having a hard time getting my form to validate now. Would I place
my rules here?

$(...).validate({
 submitHandler: function(form) {
   if (confirm(Really?)) {
 rules...
 messages...
 etc...
 form.submit();
   }else{
 //stuff to do if the form does not validate
 }
}

});


[jQuery] Check to make sure checkbox is checked using validator

2008-10-18 Thread flycast

My code:
p
span class=requiredDo you agree to the terms above? br/span
labelinput type=radio class=radioButton name=emp_termsAgreed
value=YesYes/label
labelinput type=radio class=radioButton name=emp_termsAgreed
value=NoNo/label
/p

I want to require that the checkbox with the value of Yes is checked
before the form will submit.
How is this done?


[jQuery] Re: Find all li tags without an a tag inside

2008-09-29 Thread flycast

The following code works completly in FF but only partially works in
IE6.
The following line executes fine:$(#LHNav ul).hide(); but the
next line:

 does not.
   $(#LHNav
li:not(:has(a))).css('color','red').css('cursor','pointer').bind(click,
function(){
 showHideMenus(this);
   });

I whittled it down to just $(#LHNav
li:not(:has(a))).css('color','red'); and it still did not work in IE.

Any ideas?

script type=text/javascript
$(document).ready(function() {
   setUpMenus();

});

function setUpMenus(){
   $(#LHNav ul).hide();

   $(#LHNav
li:not(:has(a))).css('color','red').css('cursor','pointer').bind(click,
function(){
 showHideMenus(this);
   });

}//End of set up menus function

function showHideMenus(element){
   $(element).next(ul).slideToggle();

}//End of showHideMenus

/script


[jQuery] Re: Find all li tags without an a tag inside

2008-09-29 Thread flycast

The line:

$(#LHNav ul).hide();

Is working in both FF and IE.
The next line:

   $(#LHNav
li:not(:has(a))).css('color','red').css('cursor','pointer').bind(click,
function(){
 showHideMenus(this);
   });

does not work in IE.

I changed the line that does not work in IE to:

$(#LHNav li:not(:has(a))).css('color','red');

and it still fails in IE but works in FF.


[jQuery] Re: Find all li tags without an a tag inside

2008-09-28 Thread flycast

Perfect BB. Thanks to all for responding, It was very helpful.

On Sep 28, 7:38 am, BB [EMAIL PROTECTED] wrote:
 $(li:not(:has(a))).click( ... );

 would be the shortest!

 On 28 Sep., 05:06, Dave Methvin [EMAIL PROTECTED] wrote:

   Attach a click event to:
   liList item without link/li

   Do not attach click event to:
   lia href=Link 1/a/li

  How about this?

  $(li).not($(li:has(a))).click( ... )


[jQuery] Works in FF but not in IE6

2008-09-28 Thread flycast

The following code works completly in FF but only partially works in
IE6.
The following line executes fine:$(#LHNav ul).hide(); but the
next line:

 does not.
   $(#LHNav
li:not(:has(a))).css('color','red').css('cursor','pointer').bind(click,
function(){
 showHideMenus(this);
   });

I whittled it down to just $(#LHNav
li:not(:has(a))).css('color','red'); and it still did not work in IE.

Any ideas?


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

function setUpMenus(){
   $(#LHNav ul).hide();

   $(#LHNav
li:not(:has(a))).css('color','red').css('cursor','pointer').bind(click,
function(){
 showHideMenus(this);
   });

}//End of set up menus function

function showHideMenus(element){
   $(element).next(ul).slideToggle();
}//End of showHideMenus

/script


[jQuery] Find all li tags without an a tag inside

2008-09-27 Thread flycast

I am stumped. I have nested unordered lists. I want to attach a click
event to all the list items that do not directly contain an a tag.

Attach a click event to:
liList item without link/li

Do not attach click event to:
lia href=Link 1/a/li

I have this code which attaches the event to both types of tags:
   $(#LHNav).find(li).bind(click, function(){
 //do something
});

Ideas anyone?


[jQuery] Validation class question

2008-09-13 Thread flycast

I am using the validate plugin.

I have the following input that is required:

label class=requiredLast: /labelinput type=text
name=emp_nameLastbr

When the field is satisfied I want the required class to be changed to
satisfied class so I can make it display differently. If the field
is required then I want itr displayed red, if it has met the validate
requirements than I want it to be black like all the rest.

How would I do this?


[jQuery] Re: rules question

2008-08-31 Thread flycast

Perfect, thanks.


[jQuery] More detail needed on web forms - design pattern

2008-08-31 Thread flycast

I have been working in this for a while. When I build a web form there
is typically numerous times when you ask a question like:

Have you had any speeding tickets in the last three years? Yes No
If yes, please give the details here.

This kind of question pattern (ask a question, if answer is yes then
ask for details) usually occurs many times on the typical web form. I
want to hide the detail question unless the first question is answered
yes. Easy with jQuery.

I have two questions:

One...When the form loads or is reloaded I want to go through and look
at the state of the first question (every time a first question
appears on the form) and either hide or show the detail question
(depending upon Yes/No state) with a single function rather than a
dedicated custom function for each question/detail set.

Second...I want a single flexible function that will see that Yes
was clicked and find the corresponding detail section for that yes
question and hide/show the detail question.

Can some of you jQuery experts steer me (jQuery beginner) in the right
direction here. It seems like this is the kind of  thing that has
probably been solved many, many times before.

Thanks in advance.


[jQuery] [validate] rules question

2008-08-30 Thread flycast

I am missing where the documentation specifies what kind of rules can
be used. I have found:

required: true
minlength: 2

but what ifr I need to filter a social security number and want to
require that it have numbers or letters in specific places? Example:
 999-99-

-or-

phone number:
999-999-

What options can I use for rules?


[jQuery] Controlling vidoe - Windows Media Player

2008-07-12 Thread flycast

I am toying with using jquery to display media. I have successfully
used it to slideDown a div and show the object/object tag
contained within the div.

I have a couple of problems.

1) When the video is finished it just sits there. I would like it to
slide back up and disappear. Is there a way to tell when the video is
finished?

2) In IE the div that contains the object tag is hidden on document
ready. Even though the video is hidden you can still hear the sound
and it is obvious that it is still playing even though you can't see
it. Is there a solution to this? In Firefox the video does not start
playing until the div is shown.

3) In Firefox when I attempt to do a fadeIn on the div with the
object/object tag the Windows Media Player seems to overcome the
fadeIn and show itself immediately.

Any help on these would;d be appreciated.


[jQuery] Re: Cross domain problems

2008-07-09 Thread flycast

I tried setting document.domain = 'site.com';
It works with a domain of site.com but not www.site.com. I now get the
following message:

[Exception... 'Permission denied to call method XMLHttpRequest.open'
when calling method: [nsIDOMEventListener::handleEvent] nsresult:
0x8057001e (NS_ERROR_XPC_JS_THREW_STRING) location: unknown
data: no]

This seems to be a different problem.

BTW...here is a Mozilla link to the issue of cross domain and the use
of document.domain: 
http://www.mozilla.org/projects/security/components/same-origin.html



On Jul 9, 1:30 am, Alexsandro_xpt [EMAIL PROTECTED] wrote:
 Well, I thought this is security browser issue.

 I always solve this problem this way:
 Eg.:

 To ajax this:http://feedproxy.feedburner.com/undergoogle

 I create 
 this:http://blog.alexsandro.com.br/application/load/feedproxy.feedburner.c...

 --
 Alexsandrowww.alexsandro.com.br

 On 9 jul, 00:18, Erik Beeson [EMAIL PROTECTED] wrote:

  Add this somewhere in your javascript:

  document.domain = 'site.com';

  Google document domain

  --Erik

  On 7/8/08, flycast [EMAIL PROTECTED] wrote:

Simple problem (I think)...

I am new to JS and ajax.

I am building an ajax capability on a clients site. I am running into
cross domain problems. If I get the page using the url 
   formhttp://www.site.com
but I do a load using the url form http://site.com; (www vs. no www
in the url) I get nothing but a js error.

What is the best way to handle making sure that if the person is at
the site with OR without the www in the url that the .load will
still work?


[jQuery] Re: Problem with .load

2008-07-02 Thread flycast

Wow, have I learned something here!

The problem was not jQuery, the problem was that the page that was
feeding the load had a couple of extra closing tags in the html. The
browsers were choking on the extra closing tags. The thing that made
it so hard to catch was when I would alert the data that was returned
it would display the data.

Moral of the story...make sure that you have valid html.

PS. I replaced the script that built the data with a simple html code
and that would display just fine. That was how I finally figured out
that the html had a problem.


[jQuery] Problem with post not displaying in IE - FF works

2008-06-29 Thread flycast

First of all - I'm a 1st timer on Javascript and jquery so...please
give me a little grace on my poor js skills.

I have the following setup that is working fine in FF. The problem is
in IE with the post in the getData function. In both IE and FF I get
the alert that contains the data (just to debug the script) and the
data is displayed properly in FF. In IE I get the alert with the
proper data so I know that the request is being set and returned
properly. The problem is the data does not refresh. I just get a blank
area like there is no data.

Any ideas?

Code:

$(document).ready(function(){

   $(#FilterSubmit).click(function(){

   getData();

   });//End of the filterSubmit actions

   bindPageLinks();

});//end of ready function

function getData(){

var $pagename=http://www.domain.net/includes/publicProfiles+$
(#gender option:selected).val()+$(#location
option:selected).val();

$(#FilteredProfiles).html('img src=http://www.domain.net/images/
text-fetching data.gif');

$.post($pagename, function(data){

   $(#FilteredProfiles).html(data);

   alert(data);

   bindPageLinks();

   });

}//End of getData function

function bindPageLinks(){

//Bind a click event to the links

$(#Pagination  a).bind(click, function(){

//Set pattern to append to end of url

var pattern=/P[0-9]([0-9]*)?/;

var $urlAppend;

if ($(this).attr(href).match(/P[0-9]([0-9]*)?/)){

   $urlAppend = $(this).attr(href).match(/P[0-9]([0-9]*)?/)[0];

}else{

   $urlAppend = P0;

}

//Display getting data graphic

$(#FilteredProfiles).html('img src=http://www.domain.net/images/
text-fetching data.gif');

var $url=http://www.domain.net/includes/publicProfiles+$(#gender
option:selected).val()+$(#location option:selected).val()+/+
$urlAppend ;

$.post($url, function(data){

   $(#FilteredProfiles).html(data);

   bindPageLinks();

});

return false;

});//End of the binding

//$(#Pagination  a).css(border,3px solid red);

}//End of bindPageLinks function