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
  • 2 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

A small - little question. I have seen many application having buttons like following.
I have written a small client server socket application. It is a proof of
I'm using Ruby on Rails to develop a web application. I have a wiki
After following instructions on the emscripten wiki I have managed to compile a small
I want to create a small java application to copy some wiki content from
Small preamble. I was good java developer on 1.4 jdk. After it I have
We (small team) currently have our Visual Studio projects on a network drive (no
have small problem, and would very much appreciate help :) I should convert byte
I want to do some small application development for S60 3rd edition, FP2 of
I would like to use the concept of MindMap http://en.wikipedia.org/wiki/Mind_map in a AI program.

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.