473,883 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Frames -- Disable/Enable Menus

Hi All,
Currently i am working in a framed environment where i have
divided the window as 20% and 80% and the 20% is used for navigation
purpose and right frame for displaying the orignal content. Now i want
to Disable ad Enable the menu items which are placed in the left frame
for navigation purpose.

Can any of you input me with any idea as how to proceed? If you
need any other information then please let me know.

Thanks!
Jun 27 '08 #1
56 3910
Deepan HTML wrote:
Hi All,
Currently i am working in a framed environment where i have
divided the window as 20% and 80% and the 20% is used for navigation
purpose and right frame for displaying the orignal content. Now i want
to Disable ad Enable the menu items which are placed in the left frame
for navigation purpose.

Can any of you input me with any idea as how to proceed? If you
need any other information then please let me know.
There is two possible ways to do it.
First way is to use javascript and it is relatively simple. You define
javascript function to control menu item status and call it as onload() at all
right pages with 2 parameters - item id and needed state. For example
<body onload="setmenu ('first','disab le')">
This way you can use for static html pages.

Second way is to use scripts (Perl CGI or PHP) to generate frameset and left
page. In this case you must use links to frameset with parameters and this
script (for generating frameset) pass paramaters to other script for
generating left menu. This way is relatively more complex but work even if
user have javascript disabled.

--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

Jun 27 '08 #2
Petr Vileta wrote:
Second way is to use scripts (Perl CGI or PHP) to generate frameset and
left page. In this case you must use links to frameset with parameters
and this script (for generating frameset) pass paramaters to other
script for generating left menu. This way is relatively more complex but
work even if user have javascript disabled.
If doing it this way then dispense with frames all together!

http://www.google.com/search?hl=en&q...=Google+Search
how to include one html file in another - Google Search
http://www.google.com/search?hl=en&q...il&btnG=Search
why frames are evil - Google Search

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 27 '08 #3
Jonathan N. Little wrote:
Petr Vileta wrote:
>Second way is to use scripts (Perl CGI or PHP) to generate frameset
and left page. In this case you must use links to frameset with
parameters and this script (for generating frameset) pass paramaters
to other script for generating left menu. This way is relatively
more complex but work even if user have javascript disabled.

If doing it this way then dispense with frames all together!

http://www.google.com/search?hl=en&q...=Google+Search
how to include one html file in another - Google Search
http://www.google.com/search?hl=en&q...il&btnG=Search
why frames are evil - Google Search
Yes, I know it, but original question was be about "How to do for frames" ;-)
(see Subject)
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your
mail from another non-spammer site please.)

Please reply to <petr AT practisoft DOT cz>

Jun 27 '08 #4
Petr Vileta wrote:
Jonathan N. Little wrote:
>>
http://www.google.com/search?hl=en&q...il&btnG=Search
why frames are evil - Google Search

Yes, I know it, but original question was be about "How to do for frames" ;-)
If you asked how you could shoot yourself in the foot, don't you think
we'd rather talk you out of it than provide step-by-step instructions?
(see Subject)
Welcome to Usenet. ;)

--
Berg
Jun 27 '08 #5
Petr Vileta wrote:
Jonathan N. Little wrote:
>Petr Vileta wrote:
>>Second way is to use scripts (Perl CGI or PHP) to generate frameset
and left page. In this case you must use links to frameset with
parameters and this script (for generating frameset) pass paramaters
to other script for generating left menu. This way is relatively
more complex but work even if user have javascript disabled.

If doing it this way then dispense with frames all together!

http://www.google.com/search?hl=en&q...=Google+Search

how to include one html file in another - Google Search
http://www.google.com/search?hl=en&q...il&btnG=Search
why frames are evil - Google Search

Yes, I know it, but original question was be about "How to do for
frames" ;-) (see Subject)
Yes but if you are employing server-side then there is no need for
frames in the first place. Frames was an early *hack* to modularize
webpage development when server-side scripting was being developed and
both expensive and not widely available. Again with my favorite analogy,
why would a lumberjack cling to his ax after the development of the
chainsaw?
--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 27 '08 #6
On 4/21/2008 6:07 AM, Petr Vileta wrote [in part]:
Deepan HTML wrote:
>Hi All,
Currently i am working in a framed environment where i have
divided the window as 20% and 80% and the 20% is used for navigation
purpose and right frame for displaying the orignal content. Now i want
to Disable ad Enable the menu items which are placed in the left frame
for navigation purpose.

Can any of you input me with any idea as how to proceed? If you
need any other information then please let me know.
There is two possible ways to do it.
First way is to use javascript and it is relatively simple. You define
javascript function to control menu item status and call it as onload() at all
right pages with 2 parameters - item id and needed state. For example
<body onload="setmenu ('first','disab le')">
This way you can use for static html pages.
Gecko-based browsers (Firefox, SeaMonkey, Camino, and others) have the
user option to disable JavaScript from affecting context menus without
completely disabling JavaScript.

--
David Ross
<http://www.rossde.com/>

Have you been using Netscape and now feel abandoned by AOL?
Then use SeaMonkey. Go to <http://www.seamonkey-project.org/>.
Jun 27 '08 #7
In article <67************ *@mid.individua l.net>,
Bergamot <be******@visi. comwrote:
Petr Vileta wrote:
Jonathan N. Little wrote:
>
http://www.google.com/search?hl=en&q...il&btnG=Search
why frames are evil - Google Search
Yes, I know it, but original question was be about "How to do for frames"
;-)

If you asked how you could shoot yourself in the foot, don't you think
we'd rather talk you out of it than provide step-by-step instructions?
(see Subject)

Welcome to Usenet. ;)
Welcome to the hysterical fundamentalisms that liken using frames to
shooting oneself.

--
dorayme
Jun 27 '08 #8
In article <34************ *************** @NAXS.COM>,
"Jonathan N. Little" <lw*****@centra l.netwrote:
Again with my favorite analogy,
why would a lumberjack cling to his ax after the development of the
chainsaw?
Because it is easy to carry and much easier to sharpen and is much less
dangerous. Any other analogies?

--
dorayme
Jun 27 '08 #9
dorayme wrote:
In article <34************ *************** @NAXS.COM>,
"Jonathan N. Little" <lw*****@centra l.netwrote:
>Again with my favorite analogy,
why would a lumberjack cling to his ax after the development of the
chainsaw?

Because it is easy to carry and much easier to sharpen and is much less
dangerous. Any other analogies?
Obviously you've never chopped down a tree with an ax.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Jun 27 '08 #10

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

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.