Click to See Complete Forum and Search --> : list box contains 4000 entries
rajakvk
06-28-2005, 09:13 AM
in my asp file, i have to feed 4000 records from table. i know it is foolish to do like that.
instead i decided to popup a window with records (code, name, qty) populated in it with href tag. after user click a row the popup window should close and return to original window and load a text box already placed in it.
how to code my procedure, please some one help.
raja
buntine
06-28-2005, 11:40 AM
Do you want this to be done from the client - without refreshing the page? If so, it will must be done with a client-side language such as JavaScript.
Regards.
rajakvk
07-01-2005, 12:19 AM
thnx for your reply. i tried your suggestion like this. first i write a asp page which i given below. pl go throgh it and point out the mistake.
and my plan is like this: first in a asp file with href i want to popup a window using javascript method call named popWindow. inside popWindow javascript function i want to write code to display information from a database which contains some 400 entries. after user clicks the desired item popup window should close and loads a textbox in parent window.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<html>
<head>
<title>Untitled Document</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function popWindow() {
var myWin = window.open("","","toobar=no, dependent=yes, titlebar=no");
var content = "<html> <body> <form>";
content = content + "<%Dim objConn, objRS %>";
content = content + " <% Set objConn = Server.CreateObject(" + "ADODB.Connection" + ")%>"
content = content + "</form> </body> </html>"
myWin.document.write(content);
}
//-->
</script>
</head>
<body>
<form name="form1" method="post" action="">
<p><a href="javascript:popWindow()">Variety</a> </p>
<p>
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Submit">
</p>
</form>
</body>
</html>
buntine
07-01-2005, 02:16 AM
You are getting your languages confused. The ASP code will be executed long before the JavaScript code. So, appending an ASP expression onto a JavaScript string will error (from JS).
Write your ASP code the same as you would on any other page.
Regards.