4 Replies - 1793 Views - Last Post: 02 May 2002 - 05:23 PM

#1 BlueCube   User is offline

  • THIS IS SPARTAAA
  • member icon

Reputation: 1
  • View blog
  • Posts: 3,594
  • Joined: 19-February 02

Can this be condensed?

Posted 30 April 2002 - 11:56 AM

Aight, I'm not sure, but I have a feeling this script can be condensed.  For the proporties that do not change for each cromless window, should I leave the property blank in the next script? Haha, and those smilies aren't there in the script obviously! lmao
<html>
<head>
<title>Conspiracy Studios</title>
</head>
<script language="javascript" type="text/javascript" SRC="pz_chromeless.js"></script>
&lt;script&gt;
function openITstaff() {
theurl="Brendan.html"
wname ="CHROMELESSWIN"
W=450;
H=225;
windowCERRARa = "close_a.gif"
windowCERRARd = "close_d.gif"
windowCERRARo = "close_o.gif"
windowTIT    = "<font face=verdana size=1>&nbsp;¯ window title</font>"
windowBORDERCOLOR   = "#000000"
windowBORDERCOLORsel= "#FFFFFF"
windowTITBGCOLOR    = "#e0e0e0"
windowTITBGCOLORsel = "#a0a0a0"
openchromeless(theurl, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowTIT, windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
&lt;script&gt;
function openITcontact() {
theurl="contact.html"
wname ="CHROMELESSWIN"
W=285;
H=150;
windowCERRARa = "close_a.gif"
windowCERRARd = "close_d.gif"
windowCERRARo = "close_o.gif"
windowTIT    = "<font face=verdana size=1>&nbsp;¯ window title</font>"
windowBORDERCOLOR   = "#000000"
windowBORDERCOLORsel= "#FFFFFF"
windowTITBGCOLOR    = "#e0e0e0"
windowTITBGCOLORsel = "#a0a0a0"
openchromeless(theurl, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowTIT, windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
&lt;script&gt;
function openITdp() {
theurl="dp1.html"
wname ="CHROMELESSWIN"
W=400;
H=382;
windowCERRARa = "close_a.gif"
windowCERRARd = "close_d.gif"
windowCERRARo = "close_o.gif"
windowTIT    = "<font face=verdana size=1>&nbsp;¯ window title</font>"
windowBORDERCOLOR   = "#000000"
windowBORDERCOLORsel= "#FFFFFF"
windowTITBGCOLOR    = "#e0e0e0"
windowTITBGCOLORsel = "#a0a0a0"
openchromeless(theurl, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowTIT, windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
&lt;script&gt;
function openITservices() {
theurl="services.html"
wname ="CHROMELESSWIN"
W=200;
H=200;
windowCERRARa = "close_a.gif"
windowCERRARd = "close_d.gif"
windowCERRARo = "close_o.gif"
windowTIT    = "<font face=verdana size=1>&nbsp;¯ window title</font>"
windowBORDERCOLOR   = "#000000"
windowBORDERCOLORsel= "#FFFFFF"
windowTITBGCOLOR    = "#e0e0e0"
windowTITBGCOLORsel = "#a0a0a0"
openchromeless(theurl, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowTIT, windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>
&lt;script&gt;
function openITwhyonline() {
theurl="whyonline.html"
wname ="CHROMELESSWIN"
W=200;
H=200;
windowCERRARa = "close_a.gif"
windowCERRARd = "close_d.gif"
windowCERRARo = "close_o.gif"
windowTIT    = "<font face=verdana size=1>&nbsp;¯ window title</font>"
windowBORDERCOLOR   = "#000000"
windowBORDERCOLORsel= "#FFFFFF"
windowTITBGCOLOR    = "#e0e0e0"
windowTITBGCOLORsel = "#a0a0a0"
openchromeless(theurl, wname, W, H, windowCERRARa, windowCERRARd, windowCERRARo, windowTIT, windowBORDERCOLOR, windowBORDERCOLORsel, windowTITBGCOLOR, windowTITBGCOLORsel)
}
</script>

<body bgcolor="#9C9A9C" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="Layer1" style="position:absolute; left:1px; top:360px; width:805px; height:87px; z-index:1"><img src="botlogo.jpg" width="800" height="99" usemap="#Jello" border="0">
 <map name="Jello">
   <area shape="rect" coords="127,54,231,87" href="Java script:openITdp();">
   <area shape="rect" coords="368,54,458,89" href="Java script:openITcontact();">
   <area shape="rect" coords="576,52,693,89" href="Java script:openITwhyonline();">
 </map>
</div>
<table width="100%" border="0">
 <tr>
   <td><img src="toplogo.jpg" width="800" height="99" usemap="#pimpin" border="0"></td>
 </tr>
</table>
<map name="pimpin">
 <area shape="rect" coords="183,64,253,89" href="Java script:openITstaff();">
 <area shape="rect" coords="506,64,595,92" href="Java script:openITservices();"">
</map>
</body>
</html>

(Edited by BlueCubeStudios at 2:58 pm on April 30, 2002)


Is This A Good Question/Topic? 0
  • +

Replies To: Can this be condensed?

#2 skrilla monkey   User is offline

  • goat.face

Reputation: 0
  • View blog
  • Posts: 838
  • Joined: 14-January 02

Re: Can this be condensed?

Posted 01 May 2002 - 07:54 AM

yes, in fact it can. any script you take from a website (as that one is) is what i refer to as a 'stock script.'  it includes every feature known to man that you could use in a window or whatever the script is for. i prefer to write my own scripts so that they are smaller, easier to understand, and better implemented feature-wise.

another rule of thumb i use: if its not your script that you wrote, do not use it unless you completely understand it and can modify it/condense it :)

as for that script, pitch it. too complicated. use the script i gave you, and if you lost it, i can give it to you again. its using about, oh, 3% as much code as that script does. and if you're going for that draggable/resizeable look, learn JS and write your own.

last words of wisdom: chromeless windows are pretty much cliché :)

-pete

<edit>something i forgot: you have &lt;script&gt;function a() { code.stuff }</script> &lt;script&gt;function b() { code.stuff }</script>. basically one function in each script! that's one way to HUGELY condense the script!:o</edit>

(Edited by skrilla monkey at 11:56 am on May 1, 2002)

Was This Post Helpful? 0
  • +
  • -

#3 BlueCube   User is offline

  • THIS IS SPARTAAA
  • member icon

Reputation: 1
  • View blog
  • Posts: 3,594
  • Joined: 19-February 02

Re: Can this be condensed?

Posted 01 May 2002 - 08:12 AM

Aight.  The script you gave me does not include moving windows and closeing.  Yes, I do completely understand at least 95% of the script.  I read the entire tutorial and customized just about everything in there.  Thanx
Was This Post Helpful? 0
  • +
  • -

#4 skrilla monkey   User is offline

  • goat.face

Reputation: 0
  • View blog
  • Posts: 838
  • Joined: 14-January 02

Re: Can this be condensed?

Posted 01 May 2002 - 08:32 AM

Quote

Quote: from BlueCubeStudios on 12:12 pm on May 1, 2002
Aight.  The script you gave me does not include moving windows and closeing.
this i knew :rolleyes: if you understand the code, why can't you condense it?
Was This Post Helpful? 0
  • +
  • -

#5 BlueCube   User is offline

  • THIS IS SPARTAAA
  • member icon

Reputation: 1
  • View blog
  • Posts: 3,594
  • Joined: 19-February 02

Re: Can this be condensed?

Posted 02 May 2002 - 05:23 PM

Cause I know what all the code does.  I know about each property, etc.  But I do not know if I need to reset each property everytime I use a new function.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1