Pass Image To Second Page

[Total: 0    Average: 0/5]

This shows how to have a form submit data to another html page that uses javascript to obtain the parmater.

Body Code:

// this supresses any javascript errors.
onerror=function(){return true;} 
Specify the action of the form to be this page.
<form name=exf1 action="" method=GET>
<input type=text name=pic value="">
<input type=submit>

This code could be on the second page that is the action of the above form.<BR>
_src = unescape(document.location.toString().split("?")[1].split("=")[1]);
document.write("Image = "+_src+"<BR>");
document.write("<img src='"+_src+"' border=1>");

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *