473,387 Members | 3,810 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,387 software developers and data experts.

dynamic modification of browser content

Hi, I am interested in knowing how to dynamically modify what browser shows
using javascript. I have seen advert programs that put a javascript at the
end of html code, and then dynamically underline certain keywords that the
browser is showing. How do they do that.

Thanks for your help.
May 16 '06 #1
5 1399
Rob
That's a pretty far reaching question. You need to know HTML, the
Document Object Model for browsers and a scripting language such as
JavaScript. Once you know something about these subjects you will need
to write some code and try it out. You can do that right on your own
computer and you don't even need a server to start out.

Open Notepad, copy and paste the code below, save it with a file name
of hi.html. Then go double click on it and see what happens.
Experiment.

<html>
<head>
<title>My Simple Test Page</title>
<script>
function hi()
{
var oWin = window.open();
oWin.document.writeln("<html><head></head><body><h1>Hello,
world</h1></body></html>");
return false;
}
</script>
</head>
<body>
<input type=button onclick='return hi();return' value='Say hi'>
</body>
</html>

May 16 '06 #2
Rob said the following on 5/16/2006 2:45 PM:
That's a pretty far reaching question.
Too bad nobody else knows what you are talking about.
Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.

<URL: http://www.safalra.com/special/googlegroupsreply/ >
You need to know HTML, the Document Object Model for browsers and a
scripting language such as JavaScript.
Only if you want to write the code yourself. Using DynWrite in the FAQ
there is no need to understand 99% of what you just said.
Once you know something about these subjects you will need
to write some code and try it out. You can do that right on your own
computer and you don't even need a server to start out.
You don't even need a browser to tinker with JScript.....
Open Notepad, copy and paste the code below, save it with a file name
of hi.html. Then go double click on it and see what happens.
Experiment.


And if the user doesn't have Notepad?

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 16 '06 #3
Rob
Randy Webb wrote:
Rob said the following on 5/16/2006 2:45 PM:
That's a pretty far reaching question.
Too bad nobody else knows what you are talking about.
Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at
the top of the article, then click on the "Reply" at the bottom of the
article headers.


Thanks for the tip. I forget that some people still use email for this
kind of thing.:)
<URL: http://www.safalra.com/special/googlegroupsreply/ >
You need to know HTML, the Document Object Model for browsers and a
scripting language such as JavaScript.
Only if you want to write the code yourself. Using DynWrite in the FAQ
there is no need to understand 99% of what you just said.
Once you know something about these subjects you will need
to write some code and try it out. You can do that right on your own
computer and you don't even need a server to start out.


You don't even need a browser to tinker with JScript.....


But what if you don't have JScript?
Open Notepad, copy and paste the code below, save it with a file name
of hi.html. Then go double click on it and see what happens.
Experiment.
And if the user doesn't have Notepad?


I don't know. If I say get a text editor they you'll say, What if they
don't have a computer? After all you can do all this with a pencil and
paper. (But what if he doesn't have a pencil?)

But seriously, I guess I was just trying to encourage the guy to
experiment. My suggestion to you is why don't you give him your ideas
about how to approach the issue. It sounds like you might have some
good ones.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


All properly quoted, this is Rob:-] signing off in peace, love and
laughter...

May 16 '06 #4
Rob wrote:
Randy Webb wrote: <snip>
If you want to post a followup via groups.google.com, ... <snip> Thanks for the tip. I forget that some people still use email
for this kind of thing.:)
No they don't. This is Usenet so what people use is dedicated newsreader
software (and easily the majority does so).

<snip> --
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup
weekly

<snip> All properly quoted, ...


Not really. You have not trimmed the material unnecessary to maintain
the context of your responses, including Randy's signature (signatures
are never quoted unless they are the direct subject of a response).
See:- <URL: http://jibbering.com/faq/ >

Richard.
May 16 '06 #5
Rob said the following on 5/16/2006 7:32 PM:
Randy Webb wrote:
Rob said the following on 5/16/2006 2:45 PM:
You need to know HTML, the Document Object Model for browsers and a
scripting language such as JavaScript. Only if you want to write the code yourself. Using DynWrite in the FAQ
there is no need to understand 99% of what you just said.
Once you know something about these subjects you will need
to write some code and try it out. You can do that right on your own
computer and you don't even need a server to start out.

You don't even need a browser to tinker with JScript.....


But what if you don't have JScript?


Then you need a different stand alone script engine.
Open Notepad, copy and paste the code below, save it with a file name
of hi.html. Then go double click on it and see what happens.
Experiment.

And if the user doesn't have Notepad?


I don't know. If I say get a text editor they you'll say, What if they
don't have a computer? After all you can do all this with a pencil and
paper. (But what if he doesn't have a pencil?)


No. Your assumption is very flawed. Macs, Linux, any non-windows OS does
not have Notepad. Had you said "Use a text editor", I would have said
nothing about it.
But seriously, I guess I was just trying to encourage the guy to
experiment. My suggestion to you is why don't you give him your ideas
about how to approach the issue. It sounds like you might have some
good ones.


Dynamic modification of a page? Simple. It is so frequently asked that
it is directly answered in this groups FAQ:

<URL: http://jibbering.com/faq/#FAQ4_15>
4.15 How do I modify the current page in a browser?

I assume that you *have* read the FAQ, right?

P.S. You were a long way from properly quoting me.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 17 '06 #6

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

Similar topics

7
by: Jack | last post by:
Hi, I am trying to test a sql statement in Access which gives me the error as stated in the heading. The sql statement is built as a part of asp login verification, where the userid and password...
1
by: Razzbar | last post by:
I'm creating a site that is all on one page. The navigation of the site is enabled by a hidden iframe that fetches content from the server and re/places it in a div on the page. The problem is...
2
by: Martien van Wanrooij | last post by:
I have been using in a lot of websites a script that creates a menu bar but avoids that the button to the current page can be clicked. I am rather satisfied with it (although suggestions for better...
1
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following HTML code and I like to change the value of REFRESH content from 2 to something else at runtime. Any suggestions? <HTML> <HEAD> <meta name="GENERATOR"...
9
by: Jay Kim | last post by:
Hi, We're implementing a Windows application using Visual Basic .NET. One of the key features we need to implement is that we should be able to get the accurate byte offset of user selected...
0
by: Pascal Costanza | last post by:
Dynamic Languages Day @ Vrije Universiteit Brussel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monday, February 13, 2006, VUB Campus Etterbeek The VUB (Programming Technology Lab,...
1
by: Henry Law | last post by:
(I posted this to comp.infosystems.www.browsers.misc but there seems to be very little traffic there. I can't see another suitable group; is it on topic here? If not, any suggestions as to...
3
by: =?Utf-8?B?U3ViYQ==?= | last post by:
I am using a asp page to dynamically create a stylesheet my asp page creates the following css element when i call the asp page my typing the url in the browser. My asp page works...
14
by: asdf | last post by:
I have a python script whose output i want to dynamically display on a webpage which will be hosted using Apache. How do I do that? thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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,...

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.