Solved

Variables in Frontpage submit component

Posted on 1998-07-29
6
220 Views
Last Modified: 2013-12-25
I'd like to have a list of email addresses in a combobox on a form that users could choose which would then be put into a variable.  When they click submit, the variable would be substituted into the mailto part of the submit component.  Anyone have any experience with variables in Frontpage bots?
0
Comment
Question by:zaop
6 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1858739
I don't know how to do it in FP, but I know how the code in HTML would be like:

<form name="frmMail" action="">

<SELECT Name="MailAddresses">
<option value="name1@bla.com">Peter
<option value="name2@bla.com">John
<option value="name3@bla.com">Mary
</SELECT>

<input type="button" value="Send Mail" onClick="SendMail()">

</form>

<script>
function SendMail() {
  strMailAddress = document.frmMail.MailAddresses.options[document.frmMail.MailAddresses.selectedIndex].value;
  document.frmMail.submit();
}
</script>

0
 
LVL 28

Expert Comment

by:sybe
ID: 1858740
Sorry, that won't work, it's:



<form name="frmMail" action="">

<SELECT Name="MailAddresses">
<option value="name1@bla.com">Peter
<option value="name2@bla.com">John
<option value="name3@bla.com">Mary
</SELECT>

<input type="button" value="Send Mail" onClick="SendMail()">

</form>

<script>
function SendMail() {
  strMailAddress = "mailto:" + document.frmMail.MailAddresses.options[document.frmMail.MailAddresses.selectedIndex].value;
  document.frmMail.action = strMailAddress;
  document.frmMail.submit();
}
</script>

0
 

Author Comment

by:zaop
ID: 1858741
Thanks for the response sybe but, I've gone away from straight html-vased email links to the frontpage bot because the form uses its own built-in emailer and does not require a client on the users end.  It is a really neat way to send the results of a form to an email address but the limitation so far is in being able to use the one form with different email recipients.  Ive even thought of having different submit buttons each with their own email address, but wanted to find something more elegant.  You have a nice way of accomplishing this via the users client!
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 28

Expert Comment

by:sybe
ID: 1858742
I don't know how FP does that, but it probably puts an email address somewhere in a form. You might still be able to change the value of the email address using the principles of the function I suggested.
0
 

Expert Comment

by:eschatar
ID: 1858743
I know of some cgi programs that will handle a form in such a manner.  One in particular is available as shareware, and only costs $20 to register.  Registering removes an annoying 'Register Me' message as the .sig of all emails.  Check out the following link:

http://www.davecentral.com/2748.html
0
 
LVL 6

Accepted Solution

by:
ckayter earned 100 total points
ID: 1858744
Not the answer you want, but FP98's submit dialog box only allows for one e-mail address. Your alternative is to send the data to an external CGI, ISAPI, NSAPI or ASP script for handling (that's what the "Send to other:" field is for).

Not as graceful as a drop list of addressees and would require oversight, but you could add an "ATTN:" field to the data and upon receipt by generic e-mail address, forward to intended recipient. Consider that many users will not know who to direct the message to and will probably choose a "department" name rather than an individual.

You could also try Sybe's HTML code as an "Insert HTML" string...
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Animated .jpg? 13 79
Redirect Website for Mobile Devises 9 111
Two wordpress questions 3 45
CSS: Making Pure CSS read more boxes thinner 5 31
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question