|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
plss help me with this code
hii everybody
I am working on the following code and supposedly it si not wroking ...none of the buttons in the code are working...can anyone plss help me find the error wherever it is in the script so that i can proceed ahead with the code <html> <head> <title>Test</title> <script language="Javascript"> function doSend() { squeryData = document.all("txtQueryData").value if (squeryData == null) { alert("You must get the data first") return false } document.all("queryStuff").value = squeryData; xaction = ../../../../.testup2.php document.forms("form1").action = xaction; document.form1.submit(); } </script> </head> <body onload="doLoad()"> <h3 align="center">Send Queries to Server by Coordinator</h3> <!--<div align="center">--> <form name="form1" action=""--WEBBOT-SELF--"" method="post"> <font style="arial narrow" size="2"> <input type="button" name="loadQueryData" value="Load data"> <input type="button" onclick="doSend()" value="Send to server"> </form> <script language="VBScript"> sub loadQueryData_onclick() dim conn dim rs dim connStr dim qry dim xMRN,xID msgbox "hi" Set conn = CreateObject("ADODB.Connection") conn.CursorLocation = 3 Set rs = CreateObject("ADODB.Recordset") conn.Open "TestDB" ': Queries qry = "Select * from q4 rs.Open qry, conn, adOpenStatic if not rs.eof then rs.movelast total = rs.recordcount rs.movefirst msgbox total & " records from Queries were loaded",,"" end if if not rs.eof then queryArr = rs.GetRows() rs.Close dim sQueries sQueries = "" 'IDlist = "" for i = lbound(queryArr,2) to ubound(queryArr,2) pid = queryArr(0,i) if i = 0 then sQueries = pid else sQueries = sQueries & "*" & pid end if next erase queryArr txtQueryData.value = sQueries stuff.value = sQueries else rs.close msgbox "There are no queries to upload",,"" end if ': Missing data '== conn.close set rs = nothing set conn = nothing end sub </script> <hr/> <br><input type="hidden" name="txtPatient" size="20" value=""> <br><textarea name="stuff" rows="5" cols="60"></textarea> <br><input type="hidden" name="txtQueryData" size="20" value=""> <br><input type="hidden" name="txtMRN" size="20" value=""> <input type="hidden" name="txtMRN2" size="20" value=""> </body> </html> Thanks so much Ravi |
|
#2
|
|||
|
|||
|
What is the error message you are getting?
__________________
How can I soar like an eagle when I'm flying with turkey's? |
|
#3
|
|||
|
|||
|
hii theree
none of the two buttons are working...and i am getting no error message ..the code for the buttons does not seem to work thanks ravi |
|
#4
|
|||
|
|||
|
OK, now I see it.
in your onclick command, change to: Code:
onclick="javascript:return doSend()" for more info see: http://www.devguru.com/Technologies...tml_button.html and also http://www.devguru.com/Technologies...html_input.html HTH Last edited by mohecan : June 15th, 2003 at 10:41 PM. |
|
#5
|
||||
|
||||
|
In the future please use an appropriate subject title. See the sticky at the top of this forum for more information.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > plss help me with this code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|