Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Button nested in Hyperlink

Status
Not open for further replies.

marcusw

Programmer
Jan 18, 2001
35
GB
I have an ASP.NET page and I want to insert an HTML Button inside a hyperlink. You'd think this was simple but I can't get it working....

Here's the code

<a href=&quot;ReportExport.aspx&quot; target=&quot;_blank&quot;>
<INPUT id=&quot;cmdOK&quot; type=&quot;button&quot; class=&quot;INPUT_Button_Standard&quot; value=&quot;OK&quot;></a>


Pretty straight forward but it won't work. Putting in a text value works perfectly. Any help much appreciated!

Marcus.
 
The way I would do this is:

<script language=&quot;javascript&quot;>
function popup(myfile,mywidth,myheight)
{
var my_window;
my_window = window.open (myfile,'','scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + mywidth + ',height=' + myheight);
my_window.focus();
}
</script>


<INPUT id=&quot;cmdOK&quot; type=&quot;button&quot; class=&quot;INPUT_Button_Standard&quot; value=&quot;OK&quot; onclick=&quot;javascript:popup('ReportExport.aspx',400,500)&quot;>



Hope this helps,

Jonathan
 
Thanks Jonathan,

That works perfectly!

Regards,

Marcus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top