|
-
Mar 18th, 2002, 06:34 AM
#1
Thread Starter
Lively Member
Asp-question
Can this line be written in JavaScript
var1=request.form("text1")
or this:
var1=request.querystring("text1") ??
--------
-Abel-
--------
-
Mar 18th, 2002, 06:43 AM
#2
Fanatic Member
Not to my knowledge. You could use ASP to generate the javascript on your results page : -
<script language="javascript" type="text/javascript">
var formvalue=""
function displayDetails(){
<%
response.write "formvalue='" & response.write (request.form("text1")) & "';"
%>
alert (formvalue);
}
</script>
-
Mar 18th, 2002, 06:44 AM
#3
PowerPoster
hi
Are u trying to code in javascript - then the ans. is: Yes it is possible.
-
Mar 18th, 2002, 07:01 AM
#4
Fanatic Member
Yes, it is possible. I just assumed that was after a form submit.
You can use the DOM to get info from a form
<script language="javascript">
function popupValue(){
alert (document.form1.text1.value);
}
</script>
<form name="form1">
<input type="text" name="text1"><br>
<input type="button" onclick="popupValue()">
</form>
Or if the item isnt in a form : -
<script language="javascript">
function popupValue(objectID){
alert (document.all(objectID).value);
}
</script>
<input type="text" id="text1"><br>
<input type="button" onclick="popupValue(text1)">
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|