473,386 Members | 1,621 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,386 software developers and data experts.

VB Internet Explorer onchange event

20
hi I'm making a macro in excel that loads up internet explorer and fills out a form. I'm able to do all of that but i have a hard time to trigger a javascript onchange event that is triggered when a user manuallay types a number in the textbox and clicks outside the box.

here is my code for that text box

' Inserts unit sales price
IEdoc.All("ctl00$ContentPlaceHolderMain$uxFtc$uxUn itSalesPrice").Value = Cells(i, 10)

and here is the source piece from the website that shows the textbox and the onchange,

<tr><td>
<span id="ctl00_ContentPlaceHolderMain_uxFtc_uxUnitSales PriceLabel">Unit Sales Price:</span>
</td><td>
<input name="ctl00$ContentPlaceHolderMain$uxFtc$uxUnitSal esPrice" type="text" onchange="javascript:setTimeout('__doPostBack(\'ct l00$ContentPlaceHolderMain$uxFtc$uxUnitSalesPrice\ ',\'\')', 0)" onkeypress="if (WebForm_TextBoxKeyHandler(event) == false) return false;" id="ctl00_ContentPlaceHolderMain_uxFtc_uxUnitSales Price" onfocus="StoreFocusElementName()" />
<span id="ctl00_ContentPlaceHolderMain_uxFtc_uxUnitSales PriceCurrency">USD</span>
</td></tr>


I'm a begginer so this could be very simple.
Any help would be much appreciated
Thanks
Mar 29 '10 #1

✓ answered by loudey

I was able to figure it out but here is the code for whoever needs it in the future.

IEdoc.All("Input the name of the field that when it changes it the onchange event should activate").FireEvent ("onchange")

1 4306
loudey
20
I was able to figure it out but here is the code for whoever needs it in the future.

IEdoc.All("Input the name of the field that when it changes it the onchange event should activate").FireEvent ("onchange")
Apr 1 '10 #2

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

Similar topics

2
by: Yve | last post by:
Hallo, this testweb works well in Mozilla and Netscape but not in Internet Explorer. http://www.netzwerkservice.com/test/frame/test_javascript_1007/ As I am not good at JavaScript I have...
6
by: Thomas | last post by:
Hi, I'm having a problem with the dynamically created inputfields in Internet Explorer. The situation is the following: - I have a dynamically created table with a textbox in each Cell. - It...
3
by: b_naick | last post by:
I realize that the onChange event for a drop down can be trapped as follows: <select name="myDropDown" onChange="somefunc"> Is it possible to trap the onChange event outside of the select...
1
by: Apu Nahasapeemapetilon | last post by:
Hello and thank you in advance for your help. Can anyone think of a reason why this code would work properly on one PC, but not another? I've got a System.Windows.Forms.UserControl that...
1
by: kebabkongen | last post by:
Hi, I'm working on a JavaScript that is enabling / disabling a select element according to whether a checkbox is selected or not. This works fine in Firefox, but in Internet Explorer (v 6.0.2900)...
2
by: l3gz | last post by:
Hello ppl, i am using onChange method on radio buttons. the following code works fine in firefox. in IE it does nothing until you click somewhere else on the screen (or even if you click again on...
3
by: Mister Joe | last post by:
I have a page and if the user has javascript enables I am trying to dynamically change a link to a sitemap to a dropdown menu (that when the option is changed will forward the user to another...
2
by: antiinertia | last post by:
How does one find the value of a drop down in Internet Explorer? The form below works in Firefox and Safari. But not in Internet Explorer. Can someone tell me how to code this so IE understands...
1
by: -Lost | last post by:
This is more of a post to inform, unless of course I am missing something fundamental, in which case I would appreciate anyone explaining it. Based on Mr. Michaux's camelizeStyle function I...
1
by: suneel271 | last post by:
code working in internet explorer but not in mozilla and iam getting erroe like window.event has no properties and here is the code <%@ page language="java" contentType="text/html;...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.