Click to See Complete Forum and Search --> : Preview page?
bobafifi
04-09-2003, 03:30 PM
Looking for a JavaScript that will make a Preview page of the Description field on my form
http://www.usedflutes.com/addpage.html . Anybody have something that can do that?
Many thanks in advance,
-Bob
You mean something like this?
http://geocities.com/god_loves_07/dynamicusrpage.htm
bobafifi
04-09-2003, 04:01 PM
Hi Jona,
Thanks for the reply!
However, that link is not really what I'm looking for.
I'm after something much simpler, along the lines of a pop-up window that just shows the text that the user entered so that they can review it for typos before they hit the Submit button.
Thanks again,
-Bob
Oh sure...
<script>
function reView(){
var win = window.open("","win","config");
win.document.write("<center><h1>Here is what you wrote, please review for typos or spelling errors:</h1></center><br>");
win.document.write(document.formName.textareaName.value);
}
</script>
On your button:
<input type=button onClick="reView();" value="Review">
bobafifi
04-09-2003, 04:25 PM
Thanks Jona!
That's the idea. :-)
I installed it http://usedflutes.com/addpage_test.html
Would like to change a couple of things:
Instead of a button, would like to just have a hyperlink of the words "Preview your description"
White background instead of grey
"Close" button
Is that a relatively easy thing to do?
Thanks again Jona,
-Bob
<script>
function reView(){
var win = window.open("","win");
win.document.write("<center><h1>Here is what you wrote, please review for typos or spelling errors:</h1></center><br>");
win.document.write(document.formName.textareaName.value);
win.document.write("<br><br><hr width='100%'><a href='javascript:self.close();'>Close</a>");
}
</script>
<a href="javascript:reView();" value="Review">
bobafifi
04-09-2003, 05:27 PM
Hi Jona,
hmmm...
well I must be something wrong because I couldn't get the new stuff to work...
I can get your first code to work OK and have modified it to work with my page.
http://www.usedflutes.com/addpage_test.html
<script>
function reView(){
var win = window.open("","win");
win.document.write("<left><B>Description:</b></left><BR><BR>");
win.document.write(document.myForm.comments.value);
win.document.write("<br><br><hr width='100%'><a href='javascript:self.close();'>Close</a>");
}
</script>
=====
<input type=button onClick="reView();" value="Preview your description">
=====
Can you please tell me how to change the above so that the "Preview your description" is a link and the "Close" is a button?
Thanks again for your help Jona,
-Bob
<a href="javascript:reView();">Review</a>
That will work.
bobafifi
04-09-2003, 05:53 PM
Thanks so much Jona!
That works great! :-)
-Bob
bobafifi
04-09-2003, 08:52 PM
Hi Jona,
One more quick question??
How do I make the "Preview your description" link color be black instead of blue? I've tried inserting the <FONT COLOR="#000000"> but it seemed to have no effect.
http://www.usedflutes.com/addpage.html
Thanks again Jona,
-Bob
bobafifi
04-09-2003, 09:18 PM
Never mind!
I got it! :-)
Thanks again for all your help Jona,
-Bob