ok i have page1 and i have another page called "index.html" in the index.html page i have a textbox called "AuthorName". how do i fill it from another page?
i tryed somthing like this but it doesn't work.
Code:index.html?AuthorName=blahblah
Printable View
ok i have page1 and i have another page called "index.html" in the index.html page i have a textbox called "AuthorName". how do i fill it from another page?
i tryed somthing like this but it doesn't work.
Code:index.html?AuthorName=blahblah
For html just set the value like the example below.
index.html?AuthorName.value="blah blah blah"
i think you are in need of some serverside lang.
then tryPHP Code:<?php $fillText = $_Get['AuthorName']; ?>
<html>
<head>
<title>TEST PAGE</title>
</head>
<body>
<p><input type="text" name="textbox" size="54" value="<?php echo $fillText; ?>"></p>
</body>
</html>
Code:http://yoursite.tld/path/test.html?AuthorName=blahblah
Or read the values using javascript,
Call qs(), then access it by using qs['authorname'];PHP Code:var qsParm = new Array();
function qs() {
var query = window.location.search.substring(1);
var parms = query.split('&');
for (var i=0; i<parms.length; i++) {
var pos = parms[i].indexOf('=');
if (pos > 0) {
var key = parms[i].substring(0,pos);
var val = parms[i].substring(pos+1);
qsParm[key] = val;
}
}
}