PDA

View Full Version : problem with netscape (variables)


alaios
08-16-2002, 05:26 PM
this works with ie 5 but not with netscape 4.75
the problem is the line
onClick="MM_goToURL('parent','1.htm?0:0')
this works properly '1.htm but not this '1.htm?0:0'

why ? what can i do?


<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
<script language="JavaScript">
<!--
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<input type="button" name="Button" value="Button" onClick="MM_goToURL('parent','1.htm?0:0');return document.MM_returnValue">
</form>
</body>
</html>

beetle
08-16-2002, 05:35 PM
Uh, gobbledygook.

What are you trying to achieve exactly? what is the purpose of the '?0:0' tacked on to 1.htm? It looks like the syntax for a ternary operator but I don't understand it's use here. That Macromedia function looks a big complicated for just URL switching....I mean, you might as well just do this<input type="button" name="Button" value="Button" onClick="top.location.href='1.htm?0:0';">

alaios
08-16-2002, 09:24 PM
yes i need these ?0:0' ..These are variables that i want to move to the new page...What i must do for the Netscape?

beetle
08-16-2002, 09:27 PM
So you are using the colon as the delimeter? Why not something more standard like the ampersand?

1.htm?0&0

alaios
08-17-2002, 07:16 AM
this will work with the netscape?

beetle
08-17-2002, 09:27 AM
I believe so. I don't have access to an installed version of NS4.x. You could also consider storing whatever variables you need in a cookie, if this doensn't work out for you.