Log in

View Full Version : Create a html page from a website



2ndglance
09-11-2005, 01:06 AM
Alright this is what I am trying to do and I will try to explain it as best I can.

I want to have a webpage on my website that will let the used create a html page and have it saved on there local machine so they can view it anytime they want (instead of leaving it on my website taking up space)

The function of it should work like this, there will be two drop down boxes and in each dropdown there will be options (ie: option1 - option2 - or - option3)

now the options will have different html coding to them
like for example
option1 = <br>
option2 = <hr>
option3 = <font>

And if the user selects one of the options then what it equals will be put into like a hidden text box i suppose and then when they are finished they select save and then presto that page is saved on there local machine.

Hope someone can help me out with this, it may be real easy but I dont even know where to begin.

Thanks in advance,
Ryan

Twey
09-11-2005, 08:36 AM
Right.
1) You can't save anything to the user's page without ActiveX or (preferably) a signed Java applet.
2) Unless you want the resulting page to be utterly, utterly bogged down with a lot of Javascript cludge, you'll need to do this server-side. Do you have a server-side language installed and enabled on your server?

2ndglance
09-11-2005, 04:19 PM
perl and php, may you expalain to me why you would need a ActiveX control for this?
Also last night I was tinkering and i found this, may be help may not be.


<select name="dropdown1">
<option value="&lt;br&gt;">option1</option>
<option value="&lt;hr&gt;">option2</option>
<option value="&lt;font&gt;">option3</option>
</select>

would it be that easy? and then when they save this off of my server and it is saved on their computer the form "save" button will get the values for all the dropdown boxes and display a message for them to save it in a certain location (that may be why i need the ActiveX or the signed Java applet, but would they still be needed if the user is going thru the save actions and its not just being saved without there knowledge?

HockeyFan
09-14-2005, 08:22 PM
Unless I'm misunderstanding your intent, what you've just put there is nothing more than code to put a list box on the page that they can select from. Nothing from that code is going to do anything, in fact, as that Select would need to be inside a Form. The form would need some kind of Action to perform after a Submit is done by the user. And the Action is what you're wanting to figure out how to Save to the user's computer.
Since you're not really allowed to write to the user's computer from a webpage, unless there's some ActiveX control to do it, or a Java app, another easy alternative would be to generate the web page that the user selects, and have it generated on the server. This is done after the Submit.
Then, in addition to generating the webpage on the server, set the URL to this so that the user sees this page come up on his/her screen. Then just get them to do a File -> Save As ... to save it onto their computer.

It's not an elegant solution, but it will work.