dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: calling java function from vb sub,

  1. #1
    Join Date
    Sep 2011
    Posts
    5

    Unhappy calling java function from vb sub,

    Hello
    i want to call java function 3 times from vb sub.
    but i worked one time.
    is there anyone help me
    here i try the following but
    ----------------------------------------------
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
    For i = 1 To 3
    Dim test1 As String
    test1 = "<script language='javascript' id='myClientScript'>test();</script>"
    Page.RegisterStartupScript("callTest", test1)
    Next
    End Sub
    -----------------------------------------------
    function test()
    {
    alert("called from vb");
    }

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Java is not JavaScript. Can you be more accurate in your demand, please?

  3. #3
    Join Date
    Sep 2011
    Posts
    5

    Unhappy javascript fun call from vb sub

    Quote Originally Posted by Kor View Post
    Java is not JavaScript. Can you be more accurate in your demand, please?
    Kor thanks for your reply,.
    sorry for my demand mistake, i want to to javascript fun in loop.
    now i can call 3 time to test() fun.
    but i want to call VBdisplay() vb sub when one call finish to javascript test().
    code sample is as follows,
    have u any hleps
    thanks in advance.
    thaw

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
    For i = 1 To 3
    Body1.Attributes.Add("onload", Body1.Attributes.Item("onload") & "test();")
    VBdisplay()
    Next
    End Sub
    -----------------------------------------------
    function test()
    {
    alert("called from vb");
    }
    Sub VBdisplay()
    MsgBox("called finish" & i & "times to test fun")
    End Sub

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles