hi,
is there any way i could click on the html table content (<td>) and edit the info, and then click a button to update the modification into a database?
i found the following function off the internet, and it really doesn't do the thing that mentioned above, but just replaces the content with the specified "WORD". -
function changeContent(){
-
var x=document.getElementById('myTable').rows
-
var y=x[0].cells
-
y[0].innerHTML="NEW CONTENT"
-
}
-
please help. thanks a lot in advance.
3 1865 dlite922 1,584
Recognized Expert Top Contributor
why don't you put the contents of the <td> into a text field
[PHP]
<td><input type="text" name="nameGoesH ere" value="Value Here" /></td>
[/PHP]
You don't like the looks of it you say? want it to look like regular text?
You can completely change the look of an input tag with css.
background color, no border would do the trick for you.
" Google input html css "
hi dlite922,
thanks for your reply. i tried that already and doesn't work. here is what i'm actually doing:
the script gets the $desc (string) from somewhere, and -
echo "<TR bgcolor=\"#660000\"><TD COLSPAN=2><input type=\"text\" name=\"desc\" value=\"$desc\" /></TD></TR>";
-
the next thing that i'm trying to do is to submit the $desc variable, AFTER making some changes to it, to another script that would insert it into the database: -
echo "<form name=\"go\" method=\"post\" action=\"ezadd.php\">";
-
echo "<input type=\"hidden\" name=\"desc\" value=\"$desc\">";
-
echo "<input type=\"submit\" name=\"submit\" value=\"Add to DB\">";
-
Thank you!
acoder 16,027
Recognized Expert Moderator MVP
the next thing that i'm trying to do is to submit the $desc variable, AFTER making some changes to it, to another script that would insert it into the database:
Without refreshing the page?
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Csaba2000 |
last post by:
How do I detect when the font size has been changed (especially by user action: either Ctrl+Scroll wheel or View/Text
Size)?
This is just for use on IE 5.5+, but it would be great if there was a generic solution.
Thanks,
Csaba Gabor from New York
|
by: Reply Via Newsgroup |
last post by:
Folks,
Say I have a table, ten columns, ten rows - Each with a word in it. I want
to change the values of some/all of the cells in the table via a hyperlink.
How do I reference each cell and change its text contents from a link
elsewhere in the page? I have a rought idea that I'll need something like
'id' in my <td> tags but while I have a greater understanding of server-side
programming langauges like PHP, javascript is still very new...
|
by: Byron |
last post by:
Hi,
Javascript confuses me, so I usually limit myself to Dreamweaver's
built-in scripts for stuff like imageswaps. But this time I'm trying to
write something very simple myself. I do most of my stuff in ASP and PHP
so I'm familiar with server-side programming; for some reason JavaScript
syntax trips me up.
I want to assign a value to a variable according to an onclick event,
and then run an if...then on the variable, and according to...
|
by: SarahMarsden |
last post by:
I'm new to Dreamweaver (using MX 2004). I have a 2 row 3 column table.
I have set each column to 200 pixels. The second row I have merged
into one cell. When I enter text (or anything else) into the merged
cell the 3 columns above change pixel width. The pixel width still
says 200. But the pixel width shown in green above the columns it says
200(172)for example. It seems that the bracketed number is the size
the cell displays at rather...
|
by: Leo |
last post by:
I created a user control which is some text contained in a HtmlTable.
I put this control into main form. I would like to have the ability to
move this control around in the main form. I think one way to do this
is to change the style of this control at runtime ("Left:xx px; Top:xx
px"). Another way is to move the HtmlTable in the control (i.e. change
the style of it). However I couldn't figure out how to let it work. At
design time, I...
| |
by: Don NJ |
last post by:
First my site name is Sinfullblisslingerie.com. I'm starting this
little business to try and make some money on the side. My kids will
be going to college in a few years... Anyway, in the past I have had
some experience with html but now, my new site runs on php. It's a
turnkey site that I purchased on ebay...(Yeah right...turnkey...) I've
been submitting my site to search engines. On excite.com, when I bring
up my site it shows...
|
by: helraizer1 |
last post by:
I have this code in JS
function show_player() {
document.mediaplayer1.style.visibility = "visible";
}
function content(p, clip) {
var mus = document.getElementById('music');
mus.style.visibility = "visible";
|
by: gavy7210 |
last post by:
hello
i am using struts 1.2,Eclipse Platform Version: 3.4.2,mySql 5.0.1,jdk 1.5..
i have a login form(jsp) in which a user logs in,in case he doesnt enter his username and/or password an error is displayed using the <ul> tag and <html:errors> in the jsp. in the from class a vaidate method creates an actionerrors object adds all the errors to it and finally returns it.
the ids are linked in messageresources.properties and appropriate...
|
by: thatcollegeguy |
last post by:
Below are my 3php and 2js files.
I create a table using ajax/php and then want to change the values in the tables add(+ number for teamid) id's for each specific td in the table. I don't know if I have the entirely wrong approach, but my code is below. Any or all help is appreciated!
What currently happens is that the getdivision.php script works perfectly and gives me an entire table of correct data. The problem is that when I click...
|
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...
|
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...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
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...
| |