briedis Posted November 18, 2014 Report Share Posted November 18, 2014 Tas, kas strādā, ir vnk gļuks. Citi pārlūki ir tolerantāki pret programmētāju lažām, citi nav. Tā kā, saved kārtībā savu kodu. Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 18, 2014 Author Report Share Posted November 18, 2014 (edited) par kuriem id tu runā?Šādi arī nestrādā uz IE jQuery('#showAwr').on('click', function(){ jQuery.get('process/home.php?w=getawr', function(data){ jQuery('.answer').html(data); }); }); Edited November 18, 2014 by ziedinjsh Quote Link to comment Share on other sites More sharing options...
jurchiks Posted November 18, 2014 Report Share Posted November 18, 2014 Cik tev kodā tādu "#showAwr" un ".answer" ir? Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 18, 2014 Author Report Share Posted November 18, 2014 (edited) #showAwr ir tikai 1x un .answer 2x Atstājos js failu tikai šādu: jQuery(function(){ jQuery('#showAwr').on('click', function(){ jQuery.get('process/home.php?w=getawr', function(data){ jQuery('.answer').html(data); }); }); }); Nestrādā uz IE vienalga Edited November 18, 2014 by ziedinjsh Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 18, 2014 Author Report Share Posted November 18, 2014 Izvadot datus iekš alert, it kā strādā on() funkcija, katru reizi uzspiežot uz #showAwr parādas alert(), bet tikai visu laiku viena un tā pati atbilde! Quote Link to comment Share on other sites More sharing options...
jurchiks Posted November 18, 2014 Report Share Posted November 18, 2014 (edited) Un ko tad tu gaidīji, ka pieprasot vienu un to pašu URL, katru reizi būs cita atbilde? Ja tev ir 2x .answer, tad response tiks ievietots abos tajos .answer elementos, to taču tu saproti? P.S. drošības pēc, kādu IE versiju tu tur mēģini pielauzt? Edited November 18, 2014 by jurchiks Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 18, 2014 Author Report Share Posted November 18, 2014 (edited) url ir viens un tas pats, jā, bet datubāzē ir vairāki ieraksti un no šī url katru reizi ir cita atbilde by rand(). otrs .answer elements tiek pieminēts tapēc, ka nospiežot citu trigeru .answer div fadeOut()IE 11 Edited November 18, 2014 by ziedinjsh Quote Link to comment Share on other sites More sharing options...
jurchiks Posted November 18, 2014 Report Share Posted November 18, 2014 Vienkārši WTF... I'm out of here. Quote Link to comment Share on other sites More sharing options...
codez Posted November 18, 2014 Report Share Posted November 18, 2014 get requesti dažādos browseros tiek dažādi kešoti. Nomaini get uz post, vai pieliec rand parametru pie get. Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 18, 2014 Author Report Share Posted November 18, 2014 ok, jQuery.get nomainot uz jQuery.post strādā, bet ko darīt ar getJson?? Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 18, 2014 Author Report Share Posted November 18, 2014 Labi, atrisināju :D jQuery('#showAwr').on('click', function(){ jQuery.ajax({ type: 'post', url: 'process/home.php?w=getawr', dataType: 'json', success: function(data){ jQuery('.answer').html(data); } }); }); Quote Link to comment Share on other sites More sharing options...
jurchiks Posted November 18, 2014 Report Share Posted November 18, 2014 dataType: 'json' apzīmē atbildes datu tipu, bet tu to izvadi kā HTML... Quote Link to comment Share on other sites More sharing options...
Kemito Posted November 20, 2014 Report Share Posted November 20, 2014 get requesti dažādos browseros tiek dažādi kešoti. Nomaini get uz post, vai pieliec rand parametru pie get. Šādi runājot samācīsi cilvēkam vēl muļķības. Tagad katru reizi kā kaut kas neies, pie GET requesta sāks lietot POSTus etc. Un tā turpmāk dzīvē, atradīs darbu, tur sāks darīt tā pat, beigās citam jāsupportē, viss šitā sarakstīts, galu galā čalis aiziet un nošaujas, jo nevar samaksāt hipotekāro, jo darbs nemaksā algu, un viss Tavas vainas dēļ. Quote Link to comment Share on other sites More sharing options...
codez Posted November 20, 2014 Report Share Posted November 20, 2014 Kemito, ko tu murgo? Kur teikts, kas tas par requestu, varbūt tur tiek iegūti dati autorizētam lietotājam un tad ir jāliek klāt crsf tokens un jātaisa post tāpat. Quote Link to comment Share on other sites More sharing options...
Kemito Posted November 20, 2014 Report Share Posted November 20, 2014 Vai tas ir tas gadījums, ko Tu pieminēji tagad? Neizskatās. Parādi viņam veidu, kā "neiet GET, mož ar POST ies", un aiziet, rullēs tā arī turpmāk. Par to es murgoju. Domāju, Tev jau nu vajadzēja saprast. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.