•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 428,639 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,987 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 1112 | Replies: 1
![]() |
•
•
Join Date: Jan 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
in html body
<form method="get" action="MovieTiming.jsp">
<table cellspacing="0" cellpadding="0" border="2" style="width:50%; height: 400px;" bgcolor="pink">
<tr style="height:4px;">
<td id="Date" colspan="5">
Please input date (yyyymmdd)<input name="Date" type="text" size="8" maxlength="8" value="<%=date%>"></input>
<button type="submit" value="Submit">Get Movies List</button>
</td>
<td>
<button onclick=fileWrite();>save file</button>
<input type="file" id="loc" name="loc" >[/b]</input>
</td>
</tr>
<tr bgcolor="white">
<td id="output" colspan="10" style="height:400Px;"> </td><td><textarea id="out" name="out" rows=20 cols=20 ></textarea></td>
</tr>
</table>
</form>
function fileWrite
{
<%
String loc = request.getParameter("file");
String func = request.getParameter("out");
if(func!=null)
{
File strFile = new File(loc);
Writer objWriter = new BufferedWriter(new FileWriter(strFile));
objWriter.write(func);
objWriter.flush();
objWriter.close();
}
%>
}
but this code is throwing exception whenever i click on save as button says that no such file exist.
is there any other way of write data to the file using html javascript or jsp(embed in html)
prefer javascript
please help
please help
<form method="get" action="MovieTiming.jsp">
<table cellspacing="0" cellpadding="0" border="2" style="width:50%; height: 400px;" bgcolor="pink">
<tr style="height:4px;">
<td id="Date" colspan="5">
Please input date (yyyymmdd)<input name="Date" type="text" size="8" maxlength="8" value="<%=date%>"></input>
<button type="submit" value="Submit">Get Movies List</button>
</td>
<td>
<button onclick=fileWrite();>save file</button>
<input type="file" id="loc" name="loc" >[/b]</input>
</td>
</tr>
<tr bgcolor="white">
<td id="output" colspan="10" style="height:400Px;"> </td><td><textarea id="out" name="out" rows=20 cols=20 ></textarea></td>
</tr>
</table>
</form>
function fileWrite
{
<%
String loc = request.getParameter("file");
String func = request.getParameter("out");
if(func!=null)
{
File strFile = new File(loc);
Writer objWriter = new BufferedWriter(new FileWriter(strFile));
objWriter.write(func);
objWriter.flush();
objWriter.close();
}
%>
}
but this code is throwing exception whenever i click on save as button says that no such file exist.
is there any other way of write data to the file using html javascript or jsp(embed in html)
prefer javascript
please help
please help
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Text Editor & Web Design
- Next Thread: Pop Up Media Player


Linear Mode