473,774 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GoLive JS is a mess - Need help

Hi -

I'm beginning work on an existing web site which was created with Adobe Golive.
The page in question has CSACTIONS which is part of Golive's CyberStudio.

Anyway, the code below has this CSaction stuff and a bunch of Javascript. If
somebody would please take a very brief peek at the code and give me a basic
idea of what it does. Presumably something to do with pausing the page before
redirecting to another URL. But it seems like so much code just to do that;
surely it
does more ...

TIA,
warren

BEGIN CODE >>>
<csactions>
<csaction name="B46F6EE63 " class="Idle" type="ONLOAD" val0="true"
val1="B46F6F114 ,,B46F6F545">
<csaction name="B46F6F114 " class="Timeout" type="ONEVENT" val0="2.500000" >
<csaction name="B46F6F545 " class="Goto Link" type="ONEVENT"
val0="home/fs1.html" val1>
</csactions>
<csactionitem name="B46F6EE63 "></csactionitem>
<csscriptdict >
<script><!--
CSStopExecution = false;
CSInit = new Array;
function CSScriptInit() {
if(typeof(skipP age) != "undefined" ) { if(skipPage) return; }
idxArray = new Array;
for(var i=0;i<CSInit.le ngth;i++)
idxArray[i] = i;
CSAction2(CSIni t, idxArray);
}
CSStopExecution = false;

