473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Multiple Frame Targets

Howdy:

Let's suppose for illustration that I have a web page with 3 frames:
Let's call them 'fStates', 'fCounties', and 'fCities'.

On loading the page, fStates has a select list of states and the other
two are empty. The form "target" attribute is 'fCounties', and
an event handler for the list in 'fStates' looks something like this:
onChange="form.submit();"

So when we click on a state item in 'fStates', a CGI action is posted to
'fCounties' and displays a list of counties there and now we 'target'
'fCities' to display cities for the chosen state->county venue, using
a similar approach.

It follows that when we click on a city, a new page is rendered, but
let's suppose that the user clicks again on a state, which then renders
the list of counties for that state *but* the 'fCities' frame now holds
a list of cities for the previously chosen state->county venue.

This could lead to confusion.

Question: Is there a way to clear 'fCities' from the onChange event in
'fStates' at or previous to the rendering of 'fCounties'? Pointers to
documentation, URLs, and examples are welcome.

TIA
Tim
Aug 19 '05 #1
5 2191
ASM
Tim Johnson wrote:
Howdy:

Let's suppose for illustration that I have a web page with 3 frames:
Let's call them 'fStates', 'fCounties', and 'fCities'.

On loading the page, fStates has a select list of states and the other
two are empty. The form "target" attribute is 'fCounties', and
an event handler for the list in 'fStates' looks something like this:
onChange="form.submit();"


