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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Response.write

Status
Not open for further replies.

testare

Programmer
Joined
Jan 21, 2005
Messages
127
I only have this code.
How can i get the value that i typed in the textarea to be printed with Response.Write Request.Form("text")

<%Response.Write Request.Form("text") %>
<textarea name="text"></textarea>
<a href="nerd.asp">link</a>
 
didnt understand the question completely...

-DNG
 
you need to submit the page to itself - for example:


nerd.asp
Code:
<%
Response.Write Request.Form("text")
%>

<form action="nerd.asp" method="post">
<textarea name="text"></textarea>
<input type="submit" />
</form>

Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
Here is my whole code?


At line 274 i use a button that i want to send my whole code with the text of the textarea.

At line 200 i want to insert the text that i have in the textarea into the database, but there is no text to insert.

Thats my big problem and then i'm done with this project.
 
ok here is what you need to do:

change your line:
sSQL = "INSERT INTO CALINFO VALUES (" & Request.Form("text") & ", '" & sDay & "')"

to

sSQL = "INSERT INTO CALINFO VALUES (" & Request.Form("[red]texta[/red]") & ", '" & sDay & "')"

-DNG
 
Oh, and be careful that your text itself doesn't have any single quotes... might want to Replace() them.
 
I'm sorry for my stupidity, that I pointed out the wrong lines.
I meant line 284 and 207.

Thanks, i will directly try this out and get back to you if it works.
 
It didn't work still get nothing when i at line 209 Response.write the sqlstring
 
try this please:
Code:
&nbsp;<textarea name="text[red]a[/red]" cols="75" rows="6" id="texta"></textarea>
....
....
....
sSQL = "INSERT INTO CALINFO VALUES ([red]'[/red]" & Request.Form("texta") & "[red]'[/red], '" & sDay & "')"

Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
i believe the problem is you are not submitting the form because you have a onclick event on the post button, remove that and change the button to a submit type
 
Okey, i can't do as I want with OnClick?

FesterSXS; I've changed it as you said but it doesn't help
 
testare - your code seems to be missing q few things:

As Satich points out - no <html></html> or <body></body> tags

You are also missing the closing <form> tag for your login form and also all the <form> tags for your textarea



Tony

Spirax-Sarco - steam traps control valves heat exchangers
Sun Villa - Luxury Florida accommodation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top