Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames with ASP ***URGENT***

Status
Not open for further replies.

ufobaby

MIS
Sep 25, 2001
238
US
hi all, help me debug the below code----
am trying to populate a hiddin textbox on the top frame on my page......
Error - > line 16 (Object Expected)
===========================
<%
Sub Auth()
Dim ConLog 'For Opening Connection to Db
Dim rs 'For RecordsSet

Set ConLog = Server.CreateObject(&quot;adodb.connection&quot;)
ConLog.Open &quot;Driver={Microsoft Access Driver (*.mdb)};DBQ=c:\inetpub\Set rs = ConLog.Execute(&quot;select * from usr where username='&quot; & _
request.form(&quot;uname&quot;) & &quot;' and password='&quot; & request.form(&quot;pwd&quot;) & &quot;'&quot;)

if rs.eof=true then
Response.Redirect &quot;logscr.htm&quot;
else
'Session(&quot;me&quot;) = rs(&quot;username&quot;)
'Response.Write(Session(&quot;me&quot;))
%>
<script language=&quot;JavaScript&quot;>
document.frames(&quot;identity&quot;).item(&quot;me&quot;).value = <%=rs(&quot;username&quot;)%>
</script>
<%
Response.Write &quot;Cool&quot;
'Response.Redirect &quot;welcome.asp&quot;
end if
End sub
%>
<html>

<head>
<title>My First Login Screen in ASP</title>
<meta name=&quot;GENERATOR&quot; content=&quot;Microsoft FrontPage 3.0&quot;>
</head>

<body>

<form>
<p><strong>My First Login Screen in ASP</strong></p>
<p>&nbsp;</p>
<p>Username <input type=&quot;text&quot; name=&quot;uname&quot; size=&quot;20&quot;></p>
<p>Password <input type=&quot;text&quot; name=&quot;pwd&quot; size=&quot;20&quot;></p>
<p><input type=&quot;button&quot; value=&quot;Submit&quot; name=&quot;B1&quot; onclick=Auth()><input type=&quot;reset&quot; value=&quot;Reset&quot;
name=&quot;B2&quot;></p>
</form>
</body>
</html>
 
Thats actually a javascript problem I think. Make sure you are referencing the frame correctly, it appears the you are referencing from a frame inside the page, not the top level. But the code looks as if it is trying to reference a frame located inside this page.

-Tarwn
It made sense to me, no wonder no one else got it
 
Thanks, Tarwn

The Code is ->

window.parent.frames(0).document.forms(0).item(0).value = &quot;anything&quot;

Can you redirect me to some site which has a whole listing of the Objects structure for Javascript

Regards
Niraj [noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top