[jQuery] Re: ajax problem in IE

2009-03-31 Thread Ricardo

$('#myspan').text( $('#partnum').val() );
http://docs.jquery.com/Attributes

On Mar 29, 6:07 pm, webguy262 webguy...@yahoo.com wrote:
 I have two forms on a page (www.eastexhaust.com/inventory.php).

 One uses ajax to generate a part number by selecting values from a series of
 selection boxes.

 The other form emails the part number so we can reply with a quote.

 Everything works fine in FFox, but does not work in IE.

 Therefore, I have had to make things harder by asking the user to copy and
 paste their part number into the email form instead of having it entered
 there automatically.

 To display the part number to the user, I'm using this in the JS...

 document.getElementById('myspan').innerHTML = result;

 ...and this in the html...

 To get the variable in the email form, I'm using this in the JS...

 document.getElementById('partnum').value= result;

 ...and this in the html...

 input type=text name=partnum id=partnum readonly

 As I said, this works everywhere but not in IE.

 How can I use Jquery to make it work across the board?

 Thanks!
 --
 View this message in 
 context:http://www.nabble.com/ajax-problem-in-IE-tp22772776s27240p22772776.html
 Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Re: Ajax Problem with IE works fine on FF

2009-02-04 Thread James

I haven't looked into it deeply, but try removing the space in
#gender :selected

so:
Usex = $(#gender :selected).val();

becomes:
Usex = $(#gender:selected).val();

I'm not sure if that'll make a differences. Do you know which part of
your code is not working? Have you tried printing/loggin variable
values at each step of your code?

On Feb 4, 5:52 am, Xross tam...@gmail.com wrote:
 Hi,

 I am having problem with IE6 / IE7 but IE8 works fine.

 Here's my ajax call

 ***

 function getJSonDate() {
         var Usex =;
         var Uminage = ;
         var Umaxage =;
         var Ucountry =;
         var Uplace = ;
         var Uzip =;

         Usex = $(#gender :selected).val();
         Uminage = $(#minage :selected).val();
         Umaxage = $(#maxage :selected).val();
         Ucountry = $(#country :selected).val();
         Uplace = $(#place :selected).val();
         Uzip = $(#zipcode).val();
         $(#preloader).show();
         $.getJSON(
                         getdateJSon.php, {gender: Usex, minage: Uminage, 
 maxage: Umaxage,
 zip: Uzip, cache: false},
                         function(data){
                                 $.each(data.userdata, function(i,user){
                                         ckuserid = user.id;
                                         var name_text  =  user.pname;
                                         var age_text = user.page;
                                         var place_text = user.pplace;
                                         var state_text = user.pState;
                                         var country_text = user.pCountry;
                                         var hello_text = user.ptextdesc;
                                         var imgurl = user.imgurl;
                                         var imagepath = images/user/ + 
 imgurl;
                                         $(#preloader).hide();

                                         if (name_text == ){

                                                 $(#imageControl).hide
 ();
                                                 $(#text_holder).hide();
                                                 $(#ZeroEntry).show();
                                                         } else {

                                                                 
 $(#ZeroEntry).hide();
                                                                 
 $(#imageControl).show();
                                                                 
 $(#text_holder).show();
                                                                 
 $('#imageholder').attr('src', imagepath);

                                                                 //Populate 
 the page with data
                                                                 
 $('h2.date_name').html(name_text);
                                                                 
 $('h3.date_details').html(age_text + y,  + place_text + ,
 + country_text );
                                                                 
 $('P.hellotext').html(hello_text);

                                                         }

                                 });
                         }
                 );

 } //end of getJSonDate

 
 Here is PHP page output
 

 { 'userdata': [ { 'id':'10001', 'pname':'Mikeala', 'page':'18',
 'pplace':'New York', 'pState':'New York', 'pCountry':'USA',
 'ptextdesc':'I like reading books, Travel, what about you ?',
 'imgurl':'mikeala.jpg' } ] }

 

 It works perfectly fine with FF / IE 8 but nothing comes up with IE
 6 / IE 7 i have tried many solution but none worked i wonder if their
 exists any solution. i have other functions like get state/city/
 Country name from mysql db through the same method they work fine but
 this is the only problem.

 i have everything online you can check it at

 http://clickdate24.com/beta/

 Any help is appreciated.

 Thanks.