473,625 Members | 2,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why does <INPUT type="hidden"> slow my JavaScript down??

I have created a slider using Javascript and html tables that
generally works very well.

As you move the "knob" to the right, a numeric value in an adjactent
<INPUT type="text"> tag increases. As you move the knob to the left,
the numeric value decreases... just as it should. It works very smooth
and seamlessly. Very responsive to the mouse's movement.
Now, I would like to make this INPUT tag have type="hidden". But when
I make that simple, one-word change and try it out, the resulting
slider is VERY sluggish and unresponsive. The slider doesn't even come
close to keeping up with the mouse.

Does anyone know why this happens? I can't come up with any
explanation.
Is there a known work-around?

Thanks
-Saqib
Jul 20 '05 #1
6 4473
Saqib Ali wrote:
I have created a slider using Javascript and html tables that
generally works very well.

As you move the "knob" to the right, a numeric value in an adjactent
<INPUT type="text"> tag increases. As you move the knob to the left,
the numeric value decreases... just as it should. It works very smooth
and seamlessly. Very responsive to the mouse's movement.
Now, I would like to make this INPUT tag have type="hidden". But when
I make that simple, one-word change and try it out, the resulting
slider is VERY sluggish and unresponsive. The slider doesn't even come
close to keeping up with the mouse.

Does anyone know why this happens? I can't come up with any
explanation.
Is there a known work-around?

Thanks
-Saqib


Probably because of the use of a bad browser with poor javascript
implementation. M$ IE by any chance?

Jul 20 '05 #2
Saqib Ali wrote:
I have created a slider using Javascript and html tables that
generally works very well.

As you move the "knob" to the right, a numeric value in an adjactent
<INPUT type="text"> tag increases. As you move the knob to the left,
the numeric value decreases... just as it should. It works very smooth
and seamlessly. Very responsive to the mouse's movement.
Now, I would like to make this INPUT tag have type="hidden". But when
I make that simple, one-word change and try it out, the resulting
slider is VERY sluggish and unresponsive. The slider doesn't even come
close to keeping up with the mouse.

Does anyone know why this happens? I can't come up with any
explanation.
Is there a known work-around?

Thanks
-Saqib


That is an implementation-specific issue. Why does it have to be an
input hidden value that you change?

Here is a simple work-around that should work for you on all JS
capabable browsers...

Try changing a global variable, instead of the hidden value. If you
need it for form submittal, simply define the onSubmit method of the
form, and assign the variable to the hidden input field, and away you go :)

Brian

Jul 20 '05 #3
Actually, Mozilla 1.5

Erwin Moller <si************ *************** *************** @spamyourself.c om> wrote in message news:<40******* **************@ news.xs4all.nl> ...
Saqib Ali wrote:

Probably because of the use of a bad browser with poor javascript
implementation. M$ IE by any chance?

Jul 20 '05 #4
Saqib Ali wrote:
Actually, Mozilla 1.5


That is silly.
I use Mozilla 1.4.1 and don't have that problem, but I couldn't check your
code of course.
If you want me to, post it.

Good luck solving it.
If you found a workaround or solution, let us know.

Good luck!

Regards,
Erwin Moller
Jul 20 '05 #5
Erwin Moller wrote:
Saqib Ali wrote:

Actually, Mozilla 1.5

That is silly.


For the OP to post and say "Mozilla 1.5 displays this behavior" is
"silly"??? Quite contrary. For you to post and say that its silly, when
you have not tested what the OP is seeing, is beyond silly - its
downright ignorant.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #6
Randy Webb wrote:
Erwin Moller wrote:
Saqib Ali wrote:

Actually, Mozilla 1.5

That is silly.


For the OP to post and say "Mozilla 1.5 displays this behavior" is
"silly"??? Quite contrary. For you to post and say that its silly, when
you have not tested what the OP is seeing, is beyond silly - its
downright ignorant.

Relax man, you are missing my intention/point, and start calling me names
that would better describe yourself if you read this thread carefully.

This is the situation:
When Saqib Ali wrote he was having slow Javascript when updating hidden
fields, I checked that on my own browser (Mozilla 1.4.1) by making a small
program that does just that.
I didn't notice any slow performance.
So I asked if Saqib Ali was using a broken browser, like IE which is known
for it strange non-standard Javascript behaviour.

He wrote he was using Mozilla 1.5.

So I responded that was silly.
Silly that I was using Mozilla too (and a close version).
Not the fact that he uses Mozilla, which I do too.

Erwin
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
40702
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
1
27869
by: Jesper Hermansen | last post by:
Hi! I'm making a system that will generate Winamp-playlists. To make it easy for the user to add a file to the list, I'm using <input type="file">. The problem with this is that I only get the filename, not the path, which is necessary in my situation. I cracked the problem in Firefox:
2
28564
by: Matt | last post by:
If I do the following, the browse text box still cannot see C:/hello world/test.txt. <input type="file" name="fileName" value="C:/hello world/test.txt" size=80> Any ideas? and workarounds to this problem? thanks!!
1
2422
by: mark4asp | last post by:
<form runat="server"automatically adds <divtag to code contained within. Is there a way to stop that? Mixing block-level elements with inline-level elements messes up the HTML becasuse that is invalid for a strict implementation. <spanis in-line-level and <divis block-level. I don't want to mix up <span> and <div> I'm using an <asp:Buttonhere because when it switches to the URL I need to check that the user is in the correct role -...
3
4712
by: Bill | last post by:
Hi In a css page I have the following: ..OLC{float:left; width:150px;text-align:center; } OL{ list-style-position:inside;} LI{ height:160px;}
7
20859
by: Tim Slattery | last post by:
I'm trying to handle the onChange event in an <input type="file"> element. In IE, there's no problem: the event fires when a file in the "open" box is doubleclicked, or the "Open" button in the box is clicked, or "Enter" is hit in the attached text box. I can get the value of the element. But in Netscape 7, onChange doesn't fire until focus leaves the element. When you double-click a file name or click "open" in the Open box, the...
18
10735
by: zoilus | last post by:
Can not determine how "<?=PHP_SELF?>" is supposed to work. The below is the line of code. <!-- <form name="search" method="post" action="<?=$PHP_SELF?>"--> When the above statement is run the following is the result. You don't have permission to access /dev/forms/forms_testing/< on this server.
1
7075
by: mark | last post by:
Forgive me if this seems like a stupid question but I need help... I'm trying to do a simple online form that emails me the results from a few fields. Here is the code: <form action="http://cm1web1/WebSurveyComponents/script/ processform.asp" method="post">
1
6431
by: msg2ajay | last post by:
hi, i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error. <html> <head> <script type="text/javascript"> function callme(){ document.getElementById("hid").style.visibility="visible"; }
0
8253
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8189
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8692
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7182
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4192
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1499
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.