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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

basic question about frames and forms 1

Status
Not open for further replies.

RobBroekhuis

Technical User
Oct 15, 2001
1,971
US
I've not used frames so far in my web design. Today I decided I'd like to have my web surfers vote on one of two background designs (both of which are repeating jpg's). The only way I could think of getting the backgrounds side by side in a browser window was to use frames, so that's what I did. Each frame has a document with a different background, and a button at the bottom to vote. Only problem is, when you push the button, the "action=..." page loads into the frame, instead of replacing the whole frameset. I'm looking for one of two solutions:

1) A way to have the button action replace the frameset page, not just the frame page (preferably without using script).

or

2) A way to display the two alternate backgrounds on a page without using frames (would IFRAMEs work?)

Hoping to learn some new tricks here :)


Rob
[flowerface]
 
IFrames would work or you could use CSS formatted <div>s




Chris.

Indifference will be the downfall of mankind, but who cares?
 
I tried Iframes, and they have the same problem. I'll look into the DIVs. Thanks for responding.
Is there no way to make this work smoothly using the frames approach?


Rob
[flowerface]
 
add target="_parent" to the form definition

<form name="formname" method="post" action="cheers.htm" target="_parent">

that would load the page into the browser window and replace the framset.



Chris.

Indifference will be the downfall of mankind, but who cares?
 
Chris,
Thanks on both counts! I got it to work with CSS (I'd rather avoid frames anyway) but now I know how to do it framely, too :)


Rob
[flowerface]
 
You could always have used tables of course - that would have been my preferred solution.
 
I did use a table, combined with CSS. Plain HTML has no way of displaying a background image for a table, but CSS does.


Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top