I have an order form with about a hundred textboxes saying 0.
People change the zero to something else to tell quantity of field.
I am submitting page via asp and cdo.
Is there a function that detects changed text boxes and will only have
those submitted?
Here is address of page. http://www.marioncountyfl.org/emsasupplies.htm
I dont want all the non-ordered items showing up in submissal. Thanks! 6 1306 rk**@att.net wrote: I have an order form with about a hundred textboxes saying 0. People change the zero to something else to tell quantity of field. I am submitting page via asp and cdo.
Is there a function that detects changed text boxes and will only have those submitted?
Here is address of page.
http://www.marioncountyfl.org/emsasupplies.htm
I dont want all the non-ordered items showing up in submissal. Thanks!
Create an onsubmit function that disables all the text inputs that have
a value of '0' - disabled elements are not successful and should not be
submitted by the browser.
Any browser with JavaScript disabled (or without javascript at all)
will submit all the fields regardless. A sample script that will also
disable any empty text element (value = '') is below:
<form name="strBody" onsubmit="disab leZeros(this);" ... >
...
</form>
<script type="text/javascript">
function disableZeros(f) {
var els = f.elements;
var i=0;
var el = els[i];
do {
if ('text'==el.typ e && 0==el.value) el.disabled = true;
} while ( el = els[++i] )
}
</script>
--
Rob
Thankyou soo much for replying. I works nicely.
Alas, I have run into another condundrum.
I am able to request.form value of field > 0 but is there a way to also
write the field associated with the value submitted? Because all I get
is a list of numbers and not the field names associted with those
values. So instead of
1
2
4
3
I would like
FastPatches (Adult) - 1
FastPatches (Pediatric) - 2
Patient Electrodes (pack) - 4
Pediatric Electrodes - 3
In essence, response.write only those items that have been submitted or
obtained via request.form... i hope this makes sense rk**@att.net wrote: Thankyou soo much for replying. I works nicely. Alas, I have run into another condundrum. I am able to request.form value of field > 0 but is there a way to also write the field associated with the value submitted? Because all I get is a list of numbers and not the field names associted with those values. So instead of 1 2 4 3
I would like
FastPatches (Adult) - 1 FastPatches (Pediatric) - 2 Patient Electrodes (pack) - 4 Pediatric Electrodes - 3
In essence, response.write only those items that have been submitted or obtained via request.form... i hope this makes sense
At at guess you're talking ASP here? If so, you are more likely to get
a suitable answer in an ASP or server scripting/programming forum.
--
Rob rk**@att.net wrote:
[snip] So instead of 1 2 4 3
I would like
FastPatches (Adult) - 1 FastPatches (Pediatric) - 2 Patient Electrodes (pack) - 4 Pediatric Electrodes - 3
In essence, response.write only those items that have been submitted or obtained via request.form... i hope this makes sense
In js, you're looking for:
z= TEXTFIELDOBJECT .parentNode.pre viousSibling.fi rstChild
while(z.firstCh ild)z=z.firstCh ild;
description=z.d ata
Pass this along with the qty ordered, store it in a hidden field.
Mick rk**@att.net said: Thankyou soo much for replying. I works nicely. Alas, I have run into another condundrum. I am able to request.form value of field > 0 but is there a way to also write the field associated with the value submitted?
It's a bad idea to make your form submission dependent on client-side
Javascript. Massage the form data however you like on the server side
in your ASP code.
Lee wrote:
.... It's a bad idea to make your form submission dependent on client-side Javascript. Massage the form data however you like on the server side in your ASP code.
I agree that SS processing is crucial. Why not simply give form
controls meaningful names?
Mick This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Suresh Kumaran |
last post by:
Hi All,
I have a Form which has three tab controls and each tab
control has text boxes and combo boxes and Data time
picker etc, totalling up to 50 instances in all three tab
controls. How do I inform the user if any one of the
instances is changed in any tab control to save the data
before exiting the application?. I don't want create the
text changed event handler for all 50 instances. Is there
an easy way to do this?
|
by: Keith Page |
last post by:
I have a page that changes a list of checkboxes based on what city you
select, however when i insert the new nodes the values are not
submitted when the boxes are checked and form is sent, its like they
are not hooked to the form properly.
Any help would be appritiated
JAVASCRIPT ///
|
by: Johnny |
last post by:
Hello,
I've read somewhere that you can validate form data
before actually submitting it, similar to what validation
controls would do. For example, I have a form that has 2
textboxes. I populate the 2 textboxes with values from
the database. I also have an update button that will
update the values. If I have not made any change to the
data in the textboxes, then I do not want to submit the
data when the update button is clicked. I...
|
by: Mike Kingscott |
last post by:
Totally hacked off here. I've written a user control that contains a
text box, a required field validator and a button (these being the
cornerstone of a search facility), all as ASP.Net server controls. The
user clicks the button, and server-side code does a redirect to a
search page, appending the search expression to the URL.
Great, I thought, let's move on. I then wrote an mailing list page
which included the aforementioned user...
|
by: Syam |
last post by:
Hello everyone,
I am just barely two months old into learning asp.net and vb.net. Currently
I am working on a project to store customer database. I have a question about
creating a preview page:
I have a main page that uses forms to input customer information such as
name, contacts etc... Once all information is filled up, I would like to
preview it irst before submitting to the database. On the main page, there
should be a preview...
| |
by: Super Steve |
last post by:
I'm trying to write a little script that disables the submit button on
a form, changes the text of the button, and then submits the form.
Can anyone tell me why this works ok:
<input type="button" value="Submit" onClick="this.disabled=true;
this.value = 'Submitting...'; this.form.submit();">
But when I try to make a function it doesn't work:
|
by: browntown |
last post by:
so I have this application I'm nearly finished with. The only thing the
client has requested is the ability to submit the form by pressing
"enter". I didn't think this would be a huge pain in the ass and the
app will be used internally so I'm not too worried about users who
aren't using javascript. I'm using the following javascript to detect
whether or not they've hit enter:
if(document.layers)
{
|
by: pramodjava |
last post by:
i m using struts in my application , i have a struts form tag and three text fields and 2 buttons, one is html:cancel and html:submit cancel button appears first and then submit button. My problem is when i fill the text boxes and hit enter the cancel button is triggering insted of submit button i m submitting the form with javascript function.
<html:cancel styleClass="gray" style="padding-right:10px;"><bean:message...
|
by: RP |
last post by:
In my Form, I have 20 or 30 Text Boxes and Combo Boxes. I am using a
tabbed interface. When the Form's Close button is clicked, I want to
check whether user attempted an entry in any of the Text Boxes or not.
If yes, a dialog box appears to ask whether user wants to Save the
entries or not.
There is also a data grid with one Code field that is a primary key.
Suppose, a user clicks on any row of the data grid, its column values
get...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
| |
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,...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |