Search found 9 matches

by tpotman777
Wed Nov 18, 2009 2:39 am
Forum: PHP - Code
Topic: Optimizing slow input fields.
Replies: 9
Views: 459

Re: Optimizing slow input fields.

Ok, got it. What is actually quite interesting is that even though the rendering of <div>s is a lot faster than <input>s, tabbing to the next <div> is actually a lot slower in Firefox, haven't tried it with Chrome though, which I guess is faster with javascript. Maybe it's not possible to have best ...
by tpotman777
Tue Nov 17, 2009 1:11 pm
Forum: PHP - Code
Topic: Optimizing slow input fields.
Replies: 9
Views: 459

Re: Optimizing slow input fields.

Ok. One last thing: how can I access the values within each div separately, for instance to store them in a database? I guess I have to name each <div> uniquely, but am not sure about the rest... Thanks again, Tom HTML elements have a contentEditable attribute. If you replace the loop in the code I ...
by tpotman777
Mon Nov 16, 2009 3:38 am
Forum: PHP - Code
Topic: Optimizing slow input fields.
Replies: 9
Views: 459

Re: Optimizing slow input fields.

Wau, that's pretty amazing, thanks! I would still need some help with this though. Is there some way these DIVs would behave more like <input>s, for instance when clicked at I could directly change the value, without any alert boxes? Tabbing through these would also be very nice. In short, the behav...
by tpotman777
Sun Nov 15, 2009 2:51 am
Forum: PHP - Code
Topic: Optimizing slow input fields.
Replies: 9
Views: 459

Re: Optimizing slow input fields.

It's a working schedule. 31 days * 160 people. Any hints?

-T
Apollo wrote:Please enlighten me... Exactly why the heck would you want 9600 input fields, all pre-filled with one char per field, apparently? :)
by tpotman777
Thu Nov 12, 2009 3:24 am
Forum: PHP - Code
Topic: Optimizing slow input fields.
Replies: 9
Views: 459

Optimizing slow input fields.

Hi. My code generates 60x160 (9600) input fields, and each field gets it's value from the database. Each input fields is of the type: <input WIDTH=10 STYLE=width:10px type=text size=1 maxlength=1> My problem is that the rendering (and scrolling) of the page get's pretty slow. Anyone know of any twea...
by tpotman777
Wed Nov 11, 2009 7:21 am
Forum: PHP - Code
Topic: Problem passing variables to functions.
Replies: 6
Views: 123

Re: Problem passing variables to functions.

Ok, got it working, thanks for your help! -T Ok, looks reasonable! I actually also have 'while' -statement in there, but just can't get the syntax right: eval('while list('.$vars.') = $db->sql_fetchrow($result){ echo "something"; }'); gives: Parse error: syntax error, unexpected T_LIST, ex...
by tpotman777
Wed Nov 11, 2009 7:17 am
Forum: PHP - Code
Topic: Problem passing variables to functions.
Replies: 6
Views: 123

Re: Problem passing variables to functions.

Ok, looks reasonable! I actually also have 'while' -statement in there, but just can't get the syntax right: eval('while list('.$vars.') = $db->sql_fetchrow($result){ echo "something"; }'); gives: Parse error: syntax error, unexpected T_LIST, expecting '(' Any clues on that? Thanks! Tom So...
by tpotman777
Wed Nov 11, 2009 6:42 am
Forum: PHP - Code
Topic: Problem passing variables to functions.
Replies: 6
Views: 123

Re: Problem passing variables to functions.

jackpf wrote:I think the only way to do this is with eval().
Umm, how could I implement that in my code?
by tpotman777
Wed Nov 11, 2009 5:13 am
Forum: PHP - Code
Topic: Problem passing variables to functions.
Replies: 6
Views: 123

Problem passing variables to functions.

Hello. Probably pretty easy stuff, but can't figure it out: I have a string list of variables, for instance: $vars = '$a1,$a2,$a3'; which I would like to pass to list() -function: list($vars) = $db->sql_fetchrow($result) Of cours now $vars gets the value from the query, but what I would like list to...