Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Problem on IE refreshing form elements values

Reply
Thread Tools

Problem on IE refreshing form elements values

 
 
odgarro
Guest
Posts: n/a
 
      06-22-2006
Hi,
I have this problem I canīt solve.

Iīm using some mix of javascript / php / ajax code to open a text
file, process its info and close it.

While skiping through the text file lines, Iīd like some of myForm
elements be updated with the info extracted from the file.

This way, the user realice that actually some process is being executed
and forgets about "oh ! this isnīt working, I'll try closing and
opening the app again".

Here is some part of the HTML code:

<FORM name="myForm" id="myForm" method="POST" >

<INPUT type="text" name="employee" id="employee">

<INPUT type="button" name="btnProcess" id="btnProcess"
onclick="xajax_ProcessFile();" >

</FORM>

and part of my ProcessFile() php function should look like:

$h = fopen($file_name,"rb") ;

while( ($fld = fgetcsv($h, 35," ")) !== FALSE ) {
$emp = $fld[0] ;

$objResponse->addScript("document.getElementById('employee').va lue='$emp';");
}
fclose($h);
return $objResponse->getXML();

Now... on Mozilla/FireFox this works just like I expect.
As the function skips through the text file lines, the value of
myForm.employee.value is updated with some text of the line being
processed.
But, on IE nothing happens until the function reachs the end of the
text file (when the last record do appears on myForm.employee.value )
So, on both navigators my function reaches its propose (that is to
process the text file) but on IE the info is not shown on the form
while processing.

Any idea ???

 
Reply With Quote
 
 
 
 
James Black
Guest
Posts: n/a
 
      06-22-2006

odgarro wrote:

> Now... on Mozilla/FireFox this works just like I expect.
> As the function skips through the text file lines, the value of
> myForm.employee.value is updated with some text of the line being
> processed.
> But, on IE nothing happens until the function reachs the end of the
> text file (when the last record do appears on myForm.employee.value )
> So, on both navigators my function reaches its propose (that is to
> process the text file) but on IE the info is not shown on the form
> while processing.


I believe IE waits to display the page until it is all rendered.

You could just use XmlHttpObject to get the textfile from your
server, then parse it in the javascript, and show what you want, as an
update.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newb: recurse over elements children and disable all form elements SteveKlett@gmail.com Javascript 4 09-20-2006 07:42 AM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net 1 08-04-2006 01:13 PM
Self-refreshing and non-self-refreshing controls Harlan Messinger ASP .Net Web Controls 0 08-03-2006 12:29 PM
Retreiving values of form elements after being changed by DOM Angel Javascript 4 07-17-2006 05:07 AM
dynamic new form elements itself, not only change values??? fred schulz Javascript 0 01-30-2004 12:12 AM



Advertisments