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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:59:31+00:00 2026-06-07T02:59:31+00:00

When a user clicks on a button I’d like a popup to open and

  • 0

When a user clicks on a button I’d like a popup to open and when I click the accept button in the popup the popup closes. But when it closes, I want to change the button on which the user clicked to open the popup. I have used images instead of buttons. Please advise how can i do it.

Its not working for me.I think you dont get my question.”I am clicking on image then popup window opens after accepting whaterver in that popup window again it will show previous window,then that image should change” what should I do for that? Iam sending you updated code here:

<?php
session_start();

if($_SESSION['typeimagedis']=='image/gif') 
        $namedis=$_SESSION['typeimagenamedis'];
        else
    $namedis=$_SESSION['typeimagenamedis'];


    if ($_POST['hidcropimg'] == 'hidcropimg')
{
if(file_exists('images/'.$_SESSION['typeimagenamedis']))
{
unlink('images/'.$_SESSION['typeimagenamedis']);
}
    $targ_w =$_POST['w'];$targ_h = $_POST['h'];
    $jpeg_quality = 20;

if(($_POST['typeimage'] == "image/gif"))
    {
    $src='upload/'.$_SESSION['typeimagenamedis'];
    $img_r = imagecreatefromgif($src);
    }
    if(($_POST['typeimage'] == "image/jpg")|| ($_POST['typeimage'] == "image/jpeg")|| ($_POST['typeimage'] == "image/pjpeg"))
    {
    $src='upload/'.$_SESSION['typeimagenamedis'];
    $img_r = imagecreatefromjpeg($src);
    }


    $dst_r = ImageCreateTrueColor( $targ_w, $targ_h );

    @imagecopyresampled($dst_r,$img_r,0,0,$_POST['x'],$_POST['y'],
    $targ_w,$targ_h,$_POST['w'],$_POST['h']);
$yes=1;
if(($_POST['typeimage'] == "image/gif"))
    {
    $name=$_SESSION['typeimagenamedis'];
        imagegif($dst_r,'images/'.$name,$jpeg_quality);
    }
    if(($_POST['typeimage'] == "image/jpg")|| ($_POST['typeimage'] == "image/jpeg") || ($_POST['typeimage'] == "image/pjpeg"))
    {
    $name=$_SESSION['typeimagenamedis'];
        imagejpeg($dst_r,'images/'.$name,$jpeg_quality);
    }

}

    if($_POST['subacc']=='Accept')
    {
    copy('images/'.$_SESSION['typeimagenamedis'],'crop/'.$_SESSION['typeimagenamedis']);
    setcookie ("cronimagename", $_SESSION['typeimagenamedis'], time()+60*60*24*30,'/','iphoneid.com');}
    ?>

    <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
    <script type='text/javascript'>
    function closewin(){  
    window.close();
    $('#openimg',opener.document).attr('src','/v/vspfiles/photoutility/images/clickheretoTHK_off.gif');
    //alert('openimg');
    }
    </script>

<?php   

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>

        <script src="../js/jquery.min.js"></script>
        <script src="../js/jquery.Jcrop.js"></script>
        <link rel="stylesheet" href="../css/jquery.Jcrop.css" type="text/css" />
        <link rel="stylesheet" href="demo_files/demos.css" type="text/css" />
        <? if($_GET['ref']==1){?>
        <META HTTP-EQUIV="refresh" CONTENT="0; URL=http://serverl.iphoneid.com/demos/croped.php?ProductCode=<?=$_GET['ProductCode']?>">
<? }?>


    </head>

    <body>

    <div id="outer">
    <div class="jcExample" style="width: 802px;height: 1344px;">
    <table width="151" align="center" style="padding-right:65px;" > 
      <tr><td width="54"><form id="frmacc" name="frmacc" method="post" action=""><input type="submit" id="subacc" name="subacc" value="Accept" onClick="closewin();"  /></form></td><td width="238">
    <form id="frmcancel" name="frmcancel" method="post" action="crop.php?ref=1&ProductCode=<?=$_GET['ProductCode']?>" ><input type="submit" id="subcancel" name="subcancel" value="Select Again"  /></form></td></tr></table>
    <div class="article" style="position:relative; margin:70px 0 0 230px;">
<? if($_GET['ref']==1){
?>
<img  src="wait.gif" width="200px" height="75px"  >
<?
}else{ ?>
        <div style="float:left; height:530px; padding:0px 0 0 0px; width:580px;  background:url(<? if($_GET['ProductCode']=='IPBB'){?>black.png<? }elseif($_GET['ProductCode']=='IPBR'){?>red.png<? }elseif($_GET['ProductCode']=='IPBW'){?>white.png<? }?>) no-repeat; position:relative; z-index:999999999999">

        </div><!--style="padding-top:<?=$padding?>px"-->
        <div align="center"   style=" height: 148px; width: 148px; position:absolute; top:161px; left:61px; z-index:1" ><img  src="images/<?=$namedis?>" height="148" width="148" /></div>
<? }?>
    </div>
   </div>

    </div>
    </body>

</html>
  • 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-07T02:59:34+00:00Added an answer on June 7, 2026 at 2:59 am

    To change the background image of your button from the pop up window use this :

    <script>
    $("#openimg1",opener.document).attr("src","/image-path-here");
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What I want to do is when a user clicks a button, to change
When the user clicks a button, I want to show a popup form that
When the user clicks a button, I want his browser to automatically scroll to
I want my recaptcha to appear only after user clicks submit button on the
I want to, when the user clicks a button on my website, to make
We have a bookmarklet, and the user clicks a button and an inspect like
I want to display a msg from server when user clicks a button on
I have a program which records the time when user clicks the button I
When a user clicks a button, I want a full screen iAd to appear,
After my user clicks a button, I'd like that button to stay pushed during

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.