i have following code for adding news. when i press add news button it automatically add news with title "news title" and "new news text". i want that when i press add button it open a form to add add news. thee code is following <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Add News</title> </head> <!-- #INCLUDE FILE="settings.asp" --> <% id = request("id") response.write ID if not isnumeric(id) then response.write errmessage response.end end if addlatestnews = request("addlatestnews") delnews = request("delnews") Set dConn = Server.CreateObject("ADODB.Connection") dConn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & database_path if addlatestnews = 1 then insertdate = FormatDateTime(Now(), vbShortDate) mySQL = "INSERT INTO latestNews(newstitle, newsbody, newsdate, active) VALUES ('New News Title', 'New News Text', #" & insertdate & "#, 1);" dConn.execute(mySQL) redirect = "news-admin.asp" end if if delnews = 1 then mySQL = "DELETE FROM latestnews where ID = " & id & ";" dConn.execute(mySQL) redirect = "news-admin.asp" end if dconn.close %> <script language="javascript"> <!-- location.replace("<%=redirect%>"); --> </script> </html> Code (markup): please help me. wht change in this code so that when i press add button the form of add news will display.i need urgent help.
simply form. i just want when i click add news button a form open in which i write news. then save it. when i save it will save in database.
HI What is this for <script language="javascript"> <!-- location.replace("<%=redirect%>"); --> </script>
On button click event write the following code to redirect the page. server side. Response.Redirect("yourpage.aspx",false);