views:

365

answers:

1

I'm pretty new to colorbox and lovin-it. I've been trying to submit a form from Colorbox iframe to parent window but haven't had any luck. Any suggestions would be greatly appreciated! Here's my code.

$('#CustomizeBuy').click(function(event){ event.preventDefault(); $(this).attr('action','customize-order.cfm'); parent.location.submit(); parent.$.fn.colorbox.close(); });

or

$('#CustomizeBuy').click(function(event){ event.preventDefault(); document.QuickOrderForm.action ="customize-order.cfm"; $('#QuickOrderForm').submit(); parent.$.fn.colorbox.close(); });

A: 

Is the iframe of the same domain as the window? ie localhost&localhost poo.com&poo.com

As far as i've experimented you cannot perform javscript on an iframe from a different domain for security reasons.

Haroldo
Yes, the iframe content is in the same domain.