Solved

I want to double click on HTML Table row and intercept on in vb form where the browser control is used

Posted on 2010-09-02
3
607 Views
Last Modified: 2013-12-26
Hi I would be be able to double click on a row in an HMTL table and pass back a unquiue reference number to the the form where the html brower brower window control is displayed.

1) I attach the code for the xslt fie that loads the page notebook.xsl
2) I attach the code for loaduing the browser control  loadit.txt
0
Comment
Question by:peter3244
  • 2
3 Comments
 
LVL 11

Expert Comment

by:kbirecki
ID: 33602397
I haven't used an html browser control, but vb can display forms with rows and have the labels and/or text fields clickable.  Is there a reason you need to use the browser control?  I'm thinking that the browser control is going to be limited to what any browser can do - and triggering vb application events is not one of them.  You should be able to create script in the web page that responds to events like clicking, but I don't think double clicking - that's an application-like function, not a browser function.  I've never seen any html-based web page, other than special cases like flash, silverlight or other non-html technology, be able to recognize a double click.  And at that point, if you were doing that, why not implement the whole app in a browser using your web-based scripting language of choice (php, javascript, etc.)
0
 
LVL 6

Expert Comment

by:judgeking
ID: 33630732
I'm not sure what browser control you're using, I use the DHTMLEdit control.  Something like this should work for you:

HTML code:
    <script language="javascript">
       function SetValue(Val) {
         document.all.ClickValue.value = Val;
       }
    </script>
    <input type="hidden" name="ClickValue" value="0">
    <table bgcolor="white" border=1>
      <tr>
        <td ondblclick="javascript:SetValue(1);">One</td><td>1</td>
      </tr>
      <tr>
        <td ondblclick="javascript:SetValue(2);">Two</td><td>2</td>
      </tr>
    </table>

DHTMLEdit code:

Private Sub DHTMLEdit1_ondblclick()
  MsgBox DHTMLEdit1.DOM.All.ClickValue.Value
End Sub

Open in new window

0
 
LVL 6

Accepted Solution

by:
judgeking earned 500 total points
ID: 34035629
Any update?
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question