Forum Moderators: coopster

Message Too Old, No Replies

New window appears after clicking on a link?

         

study

3:34 pm on May 10, 2006 (gmt 0)

10+ Year Member



Hi there,

Can somone please tell me how can I write a php script which can make a new window/tab (for Mozilla browsers) open after people clicked on the link but without showing the url, you know, the window that doesn't have an address bar or whatsover toolsbar on it? Are there any tutorials or useful scripts available for that task? Thank you in advance for the help and have a great day.

jatar_k

3:38 pm on May 10, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you need to do this with javascript, specifically the window.open method

you might want to try our Javascript Forum [webmasterworld.com]

eelixduppy

3:41 pm on May 10, 2006 (gmt 0)



Hello

This is a JavaScript issue. This should work:


<script language="JavaScript">
open("http://www.google.com","test", "toolbar=no,menubar=no,width=500,height=500,resizable=yes")
</script>

Good luck!

eelix

study

4:10 pm on May 10, 2006 (gmt 0)

10+ Year Member



Thank you so much for the help. Can it only be done with javascript because I think some people disable javascripts on their browser like I do or is there anyway to go around this issue?

eelixduppy

4:19 pm on May 10, 2006 (gmt 0)



You can try newt_open_window() [us2.php.net]

Requirements:
This module uses the functions of the RedHat Newt library. You need libnewt version >= 0.51.0.

eelix

study

5:27 pm on May 10, 2006 (gmt 0)

10+ Year Member



Thank you eelix for your suggestion of using the newt option. Is it possible for you to tell me whether does it require me to install the libnewt to my server or how does it work? I am on a shared UNIX server (with the hosting company) and I doubt that they will allow me to install this libnewt thing to their server. If it is just going to be installed to my public_html folder, it should be fine but other than that, I don't think that they will allow me to do things with their server not even upgrading the php or mysql to the newer version. Also, it would be great if you can tell me where to find a useful tutorial on using this newt module because I have googled on this newt thing and I have yet to find one that is useful enough to teach me how to make a new window open. Thank you so much for the help.

jatar_k

7:48 pm on May 10, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you are better off just using javascript

it is not bundled with php, this would require installation by your admin/host

not your best route imo

study

8:03 pm on May 10, 2006 (gmt 0)

10+ Year Member



Thank you jatar_k. I wonder whether you can tell me how to "force" the user's browser to enable javascript in such a way that if they do not enable javascript, they will not be able to view the page? In your opinion, do you think it is a good idea to do that?

eelixduppy

8:25 pm on May 10, 2006 (gmt 0)



You can use HTML's <noscript> tag [w3schools.com]

eelix

jatar_k

8:32 pm on May 10, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



the noscript tag is your work around, you can't actually force the user's to do very much because those are user settings.

good browsers allow you to turn off certain specific functions of client side languages as well with out turning it off all together.

I always advise against doing much to the user's browser, it just makes them annoyed

then they leave your site

study

9:06 pm on May 10, 2006 (gmt 0)

10+ Year Member



I agree completely with your opinion on forcing the user to do something. Well, thank you very much, eelix and jatar_k for the help. I really appreciate it. Cheers.