473,322 Members | 1,736 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,322 software developers and data experts.

displaying <td> within cfinput when table row clicked on

I am attempting to make a table data row editable once clicked on but
I am not sure how to show the <tdwith two different states. I've got
it to the point where the <tdis hidden then appears within a cfinput
when clicked on, but not sure where to go from here.

Thanks for looking!

<script language="javascript">
function showField(thisID){
//alert("which: "+which+" more stuff here");
identity = document.getElementById(thisID);
identity.style.display="none";
}
</script>
<tr onclick="showField(#id#);"
onMouseOver="this.style.backgroundColor='##99CCFF' "
onMouseOut="this.style.backgroundColor=''" BGCOLOR="###IIF(CurrentRow
MOD 2, DE ('E5E5E5'), DE ('FFFFFF'))#">
<td id="RestrictDate"><div id="#id#" style="display:inherit"><cfinput
name="RestrictDate" type="text" validate="date" message="you must
enter the date in mm/dd/yyyy format"
value="#DateFormat(RestrictionDate, "mm/dd/yyyy")#"></div></td>

Mar 15 '07 #1
4 2335
ASM
John a écrit :
I am attempting to make a table data row editable once clicked on but
I am not sure how to show the <tdwith two different states. I've got
it to the point where the <tdis hidden then appears within a cfinput
when clicked on, but not sure where to go from here.
what could be a 'cfinput' ?
<script language="javascript">
function showField(thisID){
//alert("which: "+which+" more stuff here");
identity = document.getElementById(thisID);
identity.style.display="none";
}
</script>
<tr onclick="showField(#id#);"
curious ... to show the td's content you hide it ?
onMouseOver="this.style.backgroundColor='##99CCFF' "
onMouseOut="this.style.backgroundColor=''" BGCOLOR="###IIF(CurrentRow
MOD 2, DE ('E5E5E5'), DE ('FFFFFF'))#">
what does mean :

BGCOLOR="###IIF(CurrentRow MOD 2, DE ('E5E5E5'), DE ('FFFFFF'))#"

????
<td id="RestrictDate"><div id="#id#" style="display:inherit"><cfinput
name="RestrictDate" type="text" validate="date" message="you must
enter the date in mm/dd/yyyy format"
value="#DateFormat(RestrictionDate, "mm/dd/yyyy")#"></div></td>
<script type="text/javascript">

function showHide(what) {
$(what).style.display = $(what).style.display=='none'?
'block' : 'none';
}
function $(smth) {
return typeof(smth)=='string')?
document.getElementById(smth) : smth;
}
</script>

<form blah >
<table>
<tr>
<td><button onclick="showHide('dat');">show / hide</button></td>
<td>
<p id="dat" style="display:none">
enter the date in mm/dd/yyyy format :
<input type=text name="date">
</p>
</td>
</tr>
<tr onclick="showHide('datDay');">show / hide</button></td>
<td>
<p id="datDay" style="display:none">
enter the date in mm/dd/yyyy format :
<input type=text name="date">
</p>
&nbsp;
</td>
</tr>
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 15 '07 #2
On Mar 15, 1:29 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
John a écrit :
I am attempting to make a table data row editable once clicked on but
I am not sure how to show the <tdwith two different states. I've got
it to the point where the <tdis hidden then appears within a cfinput
when clicked on, but not sure where to go from here.

what could be a 'cfinput' ?
My guess would be cold fusion...
>
<script language="javascript">
function showField(thisID){
//alert("which: "+which+" more stuff here");
identity = document.getElementById(thisID);
identity.style.display="none";
}
</script>
<tr onclick="showField(#id#);"

curious ... to show the td's content you hide it ?
onMouseOver="this.style.backgroundColor='##99CCFF' "
onMouseOut="this.style.backgroundColor=''" BGCOLOR="###IIF(CurrentRow
MOD 2, DE ('E5E5E5'), DE ('FFFFFF'))#">

what does mean :

BGCOLOR="###IIF(CurrentRow MOD 2, DE ('E5E5E5'), DE ('FFFFFF'))#"
Again I imagine cold fusion markup for odd/even row differentiation.
>
????
<td id="RestrictDate"><div id="#id#" style="display:inherit"><cfinput
name="RestrictDate" type="text" validate="date" message="you must
enter the date in mm/dd/yyyy format"
value="#DateFormat(RestrictionDate, "mm/dd/yyyy")#"></div></td>

<script type="text/javascript">

