You are here: Re: AJAX Problem « PHP Programming Language « IT news, forums, messages
Re: AJAX Problem

Posted by Jeff Johns on 05/24/07 15:43

On May 24, 8:08 am, Ravi <Ravindrayep...@gmail.com> wrote:
> in my script i declared one variable as global.I am tying to acess it
> in a function but it is not comming in Mozilla . it is executing in
> ie.
>
> My code is
>
> var http = createRequestObject();
> function createRow(key,val,tableId,index,numele,evt)
> {
> var table = document.getElementById(tableId);
> var newRowFlag = false;
> evt = (evt) ? evt : window.event
> var charCode = (evt.which) ? evt.which : evt.keyCode
> switch(charCode)
> {
> case 13 :
> case 9 : if(parseInt(table.rows.length) == (parseInt(index)))
> newRowFlag=true;
> }
> if(newRowFlag)
> {
> http.open('get',"gridClass.php?rowkey="+key+"&rowval="+val
> +"&index="+index+"&tabid="+tableId);
> http.onreadystatechange = function(){
> insertRow(tableId,index,numele);};
> http.send(null);
> }
>
> }
>
> function insertRow(tableId,index,numele)
> {
> alert(http.readystate);
> if(http.readystate == '4')
> {
> var response = http.responseText;
> var table = document.getElementById(tableId);
> var td = response.split('^');
> newRow = table.insertRow();
> for(i=0;i<numele;i++)
> {
> isText = newRow.insertCell(i);
> isText.innerHTML = td[i];
> }
> }
>
> }
>
> Thanks in advance
> Ravindra

I agree you are in the wrong group but just a quick question:

Where is this function : createRequestObject()?

You are declaring the variable http as global and calling the above
function but I don't see the above function listed?

Also what error do you get back?

Regards,
Jeff

 

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

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