By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

frames and forms

P: n/a
i'm trying to use javascript to change the content of a textbox in a
different frame.

by clicking on a 'folder' link in 'leftFrame' i want to put the value
assigned by that link into the 'folderName' textbox in the
'uploadForm' form in 'mainFrame'. i'm doing this as...

onClick="parent.mainFrame.uploadForm.folderName.va lue='folder';"

this works perfectly fine with IE and Safari on my Mac OS X machine
and IE 6 on my PC laptop but anything Mozilla-based on either machine
gives me an error i just can't seem to get round...

'parent.mainFrame.uploadForm has no properties'

has anyone got any ideas why and what i can do about it, please?

many thanks

joe
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
js*****@btclick.com (JoeBaker) writes:
'parent.mainFrame.uploadForm has no properties' has anyone got any ideas why and what i can do about it, please?


You use the name of the form as a global variable. There is no reason
to believe that that should work, except that IE decided to allow it.
Try the fully qualified path:

parent.frames['mainFrame'].document.forms['uploadForm'].
elements['folderName'].value = ...

It is always safer to use the appropriate collections.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.