Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I pass a string to 3 diferents JPS

Status
Not open for further replies.

112311123

Technical User
Sep 9, 2003
1
MX
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=&quot;JavaScript&quot;>

var dns=&quot;
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=&quot;../include/URLPages.jsp&quot; %>

<script language=&quot;javascript&quot; >
var newVar=&quot; F&quot;

function showDNS(){
alert(newVar);
newVar=getDNS(); //this is the problem
}
</script>

what´s the problem?
 
Hi,

Do you want the value to be posted to 3 different JSP pages?
or
Do you want to access same variable in 3 differnt Pages ??

Case 1: You need to post the value using URL Connection or HttpClient.

Case 2: Set the value in a session variable so that you can get that in those pages.

It's just a hint.

Thanks,
venu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top