Click to See Complete Forum and Search --> : Having Problem in window.frames.item('body').document.location


shahzeb_khan
February 23rd, 2006, 11:31 AM
i am trying to get current loaded page of Body
through
window.frames.item('body').document.location

and its working

but the problem is when i try move its result into a varliable like

var path=window.frames.item('body').document.location

and try to use path in function the get file extension like

getFileExtension(path) it throws exception object does not support this property

so Some body know abt it

Regards
Shahzeb

PeejAvery
February 23rd, 2006, 11:55 AM
What language is getFileExtension()? I have seen it before but everytime the G is capitalized.

Another question. Why are you using window.frames.item('body').document.location when WINDOWNAME.location is sufficient. Seems like extra work to me.

shahzeb_khan
February 23rd, 2006, 12:04 PM
I m using Frameset


that why i m using

window.frames.item('body').document.location;

becuase page names are getting change in Frame throught menu

that is the reason

and whole language is javascript

PeejAvery
February 23rd, 2006, 04:46 PM
I think you are confused. Using Frameset has nothing to do with using window.frames.item('body').document.location. Using WINDOWNAME.location has nothing to do with page names but windowname instead. Notice bannerframe and mainframe, they are windownames. So you would then have parent.bannerframe.location as the variable.

<frameset rows="100,*">
<frame src="banner.html" name="bannerframe">
<frame src="main.html" name="mainframe">
</frameset>
Concerning getFileExtension(), this must be a user created function. This function does not exist in JavaScript. Are you using some object?

shahzeb_khan
February 24th, 2006, 01:50 AM
Thanks peejavery :) its Solved Now i really appriciate your suggestion

bye

take care

PeejAvery
February 24th, 2006, 02:07 AM
Glad to know you solved it.