7 Replies Latest reply on Jun 15, 2007 4:19 AM by AntiTRUST�

    how to get values from asp to director

    farhanakhan
      hi
      ii want to get some values from the asp page to the director
      any one can tell me how
      i m waiting for reply

      regards
      farhana khan
        • 2. Re: how to get values from asp to director
          farhanakhan Level 1
          hi
          i already visit this website.........
          but i did not get any idea how the asp is sending value to director
          can u tell me the way in asp to director
          i have program of director from .... http://www.shocknet.org.uk/index.asp..... website...
          that program is using GetNetText method...i got it this point but i m so much confuse ..how to send the value from asp to director
          plz
          im waiting for ur reply fastly
          i will be very thankful to u
          regards
          farhana khan
          • 3. Re: how to get values from asp to director
            McFazstp Level 1
            You use either postNetText or getNetText. When you use these commands they return an id number. You then need to test the number for netDone and get the netTextResult once it is completed.

            ie.
            property net_id

            on exitFrame
            if ( net_id.voidP ) then
            net_id = postNetText( " http://www.adobe.com" )
            end if
            if NOT netDone( net_id ) then
            go the frame
            exit
            end if
            net_text = netTextResult( net_id )
            put net_text
            end
            • 4. Re: how to get values from asp to director
              Lukewig Level 1
              Hi,

              When you 'request' n ASP page (using either GET or POST), the server will send a response. With a webbrowser, this response is interpretted and displayed accordingling. So if your .asp page had some code like this:

              Response.Write("Foo")

              You would see the word "foo" in the browser.

              Using GetNetText or PostNextText, you can request that page in director. As McFazstp says, these functions return an ID number. You have to wait for the response to be downloaded.

              Now, if you want to interpret the server 'response' as a value, you might need to be careful how you treat the response. One common technique is to have the asp (or php or jsp or whatever) respond using XML. This way, the XML can describe what the data is and how it to be handled. If your asp page is only meant to return a single 'value', then you don't have to worry about this step.

              Have a look at http://www.lingoworkshop.com/Articles/GET_and_POST.php for some more info.

              Cheers,
              Luke

              • 5. Re: how to get values from asp to director
                farhanakhan Level 1
                hi
                i already did ....and is successfull running
                property net_id

                on exitFrame
                if ( net_id.voidP ) then
                net_id = postNetText( " http://www.adobe.com" )
                end if
                if NOT netDone( net_id ) then
                go the frame
                exit
                end if
                net_text = netTextResult( net_id )
                put net_text
                end

                now i have problem with getNetText()
                how i get value from the asp....

                • 6. Re: how to get values from asp to director
                  farhanakhan Level 1
                  hi
                  i m so much happy.....
                  now application work perfectly............
                  the director successfully send the data to asp page and asp successfully send the value to the director application ...now all done
                  here is the code

                  director code-----------
                  -------------frame 1
                  global urll
                  on exitFrame me
                  member("RS").text=""
                  urll = (" http://www.abccom/kk/run.asp")
                  end

                  ----------frame2
                  global netID
                  on exitFrame me
                  if netDone(netID) then
                  put "netDone(netID)====="&netDone(netID)
                  member("RS").text=netTextResult(netID)
                  put netTextResult(netID)
                  else
                  go to the frame
                  end if
                  end

                  -------------frame3
                  on exitFrame me
                  go the frame
                  end

                  ---------put this code at any button
                  global netID,urll
                  on mouseUp me
                  infolist=["vname": member("name").text, "vsno":member("sno").text]
                  netID = postNetText(urll,infolist)
                  go to frame 2
                  end

                  ASP code
                  ---------asp connect to the database
                  there are two asp file........one has the code...and other is the connection path with data base

                  ---------------file1--con.asp
                  <%
                  Vdb= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db.mdb")
                  %>

                  -------file2-------------run.asp
                  <%@LANGUAGE="VBSCRIPT" %>
                  <%response.Buffer=true%>
                  <!--#include file="con.asp" -->
                  <%
                  dim reg1,reg2
                  set reg1= server.CreateObject("ADODB.recordset")
                  reg1.ActiveConnection=Vdb
                  reg1.Source="select * from data where sno='" & request.form("vsno") & "'"
                  reg1.Cursortype=2
                  reg1.cursorlocation=3
                  reg1.locktype=3
                  reg1.open()
                  reg1_numRows = 0

                  set reg2= server.CreateObject("ADODB.recordset")
                  reg2.ActiveConnection=Vdb
                  reg2.Source="select * from A"
                  reg2.Cursortype=2
                  reg2.cursorlocation=3
                  reg2.locktype=3
                  reg2.open()
                  reg2_numRows = 0

                  if not(reg1.eof and reg1.bof) then
                  if (reg1.fields("active") = true) then
                  response.Write("Your r already Registered")
                  else
                  response.Write("successfully registred")
                  reg1.fields("name")=request.form("vname")
                  reg1.fields("active")=true
                  reg1.update
                  end if
                  else
                  reg2.addnew
                  reg2.fields("nname")=request.form("vname")
                  reg2.fields("ssno")=request.form("vsno")
                  reg2.update
                  response.Write("invilide user")
                  end if
                  reg1.close()
                  reg2.close()
                  %>

                  there are two table in one database
                  --database..db

                  table1----A
                  sno
                  name

                  table-----data
                  ID
                  sno
                  name
                  time


                  i post all my testing code here which is executing over internet and LAN
                  if any one want to make this kind of application then ....
                  here is the all code guys
                  copy and paste...then u have the result..
                  regards
                  farhana khan





                  • 7. Re: how to get values from asp to director
                    AntiTRUST� Level 1
                    WOW!!
                    great!!
                    good work farhanakhan

                    Its really a big help for beginners :)

                    Well Appreciated.
                    Keep it up!

                    Regards,
                    Aamir