Ok, I run a directory site and it has a lot of links, and I'm trying to set up a way for users to notify me if they find a dead link in my directory. Below I've provided some sample code of how my pages are set up now...
'## Start: Page
<head>
<SCRIPT language="JavaScript"><!--
function popDeadLink(linkID){
var linkform = 'Link' + linkID;
settings='width=300,height=60';
var n = window.open('about:blank','DeadLink',settings);
document.forms[linkform].submit;
return true;
}
//-->
</SCRIPT>
</head>
<body>
<p><a href="#" onclick="javascriptopDeadLink(5);">Report dead link</a></p>
<form name="Link5" action=" method="Post" target="DeadLink">
</form>
<p><a href="#" onclick="javascriptopDeadLink(10);">Report dead link</a></p>
<form name="Link10" action=" method="Post" target="DeadLink">
</form>
</body>
'## End: Page
With that code, it opens up the window, but it doesn't post the form to it. I think the line that reads, "document.forms[linkform].submit;" is the problem. If anybody could help me out it would be greatly appreciated. Oh, and I need it to Post; Get will not work for what I am doing.
Thanks,
-- kisk
'## Start: Page
<head>
<SCRIPT language="JavaScript"><!--
function popDeadLink(linkID){
var linkform = 'Link' + linkID;
settings='width=300,height=60';
var n = window.open('about:blank','DeadLink',settings);
document.forms[linkform].submit;
return true;
}
//-->
</SCRIPT>
</head>
<body>
<p><a href="#" onclick="javascriptopDeadLink(5);">Report dead link</a></p>
<form name="Link5" action=" method="Post" target="DeadLink">
</form>
<p><a href="#" onclick="javascriptopDeadLink(10);">Report dead link</a></p>
<form name="Link10" action=" method="Post" target="DeadLink">
</form>
</body>
'## End: Page
With that code, it opens up the window, but it doesn't post the form to it. I think the line that reads, "document.forms[linkform].submit;" is the problem. If anybody could help me out it would be greatly appreciated. Oh, and I need it to Post; Get will not work for what I am doing.
Thanks,
-- kisk