Hi Dave, I haven't tried it, but there is a 'document' property called 'fileSize', so maybe:
var txt = parent.otherFrame.document.fileSize; Of course, this may be an MSIE extension. More information is available here: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/re ference/properties/filesize.asp (Above URL may word-wrap). Good luck and let us know how it goes. Cheers... Scott Cadillac http://xml-extra.net [EMAIL PROTECTED] http://witango.org [EMAIL PROTECTED] VP, Research and Development Plus International Corp. 604-460-1843 [EMAIL PROTECTED] http://www.plusinternational.com Vancouver, BC, Canada Does your company have an Enterprise Information Portal? Check out Salsa at www.plusinternational.com/flash/salsa.htm ----- Original Message ----- From: "Dave Shelley" <[EMAIL PROTECTED]> To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]> Sent: Monday, June 24, 2002 1:55 PM Subject: RE: Witango-Talk: Javascript Question > Maybe I should explain what I'm trying to do. > > I'd like to check the size of an upload file on the client machine before > it's uploadad. I realize it's been said that it can't be done, but that's > never stopped me from trying before. ;) > > Starting with [input type=file name=theFile size=50> > and an onChange handler that says: > parent.hiddenFrame.location='file:\\'+theFile.value; > This loads the file in the hiddenFrame. (Also works for previewing gif's) > > Next I want to figure out how big it is. If I could get the contents, I > could do a .length on it. > > So I can't user <@url>. The host and protocol are different from the parent > frame. I think I'm stuck. > > Thanks. > Dave > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]]On Behalf Of Ben Johansen > > Sent: Monday, June 24, 2002 3:48 PM > > To: Multiple recipients of list witango-talk > > Subject: RE: Witango-Talk: Javascript Question > > > > > > Just a thought, haven't thought it all the way > > Using the @URL and populating a hidden object that JS can get to > > > > Ben Johansen - http://www.pcforge.com > > Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm > > Latest downloads & List Archives @ http://www.witango.ws > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] On Behalf Of Dave Shelley > > Sent: Monday, June 24, 2002 9:27 AM > > To: Multiple recipients of list witango-talk > > Subject: Witango-Talk: Javascript Question > > > > Is it possible to read the entire contents of one frame from within > > another > > frame? Something like: > > var txt = parent.otherFrame.document.innerHTML; > > > > I have my doubts as this would open a huge security hole, but I thought > > I'd > > ask anyway. > > > > Dave Shelley > > > > ________________________________________________________________________ > > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > > with unsubscribe witango-talk in the message body > > > > > > ________________________________________________________________________ > > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > > with unsubscribe witango-talk in the message body > > ________________________________________________________________________ > TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] > with unsubscribe witango-talk in the message body > ________________________________________________________________________ TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED] with unsubscribe witango-talk in the message body
