Click here to Skip to main content
15,908,768 members
Home / Discussions / Java
   

Java

 
GeneralError getting column type Pin
fly9047-Jun-09 10:41
fly9047-Jun-09 10:41 
Questionclient server communication Pin
dumnbncool5-Jun-09 7:21
dumnbncool5-Jun-09 7:21 
QuestionBackground dimmer Pin
EnchantedSun5-Jun-09 3:56
EnchantedSun5-Jun-09 3:56 
QuestionProblem with JSObject Pin
raesa5-Jun-09 2:44
raesa5-Jun-09 2:44 
QuestionJava Swing - Right Click and JPopupMenu in JTable Pin
djDash5-Jun-09 0:25
djDash5-Jun-09 0:25 
QuestionRe: Java Swing - Right Click and JPopupMenu in JTable Pin
Java John11-Jun-09 1:59
Java John11-Jun-09 1:59 
QuestionCreating a file and saving it on a networked computer [modified] Pin
ItIsFinished4-Jun-09 12:00
ItIsFinished4-Jun-09 12:00 
AnswerRe: Creating a file and saving it on a networked computer [modified] Pin
darkdragn5-Jun-09 2:45
darkdragn5-Jun-09 2:45 
I think you were just over complicating it. You're getting that error because new Server.CreateObject... it's wondering what Server is. Just use the ip like a regular path. I tested it, and this worked for me.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Local File Create Script</title>
</head>

<body>
<script>
function WriteToFile()
{
try
{
var fso, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
s = fso.CreateTextFile("\\\\205.67.214.8\\c$\\test.txt", true);
s.writeline("This is a test");
s.writeline("Oh Yea!!!!");
s.Close();
}
catch(err)
{
var strErr = 'Error:';
strErr += '\nNumber:' + err.number;
strErr += '\nDescription:' + err.description;
document.write(strErr);
}
}
</script>

<input name="write_to_file" type="button" id="write_to_file" onClick="WriteToFile()" value="Click Here" />
</body>

</html>


(i hope you don't mind, but i didn't know you could even save to a file from js until i read your post. I hope you don't mind but i'm going to add this code to my library, ^_^. I only got the solution by being bored and playing with what you provided.)

Friday, June 5, 2009 9:01 AM

GeneralRe: Creating a file and saving it on a networked computer Pin
ItIsFinished5-Jun-09 5:44
ItIsFinished5-Jun-09 5:44 
QuestionWriting a simple HTML report using Java Pin
raesa3-Jun-09 20:15
raesa3-Jun-09 20:15 
AnswerRe: Writing a simple HTML report using Java Pin
Ali Shakiba10-Jun-09 22:19
Ali Shakiba10-Jun-09 22:19 
Questionneed help geeting a nullpointerexeption [modified] Pin
ashish_bhatia3-Jun-09 1:07
ashish_bhatia3-Jun-09 1:07 
AnswerRe: need help geeting a nullpointerexeption Pin
Nagy Vilmos3-Jun-09 2:00
professionalNagy Vilmos3-Jun-09 2:00 
RantRe: need help geeting a nullpointerexeption [modified] Pin
ItIsFinished4-Jun-09 12:13
ItIsFinished4-Jun-09 12:13 
GeneralRe: need help geeting a nullpointerexeption Pin
Nagy Vilmos5-Jun-09 3:46
professionalNagy Vilmos5-Jun-09 3:46 
QuestionMobile Application Pin
cdpace2-Jun-09 23:40
cdpace2-Jun-09 23:40 
AnswerRe: Mobile Application Pin
Nagy Vilmos3-Jun-09 0:08
professionalNagy Vilmos3-Jun-09 0:08 
Questionretrieving selected item from jComboBox in jTable Pin
Denis J. González1-Jun-09 9:16
Denis J. González1-Jun-09 9:16 
AnswerRe: retrieving selected item from jComboBox in jTable Pin
darkdragn1-Jun-09 9:25
darkdragn1-Jun-09 9:25 
GeneralRe: retrieving selected item from jComboBox in jTable Pin
Denis J. González1-Jun-09 9:43
Denis J. González1-Jun-09 9:43 
QuestionMobile Programming Pin
Sourie30-May-09 19:28
Sourie30-May-09 19:28 
AnswerRe: Mobile Programming Pin
raheela12331-May-09 1:22
raheela12331-May-09 1:22 
Questionproblem in do-while loop Pin
kenna18030-May-09 4:58
kenna18030-May-09 4:58 
AnswerRe: problem in do-while loop Pin
raheela12331-May-09 1:15
raheela12331-May-09 1:15 
GeneralRe: problem in do-while loop Pin
kenna18031-May-09 7:04
kenna18031-May-09 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.