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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:59:57+00:00 2026-05-26T23:59:57+00:00

I am grabbing divs using the .each function, but I am having trouble passing

  • 0

I am grabbing divs using the .each function, but I am having trouble passing the ID I get to my modal box function. Here is the code:

(function() {
$('div.heriyah').each(function() { 
$(this).html('<div class="add"><div id="add_button_container"><div id="add_button" class="edit_links">+ ADD NEW CONTENT</div></div></div><div class="clear"></div><div class="placeable"></div></div>');

$('.add').click(function() {
$.fallr('show', {
          content     :  '<iframe width="620" height="600" src="<? echo $URL ?>/manage_content.php?id=<? echo $pageID; ?>&div='+$(this).attr('id')+'"></iframe>',
          width       : 620 + 5, // 100 = for width padding
          height         : 600,
          closeKey        : true,
          closeOverlay    : true,
          buttons     : {}
}); 
}); 

}); 

})();

I get Undefined if I request the variable inside my modal box.

I use this:

'+$(this).attr('id')+'

To grab the id inside my modal box function.

Thanks,
Drummer

  • 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-26T23:59:58+00:00Added an answer on May 26, 2026 at 11:59 pm

    I’m not sure what fallr is but try changing your code to this:

        (function() {
        $('div.heriyah').each(function() { 
        $(this).html('<div class="add"><div id="add_button_container"><div id="add_button" class="edit_links">+ ADD NEW CONTENT</div></div></div><div class="clear"></div><div class="placeable"></div></div>'); 
    
        var curID = $(this).attr('id');//get the id before you go into fallr
    
        $('.add').click(function() {
        $.fallr('show', {
                  content     :  '<iframe width="620" height="600" src="<? echo $URL ?>/manage_content.php?id=<? echo $pageID; ?>&div='+curID +'"></iframe>',
                  width       : 620 + 5, // 100 = for width padding
                  height         : 600,
                  closeKey        : true,
                  closeOverlay    : true,
                  buttons     : {}
        }); 
        }); 
    
        }); 
    })();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble grabbing the values from the form once processed. I need
I'm having trouble grabbing the TR count in JQuery of a table that inside
I'm using pyparsing to parse HTML. I'm grabbing all embed tags, but in some
I'm having some problems passing an integer array to an MVC controller. I'm grabbing
I am grabbing posts from the WordPress database using this piece of code: $query
so I have been having trouble with grabbing information from a device that is
I am grabbing some data from a page using the code below: int clientId
I am grabbing a string and using $.parseJSON(string) but keep getting the following error:
I'm grabbing lines from a text file and sifting line by line using regular
I'm struggling with grabbing an image at the moment... sounds silly, but check out

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.