?
Solved

Variables in Frontpage submit component

Posted on 1998-07-29
6
Medium Priority
?
230 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 200 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses
Course of the Month16 days, 23 hours left to enroll

864 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