Solved

input text field

Posted on 2007-04-08
5
149 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 52

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

Technology Partners: 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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

728 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