Solved

Retain textbox value after submit

Posted on 2004-09-29
5
1,004 Views
Last Modified: 2008-03-10
I'm sure this is simple, but eludes me.

I have one text box. After I submit the page -
document.demo.method="get";
document.demo.submit();

I wish to retain the value in the textbox after the page is submitted. The page is an asp page and is submitted to iteslef.

TQ
0
Comment
Question by:Malek103197
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:cLFlaVA
Comment Utility
This can be done best using ASP, not JavaScript.

I don't know ASP, but it would look something like this:

<input type="text" name="the_textbox" value="<% however_you_reference_the.get_variable %>">
0
 
LVL 15

Accepted Solution

by:
Colosseo earned 125 total points
Comment Utility
Hi

Because you are submitting the form using get you need to use request.querystring

so the value property for your text field would be

value="<%=Request.QueryString("[the textfield name]")%>"

HTH

Scott
0
 

Author Comment

by:Malek103197
Comment Utility
Colosseo,

Thanks, that did the trick.
0
 
LVL 15

Expert Comment

by:Colosseo
Comment Utility
no bother Malek glad to help

Cheers

Scott
0
 
LVL 13

Expert Comment

by:cLFlaVA
Comment Utility
awesome.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article discusses how to create an extensible mechanism for linked drop downs.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now