473,748 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1809
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.javas cript 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**********@h otmail.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.******@blueyo nder.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
6557
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 courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing countries, products, and courses. The first two display
5
2350
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
1949
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 with custom user account database. And it shows clients a list of hyperlinks to content pages located in some separated subfolders. This application and content pages are entirely secured, so everyone must logon to the application. The application...
20
5649
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 client-side HTML, CSS, etc. What I want to do is somehow insert a *server control* into the , then set the server control's properties at runtime.
51
4415
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 - adding things like ONCLICK='saveCaret(this)' etc. and it also tries to save any text that user could've entered before the button press.
2
1584
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> tag, to call a php file that will fill in the contents for my column and the html page will then finish loading... For example: <html> <tr>
2
6385
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 have added a checkbox that has an onClick event that calls a javascript function that loads the form itself and adds a GET variable in the url so that I can check which data I have to display.
22
2353
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 to look like: <script language='JavaScript'> ...do something AJAX-y </script>
15
5276
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 show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
8996
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.