Cloudgen C.F. Wong

+ Follow
since Jul 15, 2009
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Cloudgen C.F. Wong

I came across the sudden slow down or even lock-up in IE 6 (IE 7 and IE 8 are OKay). Firstly, we thought the problem came from the javascript code, we try to remove all the javascript and still cannot find the answer. Finally, after dividing code "piece-by-piece", it came out that the source of the problem came from a conditional style sheet which applied to a class of text boxes (and on that page, the number of the text box is more than 30).
I think it is impossible to match both IE7 and IE8 for this case.
Please consider the following modification (this will brings less difference):
1. the default margin of ul for IE7 and IE8 are different.
2. "Second list item #3" will shift to the left if there is no "float:left;" for div#content.

Bret Waldow wrote:I am starting the design of an application primarily for Linux machines, although perhaps it might be used on Macs too. I am not targeting Windows at all.

I'm probably going to use the GWT in a browser as the main UI - Firefox or Google Chrome when it's generally available. I expect either can run Javascript locally, but there are some features that may require a server. One would be to access a shared system library to ask for computation - it appears this violates one of the design choices for browsers, and so would require a local server (servlet, REST, or SOA) to allow access.

The question is not 'which one'. The question is 'how do I know if the user has already installed a server, and how do I install my app to that if it's already there?'

If I were to choose Tomcat, how would I know if they already have Tomcat installed? If they have Apache, what do I do then?

How is this question resolved for applications that require a server to function on Linux (and Mac) machines?

Thanks for help and pointers.


If you are going to use the GWT, I think you should consider the "Google App Engine"
14 years ago
How about disable all the remaining input box(es) once the user focus on one input box and the format of the input text is not numeric value.
Using the onkeyup event to check the format and enable all the remaining field if it is numeric value.

It may be better than the setTimeout for focus the original input box.

Another choice is using a plugin for handling keydown event. Maybe you can use the my jquery format plugin:

Pawel Nowacki wrote:Hi Ranchers,

I have a form with text input and this is the function that is executed onchange event (inputObject is the input text object that this event was fired on):

Now when alert comes out it says: current=*123.00* new=*123.00* but it shows B on the next alert, why??
Both variables should be strings. originalInputValues array consist of inputObject.value's previously inserted.
It seems so obvious to be equal. Why it is not??
I've tried equals() and eval(). Please help

Have you tried to convert the string into ascii value for inspection?

Nikes Shah wrote:Hello friends,

I am new to Ajax development.

Can anyone tell me use of Ajax? Is it for UI development also or just for small part of data processing?

What I see on various sources is that there are various libraries available also like ext, DOJO, YUI (Yahoo User Interface), GWT (Google Web Toolkit).

Can anyone tell differences briefly among there and their purpose?

AJAX originally stands for Asynchronous Javascript and XML which is a technique for downloading file with XML format from server aysnchronously without reloading the entire page. Nowadays, AJAX is not limited to download files with XML format, it also allows webbrowser downloading files with various format such as: pure text, JSON, JSONP, etc. Using the technique of AJAX, you can download a file asychronously or sychronously without reloading the webpage and changing the URL in the Address box in a webbrowser.

ext-js, DOJO and YUI are common "client-side" javascript libraries for simplifying the task in handling DOM Objects, AJAX communications and process events. They difference in their coding style, organization of code and their UI.

GWT is a java library for developing web applications (e.g. generating HTML code and javascript functions, including AJAX functions) mainly running on "Google App Engine"
If you want to cover both the leftside_div and rightside_div by the slideshow_div, is it simplier for you hide both and leftside_div and rightside_div?

Ritu varada wrote:Thanks Ankit. It displays okay if I have 'color-red' but if I do

pausecontent[2]="<div class= & # 39color-red & # 39>

Trying out javascript quotes today , 08/27/2009


It still does not convert the & #39 to single quotes whereas it converts & # 44 to be comma.

Webbrower treat &#39; and the single quote(') differently and they are not the same. In the same sense, &#44; is different from a comma(,). It causes syntax error if you use it inside a javascript object to replace the normal comma(,).

Bret Waldow wrote:

Bear Bibeault wrote:Not directly. You can use an Ajax request to fire off a server-side resource to execute it.


I'm interested in more ideas like this, but I'm also interested in doing it without any server.

I'd like to know if there is a way I can call that library without any server, as a browser will let me load and run local content from the file system without one - and the browser includes a Javascript engine to run locally based code. I want to leverage the substantial abilities current browsers have to work with local content for a browser-based application.

I know the user can load files from the local system without a server. Can I access a local system library without a server? Can I get a remote page from the internet in another tab, and drag content off it to another locally stored page? This seems likely, as I can copy images off a web page from Firefox and save them.

I might also find reason to have a server for some other functionality as I develop my application, but knowing the limits of Javascript will be helpful, so I'd like to hear about both approaches - with and without.


If you can use your library within JNI, is it possible for you to wrap the libraries into RMI (Remote Method Invocation), or a network service, (or xmlrpc web services or something else) and allow it to be called by Java Applet (or xmlHttpRequest Object) in a webpage? (Java Applet or xmlHttpRequest Object have their own security limitations, too.)
If you target for ie as your webbrowser, you have an alternative choice, compile it as ActiveX dll component. And you can call it by <object></object> tag and access it using Javascript.

Moreover, you are not allow to access local system's resources (other than webpages, multimedia files and files that opened by webbrowser's plugin or add-ons) directly from Javascript due to security reasons. Thus, it's quite IMPOSSIBLE to call an external library directly from javascript.
Hi, ranch sitterrr,

"operation is not allowed when object is closed" is caused by the rs.close statement. If you want to insert the record, simply use the connection's execute method:

You'll see it's not necessary to use the recordset object. Moreover, If you plan to run the file locally, it's better to save it as ".hta" format, which can bypass the security checking and you can limit the file as single instance, too:

I've zipped the above example together with an Access file in the following link if you want to see the outcome: download page


Eric Pascarello wrote:You can hide columns by using colgroup and setting the display to none for col.


I tried using the colgroup for accessing the collaborative style properties. I find out it's not work for some web-browser (in my test, opera 10.0 beta) and not work for some style properties, too.

See, the test page for changing column's background color: my test page 1

The test page for changing column's "display" property: my test page 2

It sounds very complicated. Let's try to construct a text box with text showing default values, it will be focused on loading and it will be vanished when the form is submitted.

1. In order to memorized the default text to differentiate if the user have modified the textbox or not, the default value should not store in the value attribute of the text box. In this case, I choose the rel property as an example.

2. If the user simply press the delete button, that's the same case as if the user input nothing. It's better to display the default value again.

3. Different colour showing default value show be more user friendly, since it alert the user that he hasn't input anything.

4. The form containing the input box should be added with an automatic script for clearing the content of the text box on submit.

5. I've used the class name "jqy-DefaultText" as illustration.

6. For fast development, allow me to use the jQuery library. Actual this code can be written without any library.

I've added all this to the following code:

I've put it online at here

Eric Pascarello wrote:I did not feel like messing with reg exp when I wrote it.


Yes, Regular Expression make code less "readability". I wonder which code will run faster, using split or using regex, any clue? Maybe I do the benchmark test later.
Another example:
See if the following function can help you: