Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 03-22-2008, 03:33 PM   #1 (permalink)
falsepride
Regular Contributor
 
Join Date: Oct 2004
Posts: 209
falsepride is on a distinguished road
setting onkeyup through javascript

i need to write a little function to create a number of objects based on rows of a form, then for each text input in that form, set the onkeyup to a function in the object created for that row. soo far, ive been able to create
Code:
function autostart(numrow, numcolumn)
{
  var code = "";
  for(var i = 0; i < numrow; i++)
  {
    code += "var line" + i + " = new autoseach(" + i + ");";
    for(var i2 = 1; i2 < (numcolumn - 1); i2++)
    {

    }
  }
  eval(code);
}
and that works, but when i try to add something like
Code:
document.getElementById('t00').onkeyup = line0.searchforops(1);
the onkeyup doesn't get triggered. any ideas what i should be doing?

ps in
Code:
document.getElementById('t00').onkeyup = line0.searchforops(1);
the id will be different for each line, in line# the number will be different for each line, and the value passed into the searchforops will be affected by the column of the text box.
falsepride is offline   Reply With Quote
Reply

Bookmarks

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript: How Do I Access PHP Functions From Within JavaScript? markster HTML, XML, Javascript, AJAX 2 06-15-2006 07:35 AM
Javascript Submit Form Options? Redline HTML, XML, Javascript, AJAX 5 05-19-2006 07:59 AM
Javascript is *not* Java Belisarius Java 0 05-27-2005 06:45 PM
Rotating .swf files at random with JavaScript? VisionsIC HTML, XML, Javascript, AJAX 0 05-18-2005 11:12 AM


All times are GMT -8. The time now is 08:12 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting