473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to solve this?

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
%>

Jul 19 '05 #1
0 1126

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Oracle3001 | last post by:
Hi All, I am looking to use SVD to solve an equation of the form Aa = B, where a is 1 row x 11 col A is 2 rows x 11 col B is 2 rows x 1 col I know from the information I am reading I need...
17
by: Just | last post by:
While googling for a non-linear equation solver, I found Math::Polynomial::Solve in CPAN. It seems a great little module, except it's not Python... I'm especially looking for its poly_root()...
27
by: Alf P. Steinbach | last post by:
I'm writing a little piece on pointers, to be "bundled" with my attempted correct C++ tutorial (see FAQ item 29.20, yes, I've finally started to at least think about that again), and while thinking...
0
by: Jitesh | last post by:
I am facing a problem in webservice, I want to know what will be the exact procedure to solve the problem............. What I want to do............ I have a table named order in SQL Server....
8
by: vj | last post by:
Hi all, I want to solve the two equations u*tan(u)=w and u^2 + w^2=V^2, where V is a known constant, and u and w are the two unknowns to be determined. Please can someone suggest me how to...
1
by: arun | last post by:
Query is too complex -------------------------------------------------------------------------------- Hi, I was trying to solve this problem since last two days but couldn't find any solution. ...
17
by: Michael Reichenbach | last post by:
Here is the example code. int main(int argc, char *argv) { string Result; WIN32_FIND_DATA daten; HANDLE h = FindFirstFile(TEXT("c://test"), &daten); system("PAUSE"); return EXIT_SUCCESS; }
2
by: beambohus | last post by:
please how do i solve this........ To write an algorithm to solve quadratic equation using almighty formular. please your respond will very much appreciated
7
by: akmaRudiliyn | last post by:
Hai everybody :). I have problem and need help. ERROR: ERROR Violation of PRIMARY KEY constraint 'PK_Table1_01'. Cannot insert duplicate key in object 'dbo.table1'. ERROR The statement has...
4
by: Kelie | last post by:
Hello group, Is there any packages in Python that will help me solve functions similar to this: x = a*(1+bx)**2.5-c where a, b, c is known and the task to solve x? Thank you, Kelie
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.