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

The Archive Base Latest Questions

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

I am going to try to make this question as clear as I can.

  • 0

I am going to try to make this question as clear as I can.

Here’s what I’m trying to do:

ELEMENTS:
– button
– modal box
– functions

Application Requirements:

  1. I need to have a button on a page, when clicked it calls a function
    called newcontent. That function will need to have it’s own
    unique ID because I have a specific pageID show up in a modal box
  2. In the modal box function, I call a specific page with a specific
    ID, but I also use an .each function to grab the specific DIV ID
    from which the button was pushed.

Here is the current modal box code:

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

I will get an error like this:

uncaught  exception: Can't create new message with content: "<iframe 
width=620" height="600" 
src="http://www.brandonrray.com/Heriyah/admin/manage_content.php?id=1&div=sermons_home"></iframe>",
past message with content "<iframe width=620" height="600" 
src="http://www.brandonrray.com/Heriyah/admin/manage_content.php?id=1&div=up_events_home"></iframe>"
is still active

But I know that is because I am trying to call the same function like 10 times depending on how many divs are on the page.

Button Jquery Wiring:

$('div.heriyah').each(function() { 
$('div.heriyah').append('<div id="add_button_container"><a onClick=newcontent_'+ this.id +'();return false><div id="add_button" class="edit_links">+ ADD NEW CONTENT</div></a></div></div><div class="clear"></div><div class="placeable"></div>');
}); 

Can anyone push me in the right direction for this app, and if you need me to be more clear, please let me know. I do not want to get kicked off these forums again!

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

    Instead of applying each everytime your button is clicked, you use a callback function and trigger the newContent with a parameter which is stored in your button element. The parameter could also be any attribute of the button.

    $('button[class=yours]').click(function () {newContent(this.id)});
    // If you want to pass the DIV ID from the button
    // $('button[class=yours]').click(function () {newContent($(this).attr('div-id')});
    //
    var newContent = function (uniqueId) {
        $.fallr('show', {
                  content     :  '<iframe width=620" height="600" src="<? echo $URL ?>/manage_content.php?id=<? echo $pageID; ?>&div='+ uniqueId +'"></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

Ok, I'm going to try to make this more clear because my last question
I'm going to try to explain this best I can I will provide more
I'm going to try and explain this as simply as I can, it's most
This is going to be pretty hard to explain, so I'll try to make
I think I can probably guess that the answer to this question is going
I'm going to try to ask my question in the context of a simple
This is going to be hard to explain but I'll try my best. I
This is going to seem a very strange question but im just playing about
I'm going to re-ask this question in a slightly different way. Say I have
I know this sounds like a subjective answer, but I will try to make

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.