/    Sign up×
Community /Pin to ProfileBookmark

input txt instead of span output

Dear…

I am working with the CUSTOM WIDGET from the DATE PICKER – JQUERY PLUGIN ([URL=”http://www.eyecon.ro/datepicker/#about”]http://www.eyecon.ro/datepicker/#about[/URL])

I have got everything working fine. The value from the user is now inserted in a <span> element. That’s nice, but how do I post that value so I can use it in (like the other form elements) in my form. I rather get it in a textbox. But how do I do that?

Below you can see the peace of code that works out the value into a span element. How do I change this so it will be a form (TXT) element.

As you noticed I am a Javascript/jQuery beginner.

Thanks for your reply

Jelte
The Netherlands

[CODE]
$(‘#widgetCalendar’).DatePicker({
flat: true,
format: ‘d B, Y’,
date: [new Date(now3), new Date(now4)],
calendars: 3,
mode: ‘range’,
starts: 1,
onChange: function(formated) {
$(‘#widgetField span’).get(0).innerHTML = formated.join(‘ &divide; ‘);
}
});
[/CODE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@FangAug 23.2010 — [CODE]$('#field_id').val(formated.join(' &divide; '));[/CODE]
Copy linkTweet thisAlerts:
@JLTauthorAug 23.2010 — Hey Fang,

Thanks a lot. Works like a dream!!

Grtz.

Jelte
×

Success!

Help @JLT spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...