Hi, iv gt an input box in a Iframe that is on a main page of mine. I
would like to assign the value of the inputbox in my Iframe to a hidden
input box in my main page..can anyone help me with this?

This i what iv been using, but it doesnt seem to work:

<script for = "ProjDetnxt2" language="VBScript" event="onClick">
If (projdetnew4.selStake.value) = "Mentor" Then
txt3 = projdetnew4.IFrame1.NameStake.value
projdetnew4.NameStake.value = txt3
End If

projdetnew4.submit
</script>

of which:

projdetnew4- form name
selectbox that send value to IFrame- selStake
NameStake - input box on iframe, n also hidden input box on main page

Any help would be highly appreciated...thanks

Re: IFrame by Slim

Slim
Mon Dec 18 07:04:46 CST 2006

Not a ASP question, but all the same

http://dev.thatsit.net.au/test/iFrame.asp


"amatuer" <njoosub@gmail.com> wrote in message
news:1166426231.425986.84220@16g2000cwy.googlegroups.com...
> Hi, iv gt an input box in a Iframe that is on a main page of mine. I
> would like to assign the value of the inputbox in my Iframe to a hidden
> input box in my main page..can anyone help me with this?
>
> This i what iv been using, but it doesnt seem to work:
>
> <script for = "ProjDetnxt2" language="VBScript" event="onClick">
> If (projdetnew4.selStake.value) = "Mentor" Then
> txt3 = projdetnew4.IFrame1.NameStake.value
> projdetnew4.NameStake.value = txt3
> End If
>
> projdetnew4.submit
> </script>
>
> of which:
>
> projdetnew4- form name
> selectbox that send value to IFrame- selStake
> NameStake - input box on iframe, n also hidden input box on main page
>
> Any help would be highly appreciated...thanks
>



Re: IFrame by amatuer

amatuer
Mon Dec 18 08:21:53 CST 2006

Now my script looks like this bt its still not working:

IFrame1.document.getElementById("NameStake1").value =
document.getElementById("NameStake").value

Please help



Slim wrote:
> Not a ASP question, but all the same
>
> http://dev.thatsit.net.au/test/iFrame.asp
>
>
> "amatuer" <njoosub@gmail.com> wrote in message
> news:1166426231.425986.84220@16g2000cwy.googlegroups.com...
> > Hi, iv gt an input box in a Iframe that is on a main page of mine. I
> > would like to assign the value of the inputbox in my Iframe to a hidden
> > input box in my main page..can anyone help me with this?
> >
> > This i what iv been using, but it doesnt seem to work:
> >
> > <script for = "ProjDetnxt2" language="VBScript" event="onClick">
> > If (projdetnew4.selStake.value) = "Mentor" Then
> > txt3 = projdetnew4.IFrame1.NameStake.value
> > projdetnew4.NameStake.value = txt3
> > End If
> >
> > projdetnew4.submit
> > </script>
> >
> > of which:
> >
> > projdetnew4- form name
> > selectbox that send value to IFrame- selStake
> > NameStake - input box on iframe, n also hidden input box on main page
> >
> > Any help would be highly appreciated...thanks
> >


Re: IFrame by Slim

Slim
Mon Dec 18 08:57:02 CST 2006

is the script firing at all?

insert
msgbox "Test"
at top of script, do you get a result?

if so try

msgbox document.getElementById("NameStake").value

do you get exspected reply?


"amatuer" <njoosub@gmail.com> wrote in message
news:1166451713.233824.286370@f1g2000cwa.googlegroups.com...
> Now my script looks like this bt its still not working:
>
> IFrame1.document.getElementById("NameStake1").value =
> document.getElementById("NameStake").value
>
> Please help
>
>
>
> Slim wrote:
>> Not a ASP question, but all the same
>>
>> http://dev.thatsit.net.au/test/iFrame.asp
>>
>>
>> "amatuer" <njoosub@gmail.com> wrote in message
>> news:1166426231.425986.84220@16g2000cwy.googlegroups.com...
>> > Hi, iv gt an input box in a Iframe that is on a main page of mine. I
>> > would like to assign the value of the inputbox in my Iframe to a hidden
>> > input box in my main page..can anyone help me with this?
>> >
>> > This i what iv been using, but it doesnt seem to work:
>> >
>> > <script for = "ProjDetnxt2" language="VBScript" event="onClick">
>> > If (projdetnew4.selStake.value) = "Mentor" Then
>> > txt3 = projdetnew4.IFrame1.NameStake.value
>> > projdetnew4.NameStake.value = txt3
>> > End If
>> >
>> > projdetnew4.submit
>> > </script>
>> >
>> > of which:
>> >
>> > projdetnew4- form name
>> > selectbox that send value to IFrame- selStake
>> > NameStake - input box on iframe, n also hidden input box on main page
>> >
>> > Any help would be highly appreciated...thanks
>> >
>



