Javascript Problem

Sintoras

Shaaakaa!
Reaction score
45
This is a very simple issue I think, I'm not very advamced at Javascript.
I have this script that when I close a Website a Popu comes and askes to open it up again, nvm the rest :D:D:D
What did I do wrong, I think its the highlighted code:

Code:
<html XMLNS:IE>
<head>
<style>
@media all
{IE\:HOMEPAGE {behavior:url(#default#homepage)}}
</style>

<script language="JavaScript">
<!--

[B]function netscapeAlert()
var load = window.open('file:///C:/Users/Ben/Desktop/Size%20Changer.html','','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no');
{if (confirm(" message "))
javascript:load()
[/B]

//-->
</script>
<IE:HOMEPAGE ID="thisPage" />
</head>
<body onunLoad="setPage()">

<script language="JavaScript">
<!-- 

var littleWidth = 800;
var littleHeight = 800;
var littleX = 100;
var littleY = 100;
var bigWidth = 100;
var bigHeight = 100;
var bigX = 100;
var bigY = 100;
var whichSize = "Little";
var speed = 100;
var bob = parseInt(navigator.appVersion)
var t = null;

function expandContract()
{if (bob >= 4)
{if (whichSize == "Little")
{self.resizeTo(bigWidth,bigHeight);
self.moveTo(bigX,bigY);
whichSize = "Big";}
else
{self.resizeTo(littleWidth,littleHeight);
self.moveTo(littleX,littleY);
whichSize = "Little";}
t=setTimeout('expandContract()', speed);}}

expandContract();
//-->
</script>
</body>
</html>

Try it if you like!
 

enouwee

Non ex transverso sed deorsum
Reaction score
240
Well Ben, I don't know, but this directory doesn't exist on my computer:
C:/Users/Ben/Desktop/Size%20Changer.html

:D
 

Sintoras

Shaaakaa!
Reaction score
45
OK well that was just because I haven't uploaded it anymore, just edit it for your needs...:D

I meant the highlighted part that should be the problem.
 

mase

____ ___ ____ __
Reaction score
154
That script isn't even finished...

Code:
function netscapeAlert() [b]{[/b]
var load = window.open('file:///C:/Users/Ben/Desktop/Size%20Changer.html','','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no');
{if (confirm(" message "))[b]{[/b]
javascript:load()[b]}[/b]
[b]}[/b]

And where does 'javascript:load()'come into play? I don't see a 'load()' function anywhere and you don't really need the 'javascript:' since you are callin it from a js function...

You didn't even add an brackets to any of your functions and if/then/elses...

Seriously don't try to get ahead in a game you don't know how to play.
JS Tutorials
 

Sintoras

Shaaakaa!
Reaction score
45
Ok, I know I'm not any good at JavaScript and I'm not planning to learn it right now. All I need is an answer to my question.

Btw, thanks for the Link mase!
 

mase

____ ___ ____ __
Reaction score
154
Ok, I know I'm not any good at JavaScript and I'm not planning to learn it right now. All I need is an answer to my question.

Btw, thanks for the Link mase!

I answered your question. Add { and } to your functions and if/then/else statements.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top