-----Original Message-----
From: Steve Easton [mailto:
[email protected]]
Posted At: 16. maj 2005 02:55
Posted To: microsoft.public.frontpage.programming
Conversation: "Steve Easton"
Subject: Re: "Steve Easton"
As long as you have defined your variables correctly, and as
long as all of the content is in one page,
document.all.testing.innerHTML = WhatToWrite;
will write WhatToWrite to any element on the page with the id
"testing"
Remember, if you need to do calculations, you need to do them
inside the function like so:
<script type = "text/javascript">
var WhatToWrite
function writeit(){
WhatToWrite = (setit.options[setit.selectedIndex].value);
WhatToWrite = WhatToWrite + SomeOtherVariable;
document.all.testing.innerHTML = WhatToWrite; } </script>
Is there any particular reason you think you need to use frames??
Tables and cells will do the same thing.
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
yes i see how that one works
but can this be done with frames. (not iframes or inline)
i have three frames an order frame, a totals frame and an orders
selected frame. (a custom made shopping cart) 'order frame' is where
the orders are being made from by the use of pull down menus.
'totals frame' has the total cost of the orders selected from pull
down menus.
and the 'orders selected frame' that shown a list of what was selected
with the pull down menus.
the 'order frame' has all the variables set to zero and when a pull
down changes it adds the cost up and shows it in the 'totals frame'.
this works fine.
the ordering page with the pull downs works ok too.
but i would like is get a list of what was ordered in the 'orders
selected frame'
maybe via a shed load of, if then's
but it is having the 'orders selected frame' having access to the
variables which are being changed in the 'order frame'
thank you
Steve Easton said:
Here's an example that uses 3 cells in a table.
keep in mind there are many ways of doing this with javascript.
Open a new page, switch to Code view and clear everything.
Then copy and paste the following into the new page and then switch
to preview and see how it works.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252"> <title>Select a flower</title> <script type =
"text/javascript"> var WhatToWrite function writeit(){ WhatToWrite =
(setit.options[setit.selectedIndex].value);
document.all.testing.innerHTML = WhatToWrite; } </script> </head>
<body> <table border="1" cellpadding="0" cellspacing="0"
style="border-collapse:
collapse" width="100%"
id="table1">
<tr>
<td width="50%">
<p align="center"><select name="pickone" id="setit" size="1"
onchange ="writeit()">
<option>Select a flower</option>
<option value="Roses">Roses</option>
<option value="Orchids">Orchids</option>
<option value="Daisies">Daisies</option>
</select></td>
<td width="25%">
<p align="right">You selected: </td>
<td width="25%" inset; border-t class="cell3"
id="testing"> </td>
</tr>
</table>
</body>
</html>
Good luck
--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer
<cheers> wrote in message please could you write a short code to show me how this should be
done, I have followed all what you said in your replies, but still
not getting very far. I am missing something along the way.
lets say there are two frames shown in one page.
one frame (the left) has the pull down.
the right frame has the text line "you selected "; the number
would
be shown after this text.
if I see it by example I will figure it out.
and would then be able to cut and paste it into my own scripts.
and fingers crossed!!!
thank you so much for your time.
I really do appreciate it.
Jason