how to solve this?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > IIS server support > IIS ASP > how to solve this?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    how to solve this?  
Andre


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-26-04 03:19 PM

Hi,

In 'test.htm', there are two Select, one visible, the other invisible. The
second becomes visible only if the number of records in a Access table <2.
There is also a button to start the VB-procedure. I choose first a value
into the first Select (sel1), then i click on the button to start
VB-procedure. If the value="a", then get the number of records in a table of
Access. So i made a INPUT within a form and go to test2.asp which gets the
number of records ('tot') i need.

My problem is now: how to get back to 'test.htm' with the number of records
('tot') in order to test that number and to make or not the second Select
visible?
I can do this using RDS, because then everything can be put in VB, but i
want to solve this without RDS.
Thanks for any help.
andré

file 'test.htm':
<SELECT name=sel >
<option value="a" > a
<option value="b" > b
</SELECT>
<SELECT name=sel2 style="visibility:hidden">
<option value="c" > c
<option value="d" > d
</SELECT>

<INPUT name=reg TYPE="button" value="test">

<form name=ins>
<input name="rpc" type="hidden" value="" >
</form>

<script language=vbscript>
sub reg_onclick()
value=sel.value
if value="a" then
document.getElementById("rpc").value=a
ins.action="test2.asp"
ins.method="post"
ins.submit
end if

if 'tot' obtained in test2.asp >=2 then
msgbox ("you have already 2 items .. whatever .....")
else
sel2.style.visibility="visible"
....
end if
end sub
</script>

file 'test2.asp':
<%
set objdc = Server.CreateObject("ADODB.Connection")
objdc.Open("provider=Microsoft.Jet.OLEDB.4.0; Data Source
=d:\access\newres.mdb")
sql="select items from mytable;"
set rs=Server.CreateObject("ADODB.recordset")
rs.open sql, objdc, 3, 3
tot=rs.recordcount
%>








[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:51 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register