You are here: Re: ajax.response max size « PHP Programming Language « IT news, forums, messages
Re: ajax.response max size

Posted by Kris Zyp on 02/24/07 06:53

I frequently use Ajax requests with responses of 100K+ with no
problems for both IE and FF.
Kris

On Feb 23, 7:14 pm, Jeff North <jnort...@yahoo.com.au> wrote:
> On 23 Feb 2007 16:48:19 -0800, in comp.lang.javascript
> trp...@gmail.com
>
> <1172278099.323577.325...@p10g2000cwp.googlegroups.com> wrote:
> >| I am using ajax / php where I am looking up some info from the
> >| database and populating a select list dynamically, however I am
> >| running into some sort of size limitation with the ajax.response
> >| object. If the string I am passing to javascript from php is too large
> >| javascript does not get it all the data. The magic number appears to
> >| be 6123 characters, anything below that it works fine, anything above
> >| and if I alert the ajax.response, I see the string is cutoff. Any
> >| ideas where this limitation is defined?
>
> Your page:
> <select name="lbItems" onChange="AJAXCall(this.value);">
> <option value="1">1</option>
> etc etc etc
> </select>
>
> Javascript function on your page
> function AJAXCall(val)
> {
> //--- make your ajaxcall here
> url = "mypage.php?id=" + val;
>
> }
>
> php page:
> <?php
> $id = 0;
> if( isset($_GET['id]) ) $id = $_GET['id'];
> if( !is_numeric($id) ) $id =0;
>
> //--- read database
> $sql = "SELECT * FROM yourtable WHERE pk=".$id;
>
> //--- loop through recordset and populate listbox
> echo "<option value='".$recPK."'>".$recText."</option>\n";
> ?>
> ---------------------------------------------------------------
> jnort...@yourpantsyahoo.com.au : Remove your pants to reply
> ---------------------------------------------------------------

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация