473,666 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How does one get the answer to clear when user refreshes page?

tpgames
785 Contributor
Here is the code for 1 question and answer, and the play again code. When I use a play again code, the answers do not erase.
What code am I missing? Thanks!

[HTML]<tr><td class="line1" colspan="4">
<br>
<tr><td class="question " colspan="4">
<!--QUESTION20-->

<b> 20) Which picture shows Jessie <br>
carrying a Living Stone? </b>
<td><div id="Incorrect20 "></div>

<!--ANSWERS20-->
<tr>
<td class="answers" >
A)
<img src="http://i107.photobucke t.com/albums/m287/tpkyteroo/blue/exam/3.jpg" width="150" height="150" alt="">
<br>
<input type="checkbox" name="" id="Q20A">
<label for="Q20A"> * ANSWER * </label>

<td class="answers" >
B)
<img src="http://i107.photobucke t.com/albums/m287/tpkyteroo/blue/exam/26.jpg" width="150" height="150" alt="">
<br>
<input type="checkbox" name="A20" id="Q20B">
<label for="Q20B"> * ANSWER * </label>

<td class="answers" >
C)
<img src="http://i107.photobucke t.com/albums/m287/tpkyteroo/blue/exam/27.jpg" width="150" height="150" alt="">
<br>
<input type="checkbox" name="" id="Q20C">
<label for="Q20C"> * ANSWER * </label>

<td class="answers" >
D)
<img src="http://i107.photobucke t.com/albums/m287/tpkyteroo/blue/exam/37.jpg" width="150" height="150" alt="">
<br>
<input type="checkbox" name="" id="Q20D">
<label for="Q20D"> * ANSWER * </label>

<form method="GET" action="refresh button.htm">
<p><input type="button" onclick="refres h()" value="Play Again!!!"
name="button1"> </p>
</form>


[/HTML]

I did find a silly work around, but forcing user to navigate off page and then back to the page is a bit much.
If you need the page link, its at http://www.tpgames.net/gaming/2/exam/math/1/mycode.html
(I have issues getting links right using ff, so skiped it this time.)
Thanks again!
Jan 31 '07 #1
4 1724
acoder
16,027 Recognized Expert Moderator MVP
Just use a reset button.
Jan 31 '07 #2
tpgames
785 Contributor
Whats the difference in code between a refresh button and a reset button?
How does the reset button reset all the answers to all 20 questions?
Thanks!
Jan 31 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
A reset button is an automatic feature easily included with any form by adding the following line:
[HTML]<input type="reset" ...etc..[/HTML]
The beauty is that the effect is instant. It resets everything on the form to its state when the page loaded.
Jan 31 '07 #4
tpgames
785 Contributor
Never mind! I figured out my questions. :>) I got it to work. Thanks for your info!
Jan 31 '07 #5

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

Similar topics

3
1621
by: netgroover | last post by:
I am currently designing a webpage, and the left fram has a is a 6-cell table that is being used as a navigation tool. The table currently uses Javascript to visually keep track of the current choice and open the specified target fram to the right. My problem occurs when a user has a page open and hits the refresh button. The page refreshes, but the menu bar on left resets to "Home", the default value on loading. Is there anyway so that the page...
1
3246
by: jcwmtl | last post by:
Hello all I'm building a suite of free php applications to create virtual worlds. My problem is i can't get my file to refresh. Can this be done with javascript? I would like to have the display and the form be on a single page..unless this can be done with frames. The sample application contains 2 files: a)The php file (with input controls and the embedded world) b)The embedded world (text file)
3
7186
by: JezB | last post by:
I want to clear some specific Session variables when the user closes a page. On my page I have a "return to ..." button which navigates back to the parent page from which it was invoked - under the click event of this button I clear my Session variables. However, how can I capture the fact that the page has been finished with, to clear my session variables, if the user (a) navigates away from the page directly by entering a URL, (b)...
7
5724
by: moondaddy | last post by:
I'm building a page in vb.net with several user controls on it. I'm using user controls instead of a frames page since I've seen this recommended many times in this user group. I want just one of the user controls to do a postback but not the rest of the page. Is this possible? it seems like it should be. If it is, please explain how I can do it. Thanks. -- moondaddy@nospam.com
1
1184
by: Mudasir Ahmed | last post by:
Guys : I have written a web page which basically has text box and a list box server controls on it. each time the user enters a value in the text box it will put it in the list box. the problem is. since the website has to go through the intranet security it asks for a userid and password every time the page refreshes. How can i persist the user cerdentials or in other words avoid the security popup box each time the the page refreshes.
5
12985
by: Dave | last post by:
Hi, I have an asp.net page with a form. When the submit button is clicked it sends an email. When the page reloads the form fields are still filled with the info that just got submitted. I tried <%@ Page EnableViewState="false" %>
6
8792
by: jojoba | last post by:
hi everyone! i'm serving up an asp.net page using ajax futures. long story short: i have two update panels. one has a webpage in it (e.g. www.google.com). the other has an image inside of a div. however, when i update the div in code behind ( via UpdatePanel_div.Update() ), the entire page refreshes. if i change the div to an iframe, then the entire page does not
10
3456
by: paulie | last post by:
Hi, I have been experiencing an issue when trying to use AJAX to reload a DIV area using a timer of 2000ms, which contains a html page with another DIV and javascript. Scenario ------------- I have perl script which simply runs a ps on a Solaris server and generates a static html page with all of the code perfectly and this html page works fine when viewing it statically or with a META REFRESH header tag. The idea is to give the user...
0
1003
by: Don | last post by:
I have a page with a GridView that uses an ObjectDataSource. The user can change some parameters on the page and refresh the GridView with a button click. One of the parameters has a CustomValidator that uses server side logic to determine if the value is valid. When the value is invalid my validator displays but the GridView still refreshes. I think this is because a GridView bound to an ObjectDataSource always refreshes when any...
0
8356
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8550
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8639
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7385
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6192
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4366
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1772
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.