function CSAction(array) {
return CSAction2(CSAct , array);
}
function CSAction2(fct, array) {
var result;
for (var i=0;i<array.len gth;i++) {
if(CSStopExecut ion) return false;
var actArray = fct[array[i]];
if(actArray == null) return false;

var tempArray = new Array;
for(var j=1;j<actArray. length;j++) {
if((actArray[j] != null) && (typeof(actArra y[j]) == "object") &&
(actArray[j].length == 2)) {
if(actArray[j][0] == "VAR") {
tempArray[j] = CSStateArray[actArray[j][1]];
}
else {
if(actArray[j][0] == "ACT") {
tempArray[j] = CSAction(new Array(new String(actArray[j][1])));
}
else
tempArray[j] = actArray[j];
}
}
else
tempArray[j] = actArray[j];
}
result = actArray[0](tempArray);
}
return result;
}
CSAct = new Object;
CSAg = window.navigato r.userAgent; CSBVers =
parseInt(CSAg.c harAt(CSAg.inde xOf("/")+1),10);
function IsIE() { return CSAg.indexOf("M SIE") > 0;}
function CSIEStyl(s) { return document.all.ta gs("div")[s].style; }
function CSNSStyl(s) { return CSFindElement(s ,0); }
function CSFindElement(n ,ly) { if (CSBVers < 4) return document[n];
var curDoc = ly ? ly.document : document; var elem = curDoc[n];
if (!elem) { for (var i=0;i<curDoc.la yers.length;i++ ) {
elem = CSFindElement(n ,curDoc.layers[i]); if (elem) return elem; }}
return elem;
}
function CSSetStylePos(s ,d,p) { if (IsIE()) { if (d == 0) CSIEStyl(s).pos Left =
p; else CSIEStyl(s).pos Top = p; }
else { if (d == 0) CSNSStyl(s).lef t = p; else CSNSStyl(s).top = p; } }
function CSGetStylePos(s ,d) { if (IsIE()) { if (d == 0) return
CSIEStyl(s).pos Left; else return CSIEStyl(s).pos Top; }
else { if (d == 0) return CSNSStyl(s).lef t; else return CSNSStyl(s).top ; }}
CSLoopIsRunning = false; CSFctArray = new Array; CSTimeoutID = null;
function CSLoop() {
CSLoopIsRunning = false;
for (i=0;i<CSFctArr ay.length;i++) {
var curFct = CSFctArray[i];
if (curFct) {
if (curFct.DoFunct ion(curFct)) { CSLoopIsRunning = true; curFct.counter+ +; }
else CSFctArray[i] = 0;
}
}
if (CSLoopIsRunnin g) CSTimeoutID = setTimeout("CSL oop()", 1);
}
function CSStartFunction (fct,data) {
if (!CSLoopIsRunni ng) { CSFctArray = 0; CSFctArray = new Array; }
var fctInfo = new Object;
fctInfo.DoFunct ion = fct; fctInfo.counter = 0; fctInfo.data = data;
CSFctArray[CSFctArray.leng th] = fctInfo;
if (!CSLoopIsRunni ng) CSLoop();
}
function CSStopFunction( sceneName) {
var i;
for (i=0;i<CSFctArr ay.length;i++) {
var curFct = CSFctArray[i];
if (curFct){ if (curFct.data.na me == sceneName){ CSFctArray[i] = 0;
return; } }
}
}
function CSStopComplete( ) {
if (CSTimeoutID == null) return;
clearTimeout (CSTimeoutID); CSLoopIsRunning = false; CSTimeoutID = null;
}
function CSMoveLoop(fInf ) {
var ticks = 60 * (((new Date()).getTime ()) - fInf.data.start Time)/1000;
var f = ticks/fInf.data.ticks ;
if (f < 1) { CSSetStylePos(f Inf.data.layer, 0,fInf.data.sta rt[0] * (1-f) +
fInf.data.end[0] * f);
CSSetStylePos(f Inf.data.layer, 1,fInf.data.sta rt[1] * (1-f) + fInf.data.end[1]
* f); return true; }
else { CSSetStylePos(f Inf.data.layer, 0,fInf.data.end[0]);
CSSetStylePos(f Inf.data.layer, 1,fInf.data.end[1]); }
return false;
}
function CSSlideObj (layer,start,en d,ticks,startTi me) {

this.layer=laye r;this.start=st art;this.end=en d;this.ticks=ti cks;this.startT ime=s
tartTime;
}
function CSSlideLayer(l, pos,anim,ticks) {
var x = pos[0]; var y = pos[1];

if (l == '') return;
if (!anim) { CSSetStylePos(l ,0,x); CSSetStylePos(l ,1,y); }
else { var fctData = new CSSlideObj(l,ne w
Array(CSGetStyl ePos(l,0),CSGet StylePos(l,1)), new Array(x,y),tick s,(new
Date()).getTime ()); CSStartFunction (CSMoveLoop,fct Data); }
}
function CSIdleObject (action) {
this.conditionA ction = action[2];
this.trueAction = action[3];
this.falseActio n = action[4];
this.exitIdleIf True = action[1];
this.lastState = false;
}
function CSIdleAction(ac tion) {
idleObj = new CSIdleObject (action);
CSStartFunction (CSDoIdle,idleO bj);
}
function CSDoIdle (param) {
idleObject=para m.data;
if (idleObject.con ditionAction) {
gCurrentIdleObj ect = idleObject;
var result = CSAction(new Array(idleObjec t.conditionActi on));
if (result == true && idleObject.last State==false) {
idleObject.last State = result;
if (idleObject.tru eAction) {
CSAction(new Array(idleObjec t.trueAction));
if (idleObject.exi tIdleIfTrue == true) return false;
}
} else if (result == false && idleObject.last State == true) {
idleObject.last State = false;
if (idleObject.fal seAction) {
CSAction(new Array(idleObjec t.falseAction)) ;
}
}
}
return true;
}function CSTimeout (condition) {
var result = false;
if (typeof (gCurrentIdleOb ject) == "undefined" ) return result;
if (gCurrentIdleOb ject.lastTime) {
var t=new Date();
if (t.getTime() >= gCurrentIdleObj ect.lastTime) {
if (t.getTime() >= gCurrentIdleObj ect.nextTime) {
gCurrentIdleObj ect.lastTime = t.getTime() + condition[1]*1000;
gCurrentIdleObj ect.nextTime = gCurrentIdleObj ect.lastTime +
condition[1]*1000;
return false;
}
return true;
}
} else {
var t=new Date();
gCurrentIdleObj ect.lastTime = t.getTime() + condition[1]*1000;
gCurrentIdleObj ect.nextTime = gCurrentIdleObj ect.lastTime + condition[1]*1000;
}
return result;
}function CSGotoLink(acti on) {
if (action[2].length) {
var hasFrame=false;
for(i=0;i<paren t.frames.length ;i++) { if (parent.frames[i].name==action[2])
{ hasFrame=true; break;}}
if (hasFrame==true )
parent.frames[action[2]].location = action[1];
else
window.open (action[1],action[2],"");
}
else location = action[1];
}
// --></script>
</csscriptdict>
<csactiondict >
<script><!--
CSInit[CSInit.length] = new Array(CSIdleAct ion,true,/*CMP*/ 'B46F6F114', /*CMP*/
'', /*CMP*/ 'B46F6F545');
CSAct[/*CMP*/ 'B46F6F114'] = new Array(CSTimeout ,2.500000);
CSAct[/*CMP*/ 'B46F6F545'] = new Array(CSGotoLin k,/*URL*/ 'home/fs1.html','');

