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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:19:08+00:00 2026-06-14T04:19:08+00:00

What I am doing is calling a Function passval() that itself is calling another

  • 0

What I am doing is calling a Function passval() that itself is calling another function menu() that displays colorbox iframe:

<html>
<head>
<link rel="stylesheet" href="colorbox/colorbox.css" />
<script src="js/jquery.min.js"></script>
<script src="colorbox/jquery.colorbox.js"></script>
<script>
            $(document).ready(function(){
                //Examples of how to assign the ColorBox event to elements
                
                $(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
                $(".inline").colorbox({inline:true, width:"40%"});
                $(".iframe").colorbox({iframe:true, width:"90%", height:"80%"});
                            
            });
            </script>


    <script type="text/javascript">
    function passval()
    {
    
    var vc = document.getElementById('vc').value;
    var fc = document.getElementById('fc').value;
    //checking inputs
    //document.write(fc+" ");
    //document.write(vc+" ");
    //document.getElementById('inline').click();
    menu();
    }
    function menu() 
    {
      $('<a />').colorbox({fixedWidth:"500px", fixedHeight:"300px", iframe:true, href:"search.php", bgOpacity:0, open:true}); return false;
     }
    
    </head>
    <body>
    <form id="form1" name="form1" method="post">
    <input type="submit" value="Submit" onclick="passval()" />
    </form>
    <a class='iframe' id="inline" href="chart.htm">iFrame</a>
    </body>
    </html>

But it opens and closes as soon as it was opened.. same is up with click [document.getElementById('inline').click();] called by the function

Any suggestions over it?

  • 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-06-14T04:19:09+00:00Added an answer on June 14, 2026 at 4:19 am

    You need preventDefault() on your submit click. Now your page is reloaded OR change:

    <input type="button" value="Submit" onclick="passval()" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm calling a function that's loaded in custom js file in the header. <head>
Please explain what this is doing with regards to calling a function and using
I know that when calling a function in assembly r0 contains the first argument
The weird syntax of a self-invoking closure function implies that you are essentially calling
I am trying to return the value of self calling function into variable that
This is sort of a rookie question, but... I'm calling a function in another
I have function that will generate breadcrumbs format for my category e.g. Root->Children .
I am doing my own visitor tracking with special features that Google Analytics (nor
I want to write a function in lisp that takes two lists of pairs
I'm calling a function quite frequently in a core audio callback to apply eq

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.