473,324 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

openining a new window

ello everyone.

i want to open a link in a new window but without pop notification, means user does not have to select "allow pop-up" and also want to redirects to the other page.
here is code of the file go.php
Expand|Select|Wrap|Line Numbers
  1. $url;
  2. <script language="javascript">
  3. window.open('<?php echo $url; ?>');
  4.  
  5. window.location='searchresults.php?keyword=<?php echo $keyword;?>&item_id=<?php echo $pid;?>';
  6. </script>
  7.  
I know by using window.open i will get a pop-up always. but i did tried different methods but none of them worked. like i tried to use form and called a javascript on onload but that too didn't worked.
remember this is part of an execution file. i want to redirect without clicking on any button or link.
i hope i put my query clearly.

Regards
Muddasir Hussain
Jul 1 '08 #1
5 1146
coolsti
310 100+
Why would you believe that what you wish to do is even possible? The changes in browsers which, depending on the settings, requires a user to confirm in order for the popup to appear were made to protect the user from unwanted popups. But it sounds like you wish to somehow override this with your PHP and Javascript? I would not imagine you could do this.
Jul 1 '08 #2
hsriat
1,654 Expert 1GB
Well, there is a way to bypass the most of the popup blockers. But I would not recommend that to use. As it would just annoy the user, which I never want should happen.
So you better let it be blocked.

Regards
Jul 1 '08 #3
pbmods
5,821 Expert 4TB
Heya, Muddasir.

Does your pop-up need to be modeless?

Try using Lightbox to display a modal div over your page content using JavaScript (http://www.huddletogether.com/projects/lightbox/).
Jul 1 '08 #4
i am able to do what i want to..
i guess i wasnt clear in putting my query to u ppl.

i used
parent.opener.location.reload();
which refresh the parent window while new window is being opened using <form> with target=_blank

neways thanks a lot for u guyz for always helping me. i have learned a lot through Bytes


Regards
Muddasir Hussain
Jul 2 '08 #5
coolsti
310 100+
Ah, ok, I think I see what you are getting at.

In my application, I sometimes have the main window open up a popupwindow, and then that popwindow may open up a second popupwindow when the user clicks a button. And sometimes I get this popup warning for the second popupwindow even though I do not get it for the first popup (because my site is considered safe enough).

And the reason is because I am opening up the second popup window from the first popup window. If, instead, I delegate the opening of the second window to a Javascript function on the main page, I do not get this problem. Because now it is the main window that is opening up the popup. I think this is what the OP is referring to. And I do this by placing all the Javascript for opening up popups on the main page, and then calling them from Javascript in the popup using the "opener" keyword.
Jul 2 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Carol Lyn | last post by:
Could use your assistance with this. I have a window that opens via onclick and it is a small window with info about a site. If the user is interested in visiting that site, there is a link to...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
4
by: alexandre.brisebois | last post by:
Hi, I am using access 2003, I would like to know if there is an option to reorganize the tables in a maner that is readable, as we can do in sql sever 2000 or 2005. I have been given a database...
5
by: asadhkhan | last post by:
I have the following code which works correctly in IE 6, but in IE 7, Fire Fox 2.0 and Netscape 8 it does not work. I have a main page where a button calls this pop-up and uploads a file once you...
24
by: Jeremy J Starcher | last post by:
While reading c.l.j, I've noticed that some people prefer and indeed even recommend the use of "window.alert()" over "alert()". I can't find any technical reason to make this distinction, and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.