Re: IFrame by amatuer

amatuer
Tue Dec 19 05:57:56 CST 2006

Yes, the script does fire. This works too: msgbox "Test", but when i
try the next one, displayng the value of the textbox from my IFrame:
msgbox document.getElementById("NameStake").value, it doesnt work...


Slim wrote:
> is the script firing at all?
>
> insert
> msgbox "Test"
> at top of script, do you get a result?
>
> if so try
>
> msgbox document.getElementById("NameStake").value
>
> do you get exspected reply?
>
>
> "amatuer" <njoosub@gmail.com> wrote in message
> news:1166451713.233824.286370@f1g2000cwa.googlegroups.com...
> > Now my script looks like this bt its still not working:
> >
> > IFrame1.document.getElementById("NameStake1").value =
> > document.getElementById("NameStake").value
> >
> > Please help
> >
> >
> >
> > Slim wrote:
> >> Not a ASP question, but all the same
> >>
> >> http://dev.thatsit.net.au/test/iFrame.asp
> >>
> >>
> >> "amatuer" <njoosub@gmail.com> wrote in message
> >> news:1166426231.425986.84220@16g2000cwy.googlegroups.com...
> >> > Hi, iv gt an input box in a Iframe that is on a main page of mine. I
> >> > would like to assign the value of the inputbox in my Iframe to a hidden
> >> > input box in my main page..can anyone help me with this?
> >> >
> >> > This i what iv been using, but it doesnt seem to work:
> >> >
> >> > <script for = "ProjDetnxt2" language="VBScript" event="onClick">
> >> > If (projdetnew4.selStake.value) = "Mentor" Then
> >> > txt3 = projdetnew4.IFrame1.NameStake.value
> >> > projdetnew4.NameStake.value = txt3
> >> > End If
> >> >
> >> > projdetnew4.submit
> >> > </script>
> >> >
> >> > of which:
> >> >
> >> > projdetnew4- form name
> >> > selectbox that send value to IFrame- selStake
> >> > NameStake - input box on iframe, n also hidden input box on main page
> >> >
> >> > Any help would be highly appreciated...thanks
> >> >
> >


Re: IFrame by Ayush

Ayush
Tue Dec 19 06:10:17 CST 2006

Replied to [amatuer]s message :
> Yes, the script does fire. This works too: msgbox "Test", but when i
> try the next one, displayng the value of the textbox from my IFrame:
> msgbox document.getElementById("NameStake").value, it doesnt work...
>



What happens ?? Try this :
Internet Explorer > Tools > Internet Options
Advanced tab
Tick "Disable Script Debugging" AND Tick "Display a notification on each script error"
Click OK
Refresh the page

â?? Ayush [ Good :-) Luck ]
-------------
Search - www.Google.com | Wikipedia - http://en.wikipedia.org
Snip your long urls - http://snipurl.com/
-------------

Re: IFrame by amatuer

amatuer
Tue Dec 19 06:22:54 CST 2006

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...



Ayush wrote:
> Replied to [amatuer]s message :
> > Yes, the script does fire. This works too: msgbox "Test", but when i
> > try the next one, displayng the value of the textbox from my IFrame:
> > msgbox document.getElementById("NameStake").value, it doesnt work...
> >
>
>
>
> What happens ?? Try this :
> Internet Explorer > Tools > Internet Options
> Advanced tab
> Tick "Disable Script Debugging" AND Tick "Display a notification on each =
script error"
> Click OK
> Refresh the page
>
> =E2=86=92 Ayush [ Good :-) Luck ]
> -------------
> Search - www.Google.com | Wikipedia - http://en.wikipedia.org
> Snip your long urls - http://snipurl.com/
> -------------


Re: IFrame by Ayush

Ayush
Tue Dec 19 07:05:10 CST 2006

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/
-------------


Re: IFrame by amatuer

amatuer
Tue Dec 19 07:22:12 CST 2006

I have noticed that this works:

<SCRIPT ID=3DclientEventHandlersVBS LANGUAGE=3Dvbscript>
Sub ProjDetnxt2_onclick
If (projdetnew4.selStake.value) =3D "Mentor" Then

