var frame = document.getElementById("frameId");
frame.contentWindow.$("form:first").trigger("submi t");