PDA

View Full Version : trying to make a button change frame in different file using CSS...maybe syntax prob


Sona
07-28-2003, 05:36 AM
hi, thank u for taking the time to help first of all...

my situation...

i am using internal CSS and nested frames for appearance and im having trouble with two things...

first, the important one... i would like to click on button at the bottom of a page and have "main" frame change...
the syntax im currently attempting to sort is

onclick="window.parent.frames[3].src='whatever.html'

im not getting an error i can see but im also not seeing anything change...

here is the location of the site in question http://www.rpi.edu/~ahujas/newpage

my other problem you can see when you view what i have...the middle left and right pieces dont seem to fit the puzzle. ive tried everything i can think of but no luck.

hopefully someone can help me! thank you so much!!

oracleguy
07-28-2003, 06:02 AM
As far as the links go, just do this:

<a href="page.htm" target=" content" border="0"><img (button image info) ></a>

instead of using the onclick event.

As far as the peices not coming together, might I suggest you lose the frames and just put an iframe (http://hotwired.lycos.com/webmonkey/96/37/index2a.html?tw=authoring) where you want the content, and position the other items with CSS or tables.

DougBTX
07-28-2003, 11:34 AM
No need for frames: Just use overflow: auto (http://www.w3schools.com/css/pr_pos_overflow.asp)

Then have normal links, and a layout something like this:

<body>
<h1>Sona Ahuja</h1>
<div><p>Content</p></div>
<ul>
<li><a href="#"><span>Menu Item</span></a></li>
<li><a href="#"><span>Menu Item Two</span></a></li>
etc...
</ul>
</body>

That should be all the HTML you need. Everything else can be put in your style sheet.

h1 { visibility: hidden; }
body { background: url{thebigimagething.gif} no-repeat #ccc; margin: 0; padding: 0;}
div { position: absolute;
top: ??px; left: ??px;
width: ??px; height: ??px;
overflow: auto}

Then similar code for the menu items. (li span { display: none;} li a { display: block; height: 100%; width: 100%; background: url(??.gif);}) and something to get rid of the bullets (ul {list-style: none}).

Later,
Douglas

Sona
08-04-2003, 05:01 AM
hey guys! sorry i havent replied! i have been out of town so i read what u wrote but havent gotten a chance to try it out yet.

wanted to thank you for ur time though! i really appreciate it. ill post later this week after i try out the suggestions letting you know how it goes in case ur interested.

thank you again and so sorry for the delay

Sona
08-20-2003, 07:31 AM
thanks for ur help guys!! iframes have worked wonders for me!!!