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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:05:40+00:00 2026-05-24T08:05:40+00:00

I am going to display the Flexigrid in html div tag when click a

  • 0

I am going to display the Flexigrid in html div tag when click a button.The function for Flexigrid would be in the Javascript function. so i add a image tag with onclick to call a function which is called f_reload() which is going to load the flexigrid function. First time its loaded. by second time click it doest load the grid again.

      <script type="text/javascript">

        function loadFlexiGrid(){
                 //here flexigrid content 
                     $("#flex1").flexigrid{{
                        //...........}}
         }  

        function eventhandler() {
                $("#flex").html(function() {    //this function used to reload grid but it is not called when click second time on the button
            return "<div id='flex1'></div>";});

        javascript:loadGrid();
        }
    </script>

<input type="image" class="btn" id="sub" src="<?=base_url();?>images/rbtnsave.gif"        
                                    onclick="eventhandler();"/>
    <div id="flex"><div id="flex1"></div></div>
    </div>

here flex1 id of the flecigrid and flex is the id of the div.

when click first time on the button it shows the grid. but second time it doesn’t why

  • 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-24T08:05:41+00:00Added an answer on May 24, 2026 at 8:05 am

    When the eventHandler is executed, the nested function in $('#flex').html() is declared, but not executed. Is there a particular reason why you put it there?

    Otherwise, try replacing it with:

        function eventhandler() 
        {
            $("#flex").html("<div id='flex1'></div>");
            javascript:loadGrid();
        }
    

    The first time it works fine, since you’ve put <div id="flex1"></div> manually in your HTML.

    Besides, are you sure javascript:loadGrid() is correct? Try removing the javascript: part. And – if referring to function loadFlexiGrid(), call it loadFlexiGrid();, not loadGrid();.

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

Sidebar

Related Questions

<div> <div>test</div> </div> $(div:contains('test')).css('display','none'); I know I am going to kick myself on this.
How do I display text for a button without going between the <button></button> tags?
I'm going to display a please enable javascript message to my site which will
I would like to build a webpart that is going to display list content
I'm trying to display edges going from right to left (i.e. backwards) using dot:
Going through Javascript documentation, I found the following two functions on a Javascript object
In my app, I am going to display the Video. But the video height
I have HTML similar to the following in my page <div id=someDiv> <img src=foo.gif
I am going to display the current password of the user like Current Password
I'm using VS2010,C# to develop my ASP.NET web app, I'm going to display some

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.