Computer Science Canada

transfer information

Author:  pavol [ Fri Nov 11, 2005 2:36 pm ]
Post subject:  transfer information

is there any way to take inputted information from a text field from one page and display it, or let another page use the information?

Author:  Tony [ Fri Nov 11, 2005 2:40 pm ]
Post subject: 

you would usually have some scripting language such as PHP or Ruby handing the information submitted through the form.

Author:  rdrake [ Fri Nov 11, 2005 4:56 pm ]
Post subject: 

This will allow you to change the text of one element based on the text from another.

code:
<html>
<head>
<title>Test</title>
</head>

<body>
<script language="javascript" type="text/javascript">
function update() {
    document.getElementById("2nd").value = document.getElementById("1st").value;
}
</script>

<input type="text" id="1st">
<input type="text" id="2nd">
<button onclick="update();">Change</button>
</body>
</html>
But like Tony said, you'll need something like PHP or Ruby in order to view the text on another page.

Author:  md [ Fri Nov 11, 2005 10:04 pm ]
Post subject: 

Actually if you really want to do anything useful you need php or ruby AND some other back end database to store the text in. Writing directly to files *does* work, but it's slow and is highly prone to race conditions.


: