Results 1 to 2 of 2

Thread: Getting variables from hidden html elements

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2009
    Posts
    27

    Getting variables from hidden html elements

    Hi all,

    Have the following ASP/Java that returns me some data from an ocx control but I'm having problems actually using the data:

    <script runat="server">

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
    Response.Write(House.Value)
    End Sub

    </script>

    <script type="text/javascript">
    function gethousecust()
    {
    IPCMF.Open("ipcmftest");
    document.getElementById("House").value = IPCMF.ReadNV( "HOUSE");
    }
    </script>

    <OBJECT id=IPCMF style="LEFT: 0px; TOP: 0px" codeBase=IPC_MF.ocx classid="clsid:363D15B5-CFF8-443E-8203-5FC5A856C489">
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_ExtentX" VALUE="2646">
    <PARAM NAME="_ExtentY" VALUE="1323">
    <PARAM NAME="_StockProps" VALUE="0">
    </OBJECT>

    <body>
    <form id="form1" runat="server">
    <div>
    <input id="House" type="hidden" runat="server" />
    <asp:Button ID="Button1" runat="server" OnClientClick="gethousecust()" Text="Button" OnClick="Button1_Click" />
    </div>
    </form>
    </body>

    ...when I click I get the data that IPCMF.ocx fetched for me and it's already in an asp variable.

    Question is how do I get it to run the Java function without clicking the button and put those variables in a format that a data grid view can use?

    Thanks!
    Monty
    Last edited by monty77uk; May 21st, 2009 at 10:34 AM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Getting variables from hidden html elements

    Which Java function do you want to run?

    Do you want to run this java function from the codebehind? As I mentioned in another thread, you cannot use a client-side ActiveX control/applet from the server side code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width