Reply to Re: read csv file in iframe as text file

Your name:

Reply:


Posted by Ben C on 10/03/56 12:00

On 2008-01-15, Adrienne Boswell <arbpen@yahoo.com> wrote:
> Gazing into my crystal ball I observed sukhmeet@gmail.com writing in
> news:9f721bde-c030-47e2-a458-3149311e99e3@d4g2000prg.googlegroups.com:
>
>> Hi,
>> I am trying to load a csv file in Iframe element. I just want to
>> load it as a text file.
>> however when i load the file in iframe it asks to open the file and
>> finally opens it with excel in IE window itself. If i save the save
>> file as .txt it is being read properly.I need to save the file in csv
>> format only so that it can be edited externally with excel easily.
>> Later on i want to display the read csv file in javascript and do some
>> processing on it.
>> Does any know how do this. The basic problem is to stop IE from
>> invoking excel to open csv file and instead read the file as text.
>>
>> Following code works for .txt file
>>
>><iframe name="loader" id="frm" width="1000" height="300"
>> style="visibility:hidden;display:none" src="Book1.txt"></iframe>
>>
>> and when i use this line it tries to open the file using excel which i
>> don't want.
>>
>><iframe name="loader" id="frm" width="1000" height="300"
>> style="visibility:hidden;display:none" src="Book1.csv"></iframe>
>>
>> Any suggestions?
>> Thanks
>> Sukhmeet
>>
>>
>
> There really isn't anything you can do - it depends on the user's
> browser and system. If the user's system wants to do that, it will.

Might it depend on the MIME type header delivered with the file? If the
extension is csv the server might send it as application/ms-excel or
something and that's what causes IE to try to open it in Excel? If so
the server can be configured to send it as text/plain instead.

It's equally possible IE itself just looks at the extension and ignores
the MIME type anyway. In which case there's nothing you can do.

[Back to original 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

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