Page 1 of 1

any ajex code for opening new window & disable previous

Posted: Thu Oct 18, 2007 7:29 am
by djdon11
Hi Everybody ....


i am looking for "ajex" code with the help of which when i click on a link than the page should be open in new window of smaller than the previous page's size & than the new window comes over the previous window and it should make disable to work on previous window until we close the new window .....

Posted: Thu Oct 18, 2007 8:02 am
by s.dot
That doesn't really sound like ajAx.. sounds like more of a javascript question.

Are you sending/retrieving data from the server, or do you just want to manipulate windows?

right now just static things i want to do..

Posted: Thu Oct 18, 2007 8:11 am
by djdon11
hi

thanks for reply ..

right now i just want to click over a link and the new page should be open in new window ( which should be smaller than the previous one ) but this new window should disabled the previous one .. until we close the new window..


Thanks

Posted: Thu Oct 18, 2007 8:27 am
by Zoxive

Code: Select all

<style>
#overlay,#box{
  visibility:hidden;
  position:absolute;
}
#box{
  background-color:red;
  z-index:100;
}
#overlay{
  background-color:#000000;
  top:0px;
  bottom:0px;
  left:0px;
  right:0px;
  z-index:90; 
}
</style>
<script type="text/javascript">
  function show(display){
    if(display==undefined) display = true;

    ov = document.getElementById('overlay');
    box = document.getElementById('box');

    if(display){
      ov.style.visibility = 'visible';
      box.style.visibility = 'visible';
      ov.style.opacity = 0.6;
    }else{
      ov.style.visibility = 'hidden';
      box.style.visibility = 'hidden';
      ov.style.opacity = 1;
    }
  }
</script>
<div id="overlay"></div>
<div id="box"><a href="javascript:void(0);" onclick="show(false)">Hide</a></div>

<br/>
<br/>
<a href="javascript:void(0);" onclick="show()">Show</a>
Very basic Example, basically you need 2 Divs. One to overlay everything on the page (Disable it), and the other would contain the `Popped` up information. Of course you would style these divisions how you would like.

Hopefully this example you can help you figure out how to archive what you want.

The `& #058;` should be Colons `:`

want to display browser ...

Posted: Thu Oct 18, 2007 8:30 am
by djdon11
here window means browser ...

thanks for your reply ..

i want to open new window(browser) which makes previous one(browser) disabled ...........

Re: want to display browser ...

Posted: Thu Oct 18, 2007 8:35 am
by Zoxive
djdon11 wrote:here window means browser ...

thanks for your reply ..

i want to open new window(browser) which makes previous one(browser) disabled ...........
I'm pretty sure its not possible to disable a browser with out a 3rd party app.

Posted: Mon Oct 22, 2007 3:28 am
by feyd
Ajax and the behavior wished for have nothing to do with PHP. :roll: Moved to Client-side.