User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 391,682 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,188 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 445 | Replies: 1 | Solved
Reply
Join Date: Feb 2007
Posts: 55
Reputation: adaykin is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
adaykin adaykin is offline Offline
Junior Poster in Training

Function undefined

  #1  
Jul 6th, 2008
Hello, whenever I try to call this function, web developer plugin for firefox gives me a message that says: "Error: addRow is not defined
Source File: http://localhost/xampp/Aptana/index.php
Line: 1"

Here is my code:

<script type="text/javascript">
var k = 7;
			function addRow()
			{
				var rowItem = document.createElement('input');
				newRow.setAttribute('type', 'text');
				newRow.setAttribute('name', 'item' + k);
				document.getElementById('myDiv').appendChild(rowItem);
				var rowPart = document.createElement('input');
				newRow.setAttribute('type', 'text');
				newRow.setAttribute('name', 'part' + k);
				document.getElementById('myDiv').appendChild(rowPart);
				k++;
			}
</script>
		<form>
		<input type="button" value="Add a Row" onclick="addRow()" />
		</form>
My Website <-- check out my site!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2007
Posts: 55
Reputation: adaykin is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
adaykin adaykin is offline Offline
Junior Poster in Training

Re: Function undefined

  #2  
Jul 6th, 2008
oops, had a bad name, this is solved now.
My Website <-- check out my site!
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 2:22 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC