Jump to content

I'm making a local server for my house and I'm using HTML and CSS to create it. This server hosts movies, music, etc. A home baked file server.

 

I need to make a user prompt that asks what the user want's on the site and then log the answer to a file.\

 

I've tried to use Java to make a simple drop down prompt with: prompt("What would you like to see on this site?"); but I have no idea how to save the input to a file.

 

Link to comment
https://linustechtips.com/topic/731581-trying-to-make-a-user-input-htmlcss/
Share on other sites

Link to post
Share on other sites

You need to use a method to send info to the server, which would be an HTTP POST or PUT command. There are various ways to do this (like AJAX). Once the data is received on the server end, you can process it and save it somewhere.

Link to post
Share on other sites

1 minute ago, M.Yurizaki said:

You need to use a method to send info to the server, which would be an HTTP POST or PUT command. There are various ways to do this (like AJAX). Once the data is received on the server end, you can process it and save it somewhere.

 

Sorry I only have a basic understanding of HTML and CSS. My server is hosted on Reactor Server if that helps at all.

Link to post
Share on other sites

ummm, @M.Yurizaki i don't think css and html will get him anywhere - you either need to find some plug ins or something on github that other people have made or get someone else to do it for you on fiverr

Link to post
Share on other sites

1 minute ago, M.Yurizaki said:

The most I can help you with is to learn how to work with HTML forms. I worked with a different client-server setup so I can't help you with your system.

i don't use the open source client-server setup either, 

to the op - are you trying to do like an inventory to see what everyone's watching or have them select a file to watch in a drop down list and watch it from there?

Link to post
Share on other sites

2 minutes ago, M.Yurizaki said:

The most I can help you with is to learn how to work with HTML forms. I worked with a different client-server setup so I can't help you with your system.

i was thinking he could just do a drop down list in a html form, and depending on what he chose, that would put a localhost file location into some code, when submit/go is clicked, said location gets run through an executable or even some javascript and will automatically play said file

Link to post
Share on other sites

2 minutes ago, gtx1060=value said:

i was thinking he could just do a drop down list in a html form, and depending on what he chose, that would put a localhost file location into some code, when submit/go is clicked, said location gets run through an executable or even some javascript and will automatically play said file

I believe HTML forms in their basic... form... can submit the information they contain as an HTML POST. That example apparently adds a query to the URL, which would be sent to the server.

 

Probably not the best way to do it though.

Link to post
Share on other sites

2 minutes ago, M.Yurizaki said:

I believe HTML forms in their basic... form... can submit the information they contain as an HTML POST. That example apparently adds a query to the URL, which would be sent to the server.

 

Probably not the best way to do it though.

 

All I really need is a Java prompt to be saved to a log file.

Link to post
Share on other sites

3 minutes ago, OffSideTech said:

All I really need is a Java prompt to be saved to a log file.

Before someone chews your butt, it's JavaScript.

 

And the way your OP is worded is you want the server to save this query into a log file. Either way, you're going to have to do an HTML POST/PUT. If you're going to use JavaScript, I would suggest learning about AJAX. This way the client can send data to the server. How the server handles it I don't know, but you're going to have to put in a way to process it and save the query from there.

Link to post
Share on other sites

19 minutes ago, OffSideTech said:

All I really need is a Java prompt to be saved to a log file.

@M.Yurizaki if he wants to just save what the person searched for, ajax, php and mysql would be the way to go - i still feel like there's some package for his software that could do this though

Link to post
Share on other sites

1 hour ago, gtx1060=value said:

@M.Yurizaki if he wants to just save what the person searched for, ajax, php and mysql would be the way to go - i still feel like there's some package for his software that could do this though

The data OP is saving seems so simple and minimal that whole setup would seem overkill for the task.

 

Would be useful for an exercise though.

Link to post
Share on other sites

4 minutes ago, M.Yurizaki said:

The data OP is saving seems so simple and minimal that whole setup would seem overkill for the task.

 

Would be useful for an exercise though.

makes me wonder why he doesn't just create a website using weebly and host it on his local server or something

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×