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 5991225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:21:23+00:00 2026-05-22T23:21:23+00:00

I have a modal which pops out a form, allowing an admin to edit/update

  • 0

I have a modal which pops out a form, allowing an admin to edit/update a news story. It works just fine, updating the database and everything, only the ‘Story’ piece appears outside of the textarea box when in the modal window.

A few pictures will illustrate my point and confusion.

Look YAY is the story text from the database

‘Look YAY’ is the current story, being pulled into the area underneath the textarea

Prior to hitting the enter button

adding in a new story

New story gets slapped into the bottom but...

the new story is now in the database, but underneath the textarea box in the modal

on the actual form page (where the modal loads from), it is diplayed properly

yet on the actual form page it is where it is suppose to be

I’ve checked and rechecked my code, but my only thought is that jquery-UI is somehow interfering with the textarea since, by definition, the code within the modal is equivalent to that of the Edit News form.

Here is the form code for the story element

    Story<br/>
    <textarea name="edit_story"/><?php print $row['story'];?></textarea>

and the jquery which pops it open

$('.edit').click(function(event){
        //don't follow the link
        event.preventDefault();
        var $link = $(this).parent();
        //load in the html from the form at edit_news
        var formDOM = $("<div />").load($link.attr('href')+' #edit_form', function() { 
                //clear the dialog box
        $('#dialog-edit').empty();
                // Append to the page 
                $('#dialog-edit').append(formDOM);
                //make the dialog
                $('#dialog-edit').dialog({
                    autoOpen:false,
                    title:$link.attr('title'),
                    width:530,
                    height:465
                })
                //open it up
                $('#dialog-edit').dialog('open');
                $('#edit_form').submit(function(event){
                    //knock out its form processing
                    event.preventDefault();
                    $.ajax({
                type    : "post",  
                        url     : $link.attr('href'),  
                        data    : $(this).serialize(),  
                        success : function() { 
                            //close dialog
                    $('#dialog-edit').dialog('close');
                            }
                    })
                })
        })
    });

What is going on here?

if anyone has any ideas please toss them my way. It may very well be a n00bish programming error, which I will gracefully accept.

  • 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-05-22T23:21:24+00:00Added an answer on May 22, 2026 at 11:21 pm

    You are closing <textarea> tag before printing text into it. Fix:

    <textarea name="edit_story"><?php print $row['story'];?></textarea>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making an edit button which pops up a modal box with a form
I have a modal dialog which contain form and hidden iframe to which form
I have a modal div on my page, which grays out the background. If
I have a form in MS Access which has an image. The image has
I have a modal view which gets the user to select some data to
I have a login.jsp page which contains a login form. Once logged in the
i have a modal view which contains only o button and a uilabel. The
I have a modal view controller which is crashing when it dismisses itself. The
I have a modal window from which I am calling a lighbox to view
We have a Modal Window with a contact form within it. We have two

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.