HighDots Forums  

Javascript (?) question

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Javascript (?) question in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Javascript (?) question - 06-29-2004 , 09:27 AM






People,

If I have a regular feedback form with a success page, can I grab the
name the user entered in a text field and have that printed in the
success page?

I.e., if user types "Ho Chi Minh" in the form's name field, the success
page will say "Thank you, Ho Chi Minh, for contacing us blah blah blah..."

--
Dan Vendel - *GOF*
Contact: http://www.proformica.com/en_gray/contact.shtml
Formmail tutorial: http://www.proformica.com/en_gray/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en_gray/nested_table_demo.shtml
SEO: http://www.proformica.com/en_gray/search_engine_optimization.shtml
SE Utility: http://www.proformica.com/en_gray/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html

Reply With Quote
  #2  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 09:39 AM






Chris In Madison wrote:

Quote:
Sure, but it's not done with Javascript. Which server model are you using?

~Chris


None. But can use any.

--
Dan Vendel - *GOF*
Contact: http://www.proformica.com/en_gray/contact.shtml
Formmail tutorial: http://www.proformica.com/en_gray/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en_gray/nested_table_demo.shtml
SEO: http://www.proformica.com/en_gray/search_engine_optimization.shtml
SE Utility: http://www.proformica.com/en_gray/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html


Reply With Quote
  #3  
Old   
Chris In Madison
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 09:41 AM



Sure, but it's not done with Javascript. Which server model are you using?

~Chris



Reply With Quote
  #4  
Old   
Chris In Madison
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 09:52 AM



Problem is that what you're asking for is not accessible from the client
side. It's got to be taken from the request headers which Javascript
doesn't have access to. If you submit a form, you can use whatever
server-side language you're using to send the mail to gain access to it,
though. For example:

ASP/VBS:

Thank you, <%=Request("formfieldname")%>. You're a heck of a nice guy!

PHP:

Thank you, <?php echo($_POST("formfieldname")) ?>. You're swell!


~Chris



Reply With Quote
  #5  
Old   
Gary White
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 10:36 AM



On Tue, 29 Jun 2004 15:39:25 +0200, Dan Vendel *GOF*
<see_my_signature_ (AT) _the_bottom_of_the_post (DOT) org> wrote:

Quote:
Sure, but it's not done with Javascript. Which server model are you using?

None. But can use any.

I guess the question should have been, "what are you using to process
the form?".


Gary


Reply With Quote
  #6  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 11:38 AM



Chris In Madison wrote:
Quote:
Problem is that what you're asking for is not accessible from the client
side. It's got to be taken from the request headers which Javascript
doesn't have access to. If you submit a form, you can use whatever
server-side language you're using to send the mail to gain access to it,
though. For example:

ASP/VBS:

Thank you, <%=Request("formfieldname")%>. You're a heck of a nice guy!

PHP:

Thank you, <?php echo($_POST("formfieldname")) ?>. You're swell!


~Chris


Thanks Chris,

I'll look into this....

--
Dan Vendel - *GOF*
Contact: http://proformica.com/en_gray/contact.shtml
Formmail tutorial: http://www.proformica.com/en_gray/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en_gray/nested_table_demo.shtml
SEO: http://www.proformica.com/en_gray/search_engine_optimization.shtml
SE Utility: http://www.proformica.com/en_gray/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html


Reply With Quote
  #7  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 11:41 AM



Gary White wrote:

Quote:
I guess the question should have been, "what are you using to process
the form?".
A perl script (the NMS from SourceForge).
But this is just a little extra touch I thought I'd add. If it means too
much labor (I'm a complete novice to scripting), then it doesn't really
matter.

--
Dan Vendel - *GOF*
Contact: http://proformica.com/en_gray/contact.shtml
Formmail tutorial: http://www.proformica.com/en_gray/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en_gray/nested_table_demo.shtml
SEO: http://www.proformica.com/en_gray/search_engine_optimization.shtml
SE Utility: http://www.proformica.com/en_gray/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html


Reply With Quote
  #8  
Old   
Chris In Madison
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 11:51 AM



Does the PERL script you're using have a thank you screen that you could
modify? Or would you need to come up with something in addition to it?

~Chris



Reply With Quote
  #9  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 12:07 PM



Chris In Madison wrote:

Quote:
Does the PERL script you're using have a thank you screen that you could
modify? Or would you need to come up with something in addition to it?

~Chris


Yeah, I can make it produce a success page, but it's plain ugly. But I
have my own, a regular html page.
Hmm...I think I can guess where you're going: I'll backup the script and
see if I can merge the code from my own page to their code. Thanks for
making me think....

--
Dan Vendel - *GOF*
Contact: http://proformica.com/en_gray/contact.shtml
Formmail tutorial: http://www.proformica.com/en_gray/formmail_tutorial.shtml
Nested tables: http://www.proformica.com/en_gray/nested_table_demo.shtml
SEO: http://www.proformica.com/en_gray/search_engine_optimization.shtml
SE Utility: http://www.proformica.com/en_gray/advanced_web_ranking.shtml
Search Dreamweaver newsgroup: http://www.proformica.com/google.html


Reply With Quote
  #10  
Old   
Gary White
 
Posts: n/a

Default Re: Javascript (?) question - 06-29-2004 , 12:32 PM



On Tue, 29 Jun 2004 18:07:44 +0200, Dan Vendel *GOF*
<see_my_signature_ (AT) _the_bottom_of_the_post (DOT) org> wrote:

Quote:
Yeah, I can make it produce a success page, but it's plain ugly. But I
have my own, a regular html page.
Hmm...I think I can guess where you're going: I'll backup the script and
see if I can merge the code from my own page to their code. Thanks for
making me think....

It might be easier to make you thank you page in something like PHP and
just pass the name in the URL.


Gary


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.