473,988 Members | 69,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Frame text

Jacotheron
44 New Member
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?
Jan 19 '08 #1
6 1499
Logician
210 New Member
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?
Jan 20 '08 #2
Jacotheron
44 New Member
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.
Jan 21 '08 #3
Jacotheron
44 New Member
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

Expand|Select|Wrap|Line Numbers
  1. CSInit = new Array;
  2. function CSScriptInit() {
  3. if(typeof(skipPage) != "undefined") { if(skipPage) return; }
  4. idxArray = new Array;
  5. for(var i=0;i<CSInit.length;i++)
  6.  idxArray[i] = i;
  7. CSAction2(CSInit, idxArray);}
  8. CSStopExecution=false;
  9. function CSAction(array) {return CSAction2(CSAct, array);}
  10. function CSAction2(fct, array) { 
  11.  var result;
  12.  for (var i=0;i<array.length;i++) {
  13.   if(CSStopExecution) return false; 
  14.   var aa = fct[array[i]];
  15.   if (aa == null) return false;
  16.   var ta = new Array;
  17.   for(var j=1;j<aa.length;j++) {
  18.    if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
  19.     if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
  20.     else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
  21.     else ta[j]=aa[j];}
  22.    } else ta[j]=aa[j];
  23.   }   
  24.   result=aa[0](ta);
  25.  }
  26.  return result;
  27. }
  28. CSAct = new Object;
  29. function CSClickReturn () {
  30.  var bAgent = window.navigator.userAgent; 
  31.  var bAppName = window.navigator.appName;
  32.  if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
  33.   return true; /* dont follow link */
  34.  else return false; /* dont follow link */
  35. }
  36. function frameP(action) {
  37.   if(parent.frames.length==0) {
  38.    var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
  39.    window.location.href=action[1]+"?"+action[2]+"="+fileName;
  40.   } else {
  41.    if(top.location.search!="") {
  42.     var sFrame=top.location.search.substring(1,top.location.search.indexOf("="));
  43.     if(name==sFrame) {
  44.      var sName=top.location.search.substring(top.location.search.indexOf("=")+1,top.location.search.length);
  45.      var fileName=window.location.href.substring(window.location.href.lastIndexOf("/")+1,window.location.href.length);
  46.      if(fileName!=sName) {
  47.       location=sName;
  48.      }
  49.     }
  50.    }
  51.   }
  52.  }
  53.  
Jan 23 '08 #4
acoder
16,027 Recognized Expert Moderator MVP
You're looking to keep your page framed.
Jan 24 '08 #5
Jacotheron
44 New Member
You're looking to keep your page framed.
Thank you for the help. It is working like it should.
Jan 24 '08 #6
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.
Jan 25 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1950
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 *
1
3171
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 *
2
1808
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...
1
1749
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,...
2
3455
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;
3
2639
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
5
3520
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...
5
1471
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
1
1438
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">
2
3654
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 ...
0
10400
marktang
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...
0
11908
Oralloy
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...
0
11486
jinu1996
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...
1
11701
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,...
0
10982
tracyyun
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...
1
8533
isladogs
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...
0
6654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5239
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
2
4821
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.