Solved

input text field

Posted on 2007-04-08
5
148 Views
Last Modified: 2010-04-09
I have a input field to keep a value from the previous page like below.
<input type="text" name="d1" value="previous_page">
But what i am trying to do is to change the value of d1 and send new value to next page.

<form name="nextpage" action="nextpage.html">
<input type="text" name="d1" value="{$previous_page}">
</form>

How can i send a new value to nextpage??

0
Comment
Question by:bbvic
[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
  • 3
5 Comments
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 18874023
before the page is submitted, you can try to change its value via javascript, like this...

<script language="javascript">
    function validate(frm) {
      frm.d1.value = "{ new Value.... }";
      return true;
   }
</script>
<form name="nextpage" action="nextpage.html" onsubmit="return validate(this)">
<input type="text" name="d1" value="{$previous_page}">
</form>
0
 
LVL 8

Expert Comment

by:jawahar_prasad
ID: 18875170
Hi...
TRY THIS..

<html><head>
<script language="javascript">
   function fn_setval() {
     document.nextpage.d1.value = "<New Value>";
     document.nextpage.submit();
   }
</script>
</head>
<body>
<form name="nextpage" action="nextpage.html">
<input type="text" name="d1" value="{$previous_page}">
<input type="button" onclick="fn_setval();" value="as">
</form>
</body>
</html>
0
 
LVL 8

Expert Comment

by:radnor
ID: 18875674
Do you have PHP available?
0
 
LVL 8

Expert Comment

by:radnor
ID: 18875688
If not, you could try a cookie....
0
 
LVL 8

Accepted Solution

by:
radnor earned 500 total points
ID: 18875694
0

Featured Post

Industry Leaders: 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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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