473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I don't want to use buttons

I have an asp page that is attached to database and I want to update
the database when the window is closed.

It is basically 5 text boxes wide by 8 text boxes high and these are
all dynamically built by the database loading. I know exactly what
textbox has what in it. I can do everything by submitting a form but
I do not want a button to submit.

Is there a way to when the window is closed run update code for a
database.

I can also open and close another page to do the update if need be.

This is the code that I can use from the submit button. I load an
array with all the values and can loop through these with the
database.

<FORM ACTION=:"array. asp" METHOD="get" id=frmName name=frmName>

I can dynamically build the following which is currently produced by
the submit button.

array.asp?WeekF rom=8/12/2004&WeekTo=8/17/2004&tempid=2&l ine1text1=21&li ne1text2=&line1 text3=&line1tex t4=&line1text5= 55&cmdSubmit=Su bmit

Any help stopping people from pushing my buttons would be greatly
appreciated.

Thanks,

Brent
Jul 19 '05 #1
5 1864
Brent Webster wrote:
I have an asp page that is attached to database and I want
to update the database when the window is closed...


Four copies of the same post in a 1-minute span is FOUR copies too many. If
you are still trying to learn how to post, I suggest [microsoft.test].
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #2
On 17 Aug 2004 09:26:29 -0700, br***@webstyler .ca (Brent Webster)
wrote:
I have an asp page that is attached to database and I want to update
the database when the window is closed.

It is basically 5 text boxes wide by 8 text boxes high and these are
all dynamically built by the database loading. I know exactly what
textbox has what in it. I can do everything by submitting a form but
I do not want a button to submit.
I can see why, you have a habit of hitting Submit buttons multiple
times. Like when posting this message...
Is there a way to when the window is closed run update code for a
database.
It's problematic. You can use a session end as a trigger, but it
could take a while to time out. You could possibly write some
Javascript to detect the window focus change. Maybe even an ActiveX
control.

The real issue is that ASP and HTML are not the same as writing a
program. The browser requests something, the server sends it. Until
the browser sends something back to the server, it's tough to know
what the browser is doing.
I can also open and close another page to do the update if need be.
You can do that but not use a Submit button? Kinda weird...
This is the code that I can use from the submit button. I load an
array with all the values and can loop through these with the
database.

<FORM ACTION=:"array. asp" METHOD="get" id=frmName name=frmName>

I can dynamically build the following which is currently produced by
the submit button.

array.asp?Week From=8/12/2004&WeekTo=8/17/2004&tempid=2&l ine1text1=21&li ne1text2=&line1 text3=&line1tex t4=&line1text5= 55&cmdSubmit=Su bmit

Any help stopping people from pushing my buttons would be greatly
appreciated.


Perhaps rethinking your button phobia is the real solution. What do
you have against a Submit button on a form that makes this method
unusable?

Jeff
Jul 19 '05 #3
Use the code below on the client to be called on the onchange event of any of the text boxes.
Create the SaveChange.asp and use it to record the data on each change.

function savedata(dblPos itionID,dblValu e) {
document.body.s tyle.cursor='wa it';
uniqueID++
var XMLHTTP = new ActiveXObject( "Microsoft.XMLH TTP" );
var URL = "SaveChange.asp ?PID=" + dblPositionID + "&VALUE=" + dblValue + "&UCALLID=" + uniqueID
XMLHTTP.open( "GET", URL, false );
XMLHTTP.send();
var result = XMLHTTP.respons eText ;
document.body.s tyle.cursor='au to';
}

--
dlbjr
Pleading sagacious indoctrination!
Jul 19 '05 #4
Bear in mind that ActiveX only works in IE, your solution could be done in Javascript

check out http://www.experts-exchange.com/Web/..._20972905.html
On Tue, 17 Aug 2004 15:44:26 -0500, "dlbjr" <oo**@iforgot.c om> wrote:
Use the code below on the client to be called on the onchange event of any of the text boxes.
Create the SaveChange.asp and use it to record the data on each change.

