[jQuery] Re: Selector help

2009-07-19 Thread Shawn


that would still fail - unless he has a tag named this  just like 
doing $(a) finds anchor tags.  If however he is using this in terms 
of an event handler (where this is a reference to the DOM object that 
threw the event, then he would need to remove the quotes:


$(this).siblings('h1').height();

In this case $(this) says to put the jquery wrapper object around the 
DOM element represented by this in the current context.


The difference is very minor, I know, but I did not see in his 
description just what this represented...


Shawn

Charlie wrote:
you can't use this in same manner as tagnames, ID's or class as a 
selector in combination with other selectors the way you are attempting.


try:

h1Height =  $('this').siblings('h1').height();




Warfang wrote:

I'm pretty new to Javascript/ jQuery, so this is really bugging me.

I'm trying to get the height of an h1 that is a sibling to this. The
value for the variable h1Height, however, returned as null in the
console in Firebug. Perplexed, I tried console.logging ('this'+'+h1')
to see what it was interpreted as. It brought back this+h1, which
should select an h1 adjacent to this (which is a div).

Javascript
h1Height =  $('this'+'h1').height();

What went wrong?

  




[jQuery] Re: JSON form submit

2009-07-19 Thread David

If you are using JSON to construct your server request, why do you
need a params order?
I mean, in JSON format, you will have pairs detailing attribute name -
attribute value, so you will always know which parameter are you
dealing with.

On 18 jul, 15:02, NightFox nightfox...@gmail.com wrote:
 Hello,

 I'm working on an order system where I get to see all my purchase
 orders.
 But the problem is that I want to submit my result with AJAX by an
 JSON key.

 The first problem that I encounter is that I need to retrieve all the
 input boxes of that particular order.
 If I use $(:input) then I get all the input fields that are existing
 on that page.

 What do I want to achieve:
  - Retrieve all the input boxes of that particular order
  - Put then in an JSON string
  - Send it to my php script

 If there are any obscurities I'd be glad to hear that so I can explain
 the problem more clearly!

 Thanks in advance,

 Leon Keijzer


[jQuery] Re: Newbie Datepicker Question

2009-07-19 Thread gfranklin

Yes I agree with James. You should set the value from the database to
match the format exactly as the datepicker needs it to be. If you are
using PHP here is a cheat sheet:
http://php-date.com/

g

On Jul 17, 10:23 pm, James james.gp@gmail.com wrote:
 That was just an example.
 You should try to make it the same then. Use your server-side script
 that gets the date from the database to format the date before you
 output it so it's the same as what datepicker uses (or whatever you
 set it).

 On Jul 17, 9:50 am, sankofa ssank...@gmail.com wrote:

  The initial value is not the same.  It is coming from the database as
  a timestamp with the time  date.  There is no leading zero before the
  month.


[jQuery] Re: Selector help

2009-07-19 Thread Charlie


absolutely right, and I know better, was far too late at night...thanks 
for the catch


Shawn wrote:


