PDA

View Full Version : Add Functionality to button


shabi
04-19-2003, 01:25 AM
Hi

I want to add functionality to button in a way that onclick, page will open in the main frame
i have used following codes but unsuccessful
<button style="background-color:lightgreen"style="width:85;height:35" onClick="window.open('Fri.html')" target="terminator2"><b>My Friends</b></button>

main frame name= terminator2

but page is not opening

anyone can tell me
thanks

pardicity3
04-19-2003, 02:49 AM
Hmm, all I can think off is that you may want to change your style declaration to look more like this:

<button style="background-color:lightgreen; width:85; height:35;" onClick="window.open('Fri.html')" target="terminator2"><b>My Friends</b></button>

I am not sure, but putting a colon at the end of the style declaration may be neccesary and thus that may be where your problem lies...I am not sure on this though :rolleyes:

shabi
04-19-2003, 10:46 PM
hi Bro
thanks for reply
but problem still same
Actually, i have three frame in main page
top frame i have four Button
my problem is that when click on button it should open page in middle
frame not in the frame where button itself i have tried a lot but not successful


button style="background-color:lightgreen"style="width:85;height:35;" onClick="window.location=('Fri.html').target=('try')"><b>My Friends</b></button>

onClick="window.location=('Fri.html').target=('try')"
problem lies in above code
and if you simply have following codes then it works but not in button
<a href="Fri.html" target="try">My FRiends</a>

Algorithm
04-19-2003, 11:12 PM
<button style="background-color:lightgreen; width:85; height:35;" onClick="parent.terminator2.location='Fri.html'"><b>My Friends</b></button>