View Full Version : Parent: onFocus="close(child);"

04-16-2007, 02:29 AM
I can't find an answer anywhere.

I have a submit button that opens a PayPal cart window using JS:

<input type="submit" name="submit" value="Add to Cart!" onclick="window.open('','paypal','width=800,height=520,scrollbars=yes,resizable=yes,status=yes')">

How can I close this cart window when the parent is onFocus()? IE + FF

04-16-2007, 02:38 AM
Other ideas:

Is it possible to do this -

1) Click form submit button, window opens with 2 framed page
2) One frame has my code, the other frame has the URL that the form was to open.


1) Click form submit, opens page (using target="_self") with the URL that the form was to open inside an iFrame.