473,408 Members | 2,813 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,408 software developers and data experts.

How can I check for a specific HTML tag or Text and remove it when the page loads



hiii

I wanted to know how can I check for a specific HTML tag or user defined
TEXT and delete it when the page loads

Whenver the IE loads the page my company add its COMPANY NAME in my
office on any page so what I want to do is to check for my company name
b4 the page loads and remove the company name and then load the page.

I want to do this in JS
thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
4 1779
techy techno wrote:
I wanted to know how can I check for a specific HTML tag or user defined
TEXT and delete it when the page loads
Whenver the IE loads the page my company add its COMPANY NAME in my
office on any page so what I want to do is to check for my company name
b4 the page loads and remove the company name and then load the page.
Sounds more like you want to remove an Ad Banner from a site.
I want to do this in JS


And if JS is disabled?

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2


ITs ok

I just need the JS for hiding the TEXT

ITs not a banner its just a <h1> link to their site and If the js is
disabled then thats my hardluck :

so please can you give me the required JS.
thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #3
techy techno hu kiteb:
hiii

I wanted to know how can I check for a specific HTML tag or user
defined TEXT and delete it when the page loads
this sounds like a job for proxomitron. Google for it. Of course, since
you appear to be using a company machine, I'm not sure whetehr you'd
have permission to install any programs.
Whenver the IE loads the page my company add its COMPANY NAME in my
office on any page so what I want to do is to check for my company
name b4 the page loads and remove the company name and then load the
page.
If you are using a company machine, I think the company has the right to
impose whatever banners it sees fit. Is there a particular reason you
don't want these to appear?

I want to do this in JS


I don't think you can. I could be wrong of course.
--
--
Fabian
This post is not associated in any way with forum4designers dot com.
Permission is specifically denied for that website to archive this post
or display it in any way.

Jul 20 '05 #4
On 25 Jan 2004 09:19:10 GMT, techy techno <an**********@hotmail.com> wrote:
I just need the JS for hiding the TEXT

ITs not a banner its just a <h1> link to their site and If the js is
disabled then thats my hardluck :

so please can you give me the required JS.


Use CSS instead. It has more chance of being supported, too.

If the inserted HTML has a specific pattern, you can match that with CSS
selectors. For example:

<style type="text/css">
h1 a {
display: none;
}
</style>
</head>

<body>
...
<h1><a href="...">The advert text</a></h1>

The CSS rule above will cause all links within a H1 element to be hidden.
They'll still exist in the page, but the user won't see them. Of course,
this means that you cannot use a similar sequence yourself. However, you
needed to, the above example could be modified to:

<style type="text/css">
h1 a {
display: none;
}
h1.showThis a {
display: inline;
}
</style>
</head>

<body>
...
<h1><a href="...">The advert text</a></h1>
...
<h1 class="showThis"><a href="...">My own link</a></h1>

The use of a more specific selector, acheived through the use of a class,
takes precedence, so the second link is displayed, whilst the first is
hidden.

If this is to hide banner images or text inserted by a host, be warned
that hiding that content probably violates the Terms and Conditions of
that site and can lead to the termination of your account.

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
5
by: A.Dagostino | last post by:
hi i need to update an SQL Table when user select or unselect a checkbox control. How Can i do? Thanks Alex
3
by: TK | last post by:
Excuse me for multiple posting because I've posted this message to aspnet.security NG but have not got any response yet. I'm building an ASP.NET application works in Forms Authentication mode...
20
by: Guadala Harry | last post by:
In an ASCX, I have a Literal control into which I inject a at runtime. litInjectedContent.Text = dataClass.GetHTMLSnippetFromDB(someID); This works great as long as the contains just...
51
by: Paul Gorodyansky | last post by:
Hi, Ran into the following problem while trying to have a code to attach a Virtual Keyboard to any user's form: User clicks a button and my JavaScript changes outerHTML of say <textarea -...
2
by: c.l.rogers | last post by:
I've been searching for few days trying to find an answer to my question... hopefully I ofund the right place to help me out! What I am trying to do is use javescript inside column of a <table>...
2
by: Steve JORDI | last post by:
Hi, I'm having a little trouble trying to update a page content when the user clicks a check box. Basically, I need to reload a page to update its content depending on that checkbox status. I...
22
by: Christopher Nelson | last post by:
I have a little menu system which essentially takes HTML like: <div id='foo'></div> and retrieves foo.shtml from the server and inserts it inside the <div>. But sometimes I'd like foo.shtml...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.