Forums
This topic is locked
Getting error, need help!
Posted 09 May 2007 03:08:52
1
has voted
09 May 2007 03:08:52 mike lafferty posted:
here is the code:<%
sub gameson(num1)
Dim filename, fs, f
filename = "flag.txt"
Set fs=Server.CreateObject("Scripting.FileSystemObject"
set f=fs.OpenTextFile("flag.txt", 2, True)
f.write("num1"
f.close
Set f=nothing
Set fs=nothing
Response.Write("Games Are Set To On!"
end sub
%>
here is how im trying to call the sub
<FORM>
<TABLE BORDER CELLPADDING=3>
<TR>
<TD><INPUT TYPE=BUTTON OnClick=<%call gameson(1)%> VALUE="Games On!"></TD>
</TR>
</TABLE>
</FORM>
this is the error im getting
Microsoft VBScript runtime error '800a0046'
Permission denied
/flagpage.asp, line 14
after i upload it and try to view the page that is what happens, can anyone help me??
Replies
Replied 09 May 2007 14:53:19
09 May 2007 14:53:19 Prabhjot Kang replied:
Hi Mike
this could be due to the permissions granted at the server folder.
You must have read write (chmod as 777) for the folder you are trying to write file in.
this could be due to the permissions granted at the server folder.
You must have read write (chmod as 777) for the folder you are trying to write file in.
Replied 09 May 2007 19:46:18
09 May 2007 19:46:18 mike lafferty replied:
thanks! ok i got the permissions set, and that seems to be working, but how do I get a button to call a sub routine??
i've been trying to figure it out for almost a week now and i've got nothing.
any help is appreciated
Thanks in advance!!
i've been trying to figure it out for almost a week now and i've got nothing.
any help is appreciated
Thanks in advance!!