document.getElementById("NameStake").value =3D
IFrame1.document.getElementById("NameStake1").value

End If
End Sub
</SCRIPT>

but this does not:

<SCRIPT ID=3DclientEventHandlersVBS LANGUAGE=3Dvbscript>
Sub ProjDetnxt2_onclick
If (projdetnew4.selStake.value) =3D "Mentor" Then
document.getElementById("selTitleStake").value =3D
IFrame1.document.getElementById("selTitleStake1").value
document.getElementById("NameStake").value =3D
IFrame1.document.getElementById("NameStake1").value
document.getElementById("SurnameStake").value =3D
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 =3D
> document.getElementById("NameStake").value
>
>
> Make sure that there is a element with NameStake1 and one element with Na=
meStake ID.
>
> =E2=86=92 Ayush [ Good :-) Luck ]
> -------------
> Search - www.Google.com | Wikipedia - http://en.wikipedia.org
> Snip your long urls - http://snipurl.com/
> -------------


Re: IFrame by Slim

Slim
Tue Dec 19 07:42:25 CST 2006

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/
> -------------



Re: IFrame by amatuer

amatuer
Tue Dec 19 07:55:22 CST 2006

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/
> > -------------


Re: IFrame by mayayana

mayayana
Tue Dec 19 07:56:39 CST 2006

I'm getting a bit confused by all the different
code samples, but I had a couple of thoughts
that might be useful:

1) IFRAME is a separate page. I'm not sure,
but I suspect it's elements may not be available
directly through the document object.

2) It's best to get out of the habit of IFRAMES,
anyway. They're security risks and are used
by advertising companies to bypass ad blockers.
Since they're not used for much else, they're
increasingly being blocked.
A DIV can be made to act like an IFRAME by
using CSS to make it scrollable.

Also, older browsers don't recognize IFRAMES.
They were a Microsoft invention that Mozilla
picked up. I don't know about older Mozilla versions,
Opera, Safari, etc. I don't think Netscape 4 recognized
them. ( I realize you're doing an IE-only page in this
case.)

3) If an element has an ID you can refer to that.
It's a waste of IE's processing time to make it
search the page.
document.getelementbyID("something").value
is the same as something.value


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/
> -------------




Re: IFrame by Slim

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/
>> > -------------
>



Re: IFrame by amatuer

amatuer
Wed Dec 20 01:12:31 CST 2006

Main Page code:

(ProjDetailsnew4.asp)

<% on error resume next
If session("user")="" Then
Response.redirect("default.htm")
End if

If session("ID")="" Then
Response.redirect("default.htm")
End if

If Session("ID") < 1 Then
Response.redirect("home.asp?page=rights")
End if

if request.form("FarmName") = "" Then
errors = errors + "<BR>Farm Name"
end if
if request.form("selFarms") = "" Then
errors = errors + "<BR>Farm Types"
end if
if (request.form("TotArea") = "") then
errors = errors + "<BR>Total Area"
elseif (not(isnumeric(request.form("TotArea")))) or
(cint(request.form("TotArea")) < (cint(request.form("ADL")) +
cint(request.form("ALUI")) + cint(request.form("PG")) +
cint(request.form("NG")))) Then
errors = errors + "<BR>Total Area"
end if
if (not(request.form("ADL") = "")) and
(not(isnumeric(request.form("ADL")))) Then
errors = errors + "<BR>Arable Dry Land"
end if
if (not(request.form("ALUI") = "")) and
(not(isnumeric(request.form("ALUI")))) Then
errors = errors + "<BR>Arable Land Under Irrigation"
end if
if (not(request.form("PG") = "")) and
(not(isnumeric(request.form("PG")))) Then
errors = errors + "<BR>Planted Grazing"
end if
if (not(request.form("NG") = "")) and
(not(isnumeric(request.form("NG")))) Then
errors = errors + "<BR>Natural Grazing"
end if

%>
<html>
<head>
<title>Adding new Project</title>
<STYLE>
.mask {
behavior: url("mask_vbs.htc");
font: 10pt Tahoma;
color: black
}

H1 {
font: bold 18pt verdana;
color: navy
}

TD {
font: 10pt verdana;
}
A:link {text-decoration:none; }
A:visited {text-decoration:none; }
A:hover { text-decoration:underline; }
</STYLE>

</head>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<script language="VBScript" for="selStake" event="onChange">

document.all.IFrame1.src="P4_Iframe.asp?Stake=" &
projdetnew4.selStake.value
</script>


