Prodgers Posted October 26, 2005 Share Posted October 26, 2005 Hi guys, i'm new here.When i open a link in a new window, in this case an image as the link, then how do i control the height and width of the new window? or cant i do this with html?Any help is good help. Thanks Link to comment Share on other sites More sharing options...
Jonas Posted October 26, 2005 Share Posted October 26, 2005 <img src="http://image_link" alt="..." onclick="window.open('http://image_link','my_new_window','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=yes, width=820, height=553, align=left, valign=top')" />An example that I used on my pages... Link to comment Share on other sites More sharing options...
Skemcin Posted October 26, 2005 Share Posted October 26, 2005 Hi, and welcome to the boards. There are a couple options.a.) opening a new window and then resize it when it opens (yuck)b.) use the following java script:<script language="javascript" type="text/javascript"><!-- //////////////////////// popup window ////////////////////////var features="status=no,scrollbars=yes,resizable=yes,menubar=yes,width=650,height=445,top=25,left=25"; function Info(x){ //window.name = "HelpWindow"; var openit = window.open(x, "HelpWindow", features);}--></script><a href="java script: void(); onclick="java script: Info('pagename.htm');">text/image</a><br>You can change the properties of the popup/new window in the "features" variable.Good Luck. Link to comment Share on other sites More sharing options...
Prodgers Posted October 27, 2005 Author Share Posted October 27, 2005 thanks for the help i'll give it a go tomorrow when i have access to my pages, and i'll let you know how i go. Link to comment Share on other sites More sharing options...
Prodgers Posted October 28, 2005 Author Share Posted October 28, 2005 ok i have played around with it for 10 minutes with sizes and that and it all works fine! thanks guys you can see my site here http://www.prodgers.cjb.net the images i did are on the home page. Link to comment Share on other sites More sharing options...
Skemcin Posted October 28, 2005 Share Posted October 28, 2005 sweet - btw the way, I have a blast at http://www.chicagoindoorracing.com.the only thing I would suggest, is to wrap your images in an HREF tag and move your ONCLICK attribute out from the image and into the HREF. Right now, there is no way to know that the helmet images are links - now little hand appears.of course, you could add this.cursor='hand' in a onmouseover attribute and compliment that with the opposite on the onmouseout attribute - but teh HREF seems a little easier to me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now