I have a onclick event which is designed to launch a javascript function getDeadlineInfo
function getDeadlineInfo(string) //string holds name of deadline
{
document.location.href='deadlineInfo.htm';
}
It is meant to open a new page "deadlineInfo.htm". I need that new page to display content from the server which I have my own function for:
function contactServer(str)
{
...additional code here
xmlhttp.open("GET","serverScript.php?q="+str,true);
xmlhttp.send();
}
The problem is I have no idea how to send the string variable which is passed into getDeadlineInfo to str which is used to look up the sql database. I have been googling around and most methods I've seen include using something along the lines of
http://www.tek-tips.com/faqs.cfm?fid=5442, which doesn't work for me if I append the format like document.location.href="deadlineInfo.htm?name="+string;
Thanks for any help!