A drop down list is populated with certain values from the database and when the selection is changed the post is posted back to itself and ceratin other processing takes place on the same page, based on the selected value.
I have modified the code to make a default list item selection (using option selected etc. ) when the page loads the 1st time. I also want the onChange event to fire the 1st time (by taking this default selected item) on page load, not just when user makes a selection from the list.
For some reason my global.asa file is not firing. I have it located in the root of my website (e.g., wwwrootmywebsiteglobal.asa) and I have the web site configured as an "application" in IIS. When I modified the file I also stopped and restarted the web server.
I'm workinbg in Visual Studio 2003. I'm experimenting with creating a session variable, and from all I can gather. the Session_Start event is not firing.
In Global.asx.vb, in the Session Start event, I have the following:
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs) ' Fires when the session is started Session("varTest") = "123" End Sub
First off, when I set a break point at that line, it is never reached when the application starts. Secondly, when I try to post a test alert(), to display Session("varTest"), it comes up blank (no error). Finally, if I set Session("varTest") = "123" in my asp page, then display it, it shows up, all of which leads me to believe that the global.asax file is not seen by the project, even though it was inserted automatically.
Problem with global.asa not firing 100% of the time. This error crops up several times throughout the day but if you wait a while and reload the page (could be 5 mins or an hour) it will suddenly start working again.
The error is: ADODB.Recordset error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. /footer.asp, line 101
Line 101 in the footer.asp file reads: InnovationRS.Open sql, Application("AnymousConnection")
I believe that bad code would produce a persistent error message. The application would either work, or generate an error 100% of the time, not be intermittent. The error is now appearing 3 or 4 times a day with different users reporting it, but like I said, if you wait a while and refresh the page, it is working again. Code:
My Session_OnStart works but Session_OnEnd does not work. Here's the code...can anyone tell me what's wrong with my code or if anything else on the server that needs to be changed. The Session_OnStart does create the folder for me with the SessionID as the folder name but Session_OnEnd does not delete that folder. Code:
In the code behind of my ASP.net web page I have code written that is dynamically creating a button. Here is a sample of how I define it.
//Define Variable Button btnNext;
public void someMethod() { btnNext = new Button(); button += new EventHandler(this.btnNext_Click); //then i add the control to the page, then call its click event btnNext_Click(); }
When I clickthis button on the page, the page postsback and its onclick event is never called (stepping through the code shows that it never gets reached). If I click the button a second time, the method is called and it works fine.
I have designed a form which process database Insert, edit and Delete(datagrid). I input userid,password and privilege in textboxes which has validation controls to verify data keyed in. And press the button to perform insert operation. Upto here is fine.
I want to perform edit or delete operations. I put datagrid for that one. After clicking the Update button for the row, the validation controls are firing again. I need to input some temporary data in the form fields to perform actual update operation. How can i stop firing validation controls at this stage?
I need to populate two select boxes So that on selecting value from one select box, the values in second select box will be populated. eg in first select box i m having the list of all project of which a particular user is manager or co-manager. eg: Query1 :"select Project from tab1 where manager = ('" & userid & "')"
on selecting any project from this list it should populate the second selectbox with workgroups that are associated with selected project from selectbox one. eg: Query :"Select workgroup from tab2 where projectid = "
In my form i have three combo boxes, all the values in combo box comes from database, Second combo box values will come according to the value selected in first combo box, third combo box values will come according to the value selected in second combo box, i think i have explianed it clearly.
eg:- first combo consists of brands which are in database, according to the brand selected categories(second combo box) values should come from database, according to the category selected products(third combo box) values should come from database
i have this code on my combo to make it reload the page to run the querys onchange='submit();' but i also need to set a variable like var=0 with the onchange function.
I have a list box that has a list of names, and i want when the user selects the name to bring some information from the database and put it below the drop down box. I think i need to use an onchase event but how do i get the page to refresh to show the new data, suggestions or examples woudl be great.
When a user changes the value in a select statement, I would like to update the recordset using a onchange event. Could someone please point me in the right direction? Would like to stay away from forms if possible.
I have a select box where the user select a branch and using the onchange, show up another select box in the same page, containing all the users within that branch. this sounds easy but I just can't get round to it.
I don't think this is possible, but thought I would ask. Is there a way to trigger an onChange event. I have a couple of radio buttons and use ASP to change them at somepoint. When it does I want to trigger the onChange.
I have a Dynamic drop-down box that is populated based on a ADO query. This works fine. I want to capture the users selection and assign it to a variable for use in another query.
I am using the onChange event to try and capture the users selection but it always passes the last entry in the drop-down list not what the user selects. I am very new to ASPJscriptVbscript. A snippent of the code is below.
I am working on an asp page and am having trouble with several things. First, I connect to Oracle and populate a combobox with the field values. No problem there. The next thing I want to do then using the onchange event is update 2 textboxes with the min and max (on same form) with the min and max values from the database. The form is created dynamically using vbscript. When the user changes the value in the combo box I need the text boxes to automatically update with the min/max values. Thoughts?
i got 3 text field in my program, first, second and sum. user enter in 2 number and sum will automatically displayed in sum text box. i use event onKeyPress to control user enter in number only. and onChange to auto calculate the sum of first and second. Code:
I have a drop down menu and it is populated with different subdivisions...Those subdivisions are associated with an ID. I need a drop down box that once the subdivision is selected it will change the ID in a hidden textfield. Any thoughts or ideas on how to do this?
I am trying to use the following code to call a function staffname() and nothing happens when called. What's wrong with my code? What is the proper way to call a function?
<select name="staffname" size="1" onchange="staffname()"> <option value="#"><-- Please select your name --> </option> <%while not rs_staff.eof%> <option value="<%=rs_staff("StaffID")%>"><%=rs_staff("StaffName")%></option> <% rs_staff.MoveNext wend %> </select>
<script language="vbscript"> Function staffname() alert("hello") End Function </script>
I have a form on a webpage that someone enters a number (SponsorID). After then enter that SponsorID into the form, I need to somehow query my SQL database and find the record that has the same ID as the SponsorID entered into the form and return the SponsorName (and write it out on the page using a <div> tag or something of the like) WITHOUT reloading the entire page (because I will loose the other information already input on this page).
Now, I don't necessarly have to query the database, I *could* create an Array when the page loads, using ASP, that will contain the SponsorIDs and the SponsorNames and then compare the SponsorIDs within that array with the number that was entered on the form.
I have a form with textboxes,and a select option(country)..onchange of select element,i reload the form because i hit database to get cities of country selected.. whatever info user has entered is being stored in session variables.
my problem..as the form gets submitted onchange event of select user is able to write in textboxes but this info does not get stored in session varibles(but info written in textboxes before select is used does get stored and i am able display again onload of the form). how can i tackle thisproblem.
i have a SQL Server (2005) and am attempting to populate 3 combo boxes by using SQL stored procedures.
The problem is that I cannot find out how to link the second combobox to the first using a selectedIndex method and the same with the last in relation to the second box. I can always pass from page-to-page, but that would be extremely inconvenient and time consuming for the user. Here is what I have so far: Code:
I have a page that pulls 'member' registration information from a table similar to a bulk delete with checkboxes. This works fine, it pulls all of the member info. What I want to do is have the selected records added to a new table known as courses.
Sort of a bulk registration system where I have a list of members, put in the start date, end date, course name and course number once and it populates for all of the members in the new table adding the member info with the course info. Code:
I'm having an asp page with a form with an action pointing to itself. The reason for that, it that the asp page depending on changes in any of two select fields with data from 2 different databasetables are going to populate a third select field. Code: