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

  • Home
  • SEARCH
  • 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 8897327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:18:45+00:00 2026-06-15T00:18:45+00:00

The idea of script below is preview the content from a text area. How

  • 0

The idea of script below is “preview” the content from a text area. How it works?

  1. $('#preview_post') is an anchor that trigger the preview mode.
  2. The textarea content is readed as var content = $('#post_content').val();
  3. The form where the textarea reside is hidden in order to show the div (#content_previewed) where the markup will be showen.

This is the JS code:

var pl_previwing = false;

$(document).ready(function(){
    $('#preview_post').plPreviewPost();


});
jQuery.fn.plPreviewPost = function(options) {
    this.on('click', function(){
        var content = $('#post_content').val();
        $('#replay_container form').toggle(function(){
            pl_previwing = !pl_previwing;
        });
        console.log("previewing: " + pl_previwing);
        //plCallParser();
    });
};

function plCallParser(){
    if (pl_previwing){
        console.log("do a post here to process the markup");
    }
}

What’s the problem here? If you note I have a commented line:

console.log("previewing: " + pl_previwing);
//plCallParser();

If I un-comment the line above, firebug will hang out abruptally and the browser freeze with the following message:

enter image description here

Translation:

A script of this page can be busy, or could has stopped responding.
You might stop the script, or wait for a response.

EDIT

  • Current browser: 16.0.2, but it happens in all browsers
  • The content of the textarea is not important, because it only have “test body”
  • 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. Editorial Team
    Editorial Team
    2026-06-15T00:18:47+00:00Added an answer on June 15, 2026 at 12:18 am

    At:

    function plCallParser() {
        if (pl_previwing) {
            console.log("do a post here to process the markup");
    });
    

    You need to put a “}; };” there, like so:

    function plCallParser() {
        if (pl_previwing) {
            console.log("do a post here to process the markup");
        };
    };
    

    Just a simple error. I hate it when I mess up brackets.

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

Sidebar

Related Questions

The script below will replace selected word in a textarea. But it only works
Here's an idea. I'm trying to create file from PHP script. File may be
This script below works on a field by field basis, and removes the quotes
Any idea why the piece of code below does not add the script element
I have a script that loads content using load() via a click function. I'd
I had the below code that load image from DB. There are more than
I created a widget that registers its own script like below class MyWidget extends
Any idea on garbage collector timer in javascript? Suppose i run below script, will
Updated below: I have a script which has a function I made that calculates
Maybe someone have idea for perl script with very strong irregular expression that match

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.