473,800 Members | 2,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing Form Data

Hello:

I've done an exhaustive online search and either can't find what I'm looking
for or I'm unable to make what I've found work. I'm not a programmer, but
I'm sure that this is probably elementary stuff.

What I have is a form which is being POSTed to an ASP script which processes
the script and emails it to a specified recipient (which is set in a hidden
form field).

In this form, I have a popup menu of a list of items. Based on which menu
item is selected, I would like the recipient value to change accordingly.
The "value" of the menu item cannot be used as it is capturing other data.

For example:

<select name="country">
<option value="12345">U SA</option> -- email to us***@xyz.com
<option value="45678">F rance</option> -- email to us***@xyz.com
<option value="98765">S pain</option> -- email to us***@xyz.com
</select>

As I said, there is a hidden field:

<input type="hidden" name="email" value="su*****@ xyz.com">

So if someone selects "France", the email "su*****@xyz.co m" changes to
"us***@xyz. com" and then the form is sent to the ASP script for processing.

If anyone has any insight or can point me to a site w/code which can help,
it would be greatly appreciated.

George

Jul 20 '05 #1
1 7370


George Rogic wrote:
Hello:

I've done an exhaustive online search and either can't find what I'm looking
for or I'm unable to make what I've found work. I'm not a programmer, but
I'm sure that this is probably elementary stuff.

What I have is a form which is being POSTed to an ASP script which processes
the script and emails it to a specified recipient (which is set in a hidden
form field).

In this form, I have a popup menu of a list of items. Based on which menu
item is selected, I would like the recipient value to change accordingly.
The "value" of the menu item cannot be used as it is capturing other data.

For example:

<select name="country">
<option value="12345">U SA</option> -- email to us***@xyz.com
<option value="45678">F rance</option> -- email to us***@xyz.com
<option value="98765">S pain</option> -- email to us***@xyz.com
</select>

As I said, there is a hidden field:

<input type="hidden" name="email" value="su*****@ xyz.com">

So if someone selects "France", the email "su*****@xyz.co m" changes to
"us***@xyz. com" and then the form is sent to the ASP script for processing.

If anyone has any insight or can point me to a site w/code which can help,
it would be greatly appreciated.


If you use ASP on the server you should change the ASP page to examine
the posted data and then change the email as needed.
With client side JavaScript your form will only function correctly if
the user has a browser with JavaScript support enabled.
If you can't change the ASP page then you could use an onchange handler
<select
onchange="switc h (this.selectedI ndex) {
case 0:
this.form.email .value = 'w*******@where ever.tld';
break;
case 1:
this.form.email .value = 'w******@wheree ver.tld';
break;
...
}"
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
24538
by: jeff | last post by:
Hello, I have a form that submits it's values to a pop-up window. I've simplied the code: <form name="formname" action="action.php" target="windowName" method="post" onsubmit="window.open('', this.target, 'dialog,modal,scrollbars=yes,resizable=no,width=300,height=200,left=362,top=284');">
7
6065
by: Stefan Finzel | last post by:
Hi, is there a way to change the display property on Windows Mobile 2003 SE Mobile/Pocket Internet Explorer? See following example. Please note: visibilty property has the same problem. Is there any other way to display/undisplay parts of web pages? TIA
3
4594
by: Jeff | last post by:
Hi I have a report with a graph on it and want to change the minimum and maximum values for the value axis when it is previewed. This can't be done by adding code in the Open event as once the report has started printing the properties can't be changed. It can be done with an MDB by opening it in design mode hidden, making the change, saving it and then opening it in preview mode. However, this obviously doesn't work in an MDE which...
10
15383
by: Marizel | last post by:
I'm not sure there's an easy solution to this, but thought I'd ask. I often find myself with a query which I'd like to reuse, but with a different datasource. These datasources generally have identical field names. The queries select a subset of the fields, so "Select *" is not really an option. Is there an easy way to change the source of a query, either in the design grid or SQL display? I suppose I could copy the SQL into WordPad...
2
2076
by: S P Arif Sahari Wibowo | last post by:
Hi! Do you know how to put a form's Access-Visual-Basic-code that will force the form to be inserted, while the user has not type anything in the form, without changing focus, selection, etc.? Here is the story. I have this structure:
4
2449
by: Tony W | last post by:
Hi, I am trying to write a simple application to retrieve data from the Windows registry and insert it into textboxs on a windows form. So far I have one namespace containing two classess. The first class handles the form generation - (this was done using GUI form designer).
5
1614
by: Mark Fox | last post by:
Hello, When you add a new web form in VS.NET it automatically adds the following namespaces at the top: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing;
32
3701
by: deko | last post by:
I have a popup form with a textbox that is bound to a memo field. I've been warned about memo fields so I'm wondering if I should use this code. Is there any risk with changing the form's RecordSource like this? Am I asking for trouble doing this with a memo field? Thanks in advance. Private Sub cmdNextNote_Click() Dim lngNid As Long If Me.Dirty Then DoCmd.RunCommand acCmdSaveRecord
22
3094
by: Zytan | last post by:
I have public methods in a form. The main form calls them, to update that form's display. This form is like a real-time view of data that is changing. But, the form may not exist (it is created / destroyed at user request). I can check form != null to prevent incorrect access. But, the form could disappear immediately after the check, before the method is run. Or someone could click 'close' when it's in the middle of an update. ...
5
2594
by: marton | last post by:
Hi there, I'm new to posting on the forum, and I've been working with MS Access for a couple of years, but and other than that know nothing about programming. I have a fairly simple, networked, Access database created with Access 2003. It is accessed from several different computers in my department (I don't know which computers or how often). About 8 people are entering data with an unbound form (which also records computer ID, date and...
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10275
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.