Click to See Complete Forum and Search --> : Change HTML script
Condor85
12-05-2002, 06:54 PM
Hi, i'm looking for a script, that will go through all the html that is under it, and find the specified word.
Example, in the html under, there might be something that says, <img src=picture.gif> and I want it to go to <a href=yahoo.com>here</a> instead, using javascript. I've seen a few pages before that have implimented it, and I want to know how it can be done.
Condor85
12-06-2002, 09:14 PM
or.... does anybody know where i can find a bad word filter?...
Beach Bum
12-06-2002, 09:35 PM
you want to click the image and go to the link? you just put the image in the a tag, no javascript needed:
<a href=yahoo.com><img src=picture.gif></a>
but i don't understand the first part of your question about html being "under it".
Zach Elfers
12-06-2002, 11:09 PM
Originally posted by Condor85
or.... does anybody know where i can find a bad word filter?...
There is a bad word filter on this site. I forget where it is located, but I know it's title is "Smut Engine".
Condor85
12-06-2002, 11:13 PM
ya, sorry 'bout that, i guess i'm not a good explainer.
I'll give another example...
Lets pretend I have a .html file, and in it near the bottom i have a param line. I want to add javascript at the top that will change the value setting.
so....
<script>
..... searching for word RED
..... found word RED
..... changing word to BLUE
</script>
<applet>
<param name=color value=RED>
</applet>
so..... in the end..... the file should be read as <param name=color value=BLUE>
get it?... i hope so.... if you do'nt understand tell me. btw, i know this is possible as i have seen it once before, my small memory bank just won't let me remember it..... and since i don't know javascript that well..... (i can just follow and understand the code).... well, ya know... ok, thanx guys (or gals)!
Beach Bum
12-07-2002, 08:54 AM
OK, now i think i get it - you don't want a search routine - you need to change a specific parameter.
you need to go to the obejct you want to change. for eaxmple:
document.name1.style.color
would change the color specified in the style of the object named mame1 in your document.
name1 is the object you give the name="name1"
no search needed - you get there by specifically telling the browser what you want to change.
you can effect more than one object at a time by using classes in CSS - thereby making all links green, for example.
is that what you are after?
Condor85
12-07-2002, 03:43 PM
ya, i think thats wut im' looking for.... i'll try it out... if not, i'll just bug the board some more, heh
Condor85
12-07-2002, 09:17 PM
ok, i've done a little research and now i know a bit more of what i'm talking about....
applets look like this...
<applet blah=blah>
<param name=he value=deh>
</applet>
now... if i want to change the thing in applet i would write this.... right?? document.applets[blah]=notblah
if not, correct me....
but anyway.... how would i do the same thing with the param.... so i can change the VALUE=deh