that would still fail - unless he has a tag named this  just like 
doing $(a) finds anchor tags.  If however he is using this in terms 
of an event handler (where this is a reference to the DOM object that 
threw the event, then he would need to remove the quotes:


$(this).siblings('h1').height();

In this case $(this) says to put the jquery wrapper object around the 
DOM element represented by this in the current context.


The difference is very minor, I know, but I did not see in his 
description just what this represented...


Shawn

Charlie wrote:
you can't use this in same manner as tagnames, ID's or class as a 
selector in combination with other selectors the way you are attempting.


try:

h1Height =  $('this').siblings('h1').height();




Warfang wrote:

I'm pretty new to Javascript/ jQuery, so this is really bugging me.

I'm trying to get the height of an h1 that is a sibling to this. The
value for the variable h1Height, however, returned as null in the
console in Firebug. Perplexed, I tried console.logging ('this'+'+h1')
to see what it was interpreted as. It brought back this+h1, which
should select an h1 adjacent to this (which is a div).

Javascript
h1Height =  $('this'+'h1').height();

What went wrong?

  






[jQuery] Re: Selector help

2009-07-19 Thread Dhruva Sagar
Hi,

Perhaps your missing a space? $('this h1'), or $('this ' + 'h1')
What I don't understand is, why are you trying to concatenate two
strings when you don't need to? 


Thanks  Regards,
Dhruva Sagar.


On Sat, 2009-07-18 at 22:05 -0700, Warfang wrote:

 I'm pretty new to Javascript/ jQuery, so this is really bugging me.
 
 I'm trying to get the height of an h1 that is a sibling to this. The
 value for the variable h1Height, however, returned as null in the
 console in Firebug. Perplexed, I tried console.logging ('this'+'+h1')
 to see what it was interpreted as. It brought back this+h1, which
 should select an h1 adjacent to this (which is a div).
 
 Javascript
 h1Height =  $('this'+'h1').height();
 
 What went wrong?
attachment: draft-paper.png

[jQuery] Re: Variable scope trouble

2009-07-19 Thread rhodopsin

Thank you Mike! It works perfect now.


[jQuery] Re: Multi jquery plugins in 1 page?

2009-07-19 Thread tswaters

if you used two closures, e.g.

(function($){
  $.fn.myplugin = function(){}
})(jQuery)

(function($){
  $.fn.mysecondplugin = function(){}
})(jQuery)

make sure there is a semicolon separating them.


On Jul 18, 9:25 am, Tzontonel tzonto...@gmail.com wrote:
 I want to put in 1 page two jquery plugin, but one of this plugin
 don't work when i put 2 plugin. I am a noob in jquery and I want to
 know if 2 jquery plugin in 1 page works fine?


[jQuery] jQuery Combo Boxes (User Selection) / Text Validation

2009-07-19 Thread Admiral Data

Is there a way to have a text validation tool for jQuery such that:

Box 1: Hi
Box 2: Automatically fills with Hi if Hi is entered in Box 1

In another case if,

Box 1: Bye
Box 2: If the user enters Bye in Box 2 it says that they entered an
invalid response

Also is it possible to have it such that if Choice A is selected in a
a combo box it auto fills some of the text boxes and prevents the user
from editing them?

Thanks,


[jQuery] jQuery Text Validation/Combo Boxes

2009-07-19 Thread Admiral Data

Hello,

Is there anyway to make a text validation tool such that if in box 1
the user entered dog, then in box 2 dog is entered for them. But if
they enter cat in box 1 and attempt to enter cat in box 2 it tells
them they have made an invalid selection?

Also is there anyway to make it such that if you select a combo box
text will appear inside of the text boxes and prevent user editing?
Likewise hide and un-hide text boxes upon combo box selection.

Thanks,


[jQuery] about get() in ajax part of jquery

2009-07-19 Thread Bradley

Hi guys!
I've got a problem to tackle. Will anybody help me?
I wrote a $(document).ready() function in a js file that are
referenced by a html page.
$(document).ready(function() {
$('#letter-e a').click(function() {
$.get('http://localhost/e.php', {'term':$(this).text()},
function(data) {
$('#dictionary').html(data);
});
return false;
});
});

I could get the response from php only in IE and safari. It didn't
work in opera firefox and chrome.

Can you guys tell me why this could happy in jquery. if i change $.get
('http://localhost/e.php', {'term':$(this).text()}, function(data) {
to $.get('e.php', {'term':$(this).text()}, function(data) { It
doesn't work in any browers.

I am using IIS for php http service in Windows Vista ultimate. My
jquery library is verison 1.3.2.

Thanks!


[jQuery] Requirement for duplicate AJAX attribute name

2009-07-19 Thread Coop

All,
I have a situation where I need to pass the same named attribute to an
AJAX enabled endpoint. Basically I need to simulate something like
http://example/cgi?text=1500characterstext=1500characters. I need
this type of scenario to work in typical JQuery AJAX and JSONP calls.
I understand that I may run into browser/server URL limitations.

In case anyone is wondering, I’m AJAX enabling some old PL/SQL code
using Oracle's Webtoolkit and there’s a limitation on the size of an
input string. To overcome this limitation I need to chop up the string
on the client side and send it in pieces to the endpoint using the
same parameter name. Something like the below would be the best
scenario but I know it’s against the JSON spec.

{data: {
  text: 1500characters...,
  text: 1500characters...
}}

I’m currently evaluating Oracle’s flexible parameter naming schema and
the worst case scenario…I’ll create some specific text parameters on
the server like text1, text2, text3, text4 …I really don’t want to do
it this way.

Any help is appreciated.


[jQuery] Does any one know of a page that uses GalleryView 2.0?

2009-07-19 Thread liquidcomma

Hi,

Since all the doucmentatio refers to the earlier version of
GalleryView, does any one know of a page that uses GalleryView 2.0? To
see an example of it in action.

Thanks.

Justin


[jQuery] Re: Does any one know of a page that uses GalleryView 2.0?

2009-07-19 Thread Charlie





have been playing with it a bit and it isn't compatible with version
1.1 markup. Look in changelog.txt for revised markup and options if
this is problem you are having

liquidcomma wrote:

  Hi,

Since all the doucmentatio refers to the earlier version of
GalleryView, does any one know of a page that uses GalleryView 2.0? To
see an example of it in action.

Thanks.

Justin

  






[jQuery] Adding element to an array of object

2009-07-19 Thread FrenchiINLA

I would like to add a key value to an object array. let's say i have 2
arrays:
var parArr = new Array('par1', 'par2', 'par3', 'par4');
var valArr = new Array('val1', 'val2', 'val3', 'val4');

I would like to obtain
ext={par1:val1, par2:val2,pa3:val3,par4:val4}

Any help would be greatly appreciated.


[jQuery] Re: Adding element to an array of object

2009-07-19 Thread Theodore Ni
Something simple (without any error checking) like the following works for
me:
html
head
titleObject Array/title
script type=text/javascript

var parArr = new Array('par1', 'par2', 'par3', 'par4');
var valArr = new Array('val1', 'val2', 'val3', 'val4');

function addKeysValues(original, newkeys, newvals)
{
for (var i = 0; i  newkeys.length; i++)
{
original[newkeys[i]] = newvals[i];
}
return original;
}

var test = addKeysValues({}, parArr, valArr);
var str = '';
for (var p in test)
{
str += p + ': ' + test[p] + \n;
}
alert(str);

/script
/head
body
/body
/html

Teddy


On Sun, Jul 19, 2009 at 12:35 PM, FrenchiINLA mamali.sohe...@gmail.comwrote:


 I would like to add a key value to an object array. let's say i have 2
 arrays:
var parArr = new Array('par1', 'par2', 'par3', 'par4');
var valArr = new Array('val1', 'val2', 'val3', 'val4');

 I would like to obtain
 ext={par1:val1, par2:val2,pa3:val3,par4:val4}

 Any help would be greatly appreciated.



[jQuery] Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Alan

OKgranted I am totally a rookie here...but I am S stuck!

Could anyone look at this page: http://www.movieeye.com/index-new.jsp


and help me with either of the two big problems I am having???


Problem #1: When the content is loading (3 content div's worth) it
shows ALL of the content before it collapses into the slider.


Problem #2: The previous content doesn't disappear when you click the
button, but rather scrolls way off the page (either left or right).


Both of these problems will be blatantly obvious when you go to the
page


Any ideas whatsoever that could fix this? If any code is needed, let
me know, happy to share it!


I'd greatly appreciate any help!


Alan




[jQuery] UI Tabs and xStandard Object

2009-07-19 Thread blackmeta...@googlemail.com

Hi
I seem to have found the following bug.

(I am using the the latest versions of all products mentioned)

When using jQuery UI Tabs with the following code in one tab, I then
select another tab then selected the first tab again the content of
the xStandard object is lost or reverts to the initial value. All
other form values on the tab are sill preserved as expected.

object type=application/x-xstandard id=editor1 width=100%
height=550 codebase=http://xxx/XStandard/
XStandard.cab#Version=2,0,0,0 name=content
param name=Value value=enter text /
/object

The object also flickers a bit when scrolling the page.
I have encountered these problems in Firefox and Chrome so far but is
fine in IE8.

Not sure if this is a UI or Browser bug.
Can anyone shed some light on this problem as I don't really what to
have to recommend IE8.
Cheers


[jQuery] Re: Json post with mozilla

2009-07-19 Thread jayz

hey am a totally newbie with json and jquery bothi am accessing a
restful service which on GET request reply with some json
data...now i wanna parse that through jquery..could you give me a
sample code or something?.

you have mentioned that u bbeen able to perform GEt request
successfully..woud you post that for reference.

Thanks
Jayz

On Jun 16, 7:44 pm, Nowhere spina.r...@gmail.com wrote:
 Hi all,
 I'm newbie to Jquery so excuse me for dummy question.
 I'm facing with the issue of making a call to another domain with
 mozilla firefox. When I need a GET request, I use JQuery.getJson and
 it works fine. The problem is when I need to do a POST request, I
 tried with:

 jQuery.post(
 url ,
dati ,
function(data){
 alert(data);
 

 }, json );

 but it gives me following error:

 Errore: uncaught exception: [Exception... Access to restricted URI
 denied  code: 1012 nsresult: 0x805303f4 (NS_ERROR_DOM_BAD_URI)
 location: http://localhost:8081/html/js/barebone.jsp?
 browserId=firefoxthemeId=classiccolorSchemeId=01minifierType=jsminifierBundleId=javascript.barebone.filesminifierBundleDir=
 %2Fhtml%2Fjst=1233649818000 Line: 1]

 The same error I get making a not json GET request. In this case I
 solved using json...but in POST case I don't know how proceed.
 Any hint will be appreciated, it's very urgent for me. If you need
 more info let me know.
 Greetings.


[jQuery] Help in validation plugin

2009-07-19 Thread MrConfused

I have just started using this great validation plugin but I encounter
problem in Remote. I do not know how to create a JSP script that
will take in the parameter for the evaluation. Can anyone show me some
example codes so that I can get started? Thanks a lot.


[jQuery] jcarousel - malware-adware?

2009-07-19 Thread gauthier2022

I had malware/adware two days ago.

Scanned with Spybot search and destroy but now mybrowsers are slow (IE
and Firefox) plus i get a window saying:
jcarousel No width/height set for items. Tjis will cause an infinite
loop.

What caused this and how do i correct the problem?

Thanks to the good soul who helps me out...!

Jean-Pierre
gauthier2...@sympatico.ca


[jQuery] Validation Plugin

2009-07-19 Thread MrConfused

Recently I have just started using JQuery and JQuery Validation
plugin. They are really great in terms of helping me in my project. I
am having problem with one of the property in the validation plugin. I
do not understand about the method called Remote. How do I write out
a script in JSP to process the field at my server?? Can anyone show me
an example? Thank you very much


[jQuery] JQuery Message with Validate Plugin

2009-07-19 Thread pocket

I am currently using the validate plugin and I needed to find a way of
displaying a message when the user clicks submit but only if they meet
certain criteria on their postcode. I have just seen Message which
will display a pop up message. How do the two work together? Is it
possible?

Does the message display every time the user clicks submit or will it
work if I use a regex for the set criteria so that it will display the
message if the user has a postcode starting TA2 for example and won't
display if they don't?

I hope this makes sense.

Thanks



[jQuery] Re: MODAL HELP!!!!!!!!

2009-07-19 Thread Theodore Ni
I don't know if you are still having this problem, but the reason it isn't
working is simply bad JavaScript syntax. You should use your working code,
as there is nothing wrong with it.
Teddy


On Tue, Jul 14, 2009 at 4:26 PM, Nick mrnickst...@gmail.com wrote:


 Anyone:  I cant seem to get this to work.  If I pass modal:true in
 as a variable it doesn't work.  Anyone have any idea what is causing
 it to break?

 ===  Stark Working Code ==
 var  modal = modal;
 var content = true;

  var $dialog = $(iframe frameborder='0' scrolling='no'
 allowtransparency='true' src='modals/ + modalID + .html'/iframe)

.dialog({
modal:content

});


$dialog.dialog('open');
 ===  End Working Code ==

 ===  Stark Broken Code ==
 var  modal = modal;
 var content = modal:true;

  var $dialog = $(iframe frameborder='0' scrolling='no'
 allowtransparency='true' src='modals/ + modalID + .html'/iframe)

.dialog({
content

});


$dialog.dialog('open');

 ===  End Broken Code ==



[jQuery] Re: Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Charlie





for starters your images are huge ...sampled a couple .Judy
Dench is 1728px  2304px (scaled to 449px  600px) and file size is
350kb!

that's a huge amount of loading time for the number of images you have
Alan wrote:

  OKgranted I am totally a rookie here...but I am S stuck!

Could anyone look at this page: http://www.movieeye.com/index-new.jsp


and help me with either of the two big problems I am having???


Problem #1: When the content is loading (3 content div's worth) it
shows ALL of the content before it collapses into the slider.


Problem #2: The previous content doesn't disappear when you click the
button, but rather scrolls way off the page (either left or right).


Both of these problems will be blatantly obvious when you go to the
page


Any ideas whatsoever that could fix this? If any code is needed, let
me know, happy to share it!


I'd greatly appreciate any help!


Alan



  






[jQuery] Re: JSON form submit

2009-07-19 Thread Michael Geary

Ah, the ambiguities of the English lanuage. :-)

David, I'm pretty sure that Leon meant in a page containing multiple
purchase orders, how do I select the input fields that belong to one of
those purchase orders? Not order in the sense of which one comes before
another. :-)

Leon, when do you want to run the Ajax submit that you mentioned? Does each
purchase order have an [Update] button or something like that, which will
trigger this code?

If so, simply put each purchase order in its own form element. Make the
Update button the submit button for the form.

Then you can use Mike Alsup's form plugin and hardly have to write any code
at all:

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

The samples for the form plugin use code like this:

$('#myForm1).ajaxForm(...);

Since you want multiple forms to all work like this, you can either do this
to select all the forms on the page:

$('form').ajaxForm(...);

Or if there may be unrelated forms on the same page, then give all of your
purchase order forms a common class:

form class=po.../form

$('form.po').ajaxForm(...);

You may want to use ajaxSubmit() instead of ajaxForm() - see the form plugin
docs and examples for details.

Note that the form plugin uses query string syntax instead of JSON. I would
just run with that instead of worrying about converting the data to JSON,
and take it into account in your PHP code. You could use JSON if you want,
but why bother? PHP can easily parse the query string.

-Mike

 From: David
 
 If you are using JSON to construct your server request, why 
 do you need a params order?
 I mean, in JSON format, you will have pairs detailing 
 attribute name - attribute value, so you will always know 
 which parameter are you dealing with.

 On 18 jul, 15:02, NightFox nightfox...@gmail.com wrote:
 
  I'm working on an order system where I get to see all my purchase 
  orders.
  But the problem is that I want to submit my result with AJAX by an 
  JSON key.
 
  The first problem that I encounter is that I need to 
  retrieve all the 
  input boxes of that particular order.
  If I use $(:input) then I get all the input fields that 
  are existing on that page.
 
  What do I want to achieve:
   - Retrieve all the input boxes of that particular order
   - Put then in an JSON string
   - Send it to my php script
 
  If there are any obscurities I'd be glad to hear that so I 
  can explain the problem more clearly!
 
  Thanks in advance,
 
  Leon Keijzer



[jQuery] Help with variable passing and jCarousel callbacks

2009-07-19 Thread oswaldcobblepot

Hi everyone,

I think this is probably an easy thing to fix, I'm just a bit lost at
the moment.

I have a photo gallery up and running that uses the Galleriffic plugin
alongside the jCarousel plugin, and I am currently trying to get the
carousel to scroll along with the displayed image.

I know that this involves using the jCarousel callback, however the
value I need to use in that callback is set inside of the Galleriffic
function, and I'm not really sure how to make them talk to one
another.

Here is my JS:

$(document).ready(function() {
// Initialize Advanced Galleriffic Gallery
var galleryAdv = 
$('#gallery-adv').galleriffic('#thumbs-adv', {
delay:  2000,
numThumbs:  26,
preloadAhead:   10,
enableTopPager: false,
enableBottomPager:  false,
imageContainerSel:  '#slideshow-adv',
controlsContainerSel:   '#controls-adv',
captionContainerSel:'#caption-adv',
loadingContainerSel:'#loading-adv',
renderSSControls:   false,
renderNavControls:  false,
playLinkText:   'Play Slideshow',
pauseLinkText:  'Pause Slideshow',
prevLinkText:   'lsaquo; Previous 
Photo',
nextLinkText:   'Next Photo rsaquo;',
nextPageLinkText:   'Next rsaquo;',
prevPageLinkText:   'lsaquo; Prev',
enableHistory:  true,
autoStart:  false,
onChange:   function(prevIndex, 
nextIndex) {
$('#thumbs-adv ul.thumbs').children()
.eq(prevIndex).fadeTo('fast', 
onMouseOutOpacity).end()
.eq(nextIndex).fadeTo('fast', 
1.0);
var idx = nextIndex + 1;
console.log(idx);
},
onTransitionOut:function(callback) {
$('#slideshow-adv, 
#caption-adv').fadeOut('fast', callback);
},
onTransitionIn: function() {
$('#slideshow-adv, 
#caption-adv').fadeIn('fast');
},
onPageTransitionOut:function(callback) {
$('#thumbs-adv 
ul.thumbs').fadeOut('fast', callback);
},
onPageTransitionIn: function() {
$('#thumbs-adv 
ul.thumbs').fadeIn('fast');
}
});

// Initialize Minimal Galleriffic Gallery
var galleryMin = 
$('#gallery-min').galleriffic('#thumbs-min', {
imageContainerSel:  '#slideshow-min',
controlsContainerSel:   '#controls-min'
});

$('#mycarousel').jcarousel({
scroll: 7,
initCallback: initCallbackFunction
});

function initCallbackFunction(carousel) {
carousel.scroll(idx);
return false;
};
});


[jQuery] using extend to extend inner object options

2009-07-19 Thread alexanmtz

Hello everyone,

In my plugin arquitecture, I need a inner object of options like the
ticked http://dev.jquery.com/ticket/2447

How could I achieve this?

I understand that it's really a expected result to overwrite a inner
object, but in plugin that I`m developing, I need a subobject of
options that need to be extending and not overwriting.

There's some plugin pattern to achieve this???

Regards,

Alexandre Magno
Interface Developer
http://blog.alexandremagno.net


[jQuery] Re: jcarousel - malware-adware?

2009-07-19 Thread MorningZ

It's called a false positive... where Spybot *thinks* it's something
malicious, but it isn't...

if it's really that much a concern to you, and in no should it, then i
would suggest not using the plugin

On Jul 19, 11:18 am, gauthier2022 gauthier2...@gmail.com wrote:
 I had malware/adware two days ago.

 Scanned with Spybot search and destroy but now mybrowsers are slow (IE
 and Firefox) plus i get a window saying:
 jcarousel No width/height set for items. Tjis will cause an infinite
 loop.

 What caused this and how do i correct the problem?

 Thanks to the good soul who helps me out...!

 Jean-Pierre
 gauthier2...@sympatico.ca


[jQuery] Re: Selector help

2009-07-19 Thread Ricardo

this is an object name, you want to pass the object itself and not a
string, as others have already said:

$(this).find('+ h1')
or
$('+ h1', this)
or
$(this).next('h1')

http://docs.jquery.com/Selectors

On Jul 19, 4:46 am, Dhruva Sagar dhruva.sa...@gmail.com wrote:
 Hi,

 Perhaps your missing a space? $('this h1'), or $('this ' + 'h1')
 What I don't understand is, why are you trying to concatenate two
 strings when you don't need to?

 
 Thanks  Regards,
 Dhruva Sagar.

 On Sat, 2009-07-18 at 22:05 -0700, Warfang wrote:
  I'm pretty new to Javascript/ jQuery, so this is really bugging me.

  I'm trying to get the height of an h1 that is a sibling to this. The
  value for the variable h1Height, however, returned as null in the
  console in Firebug. Perplexed, I tried console.logging ('this'+'+h1')
  to see what it was interpreted as. It brought back this+h1, which
  should select an h1 adjacent to this (which is a div).

  Javascript
  h1Height =  $('this'+'h1').height();

  What went wrong?



  draft-paper.png
  1KViewDownload


[jQuery] Re: Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Alan

Yeah, I know.  As part of the re-write we will deal with the image
issue.  The page load time on the actual site is aweful.

On Jul 19, 10:11 am, Charlie charlie...@gmail.com wrote:
 for starters your images are huge  ...sampled a couple  .Judy Dench  is 
 1728px × 2304px (scaled to 449px × 600px) and file size is 350kb!
 that's a huge amount of loading time for the number of images you have
 Alan wrote:OKgranted I am totally a rookie here...but I am S stuck! 
 Could anyone look at this page:http://www.movieeye.com/index-new.jspand help 
 me with either of the two big problems I am having??? Problem #1: When the 
 content is loading (3 content div's worth) it shows ALL of the content before 
 it collapses into the slider. Problem #2: The previous content doesn't 
 disappear when you click the button, but rather scrolls way off the page 
 (either left or right). Both of these problems will be blatantly obvious when 
 you go to the page Any ideas whatsoever that could fix this? If any code is 
 needed, let me know, happy to share it! I'd greatly appreciate any help! Alan


[jQuery] Re: Help with variable passing and jCarousel callbacks

2009-07-19 Thread oswaldcobblepot
NM, dumb question.  Got it working.

On Jul 19, 4:14 pm, oswaldcobblepot oswald.cobble...@gmail.com
wrote:
 Hi everyone,

 I think this is probably an easy thing to fix, I'm just a bit lost at
 the moment.

 I have a photo gallery up and running that uses the Galleriffic plugin
 alongside the jCarousel plugin, and I am currently trying to get the
 carousel to scroll along with the displayed image.

 I know that this involves using the jCarousel callback, however the
 value I need to use in that callback is set inside of the Galleriffic
 function, and I'm not really sure how to make them talk to one
 another.

 Here is my JS:

                 $(document).ready(function() {
                         // Initialize Advanced Galleriffic Gallery
                         var galleryAdv = 
 $('#gallery-adv').galleriffic('#thumbs-adv', {
                                 delay:                  2000,
                                 numThumbs:              26,
                                 preloadAhead:           10,
                                 enableTopPager:         false,
                                 enableBottomPager:      false,
                                 imageContainerSel:      '#slideshow-adv',
                                 controlsContainerSel:   '#controls-adv',
                                 captionContainerSel:    '#caption-adv',
                                 loadingContainerSel:    '#loading-adv',
                                 renderSSControls:       false,
                                 renderNavControls:      false,
                                 playLinkText:           'Play Slideshow',
                                 pauseLinkText:          'Pause Slideshow',
                                 prevLinkText:           'lsaquo; Previous 
 Photo',
                                 nextLinkText:           'Next Photo rsaquo;',
                                 nextPageLinkText:       'Next rsaquo;',
                                 prevPageLinkText:       'lsaquo; Prev',
                                 enableHistory:          true,
                                 autoStart:              false,
                                 onChange:               function(prevIndex, 
 nextIndex) {
                                         $('#thumbs-adv ul.thumbs').children()
                                                 .eq(prevIndex).fadeTo('fast', 
 onMouseOutOpacity).end()
                                                 .eq(nextIndex).fadeTo('fast', 
 1.0);
                                                 var idx = nextIndex + 1;
                                                 console.log(idx);
                                 },
                                 onTransitionOut:        function(callback) {
                                         $('#slideshow-adv, 
 #caption-adv').fadeOut('fast', callback);
                                 },
                                 onTransitionIn:         function() {
                                         $('#slideshow-adv, 
 #caption-adv').fadeIn('fast');
                                 },
                                 onPageTransitionOut:    function(callback) {
                                         $('#thumbs-adv 
 ul.thumbs').fadeOut('fast', callback);
                                 },
                                 onPageTransitionIn:     function() {
                                         $('#thumbs-adv 
 ul.thumbs').fadeIn('fast');
                                 }
                         });

                         // Initialize Minimal Galleriffic Gallery
                         var galleryMin = 
 $('#gallery-min').galleriffic('#thumbs-min', {
                                 imageContainerSel:      '#slideshow-min',
                                 controlsContainerSel:   '#controls-min'
                         });

                         $('#mycarousel').jcarousel({
                                         scroll: 7,
                                         initCallback: initCallbackFunction
                     });

                         function initCallbackFunction(carousel) {
                         carousel.scroll(idx);
                         return false;
                         };
                 });

[jQuery] Can't change padding using animate() in IE

2009-07-19 Thread djeyewater

I have a function that resizes an image (imgCur) and changes its
padding when a new image (img) is loaded like so:
img.onload = function(){
var t = this;
//Animate current image to new image size
imgCur.animate({
width: t.width,
height: t.height,
padding: 20px 25px
}, 750).attr(src, img.src);

}

Which works fine in FF, Opera and Chrome. But in IE6, 7  8 it doesn't
like changing the padding, and I get an error at line 835 in
jquery-1.3.2.js, which is:
style.left = ret || 0;

If I check in the IE Script debugger, ret has the value 40px 50px,
which obviously isn't a valid value for style.left. 40px 50px is the
padding of imgCur that is set in the CSS file.
But why is jQuery trying to set the CSS left property of imgCur to its
current padding?


[jQuery] Re: jcarousel - malware-adware?

2009-07-19 Thread icpep


MorningZ wrote:

It's called a false positive... where Spybot *thinks* it's something
malicious, but it isn't...

if it's really that much a concern to you, and in no should it, then i
would suggest not using the plugin

On Jul 19, 11:18 am, gauthier2022 gauthier2...@gmail.com wrote:
  

I had malware/adware two days ago.

Scanned with Spybot search and destroy but now mybrowsers are slow (IE
and Firefox) plus i get a window saying:
jcarousel No width/height set for items. Tjis will cause an infinite
loop.

What caused this and how do i correct the problem?

Thanks to the good soul who helps me out...!

Jean-Pierre
gauthier2...@sympatico.ca



  
If you really needed the plugin then you can uninstall the spybot or 
either way.  Like what the spybot suggest there is an infinite loop 
which is causing the slowing down of your computer.  Try also looking 
for the width and height and set some values.


[jQuery] Re: Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Glazz

Hi,

I dunno how your plugin works, but here goes my 2 cents

#Problem 1: Why don't place a display: none; style?
Dunno if this works with your plugin but, you can do this and in
inside your plugin just show the content you need to show...

#Problem 2: Don't understand what you mean for scrolls way off the
page (either left or right)


On 19 Jul, 22:19, Alan alanblackf...@gmail.com wrote:
 Yeah, I know.  As part of the re-write we will deal with the image
 issue.  The page load time on the actual site is aweful.

 On Jul 19, 10:11 am, Charlie charlie...@gmail.com wrote:

  for starters your images are huge  ...sampled a couple  .Judy Dench  is 
  1728px × 2304px (scaled to 449px × 600px) and file size is 350kb!
  that's a huge amount of loading time for the number of images you have
  Alan wrote:OKgranted I am totally a rookie here...but I am S stuck! 
  Could anyone look at this page:http://www.movieeye.com/index-new.jspandhelp 
  me with either of the two big problems I am having??? Problem #1: When the 
  content is loading (3 content div's worth) it shows ALL of the content 
  before it collapses into the slider. Problem #2: The previous content 
  doesn't disappear when you click the button, but rather scrolls way off the 
  page (either left or right). Both of these problems will be blatantly 
  obvious when you go to the page Any ideas whatsoever that could fix this? 
  If any code is needed, let me know, happy to share it! I'd greatly 
  appreciate any help! Alan




[jQuery] Re: $.ajax How-to?

2009-07-19 Thread Glazz

Hi,

Here  data : $('#form').serialize()  you are serializing the data,
so in the php i guess you need to unserialize it, dunno but maybe that
is the problem with your script.

Here's how i do it, i use json btw:

$.ajax({
type: 'POST',
url:  'ajax.php',
data: 'quantidade=' + $('#quantidade').val() ,
dataType : 'json',

success: function(data){
$('#my-div').html(data.returned_variable_from_php);
},

error: function(XMLHttpRequest, textStatus, errorThrown) {
alert('Error!');
}
});



I get the values individually, maybe its a bad way but i like this
way :)


Im a newbie at jQuery too but if you need any help you can add me on
msn, im portuguese :)

Regards
Bruno

On 18 Jul, 17:36, Pedro Vidal pedrorvi...@gmail.com wrote:
 Hello guys, my first time writing to group...I'm a beginner in jquery and
 I'm trying to learn the $.ajax() method. I created a simple form (3 inputs)
 and the form should send the data (via ajax) to the page ajax.php which will
 return the data to be written in a div (#mensagem), just it.

 But I would like to know why *THIS* works:

 *$('#form').submit(function() {*
 * **  $.post(*
 * **'ajax.php', *
 * **$('#form').serialize(), *
 * **function(data){*
 * **  $('#mensagem').html(data);*
 * **}*
 * **  );*
 * **  return false;*
 * **});*

 and *THIS* doesn't work:

 *$('#form').submit(function() {*
 * **  $.ajax({*
 * **  dataType: 'html',*
 * **  url: 'ajax.php',*
 * **  type: 'post',*
 * **  data : $('#form').serialize(),*
 * **  beforeSend: function()  { alert('iniciando requisicao ajax'); },*
 * **  error: function() { alert('ocorreu um erro'); },*
 * **  success: function(data)*
 *                  {*
 * **  $('#mensagem').html(data)*
 * **  },*
 * **  complete: function() { alert('requisicao ajax completa'); }*
 * **  });*
 * **});*

 The PHP code:
 *?php*
 * **$nome = $_POST['nome'];*
 * **$idade = $_POST['idade'];*
 * **$timetorce = $_POST['timetorce'];*
 * **echo Nome: $nome - Idade: $idade anos - Time: $timetorce;*
 *?*
 *
 *
 When I use the second code, the error returned by the PHP is this:
 *Notice*: Undefined index: nome in *
 D:\wamp\www\sites\testes\serialize\ajax.php* on line *2*
 *Notice*: Undefined index: idade in *
 D:\wamp\www\sites\testes\serialize\ajax.php* on line *3*
 *Notice*: Undefined index: timetorce in *
 D:\wamp\www\sites\testes\serialize\ajax.php* on line *4*
 Nome: - Idade: anos - Time:

 So, how do I use the $.ajax() method?

 Thanks for help!
 Pedro Vidal, Brazil.


[jQuery] Re: Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Alan

Problem #1:  not sure where i would put that, but I will check it out.

Problem #2: In IE 7, if you click on the arrow to scroll left or
right, you can see the previous content off to the side of the
slider.  interesting you didn't see it, so I checked out Firefox, and
sure enough, the problem is IE specific...joy, that will be fun to
figure out!




On Jul 19, 4:52 pm, Glazz brunofgas...@live.com.pt wrote:
 Hi,

 I dunno how your plugin works, but here goes my 2 cents

 #Problem 1: Why don't place a display: none; style?
 Dunno if this works with your plugin but, you can do this and in
 inside your plugin just show the content you need to show...

 #Problem 2: Don't understand what you mean for scrolls way off the
 page (either left or right)

 On 19 Jul, 22:19, Alan alanblackf...@gmail.com wrote:



  Yeah, I know.  As part of the re-write we will deal with the image
  issue.  The page load time on the actual site is aweful.

  On Jul 19, 10:11 am, Charlie charlie...@gmail.com wrote:

   for starters your images are huge  ...sampled a couple  .Judy Dench  
   is 1728px × 2304px (scaled to 449px × 600px) and file size is 350kb!
   that's a huge amount of loading time for the number of images you have
   Alan wrote:OKgranted I am totally a rookie here...but I am S 
   stuck! Could anyone look at this 
   page:http://www.movieeye.com/index-new.jspandhelpme with either of the 
   two big problems I am having??? Problem #1: When the content is loading 
   (3 content div's worth) it shows ALL of the content before it collapses 
   into the slider. Problem #2: The previous content doesn't disappear when 
   you click the button, but rather scrolls way off the page (either left or 
   right). Both of these problems will be blatantly obvious when you go to 
   the page Any ideas whatsoever that could fix this? If any code is needed, 
   let me know, happy to share it! I'd greatly appreciate any help! Alan- 
   Hide quoted text -

 - Show quoted text -


[jQuery] Re: Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Alan

I can show css or slider code if it helps.

Slider CSS below
--
@charset utf-8;
/* CSS Document */
#slidercontent{
position:relative;
}
#slidercontainer{
margin:0 auto;
position:relative;
text-align:left;
width:896px;
background:#fff;
margin-bottom:2em;
}

  /* clearfix */

#slidercontent:after, ul:after{
content:.;
display:block;
height:0;
clear:both;
visibility:hidden;
}
#slidercontent, ul{
display:block;
}
/*  \*/
#slidercontent, ul{
min-height:1%;
}
* html #slidercontent, * html ul{
height:1%;
}

/* // clearfix */

   /* image replacement */
.graphic, #header h1, #prevBtn, #nextBtn{
margin:0;
padding:0;
display:block;
overflow:hidden;
text-indent:-8000px;
}
/* // image replacement */

/* Easy Slider */

#slider{}
#slider ul, #slider li{
margin:0;
padding:0;
list-style:none;
}
#slider li{
/*
define width and height of list item (slide)
entire slider area will adjust according to the 
parameters provided
here
*/
width:896px;
height:171px;
overflow:hidden;
}
#prevBtn, #nextBtn{
display:block;
width:30px;
height:77px;
position:absolute;
left:-30px;
top:41px;
}
#nextBtn{
left:896px;
}
#prevBtn a, #nextBtn a{
display:block;
width:30px;
height:77px;
background:url(/includes/sliders/images/btn_prev.gif) no-repeat 0
0;
}
#nextBtn a{
background:url(/includes/sliders/images/btn_next.gif) no-repeat 0
0;
}

/* // Easy Slider */


Actual Slider Code
-
(function($) {

$.fn.easySlider = function(options){

// default configuration properties
var defaults = {
prevId: 'prevBtn',
prevText:   '',
nextId: 'nextBtn',
nextText:   '',
controlsShow:   true,
controlsBefore: '',
controlsAfter:  '',
controlsFade:   true,
firstId:'firstBtn',
firstText:  'First',
firstShow:  false,
lastId: 'lastBtn',
lastText:   'Last',
lastShow:   false,
vertical:   false,
speed:  800,
auto:   false,
pause:  4000,
continuous: false
};

var options = $.extend(defaults, options);

this.each(function() {
var obj = $(this);
var s = $(li, obj).length;
var w = $(li, obj).width();
var h = $(li, obj).height();
obj.width(w);
obj.height(h);
obj.css(overflow,hidden);
var ts = s-1;
var t = 0;
$(ul, obj).css('width',s*w);
if(!options.vertical) $(li, obj).css('float','left');

if(options.controlsShow){
var html = options.controlsBefore;
if(options.firstShow) html += 'span id='+ 
options.firstId +'a
href=\javascript:void(0);\'+ options.firstText +'/a/span';
html += ' span id='+ options.prevId +'a 
href=\javascript:void
(0);\'+ options.prevText +'/a/span';
html += ' span id='+ options.nextId +'a 
href=\javascript:void
(0);\'+ options.nextText +'/a/span';
if(options.lastShow) html += ' span id='+ 
options.lastId +'a

[jQuery] Re: Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Glazz
Hmm i tried to replicate that on my server but whithout success...

You can try what i've mentioned in my previous post, display: none;
like this:


HTML:
div id=slider align=center style=display: none;

JS:
Add this
 $('#slider').css({'display' : 'block'});

After
 this.each(function() {


It will look like this:

this.each(function() {
  $('#slider').css({'display' : 'block'});


Try it please...


On 20 Jul, 02:25, Alan alanblackf...@gmail.com wrote:
 I can show css or slider code if it helps.

 Slider CSS below
 --
 @charset utf-8;
 /* CSS Document */
         #slidercontent{
                 position:relative;
                 }
 #slidercontainer{
                 margin:0 auto;
                 position:relative;
                 text-align:left;
                 width:896px;
                 background:#fff;
                 margin-bottom:2em;
                 }

   /* clearfix */

                 #slidercontent:after, ul:after{
                         content:.;
                         display:block;
                         height:0;
                         clear:both;
                         visibility:hidden;
                         }
                 #slidercontent, ul{
                         display:block;
                         }
                 /*  \*/
                 #slidercontent, ul{
                         min-height:1%;
                         }
                 * html #slidercontent, * html ul{
                         height:1%;
                         }

     /* // clearfix */

    /* image replacement */
         .graphic, #header h1, #prevBtn, #nextBtn{
             margin:0;
             padding:0;
             display:block;
             overflow:hidden;
             text-indent:-8000px;
             }
     /* // image replacement */

 /* Easy Slider */

         #slider{}
         #slider ul, #slider li{
                 margin:0;
                 padding:0;
                 list-style:none;
                 }
         #slider li{
                 /*
                         define width and height of list item (slide)
                         entire slider area will adjust according to the 
 parameters provided
 here
                 */
                 width:896px;
                 height:171px;
                 overflow:hidden;
                 }
         #prevBtn, #nextBtn{
                 display:block;
                 width:30px;
                 height:77px;
                 position:absolute;
                 left:-30px;
                 top:41px;
                 }
         #nextBtn{
                 left:896px;
                 }
         #prevBtn a, #nextBtn a{
                 display:block;
                 width:30px;
                 height:77px;
                 background:url(/includes/sliders/images/btn_prev.gif) 
 no-repeat 0
 0;
                 }
         #nextBtn a{
                 background:url(/includes/sliders/images/btn_next.gif) 
 no-repeat 0
 0;
                 }

 /* // Easy Slider */

 Actual Slider Code
 -
 (function($) {

         $.fn.easySlider = function(options){

                 // default configuration properties
                 var defaults = {
                         prevId:                 'prevBtn',
                         prevText:               '',
                         nextId:                 'nextBtn',
                         nextText:               '',
                         controlsShow:   true,
                         controlsBefore: '',
                         controlsAfter:  '',
                         controlsFade:   true,
                         firstId:                'firstBtn',
                         firstText:              'First',
                         firstShow:              false,
                         lastId:                 'lastBtn',
                         lastText:               'Last',
                         lastShow:               false,
                         vertical:               false,
                         speed:                  800,
                         auto:                   false,
                         pause:                  4000,
                         continuous:             false
                 };

                 var options = $.extend(defaults, options);

                 this.each(function() {
                         var obj = $(this);
                         var s = $(li, obj).length;
                         var w = $(li, obj).width();
                         var h = $(li, obj).height();
                         obj.width(w);
                         obj.height(h);
                         obj.css(overflow,hidden);
                         var ts = s-1;
                         var t = 0;
                         $(ul, obj).css('width',s*w);
                         if(!options.vertical) $(li, 
 obj).css('float','left');

                         

[jQuery] Re: Value adding to drop down

2009-07-19 Thread naz

i have values in data same like you are using BSIT|MSIT|BSC| etc when
i used alert(). to display data values then values are correct but
when values appear in drop down they become |BSIT
code is like this
var programs=[];
alert(data);
programs=data.split('|');
$('#p_course').length = 1;
for(var i=0;iprograms.length-1;i++)
{
  var objDropdown =$('#p_course').get(0);
  var objOption = new Option(programs[i],programs[i]);//
adding option
  objDropdown.options[objDropdown.length] = objOption;
}

On Jul 18, 3:48 pm, Jules jwira...@gmail.com wrote:
 I tested your code with the following data

 var data = 'program1|program2|program3|';

 and the drop down combo box displays

 program1
 program2
 program3

 correctly.

 Again could you post the value of your data?

 On Jul 18, 2:07 pm, naz s.na...@gmail.com wrote:



  i m using internet explorar.and data value is SE,DLD etc i m getting
  these values from db.

  On Jul 16, 11:14 am, Jules jwira...@gmail.com wrote:

   The code looks fine to me.  Could you post the data value?  What is
   the browser you are using?

   On Jul 16, 2:58 pm, naz s.na...@gmail.com wrote:

hi
i m adding some values to drop down
by usind j query by this code
var programs=[];
 programs=data.split('|');
$('#p_course').length = 1;
  for(var i=0;iprograms.length-1;i++)
  {
       var objDropdown =$('#p_course').get(0);
       var objOption = new Option(programs[i],programs[i]);
      objDropdown.options[objDropdown.length] = objOption;
 }
but when vales appear in drop down first value look like this
|BSIT
any body have any idea why it look like  this- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Value adding to drop down

2009-07-19 Thread naz

i have values in data like BSIT|MSIT|BSC| etc when i used alert(). to
display data values then values are correct but when values appear in
drop down they become |BSIT
code is like this
 var programs=[];
alert(data);
programs=data.split('|');
$('#p_course').length = 1;
for(var i=0;iprograms.length-1;i++)
{
  var objDropdown =$('#p_course').get(0);
  var objOption = new Option(programs[i],programs[i]);//
adding option
  objDropdown.options[objDropdown.length] = objOption;
}

actually i m storing these values in data from db may be thats why
there is a problem bcs when i use static value then it appear
correctly. If u can understand whts gng on plz tell me thnx alot
On Jul 18, 12:55 pm, Theodore Ni zyl...@gmail.com wrote:
 Please post again your current jQuery code including the separator you are
 using, as well as what is inside the data variable in full. That way, we can
 understand exactly what's going on; right now, I'm still confused.
 Teddy



 On Sat, Jul 18, 2009 at 12:07 AM, naz s.na...@gmail.com wrote:

  i have changed '|' seperator still it is not working.:(

  On Jul 16, 10:31 am, 刘永杰 liuyongjie...@gmail.com wrote:
   change split character,not use '|'.

   2009/7/16 naz s.na...@gmail.com

hi
i m adding some values to drop down
by usind j query by this code
var programs=[];
 programs=data.split('|');
$('#p_course').length = 1;
 for(var i=0;iprograms.length-1;i++)
 {
      var objDropdown =$('#p_course').get(0);
      var objOption = new Option(programs[i],programs[i]);
     objDropdown.options[objDropdown.length] = objOption;
 }
but when vales appear in drop down first value look like this
|BSIT
any body have any idea why it look like  this- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -


[jQuery] Re: Could REALLY use some help implementing a slider/carousel. I think I am really close!

2009-07-19 Thread Alan
Tried that...still same result.

On Jul 19, 7:47 pm, Glazz brunofgas...@live.com.pt wrote:
 Hmm i tried to replicate that on my server but whithout success...

 You can try what i've mentioned in my previous post, display: none;
 like this:

 HTML:
 div id=slider align=center style=display: none;

 JS:
 Add this
      $('#slider').css({'display' : 'block'});

 After
      this.each(function() {

 It will look like this:

 this.each(function() {
       $('#slider').css({'display' : 'block'});

 Try it please...

 On 20 Jul, 02:25, Alan alanblackf...@gmail.com wrote:



  I can show css or slider code if it helps.

  Slider CSS below
  --
  @charset utf-8;
  /* CSS Document */
          #slidercontent{
                  position:relative;
                  }
  #slidercontainer{
                  margin:0 auto;
                  position:relative;
                  text-align:left;
                  width:896px;
                  background:#fff;
                  margin-bottom:2em;
                  }

    /* clearfix */

                  #slidercontent:after, ul:after{
                          content:.;
                          display:block;
                          height:0;
                          clear:both;
                          visibility:hidden;
                          }
                  #slidercontent, ul{
                          display:block;
                          }
                  /*  \*/
                  #slidercontent, ul{
                          min-height:1%;
                          }
                  * html #slidercontent, * html ul{
                          height:1%;
                          }

      /* // clearfix */

     /* image replacement */
          .graphic, #header h1, #prevBtn, #nextBtn{
              margin:0;
              padding:0;
              display:block;
              overflow:hidden;
              text-indent:-8000px;
              }
      /* // image replacement */

  /* Easy Slider */

          #slider{}
          #slider ul, #slider li{
                  margin:0;
                  padding:0;
                  list-style:none;
                  }
          #slider li{
                  /*
                          define width and height of list item (slide)
                          entire slider area will adjust according to the 
  parameters provided
  here
                  */
                  width:896px;
                  height:171px;
                  overflow:hidden;
                  }
          #prevBtn, #nextBtn{
                  display:block;
                  width:30px;
                  height:77px;
                  position:absolute;
                  left:-30px;
                  top:41px;
                  }
          #nextBtn{
                  left:896px;
                  }
          #prevBtn a, #nextBtn a{
                  display:block;
                  width:30px;
                  height:77px;
                  background:url(/includes/sliders/images/btn_prev.gif) 
  no-repeat 0
  0;
                  }
          #nextBtn a{
                  background:url(/includes/sliders/images/btn_next.gif) 
  no-repeat 0
  0;
                  }

  /* // Easy Slider */

  Actual Slider Code
  -
  (function($) {

          $.fn.easySlider = function(options){

                  // default configuration properties
                  var defaults = {
                          prevId:                 'prevBtn',
                          prevText:               '',
                          nextId:                 'nextBtn',
                          nextText:               '',
                          controlsShow:   true,
                          controlsBefore: '',
                          controlsAfter:  '',
                          controlsFade:   true,
                          firstId:                'firstBtn',
                          firstText:              'First',
                          firstShow:              false,
                          lastId:                 'lastBtn',
                          lastText:               'Last',
                          lastShow:               false,
                          vertical:               false,
                          speed:                  800,
                          auto:                   false,
                          pause:                  4000,
                          continuous:             false
                  };

                  var options = $.extend(defaults, options);

                  this.each(function() {
                          var obj = $(this);
                          var s = $(li, obj).length;
                          var w = $(li, obj).width();
                          var h = $(li, obj).height();
                          obj.width(w);
                          obj.height(h);
                          obj.css(overflow,hidden);
                    

[jQuery] Re: Value adding to drop down

2009-07-19 Thread Jules

OK that means the values causing the problem.  Are your strings stored
in the database as double byte characters?  Try to view your page in
Firefox and use firebug to display the value instead of using alert
().

On Jul 20, 2:08 pm, naz s.na...@gmail.com wrote:
 i have values in data like BSIT|MSIT|BSC| etc when i used alert(). to
 display data values then values are correct but when values appear in
 drop down they become |BSIT
 code is like this
                  var programs=[];
                 alert(data);
                 programs=data.split('|');
         $('#p_course').length = 1;
                 for(var i=0;iprograms.length-1;i++)
                 {
           var objDropdown =$('#p_course').get(0);
                   var objOption = new Option(programs[i],programs[i]);//
 adding option
                   objDropdown.options[objDropdown.length] = objOption;
                 }

 actually i m storing these values in data from db may be thats why
 there is a problem bcs when i use static value then it appear
 correctly. If u can understand whts gng on plz tell me thnx alot
 On Jul 18, 12:55 pm, Theodore Ni zyl...@gmail.com wrote:

  Please post again your current jQuery code including the separator you are
  using, as well as what is inside the data variable in full. That way, we can
  understand exactly what's going on; right now, I'm still confused.
  Teddy

  On Sat, Jul 18, 2009 at 12:07 AM, naz s.na...@gmail.com wrote:

   i have changed '|' seperator still it is not working.:(

   On Jul 16, 10:31 am, 刘永杰 liuyongjie...@gmail.com wrote:
change split character,not use '|'.

2009/7/16 naz s.na...@gmail.com

 hi
 i m adding some values to drop down
 by usind j query by this code
 var programs=[];
  programs=data.split('|');
 $('#p_course').length = 1;
  for(var i=0;iprograms.length-1;i++)
  {
       var objDropdown =$('#p_course').get(0);
       var objOption = new Option(programs[i],programs[i]);
      objDropdown.options[objDropdown.length] = objOption;
  }
 but when vales appear in drop down first value look like this
 |BSIT
 any body have any idea why it look like  this- Hide quoted text -

- Show quoted text -- Hide quoted text -

  - Show quoted text -


[jQuery] setting a dynamic variable

2009-07-19 Thread macsig

Hello guys,

I have found a script that works fine for me but I'd like to make it
reusable but I have an issue with that.

On the script I have something like

function my_function() {
var $container = $('#panel .container');
...
}

and I'd like to pass the id (panel in this case) as a parameter like
in the example below:

function my_function(panel_id) {
var $container = $('#--- .container');
...
}


How can I achieve my goal?

Thanks and have a nice day.


Sig