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.

JavaScript Forum


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



Reply
Fit to window with Java?
Old 03-29-2005, 05:10 AM Fit to window with Java?
Novice Talker

Posts: 9
Location: Philly love baby (Philadelphia)
Trades: 0
Hello, my question is really a simple one, but since I don't know Java yet...

I want the browser window to fit the size of the image. example: www.bynomeans.cjb.net

I want to do the same thing, you click on the entry picture and the site pops up in a browser that is whatever size i specify. I'm not sure if there is a way to do this by just inserting some lines of java script into the html somewhere and changing width and height, or if it's more complicated. Thanks in advance for all the Help!

also just as an aside, are there any sites, tutorials, or other means of learning java that won't confuse the heck out of me? thanks again.
__________________
Insert Screaming
apedosmil is offline
Reply With Quote
View Public Profile Visit apedosmil's homepage!
 
 
Register now for full access!
Old 03-29-2005, 06:11 AM
Phaedrus's Avatar
Ultra Talker

Posts: 271
Location: CA
Trades: 0
HTML Code:
<a href="#" onClick="window.open('URL', 'windowName', 'width=150,height=100')">
  <img src="whatever.jpg" />
</a>
Use something like that to open a popup window. For more details just search google for "Javascript window.open" (and you're mistakenly referring to "JavaScript" as "Java." They're different. )
__________________

Please login or register to view this content. Registration is FREE
Phaedrus is offline
Reply With Quote
View Public Profile
 
Old 03-29-2005, 06:04 PM
Novice Talker

Posts: 9
Location: Philly love baby (Philadelphia)
Trades: 0
haha well don't I feel silly, Javascript* anyways thanks for the help I will definately give that a try.
__________________
Insert Screaming
apedosmil is offline
Reply With Quote
View Public Profile Visit apedosmil's homepage!
 
Old 03-30-2005, 01:27 PM
simptech's Avatar
Skilled Talker

Posts: 81
Location: Cape Coral, Florida, United States
Trades: 0
in the new window, use something like...

Code:
<html>

<head>
<title>Image Viewer</title>
<script type="text/javascript">
<!--
function setWindow() {
  window.height = document.images[0].height;
  window.width = document.images[0].width;
}
//-->
</script>
</head>

<body onload="setWindow">

<img src="yourimage.ext" height="320" width="240" />

</body>

</html>
__________________

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

FREE PHP scripts for your website!
simptech is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Fit to window with Java?
 

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.20677 seconds with 12 queries