• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How I can referenced to a varible

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello:
I have one JSP (Inicio) that open a window with two frames: the frame of the left is Menu and teh rigth is Portada. In the JSP parent (Inicio), I declared a variable (i_Variables_Cargadas), and i need use that variable in the frame of the left (menu).
The code use is:
parent.i_Variables_Cargadas
parent.document.i_Variables_Cargadas
but this don�t run.
Regards Roberto.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do you have the script in the frameset anyway? Can you store it in an external file? If so, you can reference the variable from any page. For example:
external.js
var i_Variables_Cargadas = "foo";
Inicio.html
<SCRIPT SRC="external.js">
<FRAMESET> ... </FRAMESET>

Menu.html
<SCRIPT SRC="external.js">
<SCRIPT LANGUAGE="JavaScript">
document.write(i_Variables_Cargadas);
</SCRIPT>
Hope this helps. If not, please provide more information and restrictions and I will try to help.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic