I hope this post makes sense... I have a page, we'll call it send.asp, with the basic structure like below:
Clicking the submit button triggers my code to send an email using the html inside the TEXTAREA, and everything woroks fine. What I want to do, however, is have a Preview button (or hyperlink) that opens a new window and displays the html inside the TEXTAREA, in a new window.
Now, I can create a button or link with an ONCLICK event, something like ONCLICK="javascript:showpopup('preview.asp')", but this would not be able to pull the current contents of the TEXTAREA. I would have to submit the form to do that... but then I would have to re-display my input form (send.asp), and then, trigger a new window to popup... which I GUESS I could do with an ONLOAD statement, but this all seems wacky to me;
I'm thinking that there is probably a better way to do what I want, and my brain is just not seeing it today Does anyone have any suggestions?
Thanks!
Code:
<FORM ... >
<TEXTAREA>
contains some html the user pastes in
</TEXTAREA>
<INPUT TYPE='SUBMIT' ...>
</FORM>
Clicking the submit button triggers my code to send an email using the html inside the TEXTAREA, and everything woroks fine. What I want to do, however, is have a Preview button (or hyperlink) that opens a new window and displays the html inside the TEXTAREA, in a new window.
Now, I can create a button or link with an ONCLICK event, something like ONCLICK="javascript:showpopup('preview.asp')", but this would not be able to pull the current contents of the TEXTAREA. I would have to submit the form to do that... but then I would have to re-display my input form (send.asp), and then, trigger a new window to popup... which I GUESS I could do with an ONLOAD statement, but this all seems wacky to me;
I'm thinking that there is probably a better way to do what I want, and my brain is just not seeing it today Does anyone have any suggestions?
Thanks!