472,363 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

How do you detect when a page has only been refreshed?

I'm trying to write an ASP interface that mimiks a .Net datagrid control.
I'm having a problem when I'm in the middle of an Edit, Update, or a New
Record. If the user hits the wrong button, the program grabs the values in
the textboxes using the request.form() and then redisplays them in the
textboxes when the records table gets written back out to the page. This
works fine as long as the form is submitted. If it's just a page refresh
(F5), the program doesn't get the latest changes to the textboxes and
displays either a blank or whatever was in there the last time the form was
submitted. Anybody got any ideas?

Jim
Feb 4 '07 #1
1 4214
Gazing into my crystal ball I observed "JimO"
<jo***********@XXXearthlink.netwriting in
news:yL*******************@newsread1.news.pas.eart hlink.net:
I'm trying to write an ASP interface that mimiks a .Net datagrid
control. I'm having a problem when I'm in the middle of an Edit,
Update, or a New Record. If the user hits the wrong button, the
program grabs the values in the textboxes using the request.form() and
then redisplays them in the textboxes when the records table gets
written back out to the page. This works fine as long as the form is
submitted. If it's just a page refresh (F5), the program doesn't get
the latest changes to the textboxes and displays either a blank or
whatever was in there the last time the form was submitted. Anybody
got any ideas?

Jim
dim defaultvalues, defarr, iscompleted, required, name

defaultvalues = "Your name, your address, yo*@example.com"
defarr = split(defvaultvalues,", ")
if request.servervariables("request_method") = "POST" then
if request.form("name") = "Your name" then
required = "name"
end if
if required <"" then
'do not complete processing
else
'complete processing
iscompleted = true
name = defarr(0)
end if
else
name = defarr(0)
end if

%>
<form method="post" action="<%=request.servervariables
("script_name")%>">
<label for="name" id="name1">Name </label<input type="text"
name="name" id="name" value="<%=name%>" onfocus="if(this.value == '<%
=name%>') this.value = '';"><br>
.....
<input type="submit" value="Submit">
</form>
--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

Feb 5 '07 #2

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

Similar topics

23
by: David McCulloch | last post by:
QUESTION-1: How can I detect if Norton Internet Security is blocking pop-ups? QUESTION-2a: How could I know if a particular JavaScript function has been declared? QUESTION-2b: How could I...
1
by: Matt | last post by:
When the page is refresh, it will first call window_unload() and then call window_load(). The problem is I window_unload() is invoked when the user click close button, or right top icon close...
0
by: Alfons Puig | last post by:
I have a container page with 3 frames (Header, left frame and right frame) In the right frame I load an aspx page having a boounded datagrid with some column templates having a DopDownList in the...
1
by: abdul bari | last post by:
Hi I have a standard html form which is generated by an XSL sheet. The form data is submitted to the server and is passed on to file.aspx for processing. However file.aspx is refreshed every 5...
6
by: hb | last post by:
Hi, Would you please tell me how to detect if the client's browser is closed? I need such event to trigger a database modification. Thank you hb
5
by: J-T | last post by:
Is there a way to detect if a user has refreshed a page in asp.net? Thanks a lot
0
by: SIXFACESANKAR | last post by:
Hi, In my application, once the user logs in code is written in session_onstart to update / insert the user status . Also there is code written in session_onend to update the user status again....
3
by: Mythilisg | last post by:
hi, i'm working in asp.net with c#. i hav one dropdownlist with some options which is similar to Security Questions in yahoo mail. I hav one option called "If Others". When the user selects this...
1
by: jim bradshaw | last post by:
I have an asp.net page that calls itself recursively if the user selects certain actions on form buttons. The page will be changed in various ways according to the action called for by the user....
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
1
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
0
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...

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.