Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript JScript.NET Excel , +
SO below is the short version of what I was able to do in excel. What I did was had certain fields be collected and stored into variables. A webpage would open up and enter the fields. In this case it was mostly address search it was entering. It would click the search, and then click again to bring up the GIS map on this page.
 
        If CellAssessor = "pinalassessor" Then
            SiteLink = "http://pinalcountyaz.gov/Departments/Assessor/Pages/ParcelInfoSearch.aspx"
            TextboxNumberID = "ctl00$m$g_f1ed9e0e_852a_4270_8b23_90651396ae13$ctl00$ctl02$txt_Number"
            TextboxDirectionID = "ctl00$m$g_f1ed9e0e_852a_4270_8b23_90651396ae13$ctl00$ctl02$ddl_Direction"
            TextboxNameID = "ctl00$m$g_f1ed9e0e_852a_4270_8b23_90651396ae13$ctl00$ctl02$txt_Name"
            TextboxSuffixID = "ctl00$m$g_f1ed9e0e_852a_4270_8b23_90651396ae13$ctl00$ctl02$ddl_Suffix"
 
<pre>
        ie.navigate SiteLink
        ie.Visible = True
        Application.Wait Now + TimeValue("00:00:2")
        While ie.Busy
        DoEvents
        Wend
        ie.Document.all(TextboxNumberID).Value = Item1
        ie.Document.all(TextboxDirectionID).Value = Item2
        ie.Document.all(TextboxNameID).Value = Item3
        ie.Document.all(TextboxSuffixID).Value = Item4
    End If
    </pre>

Doing this in excel was a piece of cake. Once I figured alot of this out. Problem is now, I want to switch this feature into CRM 2011 Microsoft Dynamics. Which uses JScripts. In the Javascript I got as far as opening up the window of the URL I want. Using:
 
 window.open("<a href="http://pinalcountyaz.gov/Departments/Assessor/Pages/ParcelInfoSearch.aspx">http://pinalcountyaz.gov/Departments/Assessor/Pages/ParcelInfoSearch.aspx</a>");

But I haven't found anything on getting address entry into the fields.

Does javascript support finding the ID of objects on the webpage, and being able to set the value, and then doing a webclick on the search. In the far feature I would also like to be able to know how to collect values on the page that shows the results.

If anybody could help. It would be greatly appreciated. I can give the entire excel vbscript if it helps. But I'm basically converting what I did in Vb to Javascript. I got most of it converted, but this was the last part. Thx in advance.
Posted 4-Sep-12 15:50pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 475
1 Sergey Alexandrovich Kryukov 405
2 Maciej Los 290
3 ProgramFOX 265
4 CHill60 200
0 OriginalGriff 490
1 Sergey Alexandrovich Kryukov 405
2 Maciej Los 285
3 ProgramFOX 265
4 Peter Leow 210


Advertise | Privacy | Mobile
Web01 | 2.8.150331.1 | Last Updated 4 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100