WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1Popup window? Empty Popup window? Sat Feb 06, 2010 10:26 pm

karna

karna
Registered Member
Registered Member
Guys, I need some help at javascript.
When someone clicks a link, I want a popup window to come up which shows a web page in it. Actually I want my contact.html page to be there in the pop up window. can someone help me at this?

Thank in advance Very Happy

2Popup window? Empty Re: Popup window? Sat Feb 06, 2010 11:10 pm

ze_chaofan

ze_chaofan
Registered Member
Registered Member
Hello !

Here's the code :
<a href="#" onClick="window.open('popup_url','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=0, resizable=0, copyhistory=0, menuBar=0, width=300, height=200, left=200, top=200');return(false)">Pop Up</a>
In blue : The url of the page in the pop up.
In green : Pop up's width.
In orange : Pop up's height.
In red : Pop up's padding from left of the screen.
In purple : Pop up's padding from top of the screen.

I hope it will works.

http://www.sos-forum.com/

3Popup window? Empty Re: Popup window? Sun Feb 07, 2010 12:14 pm

karna

karna
Registered Member
Registered Member
Hey buddy. That works perfect. Thanks a lot for this code. I could easily adjust the height and width Very Happy

Can you please explain what is "return(false)"? and what does it do?

4Popup window? Empty Re: Popup window? Sun Feb 07, 2010 2:59 pm

ze_chaofan

ze_chaofan
Registered Member
Registered Member
OK.

For the return false :
The return value of an event handler determines whether or not the default browser behaviour should take place as well. In the case of clicking on links, this would be following the link, but the difference is most noticeable in form submit handlers, where you can cancel a form submission if the user has made a mistake entering the information.

http://www.sos-forum.com/

5Popup window? Empty Re: Popup window? Sun Feb 07, 2010 4:46 pm

karna

karna
Registered Member
Registered Member
Thanks for the explanation. Thank you very much Very Happy

6Popup window? Empty Re: Popup window? Sun Feb 07, 2010 5:07 pm

ze_chaofan

ze_chaofan
Registered Member
Registered Member
My pleasure...
Is everything okay ?

http://www.sos-forum.com/

7Popup window? Empty Re: Popup window? Sun Feb 07, 2010 6:58 pm

karna

karna
Registered Member
Registered Member
yes everything works fine Smile

8Popup window? Empty Re: Popup window? Sun Feb 07, 2010 6:59 pm

ankillien

ankillien
Administrator
Administrator
Solved | Locked

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum