Go Back   Hardware Forums > Software Support Forums > Web Development

Reply
 
LinkBack Thread Tools
Old 05-08-2007, 05:05 AM   #1 (permalink) Top
GEEK 2.0
 
blade's Avatar
 
Join Date: Jul 2006
Gender: Male
Posts: 417
Times Helpful: 1
My Mood: Relaxed
Status: Offline

My Computer

Question Javascript: Opening a New Window: Help needed

im trying to have javascript in my header, so i dont have to re-type the attributes on every page i want a pop-up, so far this is what i have, but its not working..

code to put in header..
Quote:
<SCRIPT LANGUAGE="JavaScript">
function openwindow()
{
window.open('','','width=620,height=800,resizable= yes,scrollbars=yes,toolbar=no,location=no,director ies=no,status=no,menubar=no,copyhistory=no');
}
</SCRIPT>
code to put on any page..
Quote:
<a href="javascript:openwindow()" onClick="window.open('http://www.website.com','Shipping Terms')">Shipping Terms</a>

__________________

Last edited by blade; 05-08-2007 at 05:07 AM.
Send a message via MSN to blade Send a message via Skype™ to blade   Reply With Quote
Whats this? diNovo Media Desktop Laser
diNovo Media Desktop Laser
Seller Price (inc. VAT) Delivery Total Price Availability Seller Rating
Dell £125.95 Free £125.95 In Stock Rated: 0 out of 5 - Number of votes: 0
Misco.co.uk £126.49 £3.99 £130.48 In Stock Rated: 4 out of 5 - Number of votes: 1355
IT247.com £113.29 Free £113.29 In Stock Rated: 4 out of 5 - Number of votes: 38
Old 05-08-2007, 05:22 PM   #2 (permalink) Top
iMod

 
Matt555's Avatar
 
Join Date: May 2005
Age: 21 Male
Posts: 3,844
Times Helpful: 238
My Mood: Happy
Status: Offline

My Computer

There's a tutorial on TechTuts that deals with Javascript pop-ups:

Javascript PopUp Window

Should help a bit.
__________________
  Reply With Quote
The Following User Says Thank You to Matt555 For This Useful Post: Show me >>
Old 05-08-2007, 05:25 PM   #3 (permalink) Top
GEEK 2.0
 
blade's Avatar
 
Join Date: Jul 2006
Gender: Male
Posts: 417
Times Helpful: 1
My Mood: Relaxed
Status: Offline

My Computer

Quote:
Originally Posted by Matt555 View Post
There's a tutorial on TechTuts that deals with Javascript pop-ups:

Javascript PopUp Window

Should help a bit.
thanks, but the problem was solved from anothr forum, here is the code..

Code:
<script type="text/javascript">
/*<![CDATA[*/
function win(width,height,url) {
var myfloater=window.open(url,'','scrollbars=yes,toolbar=no,resizable=yes,status=no,width='+width+',height='+height+',top='+((screen.availHeight/2)-(height/2))+',left='+((screen.availWidth/2)-(width/2))+',directories=no');
}
/*]]>*/
</script>



<a href="http://www.domain.com/content.html" onclick="win(600,400,this.href); return false;">launch</a>
__________________
Send a message via MSN to blade Send a message via Skype™ to blade   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Little Javascript Stopwatch I Made Matt555 Web Development 11 12-06-2007 07:49 AM
Firefox javascript flaw was made up Addis News and Article Comments 7 09-10-2006 08:05 PM
Javascript/FOR loop gumdigger Web Development 1 19-03-2006 11:18 AM
IE opening as very small window phaedrus General Software 3 20-11-2005 08:46 AM
Fresh Javascript Browser Exploit syngod News and Article Comments 0 26-06-2005 10:08 PM


All times are GMT +1. The time now is 10:11 AM.


Copyright © 2000 - 2008 · HARDWAREFORUMS.COM · All rights reserved