Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select value of clicked record using ondblclick event

Status
Not open for further replies.

BillieBurgess

Technical User
Jul 2, 2002
36
US
I have a data access page that pulls data from an access database. The records are in a Tabular format on the html page. The page lists 20 records at a time. I have an on dblclick event that when you double click on the account number is supposed to open a http site that lists the account notes for the account number clicked. The code works it just pulls the account number of the 1st record listed, no matter what record you click on.
I think that I need to have the event code select the record that I click on and then open the http site. I just can’t find any code that says select the record of item that I click. Of course I could be wrong. Any help would be appreciated this is my code.
Thank you,
Code:
<SCRIPT language=vbscript event=ondblclick for=CSGACCTNUMBER>
<!--

    Dim vURL
    Dim intCSGACCTNUMBER
    Dim strCSGACCTNUMBER
  
    intCSGACCTNUMBER = document.all.item ("CSGACCTNUMBER")
    strCSGACCTNUMBER = intCSGACCTNUMBER.value
    vURL = "[URL unfurl="true"]https://website.cfm?ACCTNO="[/URL] &strCSGACCTNUMBER
	window.open (vURL)
      
-->
</SCRIPT>
 
Ummm... Found the answer. I hope no one started to look into this. Just in case someone wants to know the code is as follows:
Code:
<SCRIPT language=vbscript event=ondblclick for=CSGACCTNUMBER>
<!--

    Dim vURL
    Dim strCSGACCTNUMBER
	
    strCSGACCTNUMBER = MSODSC.CurrentSection.HTMLContainer.children("CSGACCTNUMBER").value
    vURL = "[URL unfurl="true"]https://webiste.cfm?ACCTNO="[/URL] &strCSGACCTNUMBER
	window.open (vURL)
    
-->
</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top