Solved

Variables in Frontpage submit component

Posted on 1998-07-29
6
218 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This video teaches users how to migrate an existing Wordpress website to a new domain.
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.

705 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now