My text box is blank but I know there is a value for the Request.QueryString("txtcap"). I tested it by saying
<%
l=Request.QueryString("txtcap").
%>
And there is a value in L but when I but it has the value in my text box its blank.
Is there another way I should be doing this?
Originally posted by realgoldn My text box is blank but I know there is a value for the Request.QueryString("txtcap"). I tested it by saying
<%
l=Request.QueryString("txtcap").
%>
And there is a value in L but when I but it has the value in my text box its blank.
Is there another way I should be doing this?
How are you passing the value, using Get or Post Method?
Hmm, No it isn't. Maybe I am doing something wrong. I have a form with text boxes on it. If a user wants to add a new category on the form they click the category link which brings up a popup box. The user fills ouf the popbox then clicks submit the submit button submits the form then closes the popup box. So when the popup box closes I want the value they added on the popup form to be displayed on the main form. Hope this makes sense.
if add.txtcap.value="" then
msgbox "Please select a valid division and type.",,"Input Error"
else
MsgBox "Cap number " & add.txtcap.value & " has been added!",,"Add Alert"
Add.Submit
self.close
END IF
The main form is like this
<td> <A HREF="javascriptopUp('addcap.asp')">*CAP #</FONT></td>
Originally posted by realgoldn The user fills ouf the popbox then clicks submit the submit button submits the form then closes the popup box. So when the popup box closes I want the value they added on the popup form to be displayed on the main form. Hope this makes sense.
This in an example i just put together. Modify it for your need.
r1.asp
Code:
<head>
<script>
function Insert()
{
var winW=475;
var winH=345;
var w=screen.width;
var h=screen.height;
var t=h/2-winH/2;
var l=w/2-winW/2;
var url = "r2.asp"
var hWnd = window.open(url,"","top=" + t + ", left=" + l + ", width=" + winW+ ",height=" + winH+ ",resizable=yes,status=yes,scrollbars=yes");
if ((document.window != null) && (!hWnd.opener))
hWnd.opener = document.window;
}
</script>
</head>
<body>
<form name=form1>
<input type=text name=text1 readonly>
<input type=button name=btn1 value="Select Name" onclick="javascript:Insert()">
</form>
</body>
r2.asp
Code:
<html>
<head>
<script>
function Insert()
{
//alert(document.form1.txt1.value);
window.opener.document.form1.text1.value=document.form1.txt1.value;
window.close();
}
</script>
</head>
<body>
<form name="form1">
<input type=text name="txt1"><br>
<input type=button value="Click here to Insert" onclick="javascript:Insert()">
</form>
</body>
</html>