Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 26th, 2005, 8:12 PM   #1
zameroth
Newbie
 
Join Date: Apr 2005
Posts: 1
Rep Power: 0 zameroth is on a distinguished road
Cell Manipulation

I'm trying to change the background image of a cell with a button click and add text within the cell. I'm not to familiar with innerTEXT or how to do this. Here is the code I have:


<html>
<head>
<script language=javascript>
function textCHK() {
if (document.form1.text1.value == 'change') {

}
}
</script>
</head>
<body>
<form name="form1">
<table border>
<tr>
<td align="center">
<input type="text" id="text1"><br>
<input type="button" value="Change Table" onClick="textCHK()">
</td>
</tr>

<tr>
<td height="12" width="230" id="cell1">
</td>
</tr>
</table>
</form>
</body>
</html>
zameroth is offline   Reply With Quote
Old Apr 27th, 2005, 11:27 AM   #2
MonkeyRevolution
Programmer
 
MonkeyRevolution's Avatar
 
Join Date: Apr 2005
Location: In the toaster. Shh!
Posts: 57
Rep Power: 4 MonkeyRevolution is on a distinguished road
Send a message via AIM to MonkeyRevolution Send a message via MSN to MonkeyRevolution Send a message via Yahoo to MonkeyRevolution
As per usual, I answer with something I've never actually used, but have seen in action:

http://webmonkey.wired.com/webmonkey...tw=programming
__________________
I had a dream that Triumph the Insult Dog owned Microsoft...

How...appropriate.
MonkeyRevolution is offline   Reply With Quote
Old Apr 27th, 2005, 12:49 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
This is simple enough:
<input type="text" id="text1" /><br />
<input type="button" value="Change Table" onclick="document.getElementById('text1').style.backgroundColor = '#FF0000';" />
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 10:36 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC