Dicey
Dicey

Reputation: 1

pass through a date or string getElementsByName

I have a little code which puts a date into a text field called Receiptdate.

function changeValue(o){
    document.getElementsByName('ReceiptDate')[0].value=(o);                 
}

I have an image which when I click on it, it sends

onclick="changeValue(<%=MyDate%>)"

I change the value using Visual Basic to change MyDate.

The number I pass through is a date i.e. 2052024 How can I make it show 2/05/2024 or 02/05/2024

Upvotes: 0

Views: 46

Answers (0)

Related Questions