PC Review


Reply
Thread Tools Rate Thread

Activating Javascript with excel Part 2

 
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      26th Sep 2007
I am now trying to Edit a filter called 'Priority' which is referenced in the
source code as :

<td>Priority: </td><td><span id="Priority_Desc">All</span> <a
href="javascript:editFilter('[Priority]');">Edit</a></td>

and then place a tick in the second Check Box displayed.

Help would be very much appreciated
--
jason36
 
Reply With Quote
 
 
 
 
Tim Williams
Guest
Posts: n/a
 
      27th Sep 2007
If this is the only link on the page with the text "Edit":

dim lnk

for each lnk in IE.document.links
if lnk.innerText="Edit" then
lnk.click
exit for
end if
next l

No idea for the next part without having the source code for the checkboxes.

Tim



"jason36" <(E-Mail Removed)> wrote in message
news:A95CC90D-2851-42D7-8BC3-(E-Mail Removed)...
>I am now trying to Edit a filter called 'Priority' which is referenced in
>the
> source code as :
>
> <td>Priority: </td><td><span id="Priority_Desc">All</span> <a
> href="javascript:editFilter('[Priority]');">Edit</a></td>
>
> and then place a tick in the second Check Box displayed.
>
> Help would be very much appreciated
> --
> jason36



 
Reply With Quote
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      27th Sep 2007
Tim, This is not the only edit link, the source code has this edit by the id :
><span id="Priority_Desc">All</span>. Is there a way to For Next to find that specific id?



Many Thanks
--
jason36


"Tim Williams" wrote:

> If this is the only link on the page with the text "Edit":
>
> dim lnk
>
> for each lnk in IE.document.links
> if lnk.innerText="Edit" then
> lnk.click
> exit for
> end if
> next l
>
> No idea for the next part without having the source code for the checkboxes.
>
> Tim
>
>
>
> "jason36" <(E-Mail Removed)> wrote in message
> news:A95CC90D-2851-42D7-8BC3-(E-Mail Removed)...
> >I am now trying to Edit a filter called 'Priority' which is referenced in
> >the
> > source code as :
> >
> > <td>Priority: </td><td><span id="Priority_Desc">All</span> <a
> > href="javascript:editFilter('[Priority]');">Edit</a></td>
> >
> > and then place a tick in the second Check Box displayed.
> >
> > Help would be very much appreciated
> > --
> > jason36

>
>
>

 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      28th Sep 2007

try

document.getElementById("Priority_Desc").parentElement.getElementsByTagName("A")(0).click

watch out for wrapping there.

Untested: might be ....getElementsByTagName("A")(1).click

Tim


"jason36" <(E-Mail Removed)> wrote in message
news:7BDD9BF0-DAA7-48CA-A6A7-(E-Mail Removed)...
> Tim, This is not the only edit link, the source code has this edit by the
> id :
>><span id="Priority_Desc">All</span>. Is there a way to For Next to find
>>that specific id?

>
>
> Many Thanks
> --
> jason36
>
>
> "Tim Williams" wrote:
>
>> If this is the only link on the page with the text "Edit":
>>
>> dim lnk
>>
>> for each lnk in IE.document.links
>> if lnk.innerText="Edit" then
>> lnk.click
>> exit for
>> end if
>> next l
>>
>> No idea for the next part without having the source code for the
>> checkboxes.
>>
>> Tim
>>
>>
>>
>> "jason36" <(E-Mail Removed)> wrote in message
>> news:A95CC90D-2851-42D7-8BC3-(E-Mail Removed)...
>> >I am now trying to Edit a filter called 'Priority' which is referenced
>> >in
>> >the
>> > source code as :
>> >
>> > <td>Priority: </td><td><span id="Priority_Desc">All</span> <a
>> > href="javascript:editFilter('[Priority]');">Edit</a></td>
>> >
>> > and then place a tick in the second Check Box displayed.
>> >
>> > Help would be very much appreciated
>> > --
>> > jason36

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      28th Sep 2007
Tim,

Brilliant, I now have an issue that now I am presented with box that has a
URL which is security protected so that I cannot view the source code. I can
see checkboxes which have text next to them and a button which simply says OK
next to it. I can check these manually but it would save me an awful lot of
time if I could automate it. Am I now at a dead end?
--
jason36


"Tim Williams" wrote:

>
> try
>
> document.getElementById("Priority_Desc").parentElement.getElementsByTagName("A")(0).click
>
> watch out for wrapping there.
>
> Untested: might be ....getElementsByTagName("A")(1).click
>
> Tim
>
>
> "jason36" <(E-Mail Removed)> wrote in message
> news:7BDD9BF0-DAA7-48CA-A6A7-(E-Mail Removed)...
> > Tim, This is not the only edit link, the source code has this edit by the
> > id :
> >><span id="Priority_Desc">All</span>. Is there a way to For Next to find
> >>that specific id?

> >
> >
> > Many Thanks
> > --
> > jason36
> >
> >
> > "Tim Williams" wrote:
> >
> >> If this is the only link on the page with the text "Edit":
> >>
> >> dim lnk
> >>
> >> for each lnk in IE.document.links
> >> if lnk.innerText="Edit" then
> >> lnk.click
> >> exit for
> >> end if
> >> next l
> >>
> >> No idea for the next part without having the source code for the
> >> checkboxes.
> >>
> >> Tim
> >>
> >>
> >>
> >> "jason36" <(E-Mail Removed)> wrote in message
> >> news:A95CC90D-2851-42D7-8BC3-(E-Mail Removed)...
> >> >I am now trying to Edit a filter called 'Priority' which is referenced
> >> >in
> >> >the
> >> > source code as :
> >> >
> >> > <td>Priority: </td><td><span id="Priority_Desc">All</span> <a
> >> > href="javascript:editFilter('[Priority]');">Edit</a></td>
> >> >
> >> > and then place a tick in the second Check Box displayed.
> >> >
> >> > Help would be very much appreciated
> >> > --
> >> > jason36
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Andrew Taylor
Guest
Posts: n/a
 
      28th Sep 2007
