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
Solved

input text field

Posted on 2007-04-08
5
147 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
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
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 the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

856 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