[jQuery] jQuery 1.4 change event problem

2010-01-19 Thread Steven Yang
Hi all I apologize if this problem has been post or report. I have a problem using jQuery 1.4 when i use $(#mySelect).change(function(){...my logic...}) This problem only occurs in IE. 6-8 all have the same problem and jQuery 1.3.2 does not have this problem. This problem occurs when I bind a

Re: [jQuery] Re: jQuery 1.4 change event problem

2010-01-19 Thread Steven Yang
option value=2Value 2/option /select /body /html On Tue, Jan 19, 2010 at 6:06 AM, pambuk wojtek.zymo...@gmail.com wrote: Same here, would love to hear an answer. On Jan 19, 11:00 am, Steven Yang kenshin...@gmail.com wrote: Hi all I apologize if this problem has been post

Re: [jQuery] Re: jQuery 1.4 LiveQuery

2010-01-15 Thread Steven Yang
Jon what version of blockUI are you using? I think i just ran into similar problem yesterday when i upgraded jQuery to 1.4 and blockUI stopped working. but i solved it by upgrading blockUI to the newest version then everything worked again. i think the newest version was updated some time in Jan

Re: [jQuery] Re: Go through XML nodes only 1 level deep

2010-01-06 Thread Steven Yang
just making sure you are not able to parse the xml at all right? i believe for IE you have to make sure you server returns the correct content type like text/xml to client inorder for you to parse hope this help On Thu, Jan 7, 2010 at 9:30 AM, Jules jwira...@gmail.com wrote: For some reason,

[jQuery] Re: [Attrib external not working...]

2009-09-20 Thread Steven Yang
trya href=http://www.google.com;google/a On Sun, Sep 20, 2009 at 7:25 PM, Lord Gustavo Miguel Angel goosfanc...@gmail.com wrote: Hi, Why this code not working? a rel=external href=www.google.comgoogle/a url www.google.com open in same windows. Thank´s

[jQuery] Re: ajax xml question

2009-09-18 Thread Steven Yang
I think you might have to check the encoding that google is usingI think google should be using UTF-8. check the encoding on your side. On Fri, Sep 18, 2009 at 2:11 PM, David .Wu chan1...@gmail.com wrote: But I got one more question http://www.google.com/ig/api?hl=zh-twweather=Changhua This

[jQuery] Re: Browser sniffing - the correct way?

2009-09-17 Thread Steven Yang
AFAIK $.broswer is not the way to go in latest jQuery is simply because browser sniffing is not recommended and not the jQuery way of getting things work cross all browsers.and not that because $.browser has problem itself it really depend on why you need to know the different browsers. jQuery

[jQuery] Re: Jquery document .ready function throwing object expected

2009-09-15 Thread Steven Yang
i am not sure what /jquery-1.3.2-vsdoc.jsis for but try putting it behind jquery-1.3.2.js and also putting ui.core.js before ui.datepicker.js On Tue, Sep 15, 2009 at 6:31 PM, Vardhini vardhini...@gmail.com wrote: Hi, I'm getting Javascript error object expectedon PageLoad at the following

[jQuery] Re: Jquery document .ready function throwing object expected

2009-09-15 Thread Steven Yang
..both no luck.. On Sep 15, 3:43 pm, Steven Yang kenshin...@gmail.com wrote: i am not sure what /jquery-1.3.2-vsdoc.jsis for but try putting it behind jquery-1.3.2.js and also putting ui.core.js before ui.datepicker.js On Tue, Sep 15, 2009 at 6:31 PM, Vardhini vardhini...@gmail.com wrote

[jQuery] Re: Ajax

2009-09-15 Thread Steven Yang
? On Mon, Sep 14, 2009 at 9:15 PM, Steven Yang kenshin...@gmail.com wrote: hi this is all i see in the source of your page !DOCTYPE html html head titleAjax - jQuery Tests/title script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js; /script style i dont think its complete

[jQuery] Re: Ajax

2009-09-14 Thread Steven Yang
hi this is all i see in the source of your page !DOCTYPE html html head titleAjax - jQuery Tests/title script src =http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js;/script style i dont think its complete. Might be something wrong on your serverside program. On Tue, Sep 15, 2009 at

[jQuery] Re: Get help with wildCard selector

2009-09-13 Thread Steven Yang
i think what you want is $('div[id^=abc-]').size() $('#div[...') means id=div and something else but you dont have anything with id = div On Mon, Sep 14, 2009 at 11:30 AM, Conrad Cheng yfch...@gmail.com wrote: Dear all, I have certain div with below format div id=abc-01 /div div id=abc-02

[jQuery] Re: jquery resistance at work - advice? OR mvc in js, needed?

2009-09-12 Thread Steven Yang
Hi I am a java guy myself. from what i know some famous java framework has adopted dojo as their default support for their client side tech. And the Struts2 used to include dojo as their native support, now as a plugin i think. I an understand why your java guy is always mvc this mvc that. Its

[jQuery] Re: problem xml with jquery IE 8

2009-09-08 Thread Steven Yang
sorry i may be wrongbut until someone has a real solution here's something you can try 1. make your dataType --dataType: xml 2. not sure if the problem still exists in IE8, but IE seems to have a problem determining an incoming data as XML, so make sure your server returns a header that tells

[jQuery] Re: About jquery append and automatic deleting

2009-09-06 Thread Steven Yang
yeah append actually moves the element. you might want call clone() on the existing element then append the new element created by clone to wherever you want On Sun, Sep 6, 2009 at 3:40 PM, 月讀 keyoft...@gmail.com wrote: My English is not weill.

[jQuery] Re: Extending objects with internal objects

2009-09-06 Thread Steven Yang
look here http://docs.jquery.com/Utilities/jQuery.extend#deeptargetobject1objectN http://docs.jquery.com/Utilities/jQuery.extend#deeptargetobject1objectNthe first argument is the deep copy option. check it out On Mon, Sep 7, 2009 at 12:36 PM, roydukkey royduk...@gmail.com wrote: Thanks, that

[jQuery] Re: No Response Using getJSON

2009-09-05 Thread Steven Yang
try $.getJSON(http://130.216.208.254:10001/all_data.jsonhttp://130.216.208.254:10001/all_data.json? callback=getdata, getdata); i think you might have confused getJSON with the JSONP result On Sat, Sep 5, 2009 at 9:50 PM, Tony e.sen...@gmail.com wrote: I am using the getJSON command and

[jQuery] Re: $.each cannot iterator my array

2009-08-28 Thread Steven Yang
you are doing a very weird thing to an array I guess jQuery detects that myArray is a reall Array. Then it iterate over it by using the length attribute. However you didnt actually put anything into the Array myArray therefore, you dont get anything. On Fri, Aug 28, 2009 at 3:49 PM,

[jQuery] Re: Superfish menu help!

2009-08-25 Thread Steven Yang
hi sorry, please correct me if i am wrong or if i over looked at something i didnt see anything superfish includes or event jquery includes but instead i see mootools is the link a demo to your problem?

[jQuery] Re: Jquery + ExtJS 3.0

2009-08-24 Thread Steven Yang
try switching the order of script type=text/javascript src=...ext-all.js/script script type=text/javascript src=...ext-jquery-adapter.js/script to script type=text/javascript src=...ext-jquery-adapter.js/script script type=text/javascript src=...ext-all.js/script

[jQuery] Re: can't return value after $.ajax call

2009-08-10 Thread Steven Yang
aside from the fact that checkIfUsername does not have a return ajax function is not going to waitwhen you finished calling $.ajax your function has already ended(returned) then when server responded your returnUsernameBool will be called but thats already too late for your alert(bValid) thinking

[jQuery] Re: can't return value after $.ajax call

2009-08-10 Thread Steven Yang
if thats the case try function checkIfUsername(o) { var bool; $.ajax({ type: POST, url: +CI_ROOT+index.php/admin/check_if_username, data: ({username: username.val()}), async: false, dataType: json,

[jQuery] Re: can't return value after $.ajax call

2009-08-10 Thread Steven Yang
by using var bool = true;you made bool local to your callback and not to your checkIfUsername so checkIfUsername does not have a reference of bool you have to make bool local to checkIfUsername so you first declare var bool in checkIfUsername, then allow your callback to assign it a value.

[jQuery] Re: tablesorter, sort values in anchor as numerics

2009-07-27 Thread Steven Yang
personally i do not understand anything this guy says back to the topic i personally will put an extra/custom attribute in a like a ref=39 then $(a) and sort on the ref attribute. If not mistaken, there is a sorting plugin somewhere or even in jQuery core. Or you should be able to do it easily

[jQuery] Re: jQuery Conference Update

2009-07-21 Thread Steven Yang
man envy you guys who can go for some who live and earn a living a Taiwan, its so hard/expansive for me go to. but still hope you guys have a great weekend just dunno if anybody can share the experience on youtube or something?

[jQuery] Re: document.ready - how to make sure all js is loaded?

2009-07-13 Thread Steven Yang
ohoh so even if you do that your myevents.js still doesnt get loaded when document.ready is run? thats weird. I have never run in to problem like that. just wondering is your tag script type=text/javascript src=myevents.js? or script type=text/javascript src=myevents.js/script? because script is

[jQuery] Re: how to detect if user input is a chinese character?

2009-07-12 Thread Steven Yang
hi are you checking for Chinese specifically? or just non-English? I remember seeing a solution for non-English somewhere. Someone told me you can check the first byte or something for Chinese. not to be mean or anything But I think its really best if you google it more will faster than sitting

[jQuery] Re: jQuery ajax - can i know if the server is alive ?

2009-07-12 Thread Steven Yang
I dont believe there is a way to tell whether the server is alive or not before you try to connect to it. if you listen on the jQuery Ajax event ajaxError you will be able to get the HttpStatus from the request object. I am not sure which code means the server is down, but you will be able to

[jQuery] Re: document.ready - how to make sure all js is loaded?

2009-07-12 Thread Steven Yang
i think its best if you do script type=text/javascript src=myevents.js/script script $(document).ready(function(){ .. . }) /script instead of writing your code inside the myevent.js script tag

[jQuery] Re: $.data question

2009-07-07 Thread Steven Yang
hi sorry just wondering if there is anything input on this?by the way i am currently creating my own object to store the data but wish to use jQuery's data directly Thanks a lot

[jQuery] $.data question

2009-06-29 Thread Steven Yang
Hi Sorry if its already been asked when i used $.data and pass in ''(empty string), it return me 7. no matter what i have put for ''. when i looked at the code i believe 7 was just a generated id from jQuery. and the reason why it always return the id is because of // Return the named cache data,

[jQuery] $.data question

2009-06-29 Thread Steven Yang
Hi Sorry if its already been asked when i used $.data and pass in ''(empty string), it return me 7. no matter what i have put for ''. when i looked at the code i believe 7 was just a generated id from jQuery. and the reason why it always return the id is because of // Return the named cache data,

[jQuery] Re: $.data question

2009-06-29 Thread Steven Yang
Hi sorry for my bad example i did use something like what you said but something like $(#something).data('', mystuff); then $(#something).data('');

[jQuery] Re: $.data question

2009-06-29 Thread Steven Yang
Hihere is my case please tell me if its reasonable or not or is there a correct way to approach this in our application we use empty string as a default value i was doing a double select function and i want to cache the value from data get from using getJSON. I know that I probably should use

[jQuery] Re: what is wrong with this simple load data codes

2009-06-23 Thread Steven Yang
i am not sure whether getir.asp?Process=UPSWEIGHT=1PostalCode=90012Country=us equals to getir.asp?Process=UPSWEIGHT=1POSTALCODE=90012COUNTRY=us maybe check that

[jQuery] Re: Question on writing a jQuery plugin

2009-06-22 Thread Steven Yang
Hi I am not too sure if you can do that but to my understanding all jQuery plugin returns the selected jQuery object so if you want to do that you have to add plugin function to jQuery directly you might want to see how jQuery ui dialog and datepicker to find out how they do something similar

[jQuery] Re: Converting objects to strings

2009-06-16 Thread Steven Yang
I think what you want i something likevar params = { TotalApartmentsServed: $('#TotalApartmentsServed').val(), TotalWashroomsPerApartment:$('#TotalWashroomsPerApartment').val(), TotalPowerPipeUnits: $('#TotalPowerPipeUnits').val(), DrainStackLength:

[jQuery] Re: Enable Submit button

2009-06-15 Thread Steven Yang
maybe try something like this $(#yesBut, #condBut).click(function(){ if($(#yesBut).is(:checked) $(condBut).is(:checked)) { $(#SubmitCard).removeAttr(disabled); } else { $(#SubmitCard).attr(disabled, disabled); } }) i am not too sure of my syntax and stuff, but hopefully

[jQuery] Re: how to assign date picker for all class date ?

2009-06-11 Thread Steven Yang
$('.datepicker').datepicker() only applies to the input with class=datepicker when you call it. so any new added element will not be affected

[jQuery] Re: remove question

2009-06-11 Thread Steven Yang
i guess you just have to move div 2 somewhere else before you remove div 1

[jQuery] Re: json indexing not working for me

2009-06-02 Thread Steven Yang
sorry i am not too familiar with phpput i guess $arr or $_GET is all the parameters you get from the GET request. can you simply print out the $arr and $myjson somewhere on server and see?

[jQuery] Re: json indexing not working for me

2009-06-01 Thread Steven Yang
json is the data passed back from the serverdoes the data passed back from server look like { member : { name : some name } } ? or are u just trying to access your data?

[jQuery] Re: Pass var to click event

2009-05-26 Thread Steven Yang
the test your calling is the one you defined for the function try var test = 'Works!'; $('#action_confirm').click(function(){ alert(test); });

[jQuery] Re: set the gap of start and end date in datepicker

2009-05-26 Thread Steven Yang
hi here is how i do to set start date cannot be after end date $(#startId, #endId).datepicker({ beforeShow : function(input) { return { 'minDate' : (input.id == 'endId' ? $('#startId').datepicker('getDate') : null),

[jQuery] Re: Can the click() function be used in an if statement

2009-05-26 Thread Steven Yang
how do you click A and invoke B's onclick?the only way is A is B's child. as far as i can think and if thats the case you have event bubbling you can stop this by calling event.stopPropagation()

[jQuery] Re: know if one id are hidden

2009-05-22 Thread Steven Yang
one way i can think of on top of my head is if($(#check_id:hidden).length == 0) then its hidden

[jQuery] Re: Begginner Problems......

2009-05-21 Thread Steven Yang
Hi I am not too sure what your doesnt work means. But for a couple of things First, I dont think number for id is valid try make your id=id1 instead of id=1 Second try $().attr(checked, checked) and $().attr(checked, ) or $().removeAttr(checked) and see if you get anything

[jQuery] Re: Web dev problem face to face with JAVA J2EE Dev's

2009-05-19 Thread Steven Yang
yes basically instead of a jsp-generated htmla json or xml text should do the job and those guys don't even have to worry about how to present the information. all they need to do is pass the data or tell you that the handshake was unsuccessful

[jQuery] Re: Web dev problem face to face with JAVA J2EE Dev's

2009-05-19 Thread Steven Yang
well I think you have to decide a working model by between you and your java guys.As you know and probably what your trying to do, you make almost make the browser work like client-server model (not that they are not, just not so clearly i guess). If you want do all the display and UI logic by

[jQuery] Re: How to replace hardcode_value in jquery library

2009-05-18 Thread Steven Yang
what exactly do you mean by hardcode_value in jquery library?there isnt any/much AFAIK. if you mean the harcode_value in your code you can simply do $.get($(contact).val()), function(data){. correct me if i misunderstood you

[jQuery] Re: Web dev problem face to face with JAVA J2EE Dev's

2009-05-18 Thread Steven Yang
Well the 2 major ways to communicate between server and client are XML and JSON I guess, besides HTML of course.I believe any hardcore java developer is familiar with XML. So if you are willing to deal with XML you can ask them to format their input(for you, or output for them) in decided XML

[jQuery] Re: Picking an element from a set

2009-05-14 Thread Steven Yang
when you do $().get() or $()[] you get the actual element back. so with your case, you can do $($(div.test)[2]).fadeOut() or $(div.test:eq(2)).fadeOut()

[jQuery] Re: jquery expressions after loading content via ajax

2009-05-12 Thread Steven Yang
correct me if i misunderstood you so what you mean is that you have some element with class tooltip when the page load the first time and when you call $(.tooltip).tooltip() things work. but when you call ajax and load some more content (containing element with class tooltip as well) into the page

[jQuery] Re: jquery expressions after loading content via ajax

2009-05-12 Thread Steven Yang
yes thats rightor maybe you can run this just once after all you content has been loaded depend on your situation because i am not sure if there will be any issues if you run it on the same element twice

[jQuery] Re: when use addclass and toggleclass

2009-05-10 Thread Steven Yang
when you do addClass it literally only add the class to the element when you do toggleClass it checks whether the element has the class or not, if it does then it will remove the class if it doesnt then it will add the class

[jQuery] Re: json syntax question (ticket vs unticked names)

2009-05-08 Thread Steven Yang
seriously i am not sure but sometimes i just hate to see something like var data = {.something}; var config = { data : data }; so when this happens I do var config = { 'data' : data }; just to be clear

[jQuery] Re: NEW jQuery Cheat Sheet for 1.3.2

2009-05-07 Thread Steven Yang
Ha thanks a lot Matt This is useful. And reminded me back in the days of taking Computer Science classes when you can take cheat sheet into the exam. By the way just that your Excel sheet name is still 1.1.3

[jQuery] Re: Resetting the reset button

2009-05-06 Thread Steven Yang
i dont think you can do thatyou probably have to cache your state yourself i think reset uses the defaultValue attribute of the input and i think the attribute is readonly. correct me if i am wrong

[jQuery] Re: Help About Using JQuery With Struts 2

2009-04-29 Thread Steven Yang
hi this might just be your typo but isnt url: /AddNewClient suppose to be url: /AddNewClient.do or .action? first of all, since your using ajax and it shouldnt have anything to do with form, so just to be on the save side i would change your button from type=submit to type=button since you dont

[jQuery] Re: Help About Using JQuery With Struts 2

2009-04-29 Thread Steven Yang
one more thing if you want to ajax submit a form you might want to take a look at a great plugin http://malsup.com/jquery/form/

[jQuery] Re: How to get file name

2009-04-28 Thread Steven Yang
i dont think there is actually a jQuery way.i think your best bet is regular expression but sorry i am not good at regular expression myself but you can look at it and find your solution

[jQuery] Re: Help About Using JQuery With Struts 2

2009-04-26 Thread Steven Yang
are you getting any error?or what are u getting at the server side? can you explain a bit more?

[jQuery] Re: Check value when adding to array

2009-04-13 Thread Steven Yang
try remove the single quotes if ($(input[name*=delete_linkid],this)) { alert('it does!');

[jQuery] Re: Work on one specific node and not on the window.document

2009-03-31 Thread Steven Yang
do you have a special reason to find an element by id in a specific node?isn't id suppose to be unique in the whole document?

[jQuery] Re: can someone take a look please...

2009-03-31 Thread Steven Yang
do you have anything in the html also with name=partnum?because in IE the getElementById actually get the name first if you use jQuery simply try $(#partnum).val(result)

[jQuery] Re: Get element's html and the element

2009-03-30 Thread Steven Yang
well html() just gets the innerHTMLso your out of luck there there is actually a plugin for getting the actually container html I remember coming across it on the jquery plugin pages you can try finding it there All i can say is its doesnt seem hard, but also not as easy as you think ^^

[jQuery] Re: Get element's html and the element

2009-03-30 Thread Steven Yang
ha thanks mkmanningthats sure something never came across in my mind good idea

[jQuery] Re: looping through json

2009-03-26 Thread Steven Yang
I think the problem is you have the department 3 times in the same hash object,so the last one overrides everything. you should change departments to an array and loop through it { departments: { department: {ID: 1, Name: Physics}, department: {ID: 2, Name: Chemistry},

[jQuery] Re: data is posted only once

2009-03-24 Thread Steven Yang
how about try setting cache:false?

[jQuery] Re: Multiple data, JSON and AJAX

2009-03-24 Thread Steven Yang
I think you have to use .each and loop through all the divs and gather the information and then send the information once at the end with $.ajaxor otherwise you might end up with one $.ajax call for each div

[jQuery] Re: referring to an array with a specific name

2009-03-24 Thread Steven Yang
i think what macsig means is his arrays are like var a =[array a] var b = [array b] if thats the case you might want to do var arrays = { 'a' : [array a], 'b' : [array b] } then when select changes and you get the value you can get your array with var myArray = arrays[val];

[jQuery] Re: is it possible to do this (ignore clicks)

2009-03-20 Thread Steven Yang
i believe you can simply do e.stopPropagation()because you get event bubbling for the events inside the div all the events bind to element inside your div should use e.stopPropagation() please correct me if i am wrong

[jQuery] Re: Ajax call problem with Firefox

2009-03-19 Thread Steven Yang
I think its a browser behaviorif you use get, browser's default behavior is usually cache it. Unless you set no cache in browser setting. So I always use post and to be on the save side use cache : false as well correct me if i am wrong

[jQuery] Re: Problems whith the variables for a click function

2009-03-19 Thread Steven Yang
did you get an error if no value was given? because it seems like your parsing an empty string into an int and it looks like your value after the first calculation will always be the original value. because you never set pris except when the page loaded

[jQuery] Re: $.getJSON isn't working while getting the JSON data from hidden field

2009-03-18 Thread Steven Yang
yes $.getJSON does do eval internally so what your trying to accomplish is, trying to eval a string into javascript object but u dont want to write eval() everywhere right? or i misunderstood your question in anyway?

[jQuery] Re: $.getJSON isn't working while getting the JSON data from hidden field

2009-03-17 Thread Steven Yang
Sorry if i am mistaken in anywaybut $.getJSON is suppose to be for getting JSON data from remote server or simply server, but not for you to eval a String into javascript object. And from the source of jQuery I believe it will simply to eval('('+json+')') anyway. And if you want to do it that way,

[jQuery] Re: New Plugin Orange Tool Kit

2009-03-16 Thread Steven Yang
Hi please correct me if i have been mislead. Sorry I cant give you much advise here. I believe your doing a Template plugin. I have actually been looking for one for a long time for jQuery, but cant find one exactly suite my use. I am actually looking for the Template like Ext. Your plugin looks

[jQuery] Re: How to find a div's which have background-img?

2009-02-24 Thread Steven Yang
according to your case use$(.box) or $(div .box) since all elements with class box will have background image

[jQuery] Re: preventing redirection when opening modal dialog box

2009-02-23 Thread Steven Yang
have you tried changing the type of btnAddSession from submit to button?

[jQuery] cross frame menu

2009-02-15 Thread Steven Yang
Hi I know this is not directly related to jQuery, but I really need some help. I have found many menu plugin for jQuery. However, none are supporting cross frame. I am thinking of doing one myself, but I dont really know the concept or the main idea of how to do it. Can anyone point me to the

[jQuery] Hiding Dialog 'x' button

2009-02-11 Thread Steven Yang
Hi I want to hide the 'x' button on the dialog dynamically. Is there a good way to do it? or is there a setting? i couldnt find one. All i can think of is doing something like $(.ui-dialog-titlebar-close).css(display, none); However I dont think this is a good way. And if i have more than one

[jQuery] Re: Hiding Dialog 'x' button

2009-02-11 Thread Steven Yang
Sorry i realized that i should have posted this question on ui mailing list however thanks for your reply i will move over there and continue the disscussion Thanks On Wed, Feb 11, 2009 at 10:28 PM, Mike Alsup mal...@gmail.com wrote: I want to hide the 'x' button on the dialog dynamically.

[jQuery] Re: Order Items. Please help me. Thank You.

2009-02-11 Thread Steven Yang
I think your naming should be fine.because i sometimes use these kind of naming to populate my list on the server side, I use Struts 2. I ran into a problem similar to yours recently while doing an Ajax example for my friend. What i did was just like seasoup suggested. you might want to try