any ajex code for opening new window & disable previous

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
djdon11
Forum Commoner
Posts: 90
Joined: Wed Jun 20, 2007 5:03 pm

any ajex code for opening new window & disable previous

Post 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 .....
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post 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?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
djdon11
Forum Commoner
Posts: 90
Joined: Wed Jun 20, 2007 5:03 pm

right now just static things i want to do..

Post 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
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post 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 `:`
djdon11
Forum Commoner
Posts: 90
Joined: Wed Jun 20, 2007 5:03 pm

want to display browser ...

Post by djdon11 »

here window means browser ...

thanks for your reply ..

i want to open new window(browser) which makes previous one(browser) disabled ...........
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: want to display browser ...

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Ajax and the behavior wished for have nothing to do with PHP. :roll: Moved to Client-side.
Post Reply