View Full Version : Tables


benbramz
03-30-2003, 09:19 AM
Hi (1st post, yaaaay!)

I was wondering if sombody can help me with this problem. Ive been using a table to make rollover type buttons, and its been chuggin along very well on as it is, but ive found when i want to add a new page i need to updata ALL my pages...uggh!

So i decided i would use a frame to but my menu in, and i targeted the table (the links to the page) to my main page bit. But it no longer works, wen you click on the button it is just dud. The rollover works, but no page is opned. Can anyone help me with the targeting bit, im sure thats what the problem is.

Thankyou very much,

html below. Ive posted only one cell to be simple

<table border="0">
<tr>
<td align="middle" bgcolor="#FF0000"
bordercolor="#111111" height="20"
onclick="location.href='default.htm' target="main""
onmouseout="style.backgroundColor='#FF0000';"
onmouseover="style.backgroundColor='#00FF00'; style.cursor='hand'"><font
color="#FFFFFF" size="4"><strong>Home</strong></font></td>
</tr>
</table>


Thankyou very much, ben

pb&j
03-30-2003, 02:34 PM
onclick="location.href='default.htm' target="main""
you have put the target within the javascript quotes which seems to be the problem.

try this instead...
onclick="parent.main.location='default.htm';"

that tells the browser to go to the parent area (main window) then find the area called main and change its location the the following value.

javascript is a step by step, top to bottom process.

benbramz
03-30-2003, 03:34 PM
HI, thanx for that. Ive tried it out, i just copied it and replaced my onclick tag with it. But it dusnt work. Did i do wrong by pasting it over the old?


Thanx,ben

pb&j
03-30-2003, 04:13 PM
do you have a page online so we can see the problem in action?

pasting over the old code should work.

(i am not good when it comes to javascript, so my coding example may also have been "non-working".)

benbramz
03-30-2003, 04:57 PM
hi, ive just put it on. Ull be able to see what im trying to acchive, that side bar navagtion feeling. Ive tried it on one page but that was a nightmare for me, thats when i was oringinally using the old buttons, without frames.


If u cant manage to fix this little prob, can u show me a way to build all that on one page, if there is a way, lol, cos ive tried every trick in the book, well, on lea ne way!


thanx, ben

pb&j
03-31-2003, 06:09 AM
can you post the address (url) of the page in question so we may view it? thanks.

benbramz
04-01-2003, 04:46 PM
lol....cant belive i aint sent it, lol....sorry, here it is

http://users.aol.com/benbramz87

if u want the actual files, which u prob will, they are here in a zip file:

http://users.aol.com/benbramz87/zip.zip



thanx

pb&j
04-01-2003, 06:05 PM
your links seem to be targetting the area called "main". there isn't any area named that. your frames are named "left" and "right".

try changing this...
parent.main.location
to this...
parent.right.location.href

if that does not work, ask your question for this in the javascript forum area. someone much better at javascript than i should be able to help.

benbramz
04-02-2003, 03:14 PM
yep, thats done it! thanx loads for your help!

thankyou, ben