Click to See Complete Forum and Search --> : get the source object/source frame of the calling function


kusi
10-31-2003, 02:55 AM
I have frames calling functions that affect the location property of other frames.( i have a central controll.jsp which forwards requests according to request parameters to different pages. )

Problem is I 'd like to get the calling frame's name in some javascript functions.
is there a this.source property somewhere, where this refers to a JS FUNCTION residing in a separate controll-functions.js file.

Khalid Ali
10-31-2003, 07:38 AM
interesting,
an event inJavaSCript environment contaions a property

IE = event.srcElement

NS = e.target

which gives you the reference to the element where the event was generated from.

will that help?

Shampie
10-31-2003, 12:16 PM
Khalid with that I presume you also would know a way for this:
when a layer(your control movement) touches another layer the last action will be canceled.

it's for this (http://members.chello.nl/~r.verbrugge/PSG.zip)

btw, how far has your orange guy walked so far? he seem to get little tired there!

Khalid Ali
10-31-2003, 01:46 PM
When you move a layer, I am not aware of any event being triggered by it.
What you can probaly do is to hard code the co-ords for layers and when a layer reaches other layers cords...

The walking guy got tired because we had over 10CM snow yesterday....ya know...

Shampie
10-31-2003, 10:40 PM
I figured to do it the hardcode way..

so calgary got white for haloween? ;D
got it nice and warm here in kingston(on)