"Steve Easton"

G

Guest

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
 
S

Steve Easton

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:&nbsp;&nbsp; </td>
<td width="25%" inset; border-t class="cell3" id="testing">&nbsp;</td>
</tr>
</table>
</body>
</html>



Good luck

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
G

Guest

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:&nbsp;&nbsp; </td>
<td width="25%" inset; border-t class="cell3"
id="testing">&nbsp;</td>
</tr>
</table>
</body>
</html>



Good luck

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer

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
 
S

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:&nbsp;&nbsp; </td>
<td width="25%" inset; border-t class="cell3"
id="testing">&nbsp;</td>
</tr>
</table>
</body>
</html>



Good luck

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
.......................with a computer

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
 
G

Guest

the whole page moves up if i use tables, and the total box and orderlist
parts disapear, and i have tried the inline method too. but got very
messed up with the scripting i was lost as to where i should put things and
most of what i was trying to do was not even working.

i wanted the total box and the orderlists box to stay still (like inline)
while the order page can be scrolled down to select item from.

i have tried to enter the a script to set all the variables as global into
the MAIN.HTM file that shows all the frame sets.

<script>
abcde=0;
abcdf=0;
....
....
...
</script>

and when i try to access the variable in one of the frames or try to set a
variable with another value it shows not defined error. within the frame
that i trying to change the variable in.

is there any script that you know of that allows the value of a variable to
be read in any frame set. (again not iframe)

thank you

Jason


Steve Easton said:
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:&nbsp;&nbsp; </td>
<td width="25%" inset; border-t class="cell3"
id="testing">&nbsp;</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
 
J

Jens Peter Karlsen[FP MVP]

Do not use document.all unless you specifically want the script to work
only in IE (and Opera if set to emulate IE).
Instead use document.getelementbyid which is supported by all modern
browsers including IE.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----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:&nbsp;&nbsp; </td>
<td width="25%" inset; border-t class="cell3"
id="testing">&nbsp;</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
 
J

Jens Peter Karlsen[FP MVP]

The only way to do it would be to use cookies.
Set the cookie with the variables in your main.htm then the other pages
can read it and modify it, provided all pages are from the same domain.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
-----Original Message-----
From: cheers [mailto:cheers]
Posted At: 16. maj 2005 03:44
Posted To: microsoft.public.frontpage.programming
Conversation: "Steve Easton"
Subject: Re: "Steve Easton"


the whole page moves up if i use tables, and the total box
and orderlist parts disapear, and i have tried the inline
method too. but got very messed up with the scripting i was
lost as to where i should put things and most of what i was
trying to do was not even working.

i wanted the total box and the orderlists box to stay still
(like inline) while the order page can be scrolled down to
select item from.

i have tried to enter the a script to set all the variables
as global into the MAIN.HTM file that shows all the frame sets.

<script>
abcde=0;
abcdf=0;
...
...
..
</script>

and when i try to access the variable in one of the frames or
try to set a variable with another value it shows not defined
error. within the frame that i trying to change the variable in.

is there any script that you know of that allows the value of
a variable to be read in any frame set. (again not iframe)

thank you

Jason


Steve Easton said:
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

<cheers> wrote in message news:[email protected]...
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



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:&nbsp;&nbsp; </td>
<td width="25%" inset; border-t class="cell3"
id="testing">&nbsp;</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
 

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