From: Test Test on
Hello all,

Need help. How do I create a javascript to check the whole page, and
hide all <a> tags which look like this one?

<a tabindex=1
href="javascript:RemoveAttachmentFromServer('{044D83CB-912A-428E-87A0-
D2F746557DD5}',1)">Delete</a>

Basically I am trying to hide the delete option where the
javascript:RemoveAttachmentFromServer is being called.

Many thanks
BM
From: Martin Honnen on
Test Test wrote:

> Need help. How do I create a javascript to check the whole page, and
> hide all <a> tags which look like this one?
>
> <a tabindex=1
> href="javascript:RemoveAttachmentFromServer('{044D83CB-912A-428E-87A0-
> D2F746557DD5}',1)">Delete</a>
>
> Basically I am trying to hide the delete option where the
> javascript:RemoveAttachmentFromServer is being called.

Which browsers do you target?

--

Martin Honnen
http://msmvps.com/blogs/martin_honnen/
From: VK on
On Jun 17, 7:52 pm, Test Test <bespokem...(a)googlemail.com> wrote:
> Hello all,
>
> Need help. How do I create a javascript to check the whole page, and
> hide all <a> tags which look like this one?
>
> <a tabindex=1
> href="javascript:RemoveAttachmentFromServer('{044D83CB-912A-428E-87A0-
> D2F746557DD5}',1)">Delete</a>
>
> Basically I am trying to hide the delete option where the
> javascript:RemoveAttachmentFromServer is being called.

function hideEXA() {

var lnk = document.links;
var len = lnk.length;

for (var i=0; i<len; i++) {
if (lnk[i].href.indexOf('RemoveAttachment') != -1) {
lnk[i].style.display = 'none';
// or some other way of hiding
}
}

}

..
From: Test Test on
Martin

Was looking for IE6.. But VK's solution works perfectly fine!

Thanks


On Jun 17, 4:57 pm, Martin Honnen <mahotr...(a)yahoo.de> wrote:
> Test Test wrote:
> > Need help. How do I create a javascript to check the whole page, and
> > hide all <a> tags which look like this one?
>
> > <a tabindex=1
> > href="javascript:RemoveAttachmentFromServer('{044D83CB-912A-428E-87A0-
> > D2F746557DD5}',1)">Delete</a>
>
> > Basically I am trying to hide the delete option where the
> > javascript:RemoveAttachmentFromServer is being called.
>
> Which browsers do you target?
>
> --
>
>         Martin Honnen
>        http://msmvps.com/blogs/martin_honnen/

From: Test Test on
On Jun 17, 5:00 pm, VK <schools_r...(a)yahoo.com> wrote:
> On Jun 17, 7:52 pm, Test Test <bespokem...(a)googlemail.com> wrote:
>
> > Hello all,
>
> > Need help. How do I create a javascript to check the whole page, and
> > hide all <a> tags which look like this one?
>
> > <a tabindex=1
> > href="javascript:RemoveAttachmentFromServer('{044D83CB-912A-428E-87A0-
> > D2F746557DD5}',1)">Delete</a>
>
> > Basically I am trying to hide the delete option where the
> > javascript:RemoveAttachmentFromServer is being called.
>
> function hideEXA() {
>
>  var lnk = document.links;
>  var len = lnk.length;
>
>  for (var i=0; i<len; i++) {
>   if (lnk[i].href.indexOf('RemoveAttachment') != -1) {
>    lnk[i].style.display = 'none';
>    // or some other way of hiding
>   }
>  }
>
> }
>
> .

This works great! thanks for the great help!