I have 3 diferent JSP´s and i hava to send a string to everyone I´m trying with javascript but this is not posible
this is the URLPages.jsp
<script LANGUAGE="JavaScript">
var dns="
function getDNS(){
alert(dns);
return dns;
}
function alertDNS(){
var data=getDNS();
alert(data);
alert(dns);
}
</script>
and i want to call it in another file by...
<%@ include file="../include/URLPages.jsp" %>
<script language="javascript" >
var newVar=" F"
function showDNS(){
alert(newVar);
newVar=getDNS(); //this is the problem
}
</script>
what´s the problem?
this is the URLPages.jsp
<script LANGUAGE="JavaScript">
var dns="
function getDNS(){
alert(dns);
return dns;
}
function alertDNS(){
var data=getDNS();
alert(data);
alert(dns);
}
</script>
and i want to call it in another file by...
<%@ include file="../include/URLPages.jsp" %>
<script language="javascript" >
var newVar=" F"
function showDNS(){
alert(newVar);
newVar=getDNS(); //this is the problem
}
</script>
what´s the problem?