function showHide(what) {
$(what).style.display = $(what).style.display=='none'?
'block' : 'none';}

function $(smth) {
return typeof(smth)=='string')?
document.getElementById(smth) : smth;}
??? Wouldn't this do?

function $(smth) {
return document.getElementById(smth) || smth;
}
>
</script>

<form blah >
<table>
<tr>
<td><button onclick="showHide('dat');">show / hide</button></td>
<td>
<p id="dat" style="display:none">
enter the date in mm/dd/yyyy format :
<input type=text name="date">
</p>
</td>
</tr>
<tr onclick="showHide('datDay');">show / hide</button></td>
<td>
<p id="datDay" style="display:none">
enter the date in mm/dd/yyyy format :
<input type=text name="date">
</p>
&nbsp;
</td>
</tr>

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date

Mar 15 '07 #3
ASM
Tom Cole a écrit :
On Mar 15, 1:29 pm, ASM <stephanemoriaux.NoAd...@wanadoo.fr.invalid>
wrote:
>John a écrit :
>>I've got
it to the point where the <tdis hidden then appears within a cfinput
when clicked on, but not sure where to go from here.

what could be a 'cfinput' ?

My guess would be cold fusion...
[...]
>what does mean :

BGCOLOR="###IIF(CurrentRow MOD 2, DE ('E5E5E5'), DE ('FFFFFF'))#"

Again I imagine cold fusion markup for odd/even row differentiation.
Probably but ... why not to show normal html code ?
(this seen in a browser)
><script type="text/javascript">

function showHide(what) {
$(what).style.display = $(what).style.display=='none'?
'block' : 'none';}

function $(smth) {
return typeof(smth)=='string')?
document.getElementById(smth) : smth;}

??? Wouldn't this do?

function $(smth) {
return document.getElementById(smth) || smth;
}
Not enough twisted :-)
></script>

<form blah >
<table>
<tr>
<td><button onclick="showHide('dat');">show / hide</button></td>
<td>
<p id="dat" style="display:none">
enter the date in mm/dd/yyyy format :
<input type=text name="date">
</p>
</td>
</tr>
<tr onclick="showHide('datDay');">show / hide</button></td>
Gasp !

<tr onclick="showHide('datDay');">

> <td>
<p id="datDay" style="display:none">
enter the date in mm/dd/yyyy format :
<input type=text name="date">
</p>
&nbsp;
</td>
</tr>
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Mar 16 '07 #4
Sorry for not mentioning, yes I am using coldfusion for my form
submission.

Tom is correct, the iif line is cold fusion markup for odd/even row
differentiation.

Thanks for your help!
Mar 16 '07 #5

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

Similar topics

2
by: Sturnoff Megantic | last post by:
This seems like such a stupid little problem, but it's been bugging me for hours now. I have a 2D array called agents2d. I need to loop through it and display the info. Here is my code: echo...
4
by: El Diablo | last post by:
Hi there, I'm trying dynamically generate extra rows in a table. So far this achieves this task within the tHead segment: theTable.tHead.appendChild(document.createElement('TR')) ....but...
14
by: Zenobia | last post by:
Hello folks, Is it possible to position an item within a <td> element? For instance see below. The table has multiple rows, one for each database record. Each row has 3 hrefs associated with it...
3
by: Gil | last post by:
Hello, I use VB.NET and have a series of linkbuttons that are inside individual <td>s. Like this: <td background="image.gif"><asp:linkbutton id="myID" runat="server"/></td> I would like...
2
by: js | last post by:
I have a table rendered with XSLT. The first column has a radio button controls for user to make a selection for a particular row. All the values in the remaining columns are all concated with a...
3
by: Henry Johnson | last post by:
Okay - I'm spinning my wheels on this one... can someone help me figure out how to programmatically populate a table cell as follows (from C# code-behind)? I've tried using a Literal control in the...
1
by: prefersgolfing | last post by:
I'm not using Master Pages, yet I'd like to display the contents of an HTML page within a <table><tr><td> on a .aspx. I have a lengthy guide already paginated in html. I'd like to embed the...
5
by: mahesr | last post by:
I want to match some particular text between <tr>and </tr> or <td>and </td>.... in PHP. like below............ <table><tr> CATEGORY: <td><font face="Verdana" size="1" color="#A000A0"> Wedding...
4
by: harryusa | last post by:
I am trying to center 2 images concentrically which are z-indexed to lay on top of each other making an image with a border from another image that has a transparent center. I need the images to be...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.