The code I create (actually modify) the button is something similar to:
$j(idtext, window.parent.document).html('I am a button<input type="hidden" id="imagenv" name="imagenv" value="'+imgstr+'"/>');
Now I want to automatically click on it. Ive tried .live() (I have jQuery) but it doesnt work and I think it doesnt work because the the button I want to click is not in the same document, its in the parent (as you can see the button called idtext is in the "window.parent.document").
The reason I asked if $(idtext) is a button is because a button can't have HTML content. Therefore calling $(idtext, window.parent.document).html(...) is invalid, would throw an error, and probably kill the script. riahc3, maybe you meant to use .append() instead of .html()?