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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:09:43+00:00 2026-06-01T02:09:43+00:00

On page1.php I have a click event that causes the user to be redirected

  • 0

On page1.php I have a click event that causes the user to be redirected to page2.php. It goes something like this:

$("#someButton").click(function() {
    window.location = "page2.php";
});

And that works great. But what I really want is to open a hidden, UI-blocking <div> on page2. The user can already open this <div> manually by clicking another button on page2, that goes something like this:

$('#someOtherButton').click(function() {
   $("#pageContainer").block({message: $("#theDivIWant2See")});
});

Can I make a click event from the JavaScript on one page call the JavaScript on another? Or will I need to add in some HTML-parsing to pass information between pages? (I’m not looking for a JavaScript hand-out here, just a strategy to help me move forward.)

  • 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-01T02:09:44+00:00Added an answer on June 1, 2026 at 2:09 am

    When you redirect from the first page, add a querystring value in your url. and in the second page, using your server side page language, set in in a hidden field and in the document ready event check the value of that hidden field. If the value is expected, call a javascript function to show the popup.

    Some thing like this

    $("#someButton").click(function() {
        window.location = "page2.php?showpopup=yes";
    });
    

    and in page2.php set it (forgive for errors, i am not a php guy)

    <input type='<?php $_GET["showpopup"] ?>' id='hdnShow' />
    

    and in the script

    $(function(){
      if($("#hdnShow").val()=="yes")
      {
        //Call here the method to show pop up
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that is accessed via a URL like this: http://power-coder.net/Test/something.php?id=3#Page1 I
If I have $var defined in Page1.php and in Page2.php I have //Page2.php include('Page1.php');
I have a site with URLs like this: http://domain.co.uk/subdir/page.php I have redesigned the site
I have an website with URL`s like example.com/index.php?p=home An this script $(document).ready(function() { var
I have this jquery plugin that zooms in on photos, but I would like
I have on my page ( page1.php ) a div called result that updates
This is my first post and I have the feeling that this is something
I have an index page index.php , and when the user clicks on a
I have the following pages: page1.php <?php if (isset($_GET['link'])) { session_start(); $_session['myvariable'] = 'Hello
I have a php page that displays rows from a mysql db as 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.