darkenedsoul
New Member
I'm tring to make an ASP:BUTTON so when its clicked it opens a link to a PDF in a frame below it.<BR>I'm also tring to get a variable from the procedure in the script tag into the ASP:BUTTON, but it says variable has not been declared. But it works from within the script tag.I guess you have other buttons on the form, otherwise you would just change the form target. If there are other buttons you will have to use some client side code to change the form target on the fly and then submit the form. You will need to do something like <BR>cmdButton.Attributes.add("onClick", "loadFrame()")<BR>in your pageload.<BR><BR>Then you will need a javascript function:<BR>function loadFrame()<BR>{<BR> parent.frames(1).document.forms("frmBottom").target = "bottomFrame";<BR> parent.frames(1).document.forms("frmBottom").action = "newPage.aspx";<BR> parent.frames(1).document.forms("frmBottom").submit;<BR>}