Click to See Complete Forum and Search --> : Frames, Buttons, & Target Frame
mrsurethinng
03-04-2007, 03:20 PM
I use frames on my sites and I'm trying to get 'buttons' to be used like hyperlinks I've used in the past to display new pages in my "Main"page. This way can keep my header and subject panes without having to update those as well or duplicate the code else where. I have the code working sort of, meaning that when the button is pressed, I do get another link to show up but it's not moving to my target frame. The code I'm using is:
<INPUT TYPE="button" VALUE=" EVENTS " ONCLICK="location.href='Events.html'" target="main">
www.Eldorado-Mi.com shows the site I just finished and the result I want, however it does not use 'buttons' rather standard hlinks. I've posted my test page at www.speednetllc.com/funsch if you wish to compare. Any help on this would be appreciated.
ryanbutler
03-04-2007, 05:29 PM
An input tag (button) doesn't support a target attribute which is needed to target the main frame.
missyB
03-04-2007, 06:10 PM
You should use an image for the link instead of form buttons, if it is just the "look" you are going for.
mrsurethinng
03-04-2007, 07:11 PM
That's kinda what I thought but didn't know and since the submit button is so handy I thought I would try. Thanks for the reply(s).
Major Payne
03-14-2007, 12:12 AM
Might take a look at this one using a submit button as a link: Link Button (http://www.htmlgoodies.com/tutorials/buttons/article.php/3478871)
Not sure if this is useable in frames without modification. Another good read: Scripting - Submitting Forms (http://tom.me.uk/scripting/submit.html)
This one also covers using a Submit Button as a link.
Ron
Major Payne
03-15-2007, 04:46 PM
Didn't get back soon enough to edit post. Found this info dealing with a submit button and using frame pages:
http://pbdj.sys-con.com/read/42629.htm
Example from page:
<input type="button" name="Save" value="Submit"
onClick="parent.frames[1].location.href='daytime.htm';
parent.frames[2].location.href='plannertop.asp?date='+T1.value+
'&units='+T2.value;
parent.frames[3].location.href='plannermid.asp?events='+
parent.frames[0].open_planner();
parent.frames[4].location.href='planner.asp?date='+T1.value+
'&units='+T2.value+'&events='+parent.frames[0].open_planner();
return true;" >
Not sure if this is what you need.
Ron
mrsurethinng
03-17-2007, 11:38 AM
found an easier way.
<a href="events.html" target="main"><img border="0" src="gadgets/eventscool.png" onMouseOver='src="gadgets/eventssel.png"' onMouseOut=src="gadgets/eventscool.png" >
you guessed it. It's just a img link using a mouseover command to chng the img on file. I'm just learning the HTML thing buy trial & error self learning, so I don't know all the "give me's" from a class on it. It seems pretty easy so far though. I set up a web site for my daughters child care that she goes to and everyone is pretty happy with the looks. Thanks for the replies. I'll be back for help again some time I'm sure.
check it out at: www.lollipopschildcare.com
thanks again.
Major Payne
03-18-2007, 04:22 AM
That's a big difference from your original post. Could have given you the mouseover info to use with an image earlier. At least you're happy with it and it does what you want.
Cheers...
Ron