Clearline
07-15-2003, 05:40 PM
Some of my JS scripts require that I state the frame where the code originated from, like:
top.PanelTop.location='javascript: parent.'+inFrame+'.JS_var';
inFrame = the referring frame
I can't figure out the command to give me the inframe "string" from the script, so have to type it in. Problem is when the script runs from different frames..
I have tried:
inframe=self | _self | .self (which returns [object])
inframe=self.location (returns file & path name)
I have also tried versions of eval(self)
I would put an "inframe=" var in each file that needs it, , but ideally I would like to use inframe=parent."framename" in the js, making the use more dynamic.
So, is there not a command or functions that returns the sting name of a Frame?
:confused:
top.PanelTop.location='javascript: parent.'+inFrame+'.JS_var';
inFrame = the referring frame
I can't figure out the command to give me the inframe "string" from the script, so have to type it in. Problem is when the script runs from different frames..
I have tried:
inframe=self | _self | .self (which returns [object])
inframe=self.location (returns file & path name)
I have also tried versions of eval(self)
I would put an "inframe=" var in each file that needs it, , but ideally I would like to use inframe=parent."framename" in the js, making the use more dynamic.
So, is there not a command or functions that returns the sting name of a Frame?
:confused: