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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:55:34+00:00 2026-05-27T03:55:34+00:00

Disclaimer: I’m new to web development. I’m creating an event calendar using CodeIgniter, and

  • 0

Disclaimer: I’m new to web development.

I’m creating an event calendar using CodeIgniter, and when I’m updating an event (using js), I need to reload the exact current page that I am on at that moment. So far, all I’ve been able to do is redirect to the main controller containing the calendar class, which brings me back to the current month. This sucks for someone editing one event on a different month other than the current month. Any ideas on what to use/do? Thanks a lot for all of your help!

Controller:

if ($this->events->update($data))
            {
                redirect('user/planner');
            }
            else
            {
                show_404();
            }

View/Form:

<div class="reveal-modal" id="myModal">
    <?php echo form_open('user/planner/update/'.$event->id, 'id="updateForm"'); ?>

    <h3><?php echo $event->type ?></h3>

    <h4><label for="status">Status</label></h4>
    <p><?php echo form_dropdown('status', $status_options, $event->status ) ?></p>

    <h4><label for="title">Title</label></h4>
    <p><input type="text" id="title" name="title" value="<?php echo $event->title ?>" /></p>

    <h4><label for="content">Content</label></h4>
    <p><textarea rows="7" id="content" name="content"><?php echo $event->content ?></textarea></p>

    <p><?php echo form_submit('submit','Save') ?></p>

    <?php echo form_close(); ?>
</div>

JS That is running form:

$(function() {

    $('.event_list li').click( function(e) {
    console.log(this.id);
        $('#update_view_content').load('http://example.com/user/planner/update/'+this.id,function() {
            $('#myModal').reveal();
        });
    });

    $('#updateForm').live('submit', function() {
        var data = $('#updateForm').serialize();
        var url = $(this).attr('action');
        $.post(url, data);
        return;
    });

});
  • 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-27T03:55:34+00:00Added an answer on May 27, 2026 at 3:55 am

    you should reload document.location as Jan said (document.location.reload()), but it should be done only when request is success, so your code will be something like this:

    $.post(url, data, function(response) {
        document.location.reload();
    });
    

    jQuery Manual

    jQuery.post( url [, data] [, success(data, textStatus, jqXHR)] [, dataType] )

    1. url — A string containing the URL to which the request is sent.
    2. data — A map or string that is sent to the server with the request.
    3. success(data, textStatus, jqXHR) — A callback function that is executed if the request succeeds.
    4. dataType — The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Disclaimer : I'm new to web development. Scenario : I've built an application using
Disclaimer: super new to rails. I'm using Rails 3.2 Anyways, I'm trying to create
Disclaimer: I'm very new to SQL and databases in general. I need to create
Disclaimer: I am very new to iOS development. Please excuse the possible stupidity of
Disclaimer: I'm fairly new to python! If I want all the lines of a
Disclaimer: I have no experience using YUI at all. I was wondering how the
[Disclaimer: I am new to PHP, and I am just learning, so please no
DISCLAIMER: relatively new to Flex/AS3, I might be missing something obvious. After doing some
[DISCLAIMER: My development machine is running OS X Tiger, so my question and experiences
Disclaimer: Never used php in my life. New to Unix and Jenkins I have

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.