Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 76459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:40:36+00:00 2026-05-10T20:40:36+00:00

For my small wiki application, I mostly need to have the textarea used to

  • 0

For my small wiki application, I mostly need to have the textarea used to edit the contents to use soft (or virtual) wrapping. However, in some cases, not wrapping the content would be preferable. I thought I would do this by simply having a button to turn off wrapping. Here is the simplified code:

  <form name='wikiedit' action='[[script_name]]' method='post'>     <textarea name='content' rows='25' cols='90' wrap='virtual'>[[content]]</textarea>     <input type='button' onclick='document.wikiedit.content.wrap='off';' value='No Wrap'> &nbsp;     <input type='submit' value='Save'>   </form> 

It works with IE, but not with Firefox or Opera. How should I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:40:37+00:00Added an answer on May 10, 2026 at 8:40 pm

    See bug 41464: https://bugzilla.mozilla.org/show_bug.cgi?id=41464

    Nasty workaround for now is to replace the textarea with a clone of itself:

    function setWrap(area, wrap) {     if (area.wrap) {         area.wrap= wrap;     } else { // wrap attribute not supported - try Mozilla workaround         area.setAttribute('wrap', wrap);         var newarea= area.cloneNode(true);         newarea.value= area.value;         area.parentNode.replaceChild(newarea, area);     } } 

    Unrelated: try to avoid accessing elements straight out of the document object, it is unreliable on some browsers and causes name clash problems. ‘document.forms.wikiedit’ is better, and moving to ‘id’ on the form instead of ‘name’ and then using ‘document.getElementById(‘wikiedit’)’ better still.

    form.elements.content is also more reliable than form.content for similar reasons… or, indeed, you could give the textarea an ID and go straight to the textarea with getElementById without having to bother look at the form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a small modal form that is used in Winforms application. It
I have a small utility that I use to download an MP3 file from
I have a small VB.NET application that I'm working on using the full version
I have a small diagnostic VB.Net application ( 2 forms, 20 subs & functions)
I am looking for a small wiki engine that is easy to embed into
I have a small JS function that does Ajax for me and another like
I have a fairly small MySQL database (a Textpattern install) on a server that
I have a small local network. Only one of the machines is available to
One small function of a large program examines assemblies in a folder and replaces

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.