I need a javascript that can check if the page is in a specified frameset. If this is not true, it should disply a link to the frameset.
Can someone help me with this one please?
6 1499
I need a javascript that can check if the page is in a specified frameset. If this is not true, it should disply a link to the frameset.
The usual practice is to return it to its correct frameset, but you need to be more specific.
Should it check that it is on a certain domain or just within any frame structure or a particular position in a frame structure?
Does it have to work locally?
The usual practice is to return it to its correct frameset, but you need to be more specific.
Should it check that it is on a certain domain or just within any frame structure or a particular position in a frame structure?
Does it have to work locally?
I know it is usualy used to return it to the correct frameset, but the program I use Adobe GoLive have that action to insert, but it is not working properly so I either need to get it working or get it to display a link to get to the correct frameset (the index.html of the site. The home page is the frameset)
Due to some restrictions on the server, I can't use some serverside scripts. That's the reason I want to use Javascript
Do you have any sugestions?
Thank you for the help so far.
I know it is usualy used to return it to the correct frameset, but the program I use Adobe GoLive have that action to insert, but it is not working properly so I either need to get it working or get it to display a link to get to the correct frameset (the index.html of the site. The home page is the frameset)
Due to some restrictions on the server, I can't use some serverside scripts. That's the reason I want to use Javascript
Do you have any sugestions?
Thank you for the help so far.
Here are the code generated by GoLive -
CSInit = new Array;
-
function CSScriptInit() {
-
if(typeof(skipPage) != "undefined") { if(skipPage) return; }
-
idxArray = new Array;
-
for(var i=0;i<CSInit.length;i++)
-
idxArray[i] = i;
-
CSAction2(CSInit, idxArray);}
-
CSStopExecution=false;
-
function CSAction(array) {return CSAction2(CSAct, array);}
-
function CSAction2(fct, array) {
-
var result;
-
for (var i=0;i<array.length;i++) {
-
if(CSStopExecution) return false;
-
var aa = fct[array[i]];
-
if (aa == null) return false;
-
var ta = new Array;
-
for(var j=1;j<aa.length;j++) {
-
if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
-
if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
-
else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
-
else ta[j]=aa[j];}
-
} else ta[j]=aa[j];
-
}
-
result=aa[0](ta);
-
}
-
return result;
-
}
-
CSAct = new Object;
-
function CSClickReturn () {
-
var bAgent = window.navigator.userAgent;
-
var bAppName = window.navigator.appName;
-
if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
-
return true; /* dont follow link */
-
else return false; /* dont follow link */
-
}
-
function frameP(action) {
-
if(parent.frames.length==0) {
-
var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
-
window.location.href=action[1]+"?"+action[2]+"="+fileName;
-
} else {
-
if(top.location.search!="") {
-
var sFrame=top.location.search.substring(1,top.location.search.indexOf("="));
-
if(name==sFrame) {
-
var sName=top.location.search.substring(top.location.search.indexOf("=")+1,top.location.search.length);
-
var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
-
if(fileName!=sName) {
-
location=sName;
-
}
-
}
-
}
-
}
-
}
-
acoder 16,027
Recognized Expert Moderator MVP acoder 16,027
Recognized Expert Moderator MVP
Thank you for the help. It is working like it should.
No problem. Glad you got it working.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Toph |
last post by:
Bonjour a tous,
Hi,
I am developing a software in Python using Tkinter. The choice of my team is not to use pyton MegaWidgets.
I would like to scroll a frame.
This is a peace of my code :
# -----------------------------------------------------------------------------
#!/bin/envpython
from Tkinter import *
|
by: Toph |
last post by:
Hi,
I am developing a software in Python using Tkinter. The choice of my team is not to use pyton MegaWidgets.
I would like to scroll a frame.
This is a peace of my code :
# -----------------------------------------------------------------------------
#!/bin/env python
from Tkinterimport *
|
by: Paul |
last post by:
I have a simple frame-based application where title information
appears in a top frame and a lower frame contains the content
for the application. One of the needs for this app is for a
status line in the upper frame to be updated when certain
actions are taken in the lower frame.
In the top frame, I have a line of text wrapped with SPAN tags
and assigned a unique ID attribute.
In the lower frame, I run a JS function that looks up the...
|
by: Kenneth Montgomery |
last post by:
I have this embedded dropdown menu applet that is suppose to be in the
navigation frame and the target URL content in the content frame. But I
can't seem to the script to put the content into the right frame.
The applet data .txt file is suppose to direct the browser to load the
addressed content of the selected file in the right frame, but obviously
I am doing something wrong.I am new to JAVA and I thought this would be
a simple thing,...
|
by: Maik Wiege |
last post by:
Hi!
I want to show a blinking text over my derived CMDIChildWnd-class. The
blinking is done by one view which is hold by my frame. I set up a timer and
write text to the parent frame, which works fine. But I can't get the text
away the next time the timer fires. Here is some code:
void MyView::OnTimer(UINT nIDEvent)
{
if (nIDEvent!=1) return;
showText = !showText;
| |
by: Dai Ba Wong |
last post by:
Hi:
Currently I am having a problem with my webpage. My page consist of
two frames, one consist of input text field and the other contains
link for different pop-up windows. The problem follows:
1. At the beginning, focus is placed on an input text field of the
first frame (so there's a blinking cursor on such field).
2. Then users click on a link of the second frame (thus focus is set
|
by: Martin Chen |
last post by:
I have a frame set (as per MS FrontPage 2000). It has a contents and a main
frame. The contents frame has a menu bar written with with javascript (in
the context of a table). In IE6.1 everything works fine as it also does in
firefox if I call the contents frame directly (i.e. outside of its
frameset). However, if I call my main page (index.html) which invokes the
frame set, the contents frame javascript menubar onmouseover function...
|
by: Hank Mishkoff |
last post by:
Is there any way to use JavaScript to determine how much
text will fit into a non-scrolling browser frame?
I have a non-scrolling frame in which I want to insert some
text. I know that the text is too large to fit entirely into
the frame, so I'd like to insert only the portion of the
text that will fit into the frame. Is there any way to use
JavaScript to do this?
(The text could be any font and any size, and the frame
|
by: laredotornado |
last post by:
Hi,
I have this master frameset page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Account Creation</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=ISO-8859-1">
|
by: Abneo |
last post by:
Hi all,
I am very new to Javascript and I am in some need of some help. I am creating a site that has a madlib. I got the madlib code but now I want the results of the madlib to display in another frame. The user input will be in one from and the output should be in seperate frame. I have written the code for the madlib but when I hit the submit button it does not do anything. Here are my codes for the pages.
The frameset code is
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |