[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Variables in Frontpage submit component

Posted on 1998-07-29
6
Medium Priority
?
228 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

649 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