cell change

S

selena

I am reallynew to front page and basically teaching myself from the
internet.

I want to create a page that uses tables rather than a frame this is
because I want the table to always open up in the middle of the
browser and not on the left hand side of the screen.

i have buttons in a cell on the left hand side of the table. I want to
be able to click on a button and only the cell on the right hand side
of the table to change, not the whole page.

Does anyone know how to do this?
 
T

Trevor Lawrence

I am reallynew to front page and basically teaching myself from the
internet.

I want to create a page that uses tables rather than a frame this is
because I want the table to always open up in the middle of the
browser and not on the left hand side of the screen.

i have buttons in a cell on the left hand side of the table. I want to
be able to click on a button and only the cell on the right hand side
of the table to change, not the whole page.

Does anyone know how to do this?

My guess is that you would need to use JavaScript to alter the value in the
particular cell. I would have to think about exactly how to write the code.
(I will if you are interested.)

But you may not want to dive into writing JavaScript yet
 
A

Andrew Murray

Trevor Lawrence said:
My guess is that you would need to use JavaScript to alter the value in
the particular cell. I would have to think about exactly how to write the
code. (I will if you are interested.)

But you may not want to dive into writing JavaScript yet
--
Trevor Lawrence
Canberra
Microsoft MVP - FrontPage
MVP Web Site http://trevorl.mvps.org

I don't know if it can be done. The easiest way is to link to individual
pages in the same layout style and have the content in the right hand cell
and the menu in the left - but essentially each is a separate page. I don't
know (and have never heard of) the "target frame" idea being applied to
tables/cells.

Perhaps he could use *inline* frames within a table cell, and have the
inline frame tall/wide enough so as not to need scroll bars and so on.

Although its essentially still using an inline frame, it is the closest
solution I can think of without using Javascript (even if such a JS solution
was possible). You would then 'target' the link to open wthin the inline
frame that is sitting in the right hand column of the table.
 
T

Trevor Lawrence

Andrew Murray said:
I don't know if it can be done. The easiest way is to link to individual
pages in the same layout style and have the content in the right hand cell
and the menu in the left - but essentially each is a separate page. I
don't know (and have never heard of) the "target frame" idea being applied
to tables/cells.

Perhaps he could use *inline* frames within a table cell, and have the
inline frame tall/wide enough so as not to need scroll bars and so on.

Although its essentially still using an inline frame, it is the closest
solution I can think of without using Javascript (even if such a JS
solution was possible). You would then 'target' the link to open wthin
the inline frame that is sitting in the right hand column of the table.

Yes, I would have to think about that.

I thought that the DOM supported all elements on an HTML page, so it would
just be a matter of finding the name of table x, column y, row z and
amending this with the JS.

Another idea (which came to me when walking to the shops an hour ago), is
similar to your in-line frame.

That is, give an ID to the cell, e.g. <td id="fred"></td>
The use document.getElementById("fred").innerHTML="content required"

But I have yet to test this
 
S

Sal

Yes, I would have to think about that.

I thought that the DOM supported all elements on an HTML page, so it would
just be a matter of finding the name of table x, column y, row z and
amending this with the JS.

Another idea (which came to me when walking to the shops an hour ago), is
similar to your in-line frame.

That is, give an ID to the cell, e.g. <td id="fred"></td>
The use document.getElementById("fred").innerHTML="content required"

But I have yet to test this

--
Trevor Lawrence
Canberra
Microsoft MVP - FrontPage
MVP Web Sitehttp://trevorl.mvps.org- Hide quoted text -

- Show quoted text -

thanks for your help and suggestions. I have been researching lots of
q&a on this group and learnin a whole lot more about frontpage. THanks
for offeringthe javascript, but it wont be necessary, in fact java
script sounds awfully scary to a novice such as me.
I will play around and let you know how I get on with inline frames.
Sal
 
T

Trevor Lawrence

Sal said:
thanks for your help and suggestions. I have been researching lots of
q&a on this group and learnin a whole lot more about frontpage. THanks
for offeringthe javascript, but it wont be necessary, in fact java
script sounds awfully scary to a novice such as me.
I will play around and let you know how I get on with inline frames.

HiSal,

I know that you seem a little scared of JavaScript, but there is no need to
be.

Here is some very simple code to do what you want.

A table with two buttons on the left and some text on the right. Clicking a
button will change the text on the right.

I have added a style to the cells so that you can see their borders, but
this isn't necessary.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>A test</title>
<style type="text/css">
td {border: black 1px solid}
</style>
<script type="text/javascript">
function doit(text)
{document.getElementById("fred").innerHTML=text}
</script>
</head>

<body>
<table>
<tr>
<td>
<input type="button" value="change 1" onclick="doit('some text')"
/><br/>
<input type="button" value="change 2" onclick="doit('some other text')"
/>
</td>
<td id="fred" style="text-align:top">what is here at the start</td>
</tr>
</table>
</body>
</html>

This is the entire HTML page. You can open a new page in Code/HTML view and
just paste it in.
Then change the text in quotes after value=, inside the brackets in doit(),
and/or add more buttons, etc.

See how you go
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top