Jul 4, 2006 #1 Erics44 Programmer Oct 7, 2004 133 GB Hi I have a question using the code <a href="page1.asp" target="top">GoTo Page1</a> How do I make this on click of a button rather than a hyperlink? can i use <a href="page1.asp" target="_top"><Button Text="Click Here"></button></a> ? Thanks for your time
Hi I have a question using the code <a href="page1.asp" target="top">GoTo Page1</a> How do I make this on click of a button rather than a hyperlink? can i use <a href="page1.asp" target="_top"><Button Text="Click Here"></button></a> ? Thanks for your time
Jul 4, 2006 #2 vbkris Programmer Jan 20, 2003 5,994 IN .NET 2.0: <Asp:button onclientclick="top.location.href='page1.asp';".... .NET 1.0: <Asp:button onclick="top.location.href='page1.asp'".... Known is handfull, Unknown is worldfull Upvote 0 Downvote
.NET 2.0: <Asp:button onclientclick="top.location.href='page1.asp';".... .NET 1.0: <Asp:button onclick="top.location.href='page1.asp'".... Known is handfull, Unknown is worldfull
Jul 4, 2006 Thread starter #3 Erics44 Programmer Oct 7, 2004 133 GB Hi Thanks a lot for your reply I get an error saying that the top is not a member of my form. I am clicking a button the "side" frame and I want it to appear in the "top" frame. Thanks again Upvote 0 Downvote
Hi Thanks a lot for your reply I get an error saying that the top is not a member of my form. I am clicking a button the "side" frame and I want it to appear in the "top" frame. Thanks again
Jul 4, 2006 #4 vbkris Programmer Jan 20, 2003 5,994 IN try changing: top.location.href to: parent.frames['top'].location.href note: top is a reserved JS keyword, i would advise to use some other name... Known is handfull, Unknown is worldfull Upvote 0 Downvote
try changing: top.location.href to: parent.frames['top'].location.href note: top is a reserved JS keyword, i would advise to use some other name... Known is handfull, Unknown is worldfull
Jul 4, 2006 Thread starter #5 Erics44 Programmer Oct 7, 2004 133 GB still doesnt like it, says it doesnt recognise "frames" I have changed the frame name to MainFrame in all places I am able to do it using <input type="button" onclick="changePage('PageName.aspx');"> changePage function is function changePage(mainURL) { parent.Frames['MainFrame'].location.href = mainURL; } but I cannot manage to get it to work isung the asp:button no matter what I try Thanks again for your help Upvote 0 Downvote
still doesnt like it, says it doesnt recognise "frames" I have changed the frame name to MainFrame in all places I am able to do it using <input type="button" onclick="changePage('PageName.aspx');"> changePage function is function changePage(mainURL) { parent.Frames['MainFrame'].location.href = mainURL; } but I cannot manage to get it to work isung the asp:button no matter what I try Thanks again for your help
Jul 4, 2006 #6 vbkris Programmer Jan 20, 2003 5,994 IN you are using .NET 2? do a view source of the page and give me the HTML that is outputted for the button... Known is handfull, Unknown is worldfull Upvote 0 Downvote
you are using .NET 2? do a view source of the page and give me the HTML that is outputted for the button... Known is handfull, Unknown is worldfull