// --></script>
</csactiondict>
</head>


Jul 20 '05 #1
2 3602
> Anyway, the code below has this CSaction stuff and a bunch of
Javascript. If
somebody would please take a very brief peek at the code and give me a basic idea of what it does. Presumably something to do with pausing the page before redirecting to another URL.
Yes I think that is what it does.
But it seems like so much code just to do that; surely it does more

....

You may find much of it isn't needed. It is there to potentially
support other actions but when you use one you cop for the lot. GoLive
gives the option of having this code in each page or maintaining a
common external library of code on the site and it looks like you are
seeing the former. I think there is also an option to strip the
unneeded bits but I may have made that up as I don't tend to use the
actions. As you can see they can be a sledgehammer to crack a nut.

Jul 20 '05 #2
Thanks Graham.
w
Jul 20 '05 #3

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

Similar topics

16
2646
by: Teffy | last post by:
Should I switch from using HTML-Kit to using Adobe GoLive? I am just a volunteer who is webmaster for a small non-profit group. I am the only person working on the site. The only reason I am tempted to switch from HTML-Kit to GoLive is that I can get an academic version for cheap ($70 USD). I have been doing simple coding by hand with HTML-Kit because it is free, to avoid having to go back later to debug bloated tag soup some editors...
48
4644
by: Zenobia | last post by:
Recently I was editing a document in GoLive 6. I like GoLive because it has some nice features such as: * rewrite source code * check syntax * global search & replace (through several files at once) * regular expression search & replace. Normally my documents are encoded with the ISO setting. Recently I was writing an XHTML document. After changing the encoding to UTF-8 I used the
1
2003
by: MarkW | last post by:
I currently use Macromedia Studio for web development but have been considering changing to Adobe Products since I use Acrobat highly as well as Photoshop and will be using InDesign CS soon. My question, how do the Adobe products compare to Macromedia for web design? I also see they have GoLive CS as well as Framemaker. I'm kind of confused about this. Is GoLive the web development (HTML) program or is that Framemaker and how does...
0
1359
by: koklynn.yip | last post by:
Hey, I just wanted to let you guys know that I found a really good deal on Adobe GoLive 5.0. A download version is on sale here: http://store.crmsoftwares.com/adgoli5.html If you don't know, Adobe GoLive is a web-authorizing and site-management tool. This version also has a lot of new features that make it easier to use with Photoshop, Illustrator, and LiveMotion files.
0
1233
by: Will Honea | last post by:
I've been handed a mess of related data in the form of multiple spead sheets. Each set of data contains part or parts of the what is needed in the final database but there is no common usable column that is usable for selecting data from all sources and no two sets contain all the rows of any other. By that, I mean that one list will have member names as (last, first, middle) while another omits the middle name and a third contains only...
3
1487
by: Charlie Bear | last post by:
i've got myself into a bit of an oo mess. it's probably me misunderstanding how oo works. I've got a base class called "Feature" which some classes inherit. in the database i've stored the data in a table along with a type id to tell me what type of feature it is. ie a poll feature has an id of two and has the properties of feature plus a poll id which links to a poll table. the poll feature has seperate methods that the base feature...
12
1407
by: pecan | last post by:
Okay, I need help. Here's the url (temporary) www.africanbush.co.za/wordpress/ What happens is that when you hover over Archives in FF it expands nicely and shows the different links, but when I hover over it in IE nothing happens. How do I fix it? Catherine
16
2781
by: gnawz | last post by:
I have a pagination function I am using in a file called functions.php as below<? //Pagination functions function getPagingQuery($sql, $itemPerPage = 10) { if (isset($_GET) && (int)$_GET > 0) { $page = (int)$_GET; } else { $page = 1; } // start fetching from this row number $offset = ($page - 1) * $itemPerPage; return $sql . " LIMIT $offset, $itemPerPage"; } /* Get the links to navigate between...
17
1945
by: Nyris | last post by:
I have this form setup to allow customers to fill in a little info and send an email to particular departments that they have their questions in. For some reason I cannot get it to work and in further playing around with it I get an HTTP 500 IS Error and it won't even load the page. Please help! Oh and I took the @ addres off the emails for this post. I know they're not there. $Dept = $_REQUEST; $First = $_REQUEST; $Last =...
0
9621
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
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10040
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
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
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
3611
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.