Ciao a tutti!
Ho un problema con uno script per inviare una segnalazione di link: valorizzo correttamente una variabile contenente l'URL chiamante, ma se cerco di inviarla è vuota....
------ lo script sulla pagina chiamante è questo:
function openMaila(){
var strURL = escape (window.location.href);
var x = "/asp/Copyofmailalink.asp" + "?REFERER=" + strURL + "&TITLE=" + document.title;
window.open(x,"newWin", "width=500,height=400");
}
Email to a friend
------ sulla popup che si apre è elaborato così:
<% ' Grab the title and referring page
title = trim(request.querystring("TITLE"))
Str_referer = Request.QueryString("REFERER")
response.Write(Str_referer)
errore = (referer = "")
if errore then
SenName = Request.Form("s_name")
if title = "" then
title = trim(request.form("title"))
end if
u_submitted = trim(request.form("u_submitted"))
' u_submitted checks to see if the form with an email address was submitted
if Str_referer = "" then
' If there is no referring page display an appropriate message
response.write "You have reached the Mail-A-Link page, but we were unable to recognize the previous page"
response.end
end if ' End check for referer
' If the form with the email address has benn submittes send the mail
if u_submitted <> "Yes" then
%>
------ sulla popup il response.write è valorizzato correttamente con l'url, ma quando invio il form con l'email e il nome del sender mi restituisce il messaggio "You have reached the Mail-A-Link page, but we were unable to recognize the previous page" per la variabile Str_referer vuota...
----- questo è il form:
<form action=<%= request.servervariables("script_name") %> method="post">
<input type="text" name="u_email">
<input type="hidden" name="title" value="<%= title %>">
<input type="hidden" name="referer" value="<%= Str_referer %>">
<input type="hidden" name="u_submitted" value="Yes">
----- non sto ma mettere tutti i campi (mail e nome)...
Aiuto!!! Vi prego!!
Michele

Rispondi quotando