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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:48:20+00:00 2026-06-09T15:48:20+00:00

So this is somewhat common issue and the issue is I have a Joomla

  • 0

So this is somewhat common issue and the issue is I have a Joomla website with K2 extension and running the JAWall template. My problem is when a user wants to post an item in the frontend of my website and hits save the lightbox that pops up does not close. The post is added and there is some kind of update but the box stays.

I have found a few forums that discuss the issue and a Google code bug report here and again in the K2 forums here and again on the Joomla forums but none of them have a solution that works for my situation. I can add a

window.parent.location.reload()

And this will work but it will not wait if the user is uploading some media in their post. So how can I make this function wait for the upload? The code I am trying to add this to is long but the main chunk is at the top so I’ll post that here to hopefully help someone understand the situation better.

<?php


// no direct access
defined('_JEXEC') or die('Restricted access');

$document = & JFactory::getDocument();
$document->addScriptDeclaration("
Joomla.submitbutton = function(pressbutton){
    if (pressbutton == 'cancel') {
        submitform( pressbutton );
        return;
    }
    if (\$K2.trim(\$K2('#title').val()) == '') {
        alert( '".JText::_('K2_ITEM_MUST_HAVE_A_TITLE', true)."' );
    }
    else if (\$K2.trim(\$K2('#catid').val()) == '0') {
        alert( '".JText::_('K2_PLEASE_SELECT_A_CATEGORY', true)."' );
    }
    else {
        syncExtraFieldsEditor();
        \$K2('#selectedTags option').attr('selected', 'selected');
        submitform( pressbutton );
        //window.parent.location.reload();//this is what i added            
    }
}
");

?>



<form action="index.php" enctype="multipart/form-data" method="post"
 name="adminForm"    id="adminForm">
<?php if($this->mainframe->isSite()): ?>
<div id="k2FrontendContainer">
    <div id="k2Frontend">

        <table class="k2FrontendToolbar" cellpadding="2" cellspacing="4">
            <tr>

                <td id="toolbar-save" class="button">
                    <a class="toolbar" href="#" onclick="javascript: submitbutton('save'); return false;"> <span title="<?php echo JText::_('K2_SAVE'); ?>" class="icon-32-save"></span><?php echo JText::_('K2_SAVE'); ?> </a>
                </td>
                <td id="toolbar-cancel" class="button">
                    <a class="toolbar" href="#" > <span title="<?php echo JText::_('K2_CANCEL'); ?>" class="icon-32-cancel"></span> <?php echo JText::_('K2_CLOSE'); ?> </a>
                </td>
            </tr>
        </table>

If anyone has an idea to point me in the right direction I would appreciate it I’m here at work on a Saturday because of this issue!

  • 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-09T15:48:22+00:00Added an answer on June 9, 2026 at 3:48 pm

    My work switched to EasyBlog thanks to K2 issues like this. The issue seems to be in the submitForm() function. There’s probably a $app->setRedirect() that isn’t redirecting.

    window.parent.location.reload() is superflous. If you just want to refresh the page, all you need to do is remove the return false; in the form’s onclick.

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

Sidebar

Related Questions

Is it possible to have nested set capabilities in this somewhat custom setup? Consider
This is somewhat complex (well to me at least). Here is what I have
This question seems like it might be somewhat common, but I didn't find anything
Although this is a fairly common problem, I am struggling with what the best
I know the question sound somewhat stupid, but i have this scenario. Context I
i have an iframe on my page and seem to be facing somewhat common
I recently solved a somewhat common problem in OC4J regarding the use of Xerces
I know this is a somewhat common subject, but the information is outdated quickly.
I have this dropdownlist populated and everything. The only problem is that whenever I
This is a very common problem when Excel Worksheet or Chart is embedded into

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.