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
Help needed with javascript code
Old 04-15-2006, 04:14 PM Help needed with javascript code
Junior Talker

Posts: 3
Trades: 0
Hi,
I´m working on a new photographic site and want all pictures to open in new windows without toolbar, location, directories and status. There is also a "click to close the window" function that I find is neat.
The code I´m working with is at http://www.akphotography.se/macro_animals.shtml just click on one of the two thumbnails in the top to the left (fly and grasshopper) and look at the code for the new window.

I have tried to add the following instructions to the code; toolbar=no,location=no,directories=no,status=no. I´ve tried to add the code into several places without getting the code to work. Now, I don´t know how much of the code is good and how much is bad code of what I already got since I´ve been editing the code and cutting out the parts that I guessed was not needed in my case.
Someone with knowledge of these matters, please help me to sort this out. Where should I add the code to get the desired result? Should I do any other changes to the already existing code?
Thanks
/Vallejos
Vallejos is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-17-2006, 06:03 AM Re: Help needed with javascript code
Junior Talker

Posts: 3
Trades: 0
I still need some help, so if someone with javascript knowledge reads this, please respond.

I want the window that opens with the large picture, after viewer clickes on the thumbnail, to be without toolbar, location, directories and status.

I haven´t got it to work on my own so far and would appreciate a guiding hand or some tips on what to do. Please take a look at my code at the link in my first post.

Thanks
/Vallejos
Vallejos is offline
Reply With Quote
View Public Profile
 
Old 04-17-2006, 08:58 AM Re: Help needed with javascript code
sacx13's Avatar
Experienced Talker

Posts: 32
Location: Here
Trades: 0
This is the javascript code
Insert at top of body:

function fullScreen(theURL) {
window.open(theURL, '', 'scrollbars=no, toolbar=no, fullscreen=yes');
}

And this link in your code

<a href="javascript:void(0);" onClick="fullScreen('/html.html');">Link</a>

Regards
Adrian
__________________

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


Please login or register to view this content. Registration is FREE
sacx13 is offline
Reply With Quote
View Public Profile
 
Old 04-17-2006, 12:36 PM Re: Help needed with javascript code
Junior Talker

Posts: 3
Trades: 0
Thanks Adrian,
But I have not gotten it to work yet. I have to guess and try...
Is the (theURL) to be replaced by the URL of html document? Should I keep the ()?
Should the ('/html.html') be replaced with the path to the html document? Should I keep the ('')? Sorry I´m such a novice in this matters and hope you have the energy to guide me through this :-)
Should it look something like this? Or am I far out here?
Thanks
/Vallejos


<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="" content="">
<title>100_0039-after.jpg.html</title>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl +',scrollbars='+scroll+',resizable=yes'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
End -->
</script>
</head>


<body bgcolor="808080">
<div align="center">



function fullScreen(http://www.akphotography.se/targets/...after.jpg.html) {
window.open(http://www.akphotography.se/targets/...after.jpg.html, '', 'scrollbars=no, toolbar=no, fullscreen=yes');
}



<br><br><br>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="808080">
<td valign="middle" align="center"><a href="javascript:self.close()" title="Close window">


<a href="javascript:void(0);" onClick="fullScreen('/targets/100_0084-after.jpg.html');">Link</a>


<img src=../pictures/100_0084-after.jpg border="0"></a></td>
</tr>
</table>
<p></p>
<p class="header"><font color="#C0C0C0" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular">Grasshopper</b></font></p>
<span class="info"></a></span></div>
</body>
</html>

Last edited by Vallejos; 04-17-2006 at 12:38 PM..
Vallejos is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help needed with javascript code
 

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