Slim
Tue Dec 19 09:38:33 CST 2006
You still have this problem
Error: object required: 'document.getElementById(...)'
means the element does not exist.
check your element does have the right name
can we see your code for both the parent document and the iframe document
is your script in the iframe or the parent page?
"amatuer" <njoosub@gmail.com> wrote in message
news:1166536522.412034.207190@48g2000cwx.googlegroups.com...
> Yes i would like to assign it from the iframe to the main page....then
> i send it to anthr page aftr that
>
>
> Slim wrote:
>> the error
>>
>> Error: object required: 'document.getElementById(...)'
>>
>> means the element does not exist.
>>
>> also I se you are assigning the values from the frame to the main
>> document,
>>
>> document.getElementById("selTitleStake").value =
>> IFrame1.document.getElementById("selTitleStake1").value
>>
>> I thought you wanted it the other way around
>>
>> IFrame1.document.getElementById("selTitleStake").value =
>> document.getElementById("selTitleStake1").value
>>
>> are you sure you have the right way around?
>>
>>
>>
>>
>>
>>
>> "amatuer" <njoosub@gmail.com> wrote in message
>> news:1166534532.224460.273560@73g2000cwn.googlegroups.com...
>> I have noticed that this works:
>>
>> <SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
>> Sub ProjDetnxt2_onclick
>> If (projdetnew4.selStake.value) = "Mentor" Then
>>
>> document.getElementById("NameStake").value =
>> IFrame1.document.getElementById("NameStake1").value
>>
>> End If
>> End Sub
>> </SCRIPT>
>>
>> but this does not:
>>
>> <SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
>> Sub ProjDetnxt2_onclick
>> If (projdetnew4.selStake.value) = "Mentor" Then
>> document.getElementById("selTitleStake").value =
>> IFrame1.document.getElementById("selTitleStake1").value
>> document.getElementById("NameStake").value =
>> IFrame1.document.getElementById("NameStake1").value
>> document.getElementById("SurnameStake").value =
>> IFrame1.document.getElementById("SurnameStake1").value
>>
>> End If
>> End Sub
>> </SCRIPT>
>>
>> The difference between the two above is that it does nt work when
>> assigning more then one at a time...Any better ideas then doing one at
>> a time?
>>
>>
>> Ayush wrote:
>> > Replied to [amatuer]s message :
>> > > It says:
>> > >
>> > > Error: object required: 'document.getElementById(...)'
>> > >
>> > > Iv tried creating a test page with an iframe to do what i need my
>> > > page
>> > > to do and it works. So i think there is somthing in page that is
>> > > clashing with this script...
>> >
>> >
>> > Try using (note that i am not too good in VBs) :
>> > frames(0).document.getElementById("NameStake1").value =
>> > document.getElementById("NameStake").value
>> >
>> >
>> > Make sure that there is a element with NameStake1 and one element with
>> > NameStake ID.
>> >
>> > ? Ayush [ Good :-) Luck ]
>> > -------------
>> > Search - www.Google.com | Wikipedia -
http://en.wikipedia.org
>> > Snip your long urls -
http://snipurl.com/
>> > -------------
>