/    Sign up×
Community /Pin to ProfileBookmark

Frames, Buttons, & Target Frame

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”>

[url]www.Eldorado-Mi.com[/url] 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 [url]www.speednetllc.com/funsch[/url] if you wish to compare. Any help on this would be appreciated.

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerMar 04.2007 — An input tag (button) doesn't support a target attribute which is needed to target the main frame.
Copy linkTweet thisAlerts:
@missyBMar 04.2007 — You should use an image for the link instead of form buttons, if it is just the "look" you are going for.
Copy linkTweet thisAlerts:
@mrsurethinngauthorMar 05.2007 — 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).
Copy linkTweet thisAlerts:
@Major_PayneMar 14.2007 — Might take a look at this one using a submit button as a link: Link Button

Not sure if this is useable in frames without modification. Another good read: Scripting - Submitting Forms

This one also covers using a Submit Button as a link.

Ron
Copy linkTweet thisAlerts:
@Major_PayneMar 15.2007 — 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;" >[/QUOTE]


Not sure if this is what you need.

Ron
Copy linkTweet thisAlerts:
@mrsurethinngauthorMar 17.2007 — 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.
Copy linkTweet thisAlerts:
@Major_PayneMar 18.2007 — 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
×

Success!

Help @mrsurethinng spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...