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

Variables and a generated Table

Status
Not open for further replies.

solo7

Technical User
Mar 14, 2001
243
NO
I'm trying to pass 2 used selected variables to a 'SELECT' statement and then CREATE and insert a table of results.

I'm using the following code to pick up the chosen variables (courtsey of Targol) :-


<Script language=&quot;JScript&quot;>
function send() {
document.form1.action = &quot;finish.asp?first=&quot; + document.form1.selList1.value + &quot;&second=&quot; + document.form1.selList2.value;
document.form1.submit;
}
</Script>

finish.asp
<%
first = request.queryString(&quot;first&quot;)
second = request.queryString(&quot;second&quot;)
%>



I understand how the variables are targeted and picked up, and allocated the names &quot;first=&quot; and &quot;second=&quot;. But where does the finish.asp come in the code?

Targol also suggested a neat way to manipulate a table to suit my needs but how can I create a table from the 'OnClick'event of a button?


Steady ...
 
The finish.asp is your second page that actually pulls the values of first and second out and assigns them to variables. It is not necessary to make your javascript pull out the values if they are in the form. Merely make the form method=GET and they will be passed in the querystring just as your doing above. Then you will want to make the form action=&quot;finish.asp&quot;. On that page is where you pull the values back out again as in the example above, build your sql statement, execute it, and loop therough the resulting reecordset to display your results. There are several code examples in the FAQs section if you need a starting point for that.Hope that helps,
-Tarwn The three most dangerous things in the world are a programmer with a soldering iron, a hardware type with a program patch, and a user with an idea
-computer saying (Wiz Biz - Rick Cook)
 
Thanks Tarwn,

I was trying to read a little too much into the code I was trying to understand - how stupid can one man really be ???
NO DON'T ANSWER THAT !!!!!


Steady ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top