Solved

Variables in Frontpage submit component

Posted on 1998-07-29
6
221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
This video teaches users how to migrate an existing Wordpress website to a new domain.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

733 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