<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>
<!-- <script for = "ProjDetnxt2" language="VBScript" event="onClick">
If (projdetnew4.selStake.value) = "Mentor" Then
msgbox document.getElementById("NameStake1").value
txt2 = projdetnew4.IFrame1.selTitleStake.value
projdetnew4.selTitleStake.value = txt2
txt3 = IFrame1.NameStake1.value

document.getElementById("NameStake").value =
IFrame1.document.getElementById("NameStake1").value

txt4 = projdetnew4.IFrame1.SurnameStake.value
projdetnew4.SurnameStake.value = txt4
txt5 = projdetnew4.IFrame1.ContactNo.value
projdetnew4.ContactNo.value = txt5

ElseIf (projdetnew4.selStake.value) = "Insitution" Then
txt1 = projdetnew4.IFrame1.InstName.value
projdetnew4.InstName.value = txt1
txt2 = projdetnew4.IFrame1.selTitleStake2.value
projdetnew4.selTitleStake.value = txt2
txt3 = projdetnew4.IFrame1.NameStake2.value
projdetnew4.NameStake.value = txt3
txt4 = projdetnew4.IFrame1.SurnameStake2.value
projdetnew4.SurnameStake.value = txt4
txt5 = projdetnew4.IFrame1.ContactNo2.value
projdetnew4.ContactNo.value = txt5
End If

projdetnew4.submit
</script> -->
<body>

<% if errors = "" then %>
<table border="1" cellspacing="0" cellpadding="0" style="WIDTH: 85%;
HEIGHT: 171px" align=center>

<TR>
<td width="20%"><IMG style="WIDTH: 192px; HEIGHT: 37px" height=36
src="senwes-logos/image002.png" width=225 border=0><BR><IMG
style="WIDTH: 207px; HEIGHT: 17px" height=17
src="senwes-logos/image004.png" width=227 border=0></TD>
<TD align="center"><FONT face=Arial size=6
color=#004a31><STRONG><EM>Add a
Project</EM></STRONG></FONT></FONT></TD></TR>
<TR>
<TD><FONT color="Gray" face="arial">Current User: <%=
session("User") %></FONT> </TD>
<TD align="right"><font face="arial" style="FONT-STYLE: italic"
color="#993300">Create a new Project</font>
<TR>
<TD colSpan=2><BR>
<form method="POST" action="ProjDetailsnew5.asp" name="projdetnew4">

<input type="hidden" name="ProjFarmer" value="<%=
request.form("ProjFarmer") %>">
<input type="hidden" name="ProjType" value="<%=
request.form("ProjType") %>">
<input type="hidden" name="LegalEnt" value="<%=
request.form("LegalEnt") %>">
<input type="hidden" name="NoBeneficiaries" value="<%=
request.form("NoBeneficiaries") %>">
<input type="hidden" name="DevStage" value="<%=
request.form("DevStage") %>">
<input type="hidden" name="Priority" value="<%=
request.form("Priority") %>">
<input type="hidden" name="CommDate" value="<%=
request.form("CommDate") %>">

<input type="hidden" name="selTitle" value="<%=
request.form("selTitle") %>">
<input type="hidden" name="LangPref" value="<%=
request.form("LangPref") %>">
<input type="hidden" name="Surname" value="<%= request.form("Surname")
%>">
<input type="hidden" name="FirstNames" value="<%=
request.form("FirstNames") %>">
<input type="hidden" name="Tel1" value="<%= request.form("Tel1") %>">
<input type="hidden" name="Tel2" value="<%= request.form("Tel2") %>">
<input type="hidden" name="idNum" value="<%= request.form("idNum")
%>">
<input type="hidden" name="selProvince" value="<%=
request.form("selProvince") %>">
<input type="hidden" name="selPostTown" value="<%=
request.form("selPostTown") %>">
<input type="hidden" name="selStreetTown" value="<%=
request.form("selStreetTown") %>">
<input type="hidden" name="PostalAddr" value="<%=
request.form("PostalAddr") %>">
<input type="hidden" name="StrAddr" value="<%= request.form("StrAddr")
%>">
<input type="hidden" name="PostalCode" value="<%=
request.form("PostalCode") %>">
<input type="hidden" name="StrCode" value="<%= request.form("StrCode")
%>">
<input type="hidden" name="selBranch" value="<%=
request.form("selBranch") %>">

