473,614 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

changing text with Javascript/DHTML?

Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. As far as I
know (with my limited knowledge) the only way you can do this is with
a textbox or images, which is not what I'd like to do. There's gotta
be a way to do this, right?
Jul 23 '05 #1
3 1393
In article <73************ **************@ posting.google. com>, cryan3
@earthlink.net enlightened us with...
Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. As far as I
know (with my limited knowledge) the only way you can do this is with
a textbox or images, which is not what I'd like to do. There's gotta
be a way to do this, right?


Sure, if you're targeting recent DOM browsers. Put it in a div and use
DOM methods and/or change innerHTML (I prefer DOM methods to just
changin innerHTML).

Can't do it in older browsers very well, but even NN4 could change the
content of a layer.

Netscape/Mozilla:
<http://www.mozilla.org/docs/dom/domref/dom_el_ref.html #1021544>
MSIE:
<http://msdn.microsoft.com/library/default.asp?
url=/workshop/author/dhtml/reference/dhtml_reference _entry.asp>

--
--
~kaeli~
No one is listening until you make a mistake.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
Chris Ryan wrote:
Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. As far as I
know (with my limited knowledge) the only way you can do this is with
a textbox or images, which is not what I'd like to do. There's gotta
be a way to do this, right?


<url: http://jibbering.com/faq/#FAQ4_15 />

--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #3
Chris Ryan wrote:
Is there a way to change the displayed text on a web page using some
combination of Javascript and DHTML? NOT in a text box. [...]
There's gotta be a way to do this, right?


There is. And if you would have cared to use the tool that you are
using for posting also for (re)search, you would not have had to ask.
PointedEars
Jul 23 '05 #4

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

Similar topics

2
2108
by: John Ryan | last post by:
I've a small bit of javascript on my site that has a from with 2 selection boxes, when you choose an option in the first box, the second one re-populates its list accordingly. But the second selection box can have varying amounts of entries, and this means theres a lot of white spaces in the second selection box sometimes. Is there any way to eliminate this? Here's my code: <script language="JavaScript1.2"> <!--
2
1553
by: pablo | last post by:
Dear NGers, I want to keep some images just left of some DIVs. But a change in text size leaves my images at the original position. Which event is generated by changing the text size from the toolbar?? tia pablo k
3
2221
by: Craig | last post by:
Hi, What I'm trying (quite poorly) to do is make it so when a link is clicked the text inside a div or p changes. I've tried numerous things, most of which work in IE but none of which work in gecko browsers e.g. Mozilla, Netscape, Epiphany etc etc. This is what I have now and works fine in IE but sits there doing nothing in anything else:
14
2494
by: Brandon Hoppe | last post by:
I'm trying to change the src of an ilayer in the parent document from a link inside the ilayer. I'm not able to get it to work. All that happens is Netscape 4 crashes. This is for Netscape 4 only. For example, here is the main page: <html> <head> <script type="text/javascript">
24
3495
by: Charles Crume | last post by:
Hello; My "index.htm" page has 3 frames (content, navigation bar, and logo). I set the "SRC" of the "logo" frame to a blank gif image and then want to change it's contents after the other two frames have been loaded by using a javascript statement from the "navigation" frame, as shown below: top.window.ccs_logo.src = 'images/ccs_logo.gif'; alert(top.window.ccs_logo.src);
2
5239
by: rpesq | last post by:
Hi, I Need help changing the content of a DIV. I sincerely researched the issue and have not found a solution except to scrap the idea and stick with the iframe code that I had been using. My purpose here is to avoid iframes. I know how to change the DIV content to other basic html statements, such as basic IMG's or Lists, but I want to put a Javascript into the DIV, and have not found a way to do it.
20
2842
by: cwdjrxyz | last post by:
There have been fancy dhtml text effects since the early days of javascript. The rainbow text effect was one of the early ones. While some such effects may be fun on private pages, they can easily become obnoxious, especially on commercial sites. To a large extent, dhtml text effects have been replaced by flash, likely because the flash effects often are more easy to make for many people. How bad can a dhtml text effect be? Many of you...
2
1888
by: sasperilla | last post by:
Hi, I would like to find the coordinates of a word inside a div or span tag. I know you can find the coordinates of a tag inside the DOM, but can you get the coordinates of a portion of the text inside that element in javascript? If the user highlights or selects text in a div or span can I get the indicies that make up that selected piece of text? What API of
4
8520
by: Pete90 | last post by:
I am trying to change the text continously for the text inside a table but it stops after reaching the 2nd index in the array. Anyone can debug? Below are the coding: <script language="javascript"> var i=0; var text=; function dhtml(){ document.write("<table border='1' color='black'>");
0
8142
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
8640
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
8589
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...
1
6093
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5548
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();...
0
4058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2573
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
1
1757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1438
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.