Using text +asp to build news release System (v) News modification

Source: Internet
Author: User
Tags eval
' ###### #news_update. asp


<!--#include file= "news_session.asp"-->


<script Id=clienteventhandlersjs language=javascript>


<!--


function Client_onblur (ii) {


server=eval ("Form1.server" +ii)


if (server.value== "") {


client=eval ("form1.client" +ii)


clientvalue=client.value+ ""


Varlen=clientvalue.length


a=clientvalue.lastindexof (")


clientvalue=clientvalue.substring (a+1)


//alert (Clientvalue);


Server.value=clientvalue


    }


}


function Form1_onsubmit () {


for (i=1;i<1;i++) {


client=eval ("form1.client" +i)


server=eval ("Form1.server" +i)


if (client.value!= "" && server.value== "") {alert ("The file name after the upload cannot be empty!") "); Server.focus (); return false}


    }


}


//-->


</SCRIPT>


<% Dim myID


myid=request.querystring ("id")


If Len (myID) =0 then


Response.Write "No such news"


Response.End


End If


Dim myfso,myread,mytext,newscontent


' ###### #打开对应的新闻内容文件, and read with variable storage


set Myfso=createobject ("Scripting.FileSystemObject")


If Myfso. FileExists (Server.MapPath ("./news_content/" &myid& "TXT")) then


Set Myread=myfso.opentextfile (Server.MapPath ("./news_content/" &myid& ". txt"), 1,0)


    


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.