Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #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.
Reply With Quote
  #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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.