SunQuest
 
           JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old October 7th, 2004, 03:28 PM
lmajowka lmajowka is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 1 lmajowka User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
settimeout ignore object in function

using settimeout recalling the function, an object of params
isnt recognized.
here is the code:

function ajusta(inp,ind,mai,raxa)
{
var taxa = 0;
taxa = parseInt(ind/mai * 196);
inp.style.height = taxa + 'px';
inp.value = raxa * (ind/taxa);
if (taxa != raxa)
{raxa++;
setTimeout("ajusta('"+inp+"','"+ind+"','"+mai+"','"+raxa+"')",100)
}
}

inp is an form input type text,
ind, mai and raxa are just numbers
when the settimeout calls the function again inp is no more the initial object

i'm breaking my head all day trying to solve this,, please any help is welcome.
Hugs from Brasil.



Reply With Quote
  #2  
Old August 8th, 2005, 02:54 AM
Mittineague's Avatar
Mittineague Mittineague is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jul 2005
Location: West Springfield, Massachusetts
Posts: 541 Mittineague User rank is Private First Class (20 - 50 Reputation Level)Mittineague User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 1 Day 2 h 23 m 33 sec
Reputation Power: 3
function problem

Javascript is a loosely typed language.
I believe that this line
inp.value = raxa * (ind/taxa);
is recasting the string inp, as an int.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > settimeout ignore object in function


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway