Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing data to an HTML page 2

Status
Not open for further replies.

AndyB21

Programmer
Dec 4, 2000
26
0
0
GB
Not sure if this is the right place for this query, but it's web stuff anyway..

Is there an easy way to pass data from a file on your web server (txt, csv, xml..) so that can it be read by the HTML page as it is generated?

I have a table on my website that I want to alter by only editing a simple data file, rather than the master HTML file.

I've read a bit about XML file and javascript integration via ActiveXObjects, but this is an IE only approach. Are theere any common methods that I just have not heard about.

Can't have any fancy server-side processing. It's just a bog standard file served site..

Cheers,

Andy..
 
actually you can't do that with a client side langage, such as javascript or vbscript or html .... there is a fileupload object in the dom, but it can only upload CLIENT files as it's client side
what do you mean with "fancy" server side processing ? you really can't use no php or such ??? not even server side javacript ?
 
I'm talking about non-commercial websites that just use a bog standard ISP. Forgive me if I am wrong (fairly new to this game) but I thought that if you can't rely on / or access the web-server in any way then you can't set about using servlets etc.. Am I talking drivel? Or is there an easy alternative?
 
Andy, only IE4+ databinding and xml data islands will help you with that one, nothing from netscape as far as I know jared@aauser.com
 
In NS, you can fetch the content of an invisible frame and load it into a layer.

Or, just use Perl.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Yes you can search for TDC control. Sorry, but. It is working only in IE. Maybe you have try this at all. For NS you must use CGI or PHP.
Look at this:
<!-- BEGIN BBoard -->
<!--
4WheelDrive BBoard v0.1
==============================
Door: Jeroen Wijdeven
Email: jwijdeven@wish.net
Site: -->
<TABLE border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; DATASRC=&quot;#tdc&quot;>
<TR>
<TD width=&quot;50&quot;><B>Name:</B></TD>
<TD width=&quot;250&quot;><DIV DATAFLD=&quot;Column1&quot;></DIV></TD>
<TD width=&quot;55&quot;><B>E-Mail:</B></TD>
<TD><DIV DATAFLD=&quot;Column2&quot;></DIV></TD>
</TR>
<TR>
<TD colspan=&quot;4&quot;><FONT color=&quot;#800000&quot;><DIV DATAFLD=&quot;Column3&quot;></DIV></FONT></TD>
</TR>
<TR>
<TD colspan=&quot;4&quot;><HR></TD>
</TR>
</TABLE>
<OBJECT ID=&quot;tdc&quot; CLASSID=&quot;CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83&quot;>
<PARAM NAME=&quot;DataURL&quot; VALUE=&quot;file.txt&quot;>
</OBJECT>
<!-- EINDE BBoard -->
I have use this and it is working perfectly. I hope that this is were you are searching for.

Qwark
 
Thanks everybody,

The TDC solution seems to be what I am after, although I have a few reservations in using an IE only solution. Does anybody know whether Netscape has plans to incorporate this as it seems to be a very useful and obvious requirement.

AndyB.
 
server side languages (php, cgi, perl, ...) allow you to do what you want and in both browsers
send a mail to your isp asking which server side languages it allows/supports
 
Like I said before, you can create a 0 pixel frame, load your page into a layer of that frame, then fetch the contents of that layer and set the src of a layer in your main frame to the contents of your invisible frame layer.

That's a bit complex though. The best thing to do would be to use Server Side Includes or CGI.

BTW, iza, CGI is a protocol not a language. PHP, Perl, ASP, C, Lisp, etc., are examples of server-side languages. They can use CGI to communicate with a webserver. Or, in the case of ASP, they are built into the webserver and do not require CGI.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Hi! I have a form and that passes a filename to the action page. The actual filename is not preserved, though, but in the action page it is a .tmp type. Is there any way to preserve the actual filename?

If I browse and attach c:\My Documents\wordfile.txt and then check the name in the action file it is C:\WINNT.SBS\ACF7EA7.tmp or something like that. Thanks in advance for your help.


<html>
<head>
<title>Untitled</title>
</head>

<body>
<form action=&quot;testaction.cfm&quot; name=&quot;thisform&quot; enctype=&quot;multipart/form-data&quot; method=&quot;post&quot;>


Enter file1: <INPUT name=&quot;filename1&quot; type=&quot;file&quot; width=&quot;30&quot; ><br><br>
Enter file2: <INPUT name=&quot;filename2&quot; type=&quot;file&quot; width=&quot;30&quot; ><br><br>

<input type=&quot;submit&quot;
value=&quot;send email&quot;>
<input type=&quot;reset&quot;
value=&quot;clear form&quot;>
</form>


</body>
</html>


 
That's a server-side issue. It all depends on how you are handling the file once it's uploaded. The CGI protocol does preserve the filename, but your server-side language must have a way to retrieve it, or you must find out the raw format and parse it yourself. Which language are you using? Give the docs a try.
Sincerely,

Tom Anderson
CEO, Order amid Chaos, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top