This is obviously not as simple as the first 100 google results appear to be.
function startprocess()
{
var url = "process1.php";
win = window.open(url, "CSC", "width=900,height=750,status=no,resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
}
<a href="#" onclick="startprocess();"><img src="images/processcard.png" title="Start Process" /></a>
- function startprocess()
- {
- var url = "process1.php";
- win = window.open(url, "CSC", "width=900,height=750,status=no,resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
- }
- <a href="#" onclick="startprocess();"><img src="images/processcard.png" title="Start Process" /></a>
That image link fires the popup window the way I need it in Chrome and IE. But when I need to POST some variables...
function submitform(f)
{
document.forms[f].submit();
}
function resumeprocess(w)
{
var url = "resumeprocess.php";
win = window.open(url, w, "width=900,height=750,status=no,resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
}
<form name='$formname' method='post' action='resumeprocess.php' target='CSC' onsubmit="resumeprocess(this.target);"><input type='hidden' name='updatekey' value='$processid'></form><a href='#' onclick="submitform('$formname');" title='Click to Edit'>$processid</a>
- function submitform(f)
- {
- document.forms[f].submit();
- }
- function resumeprocess(w)
- {
- var url = "resumeprocess.php";
- win = window.open(url, w, "width=900,height=750,status=no,resizable=yes,scrollbars=yes,menubar=no,toolbar=no");
- }
- <form name='$formname' method='post' action='resumeprocess.php' target='CSC' onsubmit="resumeprocess(this.target);"><input type='hidden' name='updatekey' value='$processid'></form><a href='#' onclick="submitform('$formname');" title='Click to Edit'>$processid</a>
Sorry, this is the last variation I've tried with setting action, target, and url variables in the php and javascript. The above in Chrome opens a new tab instead of a popup. In IE it opens a new popup but has all the menubars like a normal window... The whole reason I need a javascript popup is because I want the content I'm displaying free from the addressbar, searchbar, etc.
It seems I can't get a form to submit in order to post variable to a popup window that has no browser menus. It's like it's not reading the properties parameter in the javascript. Additionally, the resumeprocess.php page takes the posted variables and then uses a header(location:) line to forward to process1.php. I don't know why this would be causing the window problems.
Is this a bug with POSTING to a popup window and is there a way to get a slimmed-down browser window with a form?