Solved

Retain textbox value after submit

Posted on 2004-09-29
5
1,013 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12179634
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
ID: 12179685
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
ID: 12179876
Colosseo,

Thanks, that did the trick.
0
 
LVL 15

Expert Comment

by:Colosseo
ID: 12179893
no bother Malek glad to help

Cheers

Scott
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 12180442
awesome.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Can't get javascript video player button to work 10 24
Jquery 7 34
Session on Html 8 42
Echo'd values in dropdowns 6 32
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

696 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