Current location: Hot Scripts Forums » General Web Coding » JavaScript » Javascript function call


Javascript function call

Reply
  #1 (permalink)  
Old 11-14-09, 07:09 AM
deekshas deekshas is offline
New Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Javascript function call

The function change() in not getting called by onClick event of button Click Me,JavaScript array size has been created in PHP

HTML Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="javascript">

function change()
	{
		alert(size[1][0]);
				
	}

</script>

</head>

<body>
<script language="javascript">
 var size = new Array();
 var = count;
for (count = 0; count < 5; count++)
size[count] = new Array();
size[0][0] = 600;
size[0][1] = 400;
size[1][0] = 300;
size[1][1] = 400;
size[2][0] = 300;
size[2][1] = 400;
size[3][0] = 600;
size[3][1] = 400;
size[4][0] = 300;
size[4][1] = 400;
</script>
	<input type="button" value="Click Me" onClick="change()"/>

</body>
</html>
Any kind support will be apreciated.

Thanks,
Srinivas.

Last edited by wirehopper; 11-14-09 at 09:52 AM. Reason: HTML tags
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-14-09, 09:57 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
var = count;

should be var count;

I'd consolidate the javascript into the upper block, and ensure the var size declaration is before the change function.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
javascript php


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

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
a.c. 50Hz voltage asm trouble steph6 Other Languages 0 04-09-08 06:17 AM
Asembly Language Help needed..Urgent..plzzzz paritoshcool Other Languages 1 11-27-07 08:07 AM
ASP upload prob minority ASP 1 06-27-05 09:35 AM
PHP Error Fairnie PHP 8 06-26-04 08:15 AM
Help trim code down TheLaughingBandit JavaScript 0 09-02-03 10:50 AM


All times are GMT -5. The time now is 07:16 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.