There are always ways to view the HTML source - after all, it has
already
been downloaded to your browser. Try the IE developer toolbar (if you
use IE) or Firebug (if you use Firefox).


On Sep 28, 12:01 pm, jason36 <jaso...@discussions.microsoft.com>
wrote:
> Tim,
>
> Brilliant, I now have an issue that now I am presented with box that has a
> URL which is security protected so that I cannot view the source code. Ican
> see checkboxes which have text next to them and a button which simply says OK
> next to it. I can check these manually but it would save me an awful lotof
> time if I could automate it. Am I now at a dead end?
> --
> jason36
>
>
>
> "Tim Williams" wrote:
>
> > try

>
> > document.getElementById("Priority_Desc").parentElement.getElementsByTagName*("A")(0).click

>
> > watch out for wrapping there.

>
> > Untested: might be ....getElementsByTagName("A")(1).click

>
> > Tim

>
> > "jason36" <jaso...@discussions.microsoft.com> wrote in message
> >news:7BDD9BF0-DAA7-48CA-A6A7-(E-Mail Removed)...
> > > Tim, This is not the only edit link, the source code has this edit by the
> > > id :
> > >><span id="Priority_Desc">All</span>. Is there a way to For Next tofind
> > >>that specific id?

>
> > > Many Thanks
> > > --
> > > jason36

>
> > > "Tim Williams" wrote:

>
> > >> If this is the only link on the page with the text "Edit":

>
> > >> dim lnk

>
> > >> for each lnk in IE.document.links
> > >> if lnk.innerText="Edit" then
> > >> lnk.click
> > >> exit for
> > >> end if
> > >> next l

>
> > >> No idea for the next part without having the source code for the
> > >> checkboxes.

>
> > >> Tim

>
> > >> "jason36" <jaso...@discussions.microsoft.com> wrote in message
> > >>news:A95CC90D-2851-42D7-8BC3-(E-Mail Removed)...
> > >> >I am now trying to Edit a filter called 'Priority' which is referenced
> > >> >in
> > >> >the
> > >> > source code as :

>
> > >> > <td>Priority: </td><td><span id="Priority_Desc">All</span> <a
> > >> > href="javascript:editFilter('[Priority]');">Edit</a></td>

>
> > >> > and then place a tick in the second Check Box displayed.

>
> > >> > Help would be very much appreciated
> > >> > --
> > >> > jason36- Hide quoted text -

>
> - Show quoted text -



 
Reply With Quote
 
Tim Williams
Guest
Posts: n/a
 
      29th Sep 2007

What kind of "box" is it ? Pop-up window or something else ?
In what way is it "security protected"

tim

On Sep 28, 4:01 am, jason36 <jaso...@discussions.microsoft.com> wrote:
> Tim,
>
> Brilliant, I now have an issue that now I am presented with box that has a
> URL which is security protected so that I cannot view the source code. I can
> see checkboxes which have text next to them and a button which simply says OK
> next to it. I can check these manually but it would save me an awful lot of
> time if I could automate it. Am I now at a dead end?
> --
> jason36
>
>
>


 
Reply With Quote
 
=?Utf-8?B?amFzb24zNg==?=
Guest
Posts: n/a
 
      1st Oct 2007
Thanks to Andrew I have obtained the web site and viewed the source code for
what I now know is a dialog box. The problem is that the dialog box appears
only to work when it appears on the web page from which it was fired up from.
If I try to run my saved queries from the dialog boxes unique url nothing
happens. Two things I need to do.

1/ interact with the dialog box, source code for where I want to interact -
AGM CLEANING SF - is :

<option value="U816" allowEdit="True">AGM CLEANING SF</option>

which in turn will need to activate the open query button :

<td><input id="btnOpen" style="WIDTH: 75px" disabled
onclick="javascriptpenQuery();" type="button" value="Open">

2/ Make sure it interacts with the source page and returns some data.

Regards
--
jason36


"Tim Williams" wrote:

>
> What kind of "box" is it ? Pop-up window or something else ?
> In what way is it "security protected"
>
> tim
>
> On Sep 28, 4:01 am, jason36 <jaso...@discussions.microsoft.com> wrote:
> > Tim,
> >
> > Brilliant, I now have an issue that now I am presented with box that has a
> > URL which is security protected so that I cannot view the source code. I can
> > see checkboxes which have text next to them and a button which simply says OK
> > next to it. I can check these manually but it would save me an awful lot of
> > time if I could automate it. Am I now at a dead end?
> > --
> > jason36
> >
> >
> >

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript in web part AVL Microsoft Dot NET Framework 1 31st Jul 2008 04:05 PM
Activating javascript with excel =?Utf-8?B?amFzb24zNg==?= Microsoft Excel Programming 6 25th Sep 2007 01:22 PM
Activating / Closing workbook using part name and a wild character =?Utf-8?B?c2hhcm1hbg==?= Microsoft Excel Programming 5 24th Jun 2005 04:00 PM
Javascript not working when part of asp.net page. tshad Microsoft ASP .NET 9 23rd Mar 2005 10:00 AM
Activating JavaScript from C# Mike Strauss Microsoft ASP .NET 2 20th Dec 2004 02:08 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:43 PM.