#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    58
    Rep Power
    12

    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. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Melbourne, Australia
    Posts
    212
    Rep Power
    12
    What is the error message you are getting?
    How can I soar like an eagle when
    I'm flying with turkey's?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    58
    Rep Power
    12
    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
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Melbourne, Australia
    Posts
    212
    Rep Power
    12
    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/...ml_button.html

    and also
    http://www.devguru.com/Technologies/...tml_input.html
    HTH
    Last edited by mohecan; June 15th, 2003 at 10:41 PM.
    How can I soar like an eagle when
    I'm flying with turkey's?
  8. #5
  9. /(bb|[^b]{2})/

    Join Date
    Nov 2001
    Location
    Somewhere in the great unknown
    Posts
    5,163
    Rep Power
    792
    In the future please use an appropriate subject title. See the sticky at the top of this forum for more information.

IMN logo majestic logo threadwatch logo seochat tools logo