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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:25:23+00:00 2026-05-23T17:25:23+00:00

I have window.onload = function() { $(‘form’).submit(function() { return false; }); }; Inside of

  • 0

I have

window.onload = function()
{
    $('form').submit(function()
    {
        return false;
    });
};

Inside of the onload function, I later call Shadowbox.open(). Of course, I am passing options. Anyway, my form submits the entire page and fails to return false instead.

I have been looking for an actual working example of how to handle form submissions for a form that has been handed to Shadowbox. If you can point me to one, that would be amazing.

Thank you

  • 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-23T17:25:24+00:00Added an answer on May 23, 2026 at 5:25 pm

    What you have to do is:

    1. use the iframe-player(when downloading shadowbox you must check the “External sites and pages”-checkbox)
    2. provide a callback-function for onFinish, to be sure that the iframe exists before really submitting the form
    3. change the form’s target-attribute to sb-player(that’s the name of the iframe created by shadowbox)

    Example-code(will run a google-search in a shadowbox)

    <script type="text/javascript">
    Shadowbox.init();
    
    $(function() 
      {
        $('form')
          .submit(function()
                  {
                    //reference to the form, needed in onFinish
                    var me=this;
    
                    Shadowbox.open({
                                      //we dont need to load a page
                                    content: 'about:blank',
                                      //use the iframe-player
                                    player:  'iframe',
                                    height:  350,
                                    width:   850,
                                    options: {
                                              //send the form without 
                                              //triggering the submit-event
                                              //when the iframe is available
                                              onFinish:function()
                                                       {me.submit();}
                                             }
            });
            //set the iframe(the name is sb-player) as target of the form
              $(this).attr('target','sb-player');
    
            return false;
        });
    });
    
    </script>
    <form action="http://google.de/search">
    <input name="q" value="shadowbox">
    <input type="submit">
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this function in my head: <head> window.onload = function(){ var x =
I have window form in my WPF Application when I open new window from
I have a js code: window.onload = function() { document.getElementById(Button1).onclick = function() { var
I have this code, window.onload = function(){ if($('div.colorPicker').length){ $(div.colorPicker).click(function(){ if($('.field_sku').length){ code = $(this).children('.tmpSKU').html(); if(!code
Before loading jquery.js , I have a simple: window.onload = function (){ /*dosomething*/ }
I have this code window.onload = function() { function foo() { alert(test); } setInterval(foo(),500)
I have a window with an subclass of NSView in it. Inside the view,
So I have this code (from the gracious help from this site!) window.onload =
I have a Window where I have put a Frame. I would like to
I have a window that is set with NSBorderlessWindowMask, and also kCGDesktopWindowLevel. When a

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.