It's much beter to use the input submit
(and if fellow did mistake ? too late ! that's fired)

for your confusion,
you could try something as following :
submit button is disabled
list onchange enable submit button
and
the submitting re disable submit button

<form action="engine.ph" target="fCountries"
<!-- "fCities" depends of frame -->
onsubmit="document.forms[0][1].disabled=true;">
Choice a country (state, city ... depends of frame)
<select onchange="document.forms[0][1].disabled=false;">
<option ...
</select>
<input type=submit name="submitBut" disabled value="GO">
</form>

or beter
in states frame the submitting disable its own submit button
then
in cities, loaded page re enables states's submit button :

- states frame page =
<form action="engine.php" target="fCountries"
onsubmit="document.forms[0][1].disabled=true;">
Choice a country (state, city ... depends of frame)
<select>
<option ...
</select>
<input type=submit name="submitBut" value="GO">
</form>

- and cities form page =
<body onload="parent.fStates.document.forms[0][1].disabled=false;">
--
Stephane Moriaux et son [moins] vieux Mac
Aug 19 '05 #2
Hi Tim,

Here are two ideas for your wanting to clear two frames upon one
button click using javascript.
Idea 1. Set the target of the form to the last (cities) frame and put
a blank (the default) page for the action if you get a different 2nd
frame (county). Right before submitting, do a window.setTimeout
(unclear if that is setTimout is necessary) which in turn will change
the action and target of the form back to the original 2nd frame.
Again, try it without the setTimeout because you may not need it.

Idea 2. If you navigate to a different 2nd frame (presuming you are
keeping track somehow), in the onload of that frame, have the frame
self submit a blank page to (with a target of) the 3rd frame.

Good luck,
Csaba Gabor from Vienna

Tim Johnson wrote:
Howdy:

Let's suppose for illustration that I have a web page with 3 frames:
Let's call them 'fStates', 'fCounties', and 'fCities'.

On loading the page, fStates has a select list of states and the other
two are empty. The form "target" attribute is 'fCounties', and
an event handler for the list in 'fStates' looks something like this:
onChange="form.submit();"

So when we click on a state item in 'fStates', a CGI action is posted to
'fCounties' and displays a list of counties there and now we 'target'
'fCities' to display cities for the chosen state->county venue, using
a similar approach.

It follows that when we click on a city, a new page is rendered, but
let's suppose that the user clicks again on a state, which then renders
the list of counties for that state *but* the 'fCities' frame now holds
a list of cities for the previously chosen state->county venue.

This could lead to confusion.

Question: Is there a way to clear 'fCities' from the onChange event in
'fStates' at or previous to the rendering of 'fCounties'? Pointers to
documentation, URLs, and examples are welcome.

TIA
Tim


Aug 20 '05 #3
ASM wrote:
Let's suppose for illustration that I have a web page with 3 frames:
Let's call them 'fStates', 'fCounties', and 'fCities'.

On loading the page, fStates has a select list of states and the other
two are empty. The form "target" attribute is 'fCounties', and
an event handler for the list in 'fStates' looks something like this:
onChange="form.submit();"

It's much beter to use the input submit
(and if fellow did mistake ? too late ! that's fired)

for your confusion,
you could try something as following :
submit button is disabled
list onchange enable submit button
and
the submitting re disable submit button

- and cities form page =
<body onload="parent.fStates.document.forms[0][1].disabled=false;">


Hi ASM: I did a little googling in the meantime and came up with the
following example at
http://www.sbrady.com/hotsource/java...twoframes.html
I'm wondering if something like top.fCities.location="empty.html";
would work in the fStates event handler. Then anytime one clicked
on the 'fStates' frame, the 'fCities' frame would be updated with
a page without the list on it.

I appreciate the ideas. This is worth some research because I don't
charge my client for research time, but I do charge them if I'm coding
(dead end or not).

Thanks
tim (<grin> who used to be an *ASM* programmer)

Aug 20 '05 #4
ASM
Tim Johnson wrote:
ASM wrote:
for your confusion,
you could try something as following :
submit button is disabled
list onchange enable submit button
and
the submitting re disable submit button

- and cities form page =
<body onload="parent.fStates.document.forms[0][1].disabled=false;">

Hi ASM: I did a little googling in the meantime and came up with the
following example at
http://www.sbrady.com/hotsource/java...twoframes.html


Oh yes, I know to launch to dble frames
but would that resolve your problem ?

that is : not click a 2nd time since cities's page not yet loaded
(did I understand)
I'm wondering if something like top.fCities.location="empty.html";
would work in the fStates event handler. Then anytime one clicked
on the 'fStates' frame, the 'fCities' frame would be updated with
a page without the list on it.
thought you had to refresh cities-form-list from states's choice ?
not understand use of non listed cities ...
Thanks
tim (<grin> who used to be an *ASM* programmer)


ASM = Amazing Stephane Moriaux :-)
--
Stephane Moriaux et son [moins] vieux Mac
Aug 20 '05 #5
My thanks for all the good input. The bottom line appears
to be that this is doable. So I shall proceed.
Thanks again
tim
Aug 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lars Vatland | last post by:
Hello, if i have frameset frame name=A frame name=B How can i target all links in A to B? Via a script in the frameset? (i can only code the frameset file, not the frames) Maybe something...
6
by: Wladimir Borsov | last post by:
I would like to load multiple web pages from Internet into ONE single browser window - one below the other. How do I do that most easily ? One idea is to built a frameset (for e.g 6 web pages)...
2
by: Fknapp | last post by:
I am setting up a internal website and I am using a non-frame index page, I then link to a page that contains frames... The problem is when I link back to the home page it opens a new window. I...
4
by: DaveO | last post by:
Hi all I have done lots of VB programming, but am not familiar with JavaScript. Can anyone tell me how to do this ....? I have a JS file for a menu system called menu.js It contains the...
2
by: A. Gupta | last post by:
I'm compiling a project that I want to have multiple targets (basically debug and optimized). I would like to just be able to type 'make debug' or 'make optimized' and have the makefile compile...
26
by: Omar Abid | last post by:
Hi, Does any one know the difference between .net 2 and .net 3 And does program made with vb2005 .net 2 works on windows vista And can i make compatibility of vb2005 with the .net 3 Omar Abid
4
by: tudyfruity18 | last post by:
I'm suppose to write an applet that contains two buttons Investment calculator and Loan Calculator. When the Investment Calculator button is clicked, a frame appears in a new window for calculating...
1
by: dave102 | last post by:
I am developing a page which uses DIY drag i.e. I cancel ondragstart, ondragover with window.event.returnValue=false; and simply create a drag image from the image I click on (with 60% opacity to...
0
by: Anish Chapagain | last post by:
Hi!! I'm trying to program an application which have multiple windows and is capable of executing method defined inside class of one another, i tries a simpel frame work here and am creating...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.