/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Clearing a text field in a Frameset.

Dear WebDeveloper members,

First I want to greet all of you a pleasant day.

I have experiencing a problem regarding the site I’m creating. My site used a frameset, with [B]FrameTop.html[/B], [B]FrameLeft.htm[/B] and [B]FrameMain.htm[/B] are the filenames respectively, and the whole frameset was named MyWeb.htm.

The FrameLeft.htm has text fields where user can input his username and password, and of course a login button that if pressed the action will be directing to the mainframe (there is a slight use of ASP here because of a database connection). BUT, after a successful (or even unsuccessful) login, I noticed that the data on both text field is still there, and my prof wants to have it “disappear” (or cleared) every time I logged in.

Here is the code of the form in my COLOR=Green]FrameLeft.htmlCOLOR]:

<form name=”formAdmin” method=”post” action=”authenticate.asp”

target=”mainFrame”>

<strong>Username</strong>
<input maxlength=15 size=10 name=”username”>
<strong>Password</strong>
<input type=”password” size=10 name=”password”></td>
<input type=”submit” value=”Login”>
</form>

This is the code in my [COLOR=Green]authenticate.asp[/COLOR]:
<%
response.buffer = true
varusername = request.form(“username”)
varpassword = request.form(“password”)
response.write(varusername)
response.write(varpassword)
dim Conn, rs
set Conn = Server.CreateObject (“ADODB.Connection”)
Conn.open “Provider = Microsoft.jet.OLEDB.4.0;” & “Data Source = ” & Server.MapPath (“Database/MedTransDB.mdb”)

set rs = Server.createObject (“ADODB.recordset”)

rs.open “select * from TableSecurity where Username = ‘” & varusername & “‘ and Password = ‘” & varpassword & “‘” & “and Level =’1′”,Conn
if rs.eof = False and rs.bof = False then
response.redirect(“MedTransHR_function.asp”)

else
response.write(“<br>”)
response.write(“<br>”)
response.write(“<b><font color=’#FF0000′> Your username and password is invalid or does not exist.</font></b>”)
response.write(“<br>”)
response.write(“<br>”)
end if
%>

I hope you could all help me with this, I know this is a simple problem to some of you, but I just can’t get it. Thank you to all and God bless.

Best regards,
[COLOR=Blue]MarkSquall[/COLOR]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @marksquall spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...