Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
open a new window help
Old 09-10-2006, 06:55 PM open a new window help
millwalll's Avatar
Webmaster Talker

Posts: 674
Name: James
Location: KENT
Trades: 3
basically what i want do is have a link when u click it it gives u more information about the advert so it open the informaiton in a new window but i dont want it to be a full size window want it to open a new box about halfthe size of a full page if that makes sense
millwalll is offline
Reply With Quote
View Public Profile Visit millwalll's homepage!
 
 
Register now for full access!
Old 09-10-2006, 07:41 PM Re: open a new window help
Novice Talker

Posts: 11
Trades: 0
Step 1 - add the following code between the head tags

Code:
<script language="javascript">
<!--
/*
Auto center window 
*/
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

Last Step.
This will create a link
HTML Code:
<a href="http://www.yourlinkhere.com" onclick="NewWindow(this.href,'name','300','248','yes');return false" onMouseOut="MM_swapImgRestore()">Click Here</a>

Config.
1. replace yourlinkhere with the link you want to open in the new window.

2. replace 300 , 248 with the window size you want. w300 h248
Allenstudios is offline
Reply With Quote
View Public Profile
 
Old 09-11-2006, 05:45 AM Re: open a new window help
millwalll's Avatar
Webmaster Talker

Posts: 674
Name: James
Location: KENT
Trades: 3
thanks for that is there a way the window can be a fixed size tho so it dont have the scroll bars so basically it just open a square box that u cant scroll on
millwalll is offline
Reply With Quote
View Public Profile Visit millwalll's homepage!
 
Old 09-11-2006, 08:32 AM Re: open a new window help
Novice Talker

Posts: 11
Trades: 0
Sure thing.
Look at the last step for the following
this.href,'name','300','248','yes'

Adjust 300 and 248 to meet your size requirements.
300 is the width and 248 is the height.
If you set it up correctly you wont have to worry about a scroll bar. However, Changing yes to no will remove the scroll bar.

Allenstudios is offline
Reply With Quote
View Public Profile
 
Old 09-11-2006, 11:19 AM Re: open a new window help
moondog's Avatar
Ultra Talker

Posts: 256
Location: Croatia
Trades: 0
This might help You:
DHTML Shock - Browser Windows - Open Centered Popup Window

If You're working in DW try Open Browser Window extension
moondog is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 02:58 AM Re: open a new window help
Hashim's Avatar
Experienced Talker

Posts: 39
Name: Hashim
Location: Aligarh
Trades: 0
If you use Dreamweaver 8, you can add that thru Behaviours tab > Open Browser Window, in that you can specify the size of the new window. Quite simple and hassle free. No code required.
__________________

Please login or register to view this content. Registration is FREE
<~~~~~ My Blog !


Please login or register to view this content. Registration is FREE
<~~~~~ Another Blog !
Hashim is offline
Reply With Quote
View Public Profile Visit Hashim's homepage!
 
Old 09-13-2006, 03:51 AM Re: open a new window help
gomx80's Avatar
Experienced Talker

Posts: 45
Name: Terry
Trades: 0
You should use Dreamweaver it very google for web design and coding.
__________________
Relax online:

Please login or register to view this content. Registration is FREE


Free Wallpapers:

Please login or register to view this content. Registration is FREE


Baby Girl:


Please login or register to view this content. Registration is FREE

Money online:

Please login or register to view this content. Registration is FREE
gomx80 is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 05:27 PM Re: open a new window help
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Yep.. and anyone with the popup blocker turned on will never see your popup window.

Opening new windows is considered rude by usability standards. People use the back button and windows opening up tends to confuse people, and others (like me) downright hate it when a web site does this.

Opening new windows is also bad for accessiblity.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 07:53 PM Re: open a new window help
Experienced Talker

Posts: 43
Trades: 0

This code let you open a new window
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
yenerich is offline
Reply With Quote
View Public Profile
 
Old 09-13-2006, 07:58 PM Re: open a new window help
Experienced Talker

Posts: 40
Name: Jeff
Location: IL
Trades: 0
Don't use Dreamweaver like some suggested. Try this article:
Opening a New Window With JavaScript
Scout is offline
Reply With Quote
View Public Profile Visit Scout's homepage!
 
Old 09-13-2006, 09:13 PM Re: open a new window help
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Or this one:
The target attribute and opening new windows | 456 Berea Street

or: Beware of Opening Links in a New Window [Usability and Information Architecture]
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-14-2006, 09:47 AM Re: open a new window help
Novice Talker

Posts: 11
Trades: 0
Very true. Folks who use pop-up blockers will not see the window. Since it’s a clickable link you may want to let your visitors know to turn off their pop-up blocker.

As for it being rude. Naw missy, it’s not rude. The person asking the question did not specify what the new window was for. It could be for an image. Ya know, some folks like to create photo albums with thumbnails and use a pop-up to show case the main image.

Could be added information the web master would like to provide his/her visitor. Maybe a help center or some important information.

The “ rude “ pop-ups are when you enter a site and they automatically start popping-up. Usually advertisement ad's

Also - you want to include a close window option on any rezied window so the confused can close it with out clicking the X..lol



Quote:
Originally Posted by LadynRed View Post
Yep.. and anyone with the popup blocker turned on will never see your popup window.

Opening new windows is considered rude by usability standards. People use the back button and windows opening up tends to confuse people, and others (like me) downright hate it when a web site does this.

Opening new windows is also bad for accessiblity.

Last edited by Allenstudios; 09-14-2006 at 09:51 AM..
Allenstudios is offline
Reply With Quote
View Public Profile
 
Old 09-14-2006, 02:46 PM Re: open a new window help
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I guess you didn't read the articles on usability and accessibilty when it comes to new windows. There are other methods available. If you INSIST on using a new window, then it is recommended that you state on your page that clicking the new link will open a new window so people are forewarned.

I've watched people surf the web, watched how they deal with different usability issues.. just blithely opening up new windows bothers people.

Missy ???? Ok.. Junior.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-18-2006, 05:01 PM Re: open a new window help
Experienced Talker

Posts: 41
Name: Patrick Masciocchi
Location: California
Trades: 0
This may have already been answered, but if you want to customize this pop up yourself, use the Pop Up Window Generator located at Dynamic Drive:

http://dynamicdrive.com/dynamicindex8/popwin.htm

HTH
watchdoghosting is offline
Reply With Quote
View Public Profile Visit watchdoghosting's homepage!
 
Old 09-19-2006, 11:53 AM Re: open a new window help
Hashim's Avatar
Experienced Talker

Posts: 39
Name: Hashim
Location: Aligarh
Trades: 0
HTML Code:
<body onload="MM_openBrWindow('http://linkurlhere/','','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=640,height=480')">
__________________

Please login or register to view this content. Registration is FREE
<~~~~~ My Blog !


Please login or register to view this content. Registration is FREE
<~~~~~ Another Blog !
Hashim is offline
Reply With Quote
View Public Profile Visit Hashim's homepage!
 
Reply     « Reply to open a new window help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.98794 seconds with 12 queries