/    Sign up×
Community /Pin to ProfileBookmark

textarea setAttribute value in FireFox.

Hi,
How can I set textarea setAttribute value in FireFox. When I print my form it doesn’t print any thing inside FireFox. It prints it blank.

[CODE]
var AddlInfo= IntakeForm.getElementsByTagName(‘textarea’)[0]; AddlInfo.setAttribute(“value”,AddlInfo.value);
[/CODE]

Thanks.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@Sterling_IsfineJun 29.2010 — Hi,

How can I set textarea setAttribute value in FireFox. When I print my form it doesn't print any thing inside FireFox. It prints it blank.
[CODE]
var AddlInfo= IntakeForm.getElementsByTagName('textarea')[0]; AddlInfo.setAttribute("value",AddlInfo.value);
[/CODE]

Thanks.[/QUOTE]

What does this markup produce inside a textarea element?

<textarea id='tBox' value="Death to cross posters"></textarea>

I expect setAttribute has the same effect.

Try[CODE]document.getElementById( 'tBox' ).value = 'Define "Attribute"';[/CODE]
Copy linkTweet thisAlerts:
@asifakhtarauthorJun 29.2010 — I created textarea dynamically. I want setAttribute because when I print the form with the values, it print textarea blank.
Copy linkTweet thisAlerts:
@KorJun 29.2010 — <i>
</i>[COLOR="Red"]AddlInfo[/COLOR].setAttribute("value",[COLOR="Red"]AddlInfo[/COLOR].value);

Looks like a circular nonsense operation to me. Why to give an element as value exactly its own value? Don't mention that the element has no value...
Copy linkTweet thisAlerts:
@asifakhtarauthorJun 29.2010 — What does this markup produce inside a textarea element?

<textarea id='tBox' value="Death to cross posters"></textarea>

I expect setAttribute has the same effect.

Try[CODE]document.getElementById( 'tBox' ).value = 'Define "Attribute"';[/CODE][/QUOTE]


The markup produce is :
[code=html]<textarea name="" id="AdditionalInfo" rows="6" cols="200"></textarea>[/code]

I tried ur code and it doesn't work. Just to let you know that I am only having this problem while printing the form, not saving the form. The form saves the teaxtarea with the value..
×

Success!

Help @asifakhtar 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.19,
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,
)...