Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 17th, 2006, 05:30 AM
Friend of Wrox
Points: 686, Level: 9
Points: 686, Level: 9 Points: 686, Level: 9 Points: 686, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Kolkata, West Bengal, India.
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default refreshing frames with javascript

Hi everyone,
I'm facing this problem for sometime and get any solutions.

I have a frames which has a leftframe & a mainframe.This page is loaded by default. The main frame has a login screen where users can login and enter .Here only the mainframe page is submit and it does not have any affect on the leftframe.It remains static irrespective of the mainpage login. It only changes when the user signs out and the default page is loaded again.

I have to change the status of the leftframe i.e refresh it from the mainpage. The users have 2 lecels 1 & 2.The 1 level user is the topadmin and can access all the menus in the leftframe & level 2 user can only see the menus made visible by user level 1.

This action takes place when the user logs in and the checking for level of user is done.

I have kept 2 diffrenet leftframe pages one with all menus another with menus that are made visible by user level 1.

I'm using the following code but this does not work...

<script language="JavaScript">
    function check_admin()
    {
    <% if session("adminlevel")="" or session("adminlevel")="1" then%>
        parent.left.location="leftframe.asp";
    <% Else %>
        parent.left.location="leftframe_checked.asp";
    <% End If %>
    }
</script>

I'm using this code in the onload function of the signing in page i.e the main page.
***Can anyone help me to refresh the leftframe from the sign-in page.If not any other suggestion to solve this problem.
  #2 (permalink)  
Old April 18th, 2006, 07:14 AM
Friend of Wrox
 
Join Date: Oct 2004
Location: delhi, delhi, India.
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

Hii Arnabghosh!!
try to change parent.left.location with parent.left.location.href
i.e.
<script language="JavaScript">
    function check_admin()
    {
    <% if session("adminlevel")="" or session("adminlevel")="1" then%>
        parent.left.location.href="leftframe.asp";
    <% Else %>
        parent.left.location.href="leftframe_checked.asp";
    <% End If %>
    }
</script>

call it onload of the mainpage.
hope this will help you



Cheers :)

vinod


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refreshing Frames in JavaScript dhruthi.ram99 Javascript 1 December 19th, 2007 10:20 AM
javascript and frames ihatejava Javascript How-To 1 January 25th, 2006 02:28 AM
Refreshing Frames Behaviours using F5 (IE only) mat41 HTML Code Clinic 0 July 25th, 2005 06:15 PM
cross frames with javascript drop-down menu crmpicco Javascript How-To 1 March 14th, 2005 12:57 PM
javascript drop-down menu that can cross-frames! crmpicco Javascript How-To 1 March 14th, 2005 12:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.