Inquiridor
Internet Explorer e Swf ?

Pergunta
-
Galera, boa noite! Vê se vc´s me entendem?
Uso um comando no flash "unloadMovieNum" para apagar do cache do
Internet Explorer um arquivo.swf que está dentro de uma página html.
O problema é que, quando é acionado o comando, "que é na verdade
apenas para apagar o arquivo.swf do cache do browser", ele
automaticamente abre uma nova janela do Internet Explorer sem eu ter
solicitado e constando o código abaixo: Como posso dar uma solução
de forma que esta janela abaixo não vem aparecer? Favor um Help?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<style>
a:link {font:8pt/11pt Verdana; color:red}
a:visited {font:8pt/11pt verdana; color4e4e4e}
</style>
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-
1252">
<title>HTTP 403 - proibido</title>
</head>
<script>
function Homepage(){
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
//For testing use
//DocURL
= "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
DocURL=document.location.href;
//this is where the http or https will be, as found by searching
for :// but skipping the res://
protocolIndex=DocURL.indexOf("://", 4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/", protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for
the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL
value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL, serverIndex);
if (protocolIndex - BeginURL > 7)
urlresult=""
//for display, we need to skip after http://, and go to the next
slash
displayresult=DocURL.substring(protocolIndex + 3, serverIndex);
var aElement = document.createElement("A");
aElement.innerText = displayresult;
aElement.href = urlresult;
homepageContainer.appendChild(aElement);
}
function doSearch()
{
saOC.NavigateToDefaultSearch();
}
function initPage()
{
document.body.insertAdjacentHTML("afterBegin","<object id=saOC
CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0
width=0></object>");
Homepage();
}
</script>
<body bgcolor="white" onload="initPage()">
<table width="400" cellpadding="3" cellspacing="5">
<tr>
<td id="tableProps" valign="top" align="left"><img
id="pagerrorImg" SRC="pagerror.gif"
width="25" height="33"></td>
<td id="tableProps2" align="left" valign="middle"
width="360"><h1 id="term1"
style="COLOR: black; FONT: 13pt/15pt verdana"><span
id="errorText">Você não está autorizado a ver esta página</span></h1>
</td>
</tr>
<tr>
<td id="tablePropsWidth" width="400" colspan="2"><font id="LID1"
style="COLOR: black; FONT: 8pt/11pt verdana">Você pode não ter
permissão para exibir este
diretório ou página usando as credenciais fornecidas.</font></td>
</tr>
<tr>
<td id="tablePropsWidth" width="400" colspan="2"><font id="LID2"
style="COLOR: black; FONT: 8pt/11pt verdana"><hr color="#C0C0C0"
noshade>
<p ID="term3"> Se você acha que deveria poder ver este diretório
ou página, tente contatar o
site da Web através de qualquer endereço de email ou número de
telefone listado na <span id="homepageContainer"></span> home
page.</p>
<p id="term4">Você pode clicar em <a href="javascriptoSearch
()"><img border=0 src="search.gif" width="16" height="16"
alt="search.gif (114 bytes)" align="center"> Pesquisar</a> para
procurar informações na Internet.</p>
<p><br>
</p>
<h2 id="errortextcode" style="font:8pt/11pt Verdana;
color:black">Erro de HTTP 403 -
proibido <br>
Internet Explorer </h2>
</font></td>
</tr>
</table>
</body>
</html>
Todas as Respostas
-
Oi!
Onde você usa esse comando unload ?
Você não deu detalhes suficientes, mas eu chutaria que no local onde você faz isso existe um link para outra página e está faltando um target="_self" (por que é que isso está sendo obrigatório não ficou claro).
[]'s
-
Caro Dennes, Agradeço pela iniciativa! Mas, vamos Lá:
No action script "Linguagem do Flash", uso um método para descarregar o arquivo swf do browser, o unloadMovieNum("arquivo.swf");. E outro para carregar o ladMovieNum("arquivo.swf"); Esses métodos estão associados a um botão . Assim gerando uma atualização em tempo de execução. “Essa saída é devido a deficiência da linguagem”! Mas é aí que surgi o problema:
Quando o unloadMovieNum(“arquivo.swf”) é interpretado ele chama uma nova janela do browser IE constando HTTP 403 – proibido, com o diretório quebrado http://localhost/Pasta/. O diretório correto é “http://localhost/Pasta/arquivo.html”. O arquivo.swf fica dentro do arquivo.html! Está dando a entender que esta nova janela atualiza o arquivo.swf que está dentro do arquivo.html no diretório original?
Por que essa nova janela é aberta com o diretório quebrado e sem eu ter solicitado ?
Será que existe uma solução a este problema ?
Abaixo segue o script desta nova janela:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<style>
a:link {font:8pt/11pt Verdana; color:red}
a:visited {font:8pt/11pt verdana; color
4e4e4e}
</style>
<meta HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-
1252">
<title>HTTP 403 - proibido</title>
</head>
<script>
function Homepage(){
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#http://www.DocURL.com/bar.htm
//For testing use
//DocURL
= "res://shdocvw.dll/http_404.htm#https://www.microsoft.com/bar.htm"
DocURL=document.location.href;
//this is where the http or https will be, as found by searching
for :// but skipping the res://
protocolIndex=DocURL.indexOf("://", 4);
//this finds the ending slash for the domain server
serverIndex=DocURL.indexOf("/", protocolIndex + 3);
//for the href, we need a valid URL to the domain. We search for
the # symbol to find the begining
//of the true URL, and add 1 to skip it - this is the BeginURL
value. We use serverIndex as the end marker.
//urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
BeginURL=DocURL.indexOf("#",1) + 1;
urlresult=DocURL.substring(BeginURL, serverIndex);
if (protocolIndex - BeginURL > 7)
urlresult=""
//for display, we need to skip after http://, and go to the next
slash
displayresult=DocURL.substring(protocolIndex + 3, serverIndex);
var aElement = document.createElement("A");
aElement.innerText = displayresult;
aElement.href = urlresult;
homepageContainer.appendChild(aElement);
}
function doSearch()
{
saOC.NavigateToDefaultSearch();
}
function initPage()
{
document.body.insertAdjacentHTML("afterBegin","<object id=saOC
CLASSID='clsid:B45FF030-4447-11D2-85DE-00C04FA35C89' HEIGHT=0
width=0></object>");
Homepage();
}
</script>
<body bgcolor="white" onload="initPage()">
<table width="400" cellpadding="3" cellspacing="5">
<tr>
<td id="tableProps" valign="top" align="left"><img
id="pagerrorImg" SRC="pagerror.gif"
width="25" height="33"></td>
<td id="tableProps2" align="left" valign="middle"
width="360"><h1 id="term1"
style="COLOR: black; FONT: 13pt/15pt verdana"><span
id="errorText">Você não está autorizado a ver esta página</span></h1>
</td>
</tr>
<tr>
<td id="tablePropsWidth" width="400" colspan="2"><font id="LID1"
style="COLOR: black; FONT: 8pt/11pt verdana">Você pode não ter
permissão para exibir este
diretório ou página usando as credenciais fornecidas.</font></td>
</tr>
<tr>
<td id="tablePropsWidth" width="400" colspan="2"><font id="LID2"
style="COLOR: black; FONT: 8pt/11pt verdana"><hr color="#C0C0C0"
noshade>
<p ID="term3"> Se você acha que deveria poder ver este diretório
ou página, tente contatar o
site da Web através de qualquer endereço de email ou número de
telefone listado na <span id="homepageContainer"></span> home
page.</p>
<p id="term4">Você pode clicar em <a href="javascriptBig SmileoSearch
()"><img border=0 src="search.gif" width="16" height="16"
alt="search.gif (114 bytes)" align="center"> Pesquisar</a> para
procurar informações na Internet.</p>
<p><br>
</p>
<h2 id="errortextcode" style="font:8pt/11pt Verdana;
color:black">Erro de HTTP 403 -
proibido <br>
Internet Explorer </h2>
</font></td>
</tr>
</table>
</body>
</html>
Atenciosamente, Jc.
-
estou procedendo normalmente, obdecendo os commandos sugeridos por vc.
Qualquer dúvida, eu concluirei posteriormente.
Obrigado
JTdeBarros
- Sugerido como Resposta dionatan yuri fk 224 sexta-feira, 7 de setembro de 2012 18:48