473,322 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

controlling onclick in a web page

I am trying to control a web page that has an expansion box named "signContact", clicking on this expansion box unhides additional form details.

I want to achieve the same as clicking on this box from my VB script

Below is the section of Java script behind the webpage I am working with - i.e. the expansion box (plus.gif) and the method I wish to activate - "toggleDiv(spContact)"
<tr>
<td width="9" class="SubSectHeading"><img src="/images/plus.gif" name="signContact" WIDTH="9" HEIGHT="9" ALT="Show/Hide Road Authority/Utility Contact Details" onClick="toggleDiv(spContact);toggleSign('signCont act');"></td>
<td class="SubSectHeading">&nbsp;Road Authority/Utility Contact</td>
</tr>



I tried the following VB code with out any luck

Set objCB = docIE.getElementById("signContact")
objCB.onclick = "toggleDiv(spContact)"

The above doesn't error out but objCB is always empty after code is run. Do I have to declare Internet Explorer as an object and then use VB to send the above onclick = toggleDiv(spContact) method to Internet Explorer? Can you offer any other suggestions.


There is a second expansion box
<tr>

<td width="9" class="SubSectHeadingRed"><img src="/images/plus.gif" name="signAuInfo" WIDTH="9" HEIGHT="9" ALT="Show/Hide Road Authority/Utility Information" onClick="toggleDiv(spAuInfo);toggleSign('signAuInf o');setCookie('AuthInfoSeen-613355','02629508X2');"></td>
<td class="SubSectHeadingRed">&nbsp;Road Authority/Utility Information

</tr>
Aug 22 '07 #1
0 1003

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Jenn | last post by:
Hi, I have a page that I am setting up at http://www.extravaganzadesign.com/aw/frame.htm I am using a frame on top for some navigation and the frame below for content that will go to external...
13
by: Arne | last post by:
Hope this is a proper group for this post :) I came across this page about META tags that control browsers. http://www.bauser.com/websnob/meta/browsers.html Some I know, some I wonder about...
5
by: kai | last post by:
Hi, In ASP.NET , what is the difference between OnClick and Click events for a button? Because we have button click event, it can trigger events, why we still need OnClick? Please help. ...
8
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got...
0
by: none | last post by:
Hi, I’ve got a problem with my onclick handlers for command buttons being dropped on page render for a popup window. On the opening window, I have several command buttons, and they all have...
11
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. ...
5
by: Stuart Shay | last post by:
Hello All I am working on ASP.NET 1.1 Custom Pager that allows a User to Enter a Number in a TextBox and go to the page selected. Since the OnClick Event does not work in ASP.NET 1.1 for a...
3
by: Herb | last post by:
I've found how to use javascript to embed a Windows Media Player in a web page. How do I go about controlling the player in response to user input? There should be calls to start, stop and also...
1
by: Math | last post by:
Hi, I have a main HTML page who opens diferrent popup windows, each of them with a specific ID. Now my needs are to refresh the content of only one of them at onClick event on main page. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.