473,499 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fire event to load page after field updated

63 New Member
I have set up an ASP web page which connects to an Access database using VBA. After the user clicks submit, the Access database is updated. I need to be able to update the page before the user clicks submit. When the user updates the product group field, the dropdown list on the product group detail field must be updated to reflect the new product group. I don’t believe I can set up an event to fire after a field is updated with VBA. Is there an after_update event which fires and can it be used with Javascript to submit the form behind the scene? If this is possible, I will use the VBA to re-load the dropdown and reload the page each time the user changes the product group field. Hopefully this will be transparent to the user. Does anyone know if this is possible?
Aug 13 '08 #1
5 2514
RamananKalirajan
608 Contributor
Hi, I dont have any Knowledge on ASP. But the I can aswer the question you asked. You want to know wether form submit can be done by any other event not by onSubmit. You can do that but if you do so the page will move to the next action url. The only answer for ur question, after changing a drod down u want to hit that to the database and load some other drop down in the same page can be done through the Ajax. But submitting the form through other events will surely navigate the page. It will not be the solution for ur peoblem. Ajax may be a solution as for as I know. Any doubts post back it.


Regards
Ramanan Kalirajan
Aug 13 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
Yes, use Ajax to avoid a page reload. Use the onchange event to call a function to make an Ajax request. The response from the server can be parsed for use in populating the drop-down at the client-side. See this simple example.
Aug 13 '08 #3
rmurgia
63 New Member
Hi, I dont have any Knowledge on ASP. But the I can aswer the question you asked. You want to know wether form submit can be done by any other event not by onSubmit. You can do that but if you do so the page will move to the next action url. The only answer for ur question, after changing a drod down u want to hit that to the database and load some other drop down in the same page can be done through the Ajax. But submitting the form through other events will surely navigate the page. It will not be the solution for ur peoblem. Ajax may be a solution as for as I know. Any doubts post back it.


Regards
Ramanan Kalirajan
Thank you for the reply. I was able to set up an onChange event for the field in question. Is it possible from within Javascript to simulate the submit command?

Regards
Aug 13 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
Yes it is (with the form submit() method), but then that would submit the page. Did you not want to avoid that?
Aug 14 '08 #5
RamananKalirajan
608 Contributor
Thank you for the reply. I was able to set up an onChange event for the field in question. Is it possible from within Javascript to simulate the submit command?

Regards
[HTML]function next()
{
var x=document.getElementById('myform'); // Id of the Form
x.action="NewDemo.html";
x.submit();
}[/HTML]

This is the way u can do. i.e. submitting a form using javascript.

Regards
Ramanan Kalirajan
Aug 18 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
6780
by: Carlo Marchesoni | last post by:
From an aspx page (A.aspx) I open another one (B.aspx - for table lookup). When the user selects an entry in B.aspx I would like to force a button's event in A.aspx to be fired. I guess the only...
2
1957
by: TPS | last post by:
I have some dynamic controls (LinkButton) that I am adding to my pages. When the link button is clicked, I am getting an ID from the LinkButton.CommandArguement value. I am then using that ID...
7
2423
by: Gordon Smith | last post by:
I have four (4) ASP.NET Web applications/Web sites on a IIS/6 - Windows Server 2003 production server. 3 of them work fine. I just installed the 4th one and it's Application_Start event is not...
6
3349
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
6
2186
by: Shimon Sim | last post by:
I have Panel control on the page. I am handling Init event for it. It doesn't seem to fire at all. Why? Thank you Shimon.
4
1260
by: Lars Netzel | last post by:
Is there any way to add some code that will happen in every single Event that i raised in a form? I have a Total field in the bottom of a pretty complex page and I think it's kind of "Dirty" to...
2
3897
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
2
3001
by: HammRadio | last post by:
I am exploring converting my web app (current Framework 1.1) to Framework 2.0. Everything went smoothly save for one item. To reduce the trips to the database, when loading user controls (like a...
2
2718
by: Michal Valent | last post by:
I would like to fire some custom server control event before Page_Load event like this (from the trace of an aspx page) : Trace Information Category Message From First(s) From Last(s) aspx.page...
0
7007
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...
0
7174
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,...
1
6894
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...
0
7388
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...
0
5470
agi2029
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,...
0
4600
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...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
297
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...

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.