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

updating date in a recordset

m
hi all,

got an interesting problem:

im working with purchase orders and in detail line i have a date field.
so for example:
header line:
PO code: X123
PO value: 100
po date: 05/05/2004

detail lines:
line no.: 1
delivery date: 10/10/2004
value: 40

line no.: 2
delivery date:
value: 60

i want to update a date in a detail record by placing the value from
javascript calendar app into a hidden field...
so all i do is (asp side):

<form...

<input type="text" name="whatever" value='<%=somedate%>'>
<a href="javascript:show_calendar('document.inv.whate ver',
document.inv.whatever.value);">

....form>

& that all works fine.

the problem arises if i want to use the app in a detail section
if a place the code against a line for detail then i have two text boxes
with the same name so the javascript does not work...

also if i do something like:

<input type="text" name="<%=counter%>" value='<%=rsc("invdat")%>'>
<a href="javascript:show_calendar('document.inv.<%=co unter%>',
document.inv.<%=counter%>.value);">

the code although it looks ok (when i do the View>source code in IE)
does not work.

the only crazy solution is to :

<%select case counter
case 1%>
<td>
<input type="text" name="a"
value='<%=rsc("invddatr")%>'>
<img src="pics/cal.gif"
href="javascript:show_calendar('document.invdetdet .a',
document.invdetdet.a.value);" alt="Date"></a>
</td>
<%case 2%>
<td>
<input type="text" name="b"
value='<%=rsc("invddatr")%>'>
<a src="pics/cal.gif"
href="javascript:show_calendar('document.invdetdet .b',
document.invdetdet.b.value);" alt="Date"></a>
</td>
....
....end select%>

but that is just stupid writing a possible line for every number of
counter!!!

is there a better way to do this?

regards

mi
Jul 22 '05 #1
2 1650
Try making the fieldname alphanumeric as you generate it rather than just
numeric.

<input type="text" name="dt<%=counter%>" value="<%=rsc("invdat")%>">
<a href="javascript:show_calendar('document.inv.dt<%= counter%>',
document.inv.dt<%=counter%>.value);">

also, is the first parameter of show_calendar supposed to be a string?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"m" <us*****@hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP10.phx.gbl...
hi all,

got an interesting problem:

im working with purchase orders and in detail line i have a date field.
so for example:
header line:
PO code: X123
PO value: 100
po date: 05/05/2004

detail lines:
line no.: 1
delivery date: 10/10/2004
value: 40

line no.: 2
delivery date:
value: 60

i want to update a date in a detail record by placing the value from
javascript calendar app into a hidden field...
so all i do is (asp side):

<form...

<input type="text" name="whatever" value='<%=somedate%>'>
<a href="javascript:show_calendar('document.inv.whate ver',
document.inv.whatever.value);">

...form>

& that all works fine.

the problem arises if i want to use the app in a detail section
if a place the code against a line for detail then i have two text boxes
with the same name so the javascript does not work...

also if i do something like:

<input type="text" name="<%=counter%>" value='<%=rsc("invdat")%>'>
<a href="javascript:show_calendar('document.inv.<%=co unter%>',
document.inv.<%=counter%>.value);">

the code although it looks ok (when i do the View>source code in IE) does not work.

the only crazy solution is to :

<%select case counter
case 1%>
<td>
<input type="text" name="a"
value='<%=rsc("invddatr")%>'>
<img src="pics/cal.gif"
href="javascript:show_calendar('document.invdetdet .a',
document.invdetdet.a.value);" alt="Date"></a>
</td>
<%case 2%>
<td>
<input type="text" name="b"
value='<%=rsc("invddatr")%>'>
<a src="pics/cal.gif"
href="javascript:show_calendar('document.invdetdet .b',
document.invdetdet.b.value);" alt="Date"></a>
</td>
...
...end select%>

but that is just stupid writing a possible line for every number of
counter!!!

is there a better way to do this?

regards

mi

Jul 22 '05 #2
m
Mark, Many Thanks!!!


"Mark Schupp" <no****@nospam.com> wrote in message
news:ON**************@TK2MSFTNGP15.phx.gbl...
Try making the fieldname alphanumeric as you generate it rather than just
numeric.

<input type="text" name="dt<%=counter%>" value="<%=rsc("invdat")%>">
<a href="javascript:show_calendar('document.inv.dt<%= counter%>',
document.inv.dt<%=counter%>.value);">

also, is the first parameter of show_calendar supposed to be a string?

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"m" <us*****@hotmail.com> wrote in message
news:uE**************@TK2MSFTNGP10.phx.gbl...
hi all,

got an interesting problem:

im working with purchase orders and in detail line i have a date field.
so for example:
header line:
PO code: X123
PO value: 100
po date: 05/05/2004

detail lines:
line no.: 1
delivery date: 10/10/2004
value: 40

line no.: 2
delivery date:
value: 60

i want to update a date in a detail record by placing the value from
javascript calendar app into a hidden field...
so all i do is (asp side):

<form...

<input type="text" name="whatever" value='<%=somedate%>'>
<a href="javascript:show_calendar('document.inv.whate ver',
document.inv.whatever.value);">

...form>

& that all works fine.

the problem arises if i want to use the app in a detail section
if a place the code against a line for detail then i have two text boxes
with the same name so the javascript does not work...

also if i do something like:

<input type="text" name="<%=counter%>" value='<%=rsc("invdat")%>'>
<a href="javascript:show_calendar('document.inv.<%=co unter%>',
document.inv.<%=counter%>.value);">

the code although it looks ok (when i do the View>source code in

IE)
does not work.

the only crazy solution is to :

<%select case counter
case 1%>
<td>
<input type="text" name="a"
value='<%=rsc("invddatr")%>'>
<img src="pics/cal.gif"
href="javascript:show_calendar('document.invdetdet .a',
document.invdetdet.a.value);" alt="Date"></a>
</td>
<%case 2%>
<td>
<input type="text" name="b"
value='<%=rsc("invddatr")%>'>
<a src="pics/cal.gif"
href="javascript:show_calendar('document.invdetdet .b',
document.invdetdet.b.value);" alt="Date"></a>
</td>
...
...end select%>

but that is just stupid writing a possible line for every number of
counter!!!

is there a better way to do this?

regards

mi


Jul 22 '05 #3

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

Similar topics

1
by: Roy Adams | last post by:
Hi everyone I'm trying to build a shopping cart app using a db the part I'm stuck on is the fact that, if someone adds a product that they have previously added to the cart. I've got it set up to...
1
by: Gerry Abbott | last post by:
Hi all, I've got two subforms on an unbound form, frmMain, frmSubOne, frmSubTwo. Ive got a control on frmSubTwo, cboList, a list box, which draws its source from the table underlying frmSubOne....
2
by: RBohannon | last post by:
I had some help on this one earlier, but I'm still having a bit of trouble. I'm sure it's something simple that I just don't know. I'm using Access2000. I have one table with employee salary...
6
by: Marlene | last post by:
Hi All I have the following scenario, where I have found all the duplicates in a table, based on an order number and a part number (item).I might have something like this: Order PODate Rec...
2
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype....
5
by: Hexman | last post by:
I've come up with an error which the solution eludes me. I get the error: >An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in HRTest.exe > >Additional...
9
by: Kosmos | last post by:
Hey guys...the following code doesn't seem to work refering to the line It says the field is not updatable...I've never updated a table from a module before so I'm not sure if I am doing this...
3
by: HSXWillH | last post by:
I've looked through the site and not found what I'm looking for here. I am not code-versed or anything like that so my skills are rudimentary at best. I'm using Access 03 on a Windows Vista...
0
by: mpande | last post by:
Hello Everyone I'm searching a database to find a value in the database and once the value is found, it should update the row corresponding with the productid, which is the PK in which I'm using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
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...
0
agi2029
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,...

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.