copy & paste a website into a form....
Posted: Mon Apr 05, 2004 4:04 pm
Hi all,
I've got a sneeky problem to solve, I hope someone can help...
I've got a form (using just HTML and javascript), containing a couple of textfields. The goal is that a user just fills out the form-fields and hits the 'send'-button. Then the javascript combines the contents of the textfields with some prefab-pieces of HTML and the result is an HTML-code for a website containing the info that the user has filled out.....Are you still with me??
Now, my problem: sometimes a user might want to copy-and-paste a part of an existing website INTO one of the textfields (or: into the form) and see it in the resulting webpage (let's just say: I want to show a part of a webpage as evidence). When I use Internet Explorer and Outlook Express (or Frontpage), I just select the part of the website I want to re-use and paste it into the 'almost-ready-website' and Outlook Express shows it as a whole website (so does Frontpage).
But I want to do this in my webform: the user fills out the form and the user can copy-and-paste a part of an existing website into this form. And when he/she hits the 'SEND'-button, the HTML-code for the webpage AND the pasted webpage is generated!
I have no idea IF and when HOW I can do this! Does anybody have any experience with this? Any ideas?
I've got a feeling I'm turning around in circles here.....
Do I need ActiveX-components here? The result just needs to work in Explorer, so no other browser is concerned...
All help would be appreciated!! And any hint!
BTW: I don't want to make the user wander throught the source-code and select the html-code fromthere..
Thanx,
Derfel.
I've got a sneeky problem to solve, I hope someone can help...
I've got a form (using just HTML and javascript), containing a couple of textfields. The goal is that a user just fills out the form-fields and hits the 'send'-button. Then the javascript combines the contents of the textfields with some prefab-pieces of HTML and the result is an HTML-code for a website containing the info that the user has filled out.....Are you still with me??
Now, my problem: sometimes a user might want to copy-and-paste a part of an existing website INTO one of the textfields (or: into the form) and see it in the resulting webpage (let's just say: I want to show a part of a webpage as evidence). When I use Internet Explorer and Outlook Express (or Frontpage), I just select the part of the website I want to re-use and paste it into the 'almost-ready-website' and Outlook Express shows it as a whole website (so does Frontpage).
But I want to do this in my webform: the user fills out the form and the user can copy-and-paste a part of an existing website into this form. And when he/she hits the 'SEND'-button, the HTML-code for the webpage AND the pasted webpage is generated!
I have no idea IF and when HOW I can do this! Does anybody have any experience with this? Any ideas?
I've got a feeling I'm turning around in circles here.....
Do I need ActiveX-components here? The result just needs to work in Explorer, so no other browser is concerned...
All help would be appreciated!! And any hint!
BTW: I don't want to make the user wander throught the source-code and select the html-code fromthere..
Thanx,
Derfel.