Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 17th, 2003, 05:40 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default Refresh Button

Hi all,

How I can Refresh the page by the button ?
I am using multiple select options and combine select options
I want that I press only one button all page will (fresh) cleared

Sincere regards.

Mateen
 
Old June 17th, 2003, 06:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

If you want to clear the form use an reset button form element.
<input type="reset" value="Reset Form" />

...but the Soon is eclipsed by the Moon
 
Old June 17th, 2003, 06:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for response.
I have multiple form tag,
and multiple form tag close
ie.

<form method=post action=page.asp id=form name=form>
....
..
</form>

<form method=post action=page2.asp id=form name=form>
....
..
</form>

regards.

Mateen Martin
[email protected]





Quote:
quote:Originally posted by NotNowJohn
 If you want to clear the form use an reset button form element.
<input type="reset" value="Reset Form" />

...but the Soon is eclipsed by the Moon
 
Old June 17th, 2003, 07:50 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Use some javascript.

Code:
for(var i = 0; i < document.forms.length; i++)
{
    document.forms[i].reset();
}
regards
David Cameron
 
Old June 18th, 2003, 01:21 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear David

Thanks for your response.
where will use javascript ?
it is use between <head> tag.


I use javascript between head tag but it is not working ?
it does not refresh / clear the page .

regards.

Mateen Martin
[email protected]


Quote:
quote:Originally posted by David Cameron
 Use some javascript.

Code:
for(var i = 0; i < document.forms.length; i++)
{
    document.forms[i].reset();
}
regards
David Cameron
 
Old June 18th, 2003, 01:26 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
Default

put the code into a function, call the function as an onclick event on some button.

regards
David Cameron
 
Old June 18th, 2003, 04:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

with thanks

problem solved.

Best regards.

Mateen

Quote:
quote:Originally posted by David Cameron
 put the code into a function, call the function as an onclick event on some button.

regards
David Cameron





Similar Threads
Thread Thread Starter Forum Replies Last Post
Button to refresh a grid? scandalous ASP.NET 2.0 Basics 1 December 5th, 2007 01:21 PM
Refresh GridView Using Refresh Button msbsam ASP.NET 2.0 Professional 0 December 6th, 2006 05:57 AM
Refresh button?? Every time? (Chapter 2) phplearner BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 September 4th, 2006 09:03 AM
How to forbidden IE refresh button? Edward King Javascript How-To 3 February 9th, 2005 11:26 PM
Refresh Button and View State Sunil Sabir General .NET 3 August 16th, 2004 02:40 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.