473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Re-load Page Programmatically from VBScript

63
I set up a page which allows the user to add data to a table. I would like to then re-load the page to display all of the data in a list including the data the user entered. I currently have fields which are able to re-load the page by using the OnChange event and firing the following java script:

function OnChangeField()
{
document.frmKPIActMaintReg_01.submit();
}

Is there a way to programmatically accomplish this from within vbscript so that after the user enters the data and I insert it in the table, I somehow from within vbScript fire the submit() event
Nov 19 '08 #1
6 4129
jhardman
3,406 Expert 2GB
You can't actually fire a submit from asp, the closest thing is put a onload=submit in using asp, or redirect including form data in a querystring. Do you need help doing either of those things?

Jared
Nov 20 '08 #2
rmurgia
63
You can't actually fire a submit from asp, the closest thing is put a onload=submit in using asp, or redirect including form data in a querystring. Do you need help doing either of those things?

Jared
Yes. Could you post a sample code.

Thanks,
Ralph
Nov 21 '08 #3
jhardman
3,406 Expert 2GB
Yes. Could you post a sample code.

Thanks,
Ralph
Ralph,

Sure, let me get a better idea of what you're doing. You enter one row of data, after each input is added a submit() is called form javascript which posts this data to a formhandler which updates the database. Am I right so far?

Then you want the form handler to re-display all of the data that has been entered? Is this right?

Jared
Nov 21 '08 #4
rmurgia
63
Yes that's it. In vbscript I do the following:
<%
Insert new record into table ....

Select * from table for all records in same time period and location and display on screen ....

I think before I do the select, I have to execute some type of Javascript which clears the screen.
Nov 25 '08 #5
jhardman
3,406 Expert 2GB
@rmurgia
I don't think anything related to clearing the screen is necessary, everyt ime you submit the form, the page will need to be reloaded. I would just do this all on one page, no need to redirect or clear the screen. At the top of the page, check to see if the user has added new data. If he has, go ahead and save that to the db. Then query the db and build the table of data that needs to be displayed. As long as you save any recently added data first, it will be included in the table that is generated, probably at the bottom (depending on what kind of sorting you use). Finally, add the form that allows the user to enter new data. I think this accomplishes everything you are looking for.

Jared
Nov 26 '08 #6
rmurgia
63
Jared,

I re-wrote the program as per your suggestion and everything is now working.

Thanks for the help,
Ralph
Nov 28 '08 #7

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

Similar topics

1
by: Nel | last post by:
I have a question related to the "security" issues posed by Globals ON. It is good programming technique IMO to initialise variables, even if it's just $foo = 0; $bar = ""; Surely it would...
4
by: Craig Bailey | last post by:
Anyone recommend a good script editor for Mac OS X? Just finished a 4-day PHP class in front of a Windows machine, and liked the editor we used. Don't recall the name, but it gave line numbers as...
1
by: Chris | last post by:
Sorry to post so much code all at once but I'm banging my head against the wall trying to get this to work! Does anyone have any idea where I'm going wrong? Thanks in advance and sorry again...
4
by: Alan Walkington | last post by:
Folks: How can I get an /exec'ed/ process to run in the background on an XP box? I have a monitor-like process which I am starting as 'exec("something.exe");' and, of course the exec function...
1
by: John Ryan | last post by:
What PHP code would I use to check if submitted sites to my directory actually exist?? I want to use something that can return the server code to me, ie HTTP 300 OK, or whatever. Can I do this with...
10
by: James | last post by:
What is the best method for creating a Web Page that uses both PHP and HTML ? <HTML> BLA BLA BLA BLA BLA
8
by: Beowulf | last post by:
Hi Guru's, I have a query regarding using PHP to maintain a user profiles list. I want to be able to have a form where users can fill in their profile info (Name, hobbies etc) and attach an...
8
by: Lothar Scholz | last post by:
Because PHP5 does not include the mysql extension any more is there a chance that we will see more Providers offering webspace with Firebird or Postgres Databases ? What is your opinion ? I must...
1
by: joost | last post by:
Hello, I'm kind of new to mySQL but more used to Sybase/PHP What is illegal about this query or can i not use combined query's in mySQL? DELETE FROM manufacturers WHERE manufacturers_id ...
2
by: sky2070 | last post by:
i have two file with jobapp.html calling jobapp_action.php <HTML> <!-- jobapp.html --> <BODY> <H1>Phop's Bicycles Job Application</H1> <P>Are you looking for an exciting career in the world of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.