Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Retain textbox value after submit

Posted on 2004-09-29
5
Medium Priority
?
1,022 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 500 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
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…

610 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