<input type="hidden" name="FarmName" value="<%=
request.form("FarmName") %>">
<input type="hidden" name="selFarms" value="<%=
request.form("selFarms") %>">
<input type="hidden" name="ADL" value="<%= request.form("ADL") %>">
<input type="hidden" name="ALUI" value="<%= request.form("ALUI") %>">
<input type="hidden" name="PG" value="<%= request.form("PG") %>">
<input type="hidden" name="NG" value="<%= request.form("NG") %>">
<input type="hidden" name="TotArea" value="<%= request.form("TotArea")
%>">
<input type="hidden" name="LatPos" value="<%= request.form("LatPos")
%>">
<input type="hidden" name="LongPos" value="<%= request.form("LongPos")
%>">
<input type="hidden" name="txtcomments" value="<%=
request.form("txtcomments") %>">

<input type="hidden" name="InstName" id="InstName" value="">
<input type="hidden" name="selTitleStake" id="selTitleStake" value="">
<input type="hidden" name="NameStake" id="NameStake" value="">
<input type="hidden" name="SurnameStake" id="SurnameStake" value="">
<input type="hidden" name="ContactNo" id="ContactNo" value="">

<table border="0" cellpadding="2" align="CENTER">
<tr>
<td align="center" colspan="4" style="background-color:
#F5F5DC;"><FONT face=Tahoma color=#993300><b>Stakeholder
Details</b></FONT></td><tr>
<TR>
<TD align=right><FONT face=Tahoma color=#993300
size=-1>Stakeholder</FONT></TD>
<TD><select name=selStake style="Width: 146px;">
<option value="None">None</option>
<option value="Institution">Institution</option>
<option value="Mentor">Mentor</option></select></TD>
</tr>
<TR>
<td colspan="4">
<iframe src="P4_Iframe.asp" name="IFrame1" id="IFrame1" width="500"
height="200" align="right" scrolling="no" frameborder="0"></iframe>
</td>
</tr>
</TABLE><br>
<P align=right style="margin-right: 100;">
<input type="Button" name="ProjDetBack" value="Back" style="WIDTH:
90px; HEIGHT: 24px" onClick="JavaScript:history.back(1)">
<input type="Reset" name="ProjDetClear" value="Clear"
style="WIDTH: 90px; HEIGHT: 24px">
<input type="submit" name="ProjDetnxt2" value="Next" style="WIDTH:
90px; HEIGHT: 24px"></P><br>
</form>
<% Else %>
</TABLE>
<h1 align="center"><font face="Arial" color="#993300">Errors Trying to
Save</font></h1>
<Font color="Navy" face="Arial">
Problems where encountered in saving the following fields:<br><br>
<%= errors %><BR><br>
Please click back to fix them!
</font>

<p align="center"><input type="Button" name="ProjDetBack" value="Back"
onClick="JavaScript:history.back(1)"><br>

<% End If %>

Code for Iframe:

(P4_Iframe.asp)

<html>
<head>
<title>Untitled</title>
</head>
<script language="VBScript" for=SurnameStake1 event=Onchange>
document.frmIFrame.SurnameStake1.value =
Replace(document.frmIFrame.SurnameStake1.value,
(left(document.frmIFrame.SurnameStake1.value, 1)),
UCase(left(document.frmIFrame.SurnameStake1.value, 1)), 1, 1)
</script>
<script language="VBScript" for=NameStake1 event=Onchange>
document.frmIFrame.NameStake1.value =
Replace(document.frmIFrame.NameStake1.value,
(left(document.frmIFrame.NameStake1.value, 1)),
UCase(left(document.frmIFrame.NameStake1.value, 1)), 1, 1)
</script>

<script language="VBScript" for=SurnameStake2 event=Onchange>
document.frmIFrame.SurnameStake2.value =
Replace(document.frmIFrame.SurnameStake2.value,
(left(document.frmIFrame.SurnameStake2.value, 1)),
UCase(left(document.frmIFrame.SurnameStake2.value, 1)), 1, 1)
</script>
<script language="VBScript" for=NameStake2 event=Onchange>
document.frmIFrame.NameStake2.value =
Replace(document.frmIFrame.NameStake2.value,
(left(document.frmIFrame.NameStake2.value, 1)),
UCase(left(document.frmIFrame.NameStake2.value, 1)), 1, 1)
</script>
<body>
<form action="" name="frmIFrame" id="frmIFrame">
<% If request.querystring("Stake") = "Mentor" Then %>
<FONT face=Tahoma color=#993300
size=-1>Title</FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select
name=selTitleStake1 style="Width: 146px;">
<option value=