Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes

 
JavaScript Help
Reply
Posted 2008-11-18, 03:22 PM
Well, at one point in the process of me testing this, it worked. However, as of right now, absolutely nothing happens. Check it out.

Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Picture Zoom In/Out</title>
<script type="text/javascript" language="javascript">
function zoom(file) {
	var image_main = new Object(), hei = new Object(), wid = new Object(); // I just cleaned this up for this edit.
	image_main = document.getElementById('zoom_' + file);
	hei = parseInt(image_main.style.height);
	wid = parseInt(image_main.style.width);
	image_main.style.height = (hei + 7) + 'px';
	image_main.style.width = (wid + 7) + 'px';
}
function zoomout(file) {
	var image_main = new Object(), hei = new Object(), wid = new Object(); // Same thing, I edited this to make it easier.
	image_main = document.getElementById('zoom_' + file);
	hei = parseInt(image_main.style.height);
	wid = parseInt(image_main.style.width);
	image_main.style.height = (hei - 7) + 'px';
	image_main.style.width = (wid - 7) + 'px';
}
</script>
</head>
<body>
<img style="height:7px;width:7px;" src="background-lo3.GIF" id="zoom_now" name="zoom_now" /><br />
<input type="button" value="Zoom In" onclick="javascript:zoom('now');" /><input type="button" value="Zoom Out" onclick="javascript:zoomout('now');" />
</body>

Edit 2: Oh bloody hell. It works again! Apparently there was something I did before not causing it to work. It works now. ~sorry. I'd been working a fix for an hour though. So I wasn't just writing this thread out for no reason.

Edit 3:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" language="javascript">
var did = 0; // Does a check against if that was used last.
function random_msg(num) {
	var msg = new Array();
	msg[0] = "This will Never Be True"; // Really
	msg[1] = "No, don't leave";
	msg[2] = "Leaving is against the rules";
	msg[3] = "Aw, leaving!";
	msg[4] = "No way.  You're leaving!?";
	for (i=0; i < num; i++) {
		var mm = new Object();
		var rand = 5;
		while (rand > 4) {
			rand = Math.ceil(100*Math.random());
		}
		mm = msg[rand];
		if (did!=mm) {
			alert(mm);
			did = msg[rand];
		}
		else {
			i -= 1;
		}
	}
}
</script>
</head>
<body onunload="javascript:random_msg(1000);">
</body>
</html>

I just created this script. I believe it works as is perfectly.
 
Work List
疲れていますから 寝むってありますね。 むずかしいです。 また、ケーキ屋で ケーキを食べていました。

I've considered being a translator, but I dunno. It feels like a lot of work. If someone gets angry then I have to deal with it, you know? I'd rather just relax.

 
Speed Test
 
Favorite Anime/Manga
#01 Clannad ~After Story~
#02 Trigun {Maximum}
#03 Koi Kaze
#04 Berserk
#05 Outlaw Star
#06 Slayers
#07 Desert Punk
#08 Spirited Away
#09 Fullmetal Alchemist
#10 Shakugan no Shana
#11 Death Note
#12 FLCL
#13 Tokyo Magnitude 8.0
#14 Toradora
#15 Gunslinger Girl

 
Anime List

Last edited by Goodlookinguy; 2008-11-18 at 09:18 PM.
Old
Profile PM WWW Search
Goodlookinguy seldom sees opportunities until they cease to beGoodlookinguy seldom sees opportunities until they cease to beGoodlookinguy seldom sees opportunities until they cease to beGoodlookinguy seldom sees opportunities until they cease to be
 
 
Goodlookinguy
 
 

Bookmarks

« Previous Thread | Next Thread »

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

Posting Rules [Forum 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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone skilled enough to deal with this javascript inquiry? Goodlookinguy Tech Help 1 2008-08-15 08:34 AM
BB coding help! - JavaScript as well included Goodlookinguy Tech Help 0 2007-08-28 04:43 PM
Nice javascript site. kaos Tech Help 0 2004-01-18 09:59 PM
HTML and JavaScript GameCube Tech Help 7 2002-09-08 10:22 PM
A question about a JavaScript(?) code. Mr.Lee Tech Help 9 2002-05-01 03:25 PM


All times are GMT -6. The time now is 07:53 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.