function savedata(dblPos itionID,dblValu e) {
document.body.s tyle.cursor='wa it';
uniqueID++
var XMLHTTP = new ActiveXObject( "Microsoft.XMLH TTP" );
var URL = "SaveChange.asp ?PID=" + dblPositionID + "&VALUE=" + dblValue + "&UCALLID=" + uniqueID
XMLHTTP.open( "GET", URL, false );
XMLHTTP.send();
var result = XMLHTTP.respons eText ;
document.body.s tyle.cursor='au to';
}


Jul 19 '05 #5
Sorry for the multiple posts, I used google groups and pressed submit
button only once. Guess I will have to stop using google posting so I
don't irritate the people that are helping me.

Thanks,

Brent Websterr
Jul 19 '05 #6

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

Similar topics

0
406
by: Brent Webster | last post by:
I have an asp page that is attached to database and I want to update the database when the window is closed. It is basically 5 text boxes wide by 8 text boxes high and these are all dynamically built by the database loading. I know exactly what textbox has what in it. I can do everything by submitting a form but I do not want a button to...
3
3041
by: Douglas Buchanan | last post by:
Buttons don't work if form is opened on startup A2k If 'frmMain' is set to open by default at startup none of the buttons work. If 'frmMain' is opened from the database window then all the buttons work. The form's name ('frmMain') is selected from in the Startup dialog box.
3
1405
by: Peter Aitken | last post by:
I am working on a VC++ program in VS.Net 2003. I am following the instructions in the help for putting a group of radio buttons on a form. 1) Put 3 radio buttons on the form. 2) Make sure they are seqential in the tab order. 3) For the first one in the tab order, set the Group property to true. 4) Right click the first one in the tab order...
1
1103
by: fasenjof | last post by:
Hi everybody! I need some help here. I have some .aspx pages in my application with some textboxes, Submit buttons, etc. All of them work perfect, but I don't know why, when I press the Enter key, I leave session and have to login again. I also have a usercontrol (.ascx) which I use in the top of all of the pages wich include 2 submit...
0
1353
by: memanwar | last post by:
Throughout our system we use the DataGrid. One problem we've noticed is that the arrow buttons don't always work with our grids, clicking on them sometimes won't move the columns at all, or may move one or two into view, but not all columns. Using the scroll bars works fine. We use a ClmnsSettings class to set the order of the columns. The...
24
19911
by: Mike Otten | last post by:
Any help greatly appreciated. The validated page is at: http://myweb.stedwards.edu/michaelo/ddtab.htm The trouble is with the radio buttons (2/3-down the left column). The radios are displaying a line above their respective labels. Here are the html and css snippets: <fieldset class="radio"> <legend>Credit card</legend>
1
1065
by: subbugannamani | last post by:
I want to retrieve the text property of the buttons in another form (for C# desktop application).For ex in Form1.cs I have four buttons I want to get the text property of that 4 buttons in Form2.cs.Please let me know if u have any suggestions.Thanks in advance.
0
1133
by: Johnny Jörgensen | last post by:
I'm doing a Visual Studio Add-In, and I had added an icon (let's say "MyIcon.ico") to the project resources to use it as icon for the Toolwindow tab. Then I decided I didn't want to use that icon anyway, so I removed it and added "MyBetterIcon.ico" instead. So far so good. When I debug run my Add-in projekt, the tab shows "MyBetterIcon"...
2
3391
beacon
by: beacon | last post by:
Hi everybody, I have a form that has a combo box that asks the user to select the program they work on. Once the user selects the program, a SQL statement populates the row source for 4 staff member combo boxes. I have an option group that has 4 option buttons for the user to indicate how many staff members to include. Once the user selects...
0
7484
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...
0
7415
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...
0
7675
Oralloy
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. ...
0
7928
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...
1
7440
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...
0
7775
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...
1
5344
isladogs
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...
0
4963
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...
0
726
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...

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.