Hi does any one of u know how i can make a news form?
i want to make a page when u get there the page will look at a file (news.txt) and show that on the website.
how do i make this?
grtz
thatsmej
Printable View
Hi does any one of u know how i can make a news form?
i want to make a page when u get there the page will look at a file (news.txt) and show that on the website.
how do i make this?
grtz
thatsmej
using asp?
whose server is it?
if it's someone elses server then "Scripting.FileSystemObject" might not be available but tit should be ok for pws on your own pc
Code:
<%@ Language=VBScript %>
<%option explicit%>
<HTML>
<BODY>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim Visitor, fso, f,myText
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(Server.MapPath("\news.txt"), ForReading, True)
Do While not f.AtEndOfStream
myText = myText & f.ReadLine & "<BR>"
Loop
f.Close
Response.Write(myText)
%>
</BODY>
</HTML>
what sort of effect are you trying to achieve?
I presume that using an <iframe> wouldn't suffice.
[Edited by Mark Sreeves on 11-27-2000 at 04:03 AM]
i want to make something for school that teachers on my school can update the lessons that we are free.
Whitout knowing something about html.
sorry for my english.
grtz
thatsmej
so this would be the code?
<%@ Language=VBScript %>
<%option explicit%>
<HTML>
<BODY>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim Visitor, fso, f,myText
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(Server.MapPath("\news.txt"), ForReading, True)
Do While not f.AtEndOfStream
myText = myText & f.ReadLine & "<BR>"
Loop
f.Close
Response.Write(myText)
%>
</BODY>
</HTML>
i probebly need to call the procedure to start it.
because it won`t work now.
can someone please tell me how i should do it?
grtz
thatsmej
what is being output to the browser?
hi,
i think i know what`s my problem.
i need to save the code as a news.asp file. and than call the asp file whitin the site.
something like
<FORM ACTION="news.asp" METHOD="GET">
but this won`t work.
can someone tell me what i do wrong??
or give some advise in starting whit asp?
thnx
grtz thatsmej
OK lets start at the begining...
ASP files contain script which is executed on the server that is anything between the <% %> tags
you need to have (at least) Personal Web Server installed on your PC have you done this?
the page is then accessed throuth the browser
http://[PC-Name]/whatever.asp
No i didn`t.
where can i find that program?
en how do i know if a ISP has it?
grtz
thatsmej
Right,
there are sites which will host Active Server Pages I use http://www.ewebcity.com (now called somthing else but you'll be redirected)
Personal Web Server is on NT4 Option Pack , well that's where I got it from anyway.
I believe it is also on the Win 98 cd but I've never installed it on 98 so I suggest you start a new thread asking this.
Yes - it is on the 98 CD, in the Add-ons folder. I am running it on 98.
oke i`ve got it right now
whats next?
thatsmej
when you type http://localhost in a browser you sghould get a default page appear
If I remember rightly this is a page in C:\Inetpub\wwwroot on your hard drive. (I think that's where the default page is stored)
anyone else on your network will need to use your pc name instead of localhost to access the pages.
so, put your asp pages in C:\Inetpub\wwwroot and navigate to them eg:
http://localhost/page1.asp
nope,
when i do that my frontpage 2000 comes up
:-(
grtz
thatsmej