Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To 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
  #1 (permalink)  
Old June 10th, 2005, 07:20 AM
Registered User
 
Join Date: Jun 2005
Location: Akron, OH, .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dmerrall Send a message via MSN to dmerrall
Default Clear Variables

When a user enters values into a search template a second time, they get the results from both the first search and the second search. How can I clear the variables after the first search has been submitted?
  #2 (permalink)  
Old June 20th, 2005, 05:25 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: Chennai, Tamil nadu, India.
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

I am not too sure whether I have understood your question or not!! Are you storing the search string to a variable? If yes just check whether you are appending to the variable each and every time.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.blogspot.com
http://vadivel.thinkingms.com
  #3 (permalink)  
Old June 20th, 2005, 08:27 AM
Registered User
 
Join Date: Jun 2005
Location: Akron, OH, .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to dmerrall Send a message via MSN to dmerrall
Default

I found code that was appending. I didn't write the original code and don't know why the original author chose to append the code. Once I corrected that, I was fine.

Original Code:

if (document.findform.pagesr.value!="Section"){
     if (document.findform.cites.value!="")
     {
      document.findform.cites.value="+"
     }

Corrected code:
if (document.findform.pagesr.value!="Section"){
     //if (document.findform.cites.value!="")
     {
      document.findform.cites.value="" //+
     }


Similar Threads
Thread Thread Starter Forum Replies Last Post
clear variables contents - Please URGENT!! hugoscp Classic ASP Basics 3 November 29th, 2008 07:21 PM
How to clear history toshi Javascript 0 August 17th, 2006 06:07 AM
Clear the Clipboard vb certified VB.NET 0 July 11th, 2006 07:31 PM
clear array darkhalf Javascript 2 October 30th, 2005 06:50 AM
make me clear please bhola Forum and Wrox.com Feedback 0 July 12th, 2005 09:45 PM





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