JavaScript - Error ASP y Javascript

 
Vista:

Error ASP y Javascript

Publicado por Luis (1 intervención) el 08/06/2007 17:39:28
Hola amigos:

tengo el siguiente error:
Sun ONE ASP JavaScript runtime (0x800A01B6)
Object doesn't support this property or method
/index2.asp, line 30

la linea 30 es:
<div id="MidleBoX"> <% response.redirect ("http://www.yahoo.com"); %> </div>

el problema se origina cuando migramos de iis a SUN ONE ASP. SUN no soporte el server.execute y hay que cambiarlo por server.redirect. El codigo completo esta mas abajo:

Se aceptan todo tipo de aydas, tips, links, ideas y toda clase de yerbas...

Gracias.

<%@LANGUAGE="JAVASCRIPT"%>
<% if (String(Request.QueryString('lng')) != "undefined") {
lng = Request.QueryString('lng');
}else{
lng = "eng";
} %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<title>Casas del Toqui</title>
<link href="code/nu.css" rel="stylesheet" type="text/css">
</head>
<script language="javascript" type="text/javascript" src="code/nu.js" ></script>
<body>
<a name="up"></a>
<div align="center">
<div id="TopBoX">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="760" height="300">
<param name="movie" value="swf/main.swf?lng=<%= lng %>">
<param name=quality value=high><br>
<param name="BGCOLOR" value="#000000">
<embed src="swf/main.swf?lng=<%= lng %>" width="760" height="300" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#000000"></embed>
</object>
</div>
<% if (String(Request.QueryString('mod')) != "undefinEd") { %>
<div id="MidleBoX"> <% response.redirect ("http://www.yahoo.com"); %> </div>
'
'<% Server.Execute(Request.QueryString('mod')+".asp"); %></div>
<% } %>
<div id="FootBoX">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" align="left" valign="bottom">
<% if (lng=='eng' || lng=='goeng'){ %>
<strong><a href="http://www.casasdeltoqui.cl/index.asp?lng=goeng" target="_self">HOME</a> <a href="#up">• UP</a> <a href="http://www.casasdeltoqui.cl/index.asp?mod=eng_contactenos&lng=goeng" target="_self">• CONTACT US</a><br>
<a href="http://www.larose-trintaudon.com/" target="_blank">Larose-Trintaudon.com</a></strong>
<% }else{ %>
<strong><a href="http://www.casasdeltoqui.cl/index.asp?lng=goesp" target="_self">HOME</a> <a href="#up">• ARRIBA</a> <a href="http://www.casasdeltoqui.cl/index.asp?mod=esp_contactenos&lng=goesp" target="_self">• CONTACTO</a><br>
<a href="http://www.larose-trintaudon.com/" target="_blank">Larose-Trintaudon.com</a></strong>
<% } %>
</td>
<td width="50%" align="right"><div id="div">Fundo Santa Anita de Totihue, Requínoa, VI Region - Chile<br>
Tel.:(56 72) 32 18 70 Tel./Fax: (56 72) 55 11 97</div>
</td>
</tr>
</table>
</div>

</div>
</body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Error ASP y Javascript

Publicado por Gonzalo (107 intervenciones) el 08/06/2007 18:10:18
Pues sin tener ni idea de ASP yo diría que puedes probar a poner la R en mayúscula:
<% Response.Redirect ("http://www.yahoo.com"); %>

Y también podrías, aprovechando, poner este trozo de código:
<%
if (String(Request.QueryString('mod')) != "undefinEd") {
Response.Redirect ("http://www.yahoo.com");
}
%>
más arriba en la página. Más que nada porque los posibles redirects o forwards es mejor hacerlos cuanto antes. Y ya que estás, así entre tú y yo, no metas eso dentro de un <div></div>.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar