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

Trying to create a switch that allows me to change text back and forth

10
Here is my code:<title>Dom demo</title>
<script type="text/javascript">
function changeText()

{

var Temp = document.getElementById('first').innerHTML= 'Second Entry';

document.getElementById('second').innerHTML= 'First Entry';

document.getElementById('Temp').value;

}

</script>
</head>
<body>

<div id="first">First Entry</div>
<div id="second">Second Entry</div>
<input type="button" onclick="changeText()" value="Change text of this document">
</body>
</html>


It displays:

First Entry
Second Entry

I press a radio button that makes it do this

Second Entry
First Entry

But I don't know how to make it go back to :

First Entry
Second Entry:

I am knew to this stuff can someone help?
Feb 8 '10 #1
3 2252
drhowarddrfine
7,435 Expert 4TB
This is a javascript question for the javascript board.
Feb 8 '10 #2
dfluker
10
Sorry, my mistake, I think I'm on the right board now.
Feb 8 '10 #3
johny10151981
1,059 1GB
document.getElementById('first').innerHTML may be this is wrong.
innerHtml
Feb 9 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: intl04 | last post by:
I am getting strange print-related error messages when trying to create (not print!) reports. For example, when I click 'new' to create a report then choose 'design view', I get an error message...
2
by: Peter Row | last post by:
Hi, I think I am having some threading issues in a project I am porting from VB6 webclass to VB.NET. Therefore I would like to temporarily set the threading mode to STA to get around it until I...
5
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
4
by: pek | last post by:
I created a file name image.php which contains only the following code: <?php function createThumbnail($picture,$thumb,$new_w,$new_h) { $extension=substr($picture,strrpos($picture,".")+1);...
1
by: Drakscon | last post by:
Im trying to get the compounded interest to go back only being compounded annually. I want the user of this program to be able to do semi annually of monthly or some other. This is my code. Any...
6
by: AppleBag | last post by:
I'm having the worst time trying to login to myspace through code. Can someone tell me how to do this? Please try it yourself before replying, only because I have asked this a couple of times in...
7
by: Danny | last post by:
Hello: I would like to develop a browser extension, or whatever such a thing is classified as, that would allow a user of IE6, and possibly IE7, to switch between a live and development page. ...
0
by: Marc Scheuner | last post by:
Folks, we're trying to stream back a result set from a SQL query into Excel from our ASP.NET application. Basically, we're doing this here: Response.ContentType = "text/csv";...
1
by: Marc Scheuner | last post by:
Folks, we're trying to stream back a result set from a SQL query into Excel from our ASP.NET application. Basically, we're doing this here: Response.ContentType = "text/csv";...
0
by: Dale | last post by:
Access 2000 I have a check scanner from Magtek, (MicrImage) This is like a "point of sale" check scanner/credit card reader. Magtek furnished 2 ocx's (MTMicrImage.ocx & SaxComm8.ocx). They also...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.