Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

Having trouble sending a form to a window.

I'm a bit stymied on what I'm doing wrong. I have the following apparently straightforward HTML code:
<form name="editForm" method="post" action="updPurchDataEdit.jsp" target="PurchEdit">
<input type="hidden" name="purchaseId" value="168">
</form>

<div style="position: absolute; top: 110px; left: 60px; font-size: smaller; font-weight: bold"
  onmouseover="document.body.style.cursor='pointer';"
  onmouseout="document.body.style.cursor='auto';"
  onclick="location='updPurchDataEdit.jsp?purchaseId=168'"

<!--  onclick="var w = window.open('','PurchEdit','width=900,height=540,top=50');
    w.focus();
    document.editForm.submit();"-->

<img alt="" style="vertical-align: bottom" src="images/Write1a.gif"/> Edit Purchase
</div>

Open in new window

When I run this as shown, it works fine. When I run the commented code ("var w = ...) instead of the "location= ..." code, I get a blank page, no form inside. I've done this dozens of times and in fact have another such window.open in the same program that works fine. Can anyone see what might be wrong here? This used to work.
SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark
Mark

ASKER

Julian, you win the points just because!