By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,544 Members | 2,002 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,544 IT Pros & Developers. It's quick & easy.

displaying <td> within cfinput when table row clicked on

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.