Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Textbox - is this possible?
Old 03-20-2007, 02:01 PM Textbox - is this possible?
Experienced Talker

Posts: 37
Name: Paul
Trades: 0
I don't know if this possible if Javascript but anyways

I have a textbox and submit button
Now let's say I enter something in that textbox and click submit.

When I click submit I want to save that text to my server file:
ftp://myhost.com/website/notes.txt
And when somebody opens my webpage, they will see my written text from before.
This is like wikipedia where you can edit things


Can anyone help me?
__________________
eh79+
Athlon1600 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-20-2007, 02:15 PM Re: Textbox - is this possible?
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
This really isn't a javascript question.
Its a server programming question. Most servers will allow you to do this (assuming you have write permissions to the directory in question).
The how just depends on what server you are using.
For example, on a J2EE server, you could do it with a servlet (or JSP but, people would make fun of you).
One thing to be very careful of is that you don't open a security hole by letting users write to arbitrary files.

(maybe a moderator could move this to the coding forum)
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 03-20-2007, 02:19 PM Re: Textbox - is this possible?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
It could be done using AJAX, but even that requires some level of server-side programming. So it COULD apply to Javascript tangentally.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 03-20-2007, 03:12 PM Re: Textbox - is this possible?
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Easy solution: Media Wiki. You want to build a site like Wikipedia, use the software they use.
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 03-20-2007, 05:37 PM Re: Textbox - is this possible?
Experienced Talker

Posts: 37
Name: Paul
Trades: 0
Quote:
Originally Posted by Learning Newbie View Post
Easy solution: Media Wiki. You want to build a site like Wikipedia, use the software they use.
Yes I was thinking about it, wikipedia uses the same. But it's just too much code.
__________________
eh79+
Athlon1600 is offline
Reply With Quote
View Public Profile
 
Old 03-20-2007, 05:38 PM Re: Textbox - is this possible?
Experienced Talker

Posts: 37
Name: Paul
Trades: 0
[quote=willcode4beer;368466]This really isn't a javascript question.
Its a server programming question. Most servers will allow you to do this (assuming you have write permissions to the directory in question).
[quote]
is CHMODing file to 777 would be enough?
__________________
eh79+
Athlon1600 is offline
Reply With Quote
View Public Profile
 
Old 03-21-2007, 09:28 AM Re: Textbox - is this possible?
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
Quote:
is CHMODing file to 777 would be enough?
That would also make the file executable. Just make sure the file is owned by the same user as the server (please not root).
Code:
chmod 600
will make it readable/writeable by that user and no one else.

You'd also need to write you server code to prevent them from reading/writing any arbitrary file (imagine if they over-wrote /etc/passwd).
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Textbox - is this possible?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25882 seconds with 12 queries