Jump to content

Form doesn't automatically reset cause..


denny911
 Share

Recommended Posts

Hello,I'm using a simple form on my page. It's some kind of shoutbox (short messages for everybody to see them).The form's action is a page that is loaded into an iframe. So, when a user clicks the Submit button, form doesn't get reset (I think it's because the main page itself (where the form is actually placed) doesn't refresh but the other page is opened in the iframe).Given the circumstances, is there any way I could make the form reset (without clicking Reset button) after submitting it?Thanks, Denny

Link to comment
Share on other sites

Pls, paste your code  :)

This inserts shouts into the database:<% set conn=Server.CreateObject("ADODB.Connection")conn.Provider="Microsoft.Jet.OLEDB.4.0"conn.Open(Server.Mappath("proba.mdb"))sql="INSERT INTO haber (nick, haber)"sql=sql & " VALUES "sql=sql & "('" & Request.Form("ime") & "',"sql=sql & "'" & Request.Form("komentar") & "');"on error resume nextconn.Execute sql,recaffected%>---------------------------------------------this is iframe's code and form's code:<iframe name=scroller src="haber.asp" frameBorder=0 border=0 width=100% height=270 scrolling="auto"></iframe><table align="left"><form method="post" action="haber.asp" target="scroller"><input name="ime" id="ime" size="12"></td><textarea style="font-family:Arial" name="komentar" cols="19" rows="3" id="komentar"></textarea><input name="submit" type="submit" value="Unesi"><input name="reset" type="reset" value="Poništi"></form>-----------------------------------------------------------when users submit the form, nothing actually happens with the main window (page), but the page "haber.asp" refreshes in the iframe so I think that is the reason why the text is still in form's fields (form is placed in my main window (page) and users have to reset the form to make it disappear.
Link to comment
Share on other sites

Hi!I use rs.AddNew and rsUpdate to add or modify a table. Nowdays did reinstall the whole server, since it doesnt works. I get error at the programline where is the rs.Update. 'database is read only' but that is'nt true!what do you think about?W. b. regards Béla

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...