BarrMan
12-18-2005, 07:05 PM
i have this link http://localhost/trivia/trivia.asp?q=%22hello%22 which i want my input form to contain the word "hello", but i don't get there anything.
i tried using this function:
Function quoteReplace(str)
If IsEmpty(str) Or IsNull(str) Then Exit Function
str = Replace(str,"%22",""")
quoteReplace = str
End Function
and then:
<form method="post" action="addq.asp" id=form1 name=form1>
Question: <input size="100" type="text" name="q" value="<%=quoteReplace(Request.QueryString("q"))%>"><br>
Answer: <input type="text" size="100" name="a"><br><br>
<input type="submit" value="add question" id=submit1 name=submit1>
</form>
But it's still returning a blank input to me.
btw: the %22 is: "
Thanks.
i tried using this function:
Function quoteReplace(str)
If IsEmpty(str) Or IsNull(str) Then Exit Function
str = Replace(str,"%22",""")
quoteReplace = str
End Function
and then:
<form method="post" action="addq.asp" id=form1 name=form1>
Question: <input size="100" type="text" name="q" value="<%=quoteReplace(Request.QueryString("q"))%>"><br>
Answer: <input type="text" size="100" name="a"><br><br>
<input type="submit" value="add question" id=submit1 name=submit1>
</form>
But it's still returning a blank input to me.
btw: the %22 is: "
Thanks.