[jQuery] Using ASCII characters in textfield

2008-07-02 Thread Gearóid O'Ceallaigh

I'm using an autocomplete function on a textfield but I'm having a
problem since the autocomplete array is filled with German words so
special characters (such as ü, ä and ö). I can insert the ASCII codes
for these characters in the array and when the autocomplete display
pulls down, the array elements are displayed correctly.

However, when the user selects an option with a German character, the
ASCII code of the element is displayed instead of the German
character.

For example, if the user selects Anlagenführer, the text field would
be populated with Anlagenfuuml;hrer.

Does anyone have any ideas of a workaround?


[jQuery] Re: Issue using a long array in jquery autocomplete

2008-07-01 Thread Gearóid O'Ceallaigh

Hi, thanks for the reply.

I can't post the page since the site is being developed locally. I
figured out several things that may prove useful however. I tried
using a group of the data to see if this was the problem. IE6 returned
the same error: Unterminated String Contstant but I noticed that the
line it had a problem with had a German character ( ü ) in it. An
element before this in the list also had this character but threw up
no problem. The word in which the character is used was
 (something)führer so I rename all elements with the word führer and
replaced them with fuhrer. The smaller array now worked.

I tried applying the same technique (as a stop gap) to the larger
array but again IE6 was complaining about an unterminated string
constant. I then removed all cases of the character ü and replaced
them with u. Now IE has the error Expected ']'  about halfway
through the array. There is no syntax error around these lines - I've
checked a few times.

Is there a chance that these foreign characters are causing the errors
within the script?


On Jun 30, 3:59 pm, gf [EMAIL PROTECTED] wrote:
 On Jun 30, 3:38 am, Gearóid O'Ceallaigh [EMAIL PROTECTED] wrote:

  Hi,

  I'm using bassistance's autocomplete on a website (plugin page found
  here:http://plugins.jquery.com/project/autocompletex). Its perfect
  for I need since it allows the data for the autocomplete to be loaded
  from a local array. However, whilst the autocomplete works fine in
  most browsers - it seems that the length of the array is throwing up
  an error in IE6. The array contains maybe 500+ elements of data but
  even if I put them on a single line in the code, the error still gets
  thrown up.

  Has anyone else ever had this problem?

 It's possible but not real likely that IE6 has a bug preventing it
 from handling that many elements. Without seeing the error nobody can
 say for sure.

 Having programmed for a long-long time, my instinct is to say more
 likely it's some sort of quoting or delimiting bug in the array
 definition. With that many elements it's hard to scan through them by
 eye unless you have laid them out in a very organized fashion. Our
 eyes and brain are good at finding changes in a pattern of orderly
 rows and columns, not at finding a missing comma or quote in pages of
 characters. So, I always line my arrays up vertically into columns as
 much as possible. (A programming editor like vim with the align module
 makes it really easy.)

 My next thought is I would use an Ajax query to reduce the array of
 500 down to something a lot more manageable. You don't say how big
 each element is, but that many elements will slow page load and
 rendering making your user's browser bog down a bit.

 Do you have the offending page somewhere that others can see it so
 they can try to figure out what's wrong? Don't post the code here as
 it'll cause screams as people open up that many lines of code.


[jQuery] Issue using a long array in jquery autocomplete

2008-06-30 Thread Gearóid O'Ceallaigh

Hi,

I'm using bassistance's autocomplete on a website (plugin page found
here: http://plugins.jquery.com/project/autocompletex). Its perfect
for I need since it allows the data for the autocomplete to be loaded
from a local array. However, whilst the autocomplete works fine in
most browsers - it seems that the length of the array is throwing up
an error in IE6. The array contains maybe 500+ elements of data but
even if I put them on a single line in the code, the error still gets
thrown up.

Has anyone else ever had this problem?


[jQuery] Re: How to center text (sweet mother of mary can it be this hard?)

2008-06-30 Thread Gearóid O'Ceallaigh

Why not just define a css class with text-align: center and add this
to whatever element you need centering?

I'm presuming you want to center the preview text in the example so
this should center it to your rounded corner div. If you want it
centered vertically also, you may have to use some relative
positioning.

Hope that helps.

On Jun 30, 7:47 am, LTG [EMAIL PROTECTED] wrote:
 I really did not want to post here and ask for help on centering
 text.  But I have created the simplest possible JQuery sample page,
 used Firebug, and still can't figure it out.

 Can anyone say what it would take to center text on this page:

 http://dev.hdgreetings.com/test.htm

 Any help would be so appreciated.
 regards,
 ltg


[jQuery] Re: jQuery enable/disable problem with IE 6 and 7

2008-06-16 Thread Gearóid O'Ceallaigh

bump, any suggestions?

On Jun 13, 11:20 am, Gearóid O'Ceallaigh [EMAIL PROTECTED] wrote:
 Hi,

 I'm having a few problems getting my jQuery code to work in internet
 explorer 6 and 7. The best way I can describe it is: there are several
 text fields on my webpage and each should be enabled/disabled based
 upon the radio button selected at the top of the page. The code I have
 written works fine in firefox, opera and safari.

 The problem with IE is that it requires 2 clicks for the jQuery to
 take effect (ie. user clicks the radio button, nothing happens, but
 then they click another part of the screen and the changes take
 effect). Also, when the jQuery IS invoked, the incorrect text fields
 are enabled/disabled.

 I tried a much simpler example to try to find the problem but
 encounter similar issues. Here is the code for that:

 /JQUERY/

 $(document).ready(function() {

 $([EMAIL PROTECTED]).change(function() {

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

 switch (thisValue) {

 case one:

  $(select#cars).attr(disabled,disabled);
  $(select#animals).attr(disabled,);
  break;
 case two:
  $(select#animals).attr(disabled,disabled);
  $(select#animals).attr(value,dog);
  $(select#cars).attr(disabled,);
  break;
  case three:

  $(select#cars).attr(disabled,);
 $(select#animals).attr(disabled,);
  break;
  }

 });

 });

 /**HTML***/
 html
 head
 //get jQuery code
 /head
 body
 form
 input type=radio name=choice value=one class=second
 id=firstChoiceOption One
 input type=radio name=choice  value=two class=second
 id=secondChoiceOption Two
 input type=radio name=choice value=three class=second
 id=thirdChoiceOption Three

  BRBR

 select id=cars name=cars class=second
 option value=volvoVolvo/option
 option value=saabSaab/option
 option value=fiatFiat/option
 option value=audiAudi/option
 /select

 select id=animals name=animals class=second
 option value=dogdog/option
 option value=catcat/option
 option value=sheepsheep/option
 option value=cowcow/option
 /select
 /form
 /div
 /body
 /html

 Any help would be greatly appreciated, thanks.


[jQuery] jQuery enable/disable problem with IE 6 and 7

2008-06-13 Thread Gearóid O'Ceallaigh

Hi,

I'm having a few problems getting my jQuery code to work in internet
explorer 6 and 7. The best way I can describe it is: there are several
text fields on my webpage and each should be enabled/disabled based
upon the radio button selected at the top of the page. The code I have
written works fine in firefox, opera and safari.

The problem with IE is that it requires 2 clicks for the jQuery to
take effect (ie. user clicks the radio button, nothing happens, but
then they click another part of the screen and the changes take
effect). Also, when the jQuery IS invoked, the incorrect text fields
are enabled/disabled.

I tried a much simpler example to try to find the problem but
encounter similar issues. Here is the code for that:

/JQUERY/

$(document).ready(function() {

$([EMAIL PROTECTED]).change(function() {

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

switch (thisValue) {

case one:

 $(select#cars).attr(disabled,disabled);
 $(select#animals).attr(disabled,);
 break;
case two:
 $(select#animals).attr(disabled,disabled);
 $(select#animals).attr(value,dog);
 $(select#cars).attr(disabled,);
 break;
 case three:

 $(select#cars).attr(disabled,);
$(select#animals).attr(disabled,);
 break;
 }

});

});


/**HTML***/
html
head
//get jQuery code
/head
body
form
input type=radio name=choice value=one class=second
id=firstChoiceOption One
input type=radio name=choice  value=two class=second
id=secondChoiceOption Two
input type=radio name=choice value=three class=second
id=thirdChoiceOption Three


 BRBR

select id=cars name=cars class=second
option value=volvoVolvo/option
option value=saabSaab/option
option value=fiatFiat/option
option value=audiAudi/option
/select

select id=animals name=animals class=second
option value=dogdog/option
option value=catcat/option
option value=sheepsheep/option
option value=cowcow/option
/select
/form
/div
/body
/html


Any help would be greatly appreciated, thanks.


[jQuery] jQuery enable/disable problem with IE 6 and 7

2008-06-13 Thread Gearóid O'Ceallaigh

Hi,

I'm having a few problems getting my jQuery code to work in internet
explorer 6 and 7. The best way I can describe it is: there are several
text fields on my webpage and each should be enabled/disabled based
upon the radio button selected at the top of the page. The code I have
written works fine in firefox, opera and safari.

The problem with IE is that it requires 2 clicks for the jQuery to
take effect (ie. user clicks the radio button, nothing happens, but
then they click another part of the screen and the changes take
effect). Also, when the jQuery IS invoked, the incorrect text fields
are enabled/disabled.

I tried a much simpler example to try to find the problem but
encounter similar issues. Here is the code for that:

/JQUERY/

$(document).ready(function() {

$([EMAIL PROTECTED]).change(function() {

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

switch (thisValue) {

case one:

 $(select#cars).attr(disabled,disabled);
 $(select#animals).attr(disabled,);
 break;
case two:
 $(select#animals).attr(disabled,disabled);
 $(select#animals).attr(value,dog);
 $(select#cars).attr(disabled,);
 break;
 case three:

 $(select#cars).attr(disabled,);
$(select#animals).attr(disabled,);
 break;
 }

});

});


/**HTML***/
html
head
//get jQuery code
/head
body
form
input type=radio name=choice value=one class=second
id=firstChoiceOption One
input type=radio name=choice  value=two class=second
id=secondChoiceOption Two
input type=radio name=choice value=three class=second
id=thirdChoiceOption Three


 BRBR

select id=cars name=cars class=second
option value=volvoVolvo/option
option value=saabSaab/option
option value=fiatFiat/option
option value=audiAudi/option
/select

select id=animals name=animals class=second
option value=dogdog/option
option value=catcat/option
option value=sheepsheep/option
option value=cowcow/option
/select
/form
/div
/body
/html


Any help would be greatly appreciated, thanks.