
Originally Posted by
mcpalmer
document.getElementById("pictitle").value=delineate(text);
If the content of a division (the <div> tag) is what you want to influence, try:
Code:
document.getElementById('pictitle').innerHTML=delineate(text);
A note: I am in the process of updating my sending and receiving code for passing a variable from one page to another. It will appear somewhere in these forums when I get it to my satisfaction. The use of a form is no longer required unless form data on the receiving page is desired. The working form of my code as it is now:
On the sending page (in the simplest situations):
Code:
<a href="some.htm?var1=someinfo">Link Text or Image Tag</a>
On the receiving page (also for the simplest situations):
Code:
<script type="text/javascript">
var text = unescape(window.location.href);
function delineate(str) {
theleft = str.indexOf("=") + 1;
theright = str.indexOf("&");
return(str.substring(theleft, str.length));
}
var sentInfo=delineate(text)
//In this space you can do what you wish with the sent
//information now contained in the variable: sentInfo
</script>
By the simplest situations I mean ones where you control what is being sent and can be sure (by testing) that no special characters that would result in errors or garbage being received are sent. Spaces may be sent as %20.
Bookmarks