Click here to Skip to main content
13,287,343 members (55,602 online)

Comments by Niral Soni (Top 45 by date)

Niral Soni 3-Sep-13 10:34am View
Remove "mouseout" event from Button A and put it on Popup
Niral Soni 23-Aug-13 7:01am View
How you are saving values to database ? Is it a form submit or AJAX call ?
Niral Soni 16-Aug-13 9:02am View
'\b' switch is ANCHORS type regular expression pattern, used to match specified string is a word character and two switches across the string to carry out exact match. RegEx function match() returns the array of all matched strings. So, at the end joining them without any separator to yield required result.

To learn more on JavaScript RegEx,

Niral Soni
Niral Soni 26-Apr-13 6:54am View
I can not use them directly because they are user defined variables. Not a fixed static object.

Here, I have an Object ("autoFilter"), having two public methods ("init" and "filterTable")
The instance created (by anyone who uses this code) for this object will be used for invoking these two public methods, "manually".

In order to invoke these methods automatically (and dynamically), I must have the reference to the "user-defined" instance of the Object.

Niral Soni 25-Apr-13 11:43am View
Its not about handling events.
Its about how to bind a dynamically created string that will act as a function to be called when the event occurs.

Here, I have an Input box, KeyUP event, and a function to be called on this event. This function is created dynamically, and it requires the name of the variable used for creating the object.

"someObject" and "anyUserObject" are two such user-defined variables used for invoking the function onKeyUp event as -

Hope you got it...
Niral Soni 23-Apr-13 5:26am View
In the for loop, value of 0 <= i < happyRating.size() - 1, which means if happyRating size is 10, then i will loop from value 0 till value 8.
the if condition within for loop is actually not required (i just placed it to avoid multiple changes in your code). You can remove this if block (and no need of break statement in else block).

Anyway, i+1 < happyRating.size() is a boundary check condition to avoid any IndexOutOfBoundsException.
Niral Soni 22-Apr-13 12:17pm View
((i + 1) < happyRating.size()) instead of just i or happyRating.get(i)

Because, in your original code, happyRating.get(i - 1) could be any random value (eventhough you asked explicitly for value between 1 to 10).

Regarding the new logic -
1) the loop starts with index 0 until it reaches to 8. So that the total values accessed within the block will be in the pairs - (0,1) (1,2) (2,3) (3,4) (4,5) (5,6) (6,7) (7,8) (8,9) which covers all the indexes within happyRating arraylist
2) your x1y1 pair will be the index i + 1, and x2y2 pair will be the index i.
Niral Soni 7-Mar-13 9:16am View
And what exactly you want to achieve with this piece of code ?
Niral Soni 25-Feb-13 9:25am View
Won't it be similar to the HTML file upload component ??
Niral Soni 8-Feb-13 5:13am View
Some sample code please... We just can't provide solution without looking at your piece of code sir.
Niral Soni 1-Feb-13 10:33am View
try encoding the data using escape() or encodeURIComponent()
Niral Soni 31-Jan-13 11:34am View
I agree with what Mike has stated. It would be good if you use pagination for displaying 1000 records.
And also, try to set TABINDEX property of each textbox and see if it works.
Niral Soni 4-Jan-13 10:32am View
You can give it a try. As is mere a JavaScript that runs on client side, the actual problem will arise for maintaining the session values for different users in same browser window with different tabs.

All the best !!!
Niral Soni 2-Jan-13 6:22am View
Hi WajihaAhmed,

Below is the link for detailed description of the JavaScript code -

Niral Soni 2-Jan-13 6:21am View
Hi Eric,

Your tabber.js JavaScript is designed for displaying HTML contents only. It will require major changes to implement your requirement. I would suggest you better switch to some alternate tab view, that provides you adding a link.

If you still want to go with this one, you will need to either incorporate AJAX to load html web page for each tab, or else, you need to reload the page every time a tab is getting clicked, and also to pass the selected tab index as parameter.
Niral Soni 2-Jan-13 5:18am View
It is because when you are uploading large file, the actual upload is processed by your server. Depending upon the session timeout defined in the config files, you may receive this message - "Problem loading page ('Connection was reset')"

As far as identifying file size in JavaScript, it is achievable using the ActiveX control, but will only work in IE.
Niral Soni 2-Jan-13 5:13am View
I will be glad if you tell me the reason for such a unique requirement.
Niral Soni 31-Dec-12 7:13am View
try setting the z-index of your DIV tag to something like 5 or 10 and see if it works...
Niral Soni 27-Dec-12 8:33am View
Well, its free for development purpose as well as to translate whole website (live). But for specific translation options, its paid service.

You can also go for the Bing (Microsoft) translation service, which is free to use.
Niral Soni 27-Dec-12 6:57am View
Why don't you just make use of the Google Translate API ?
Niral Soni 21-Dec-12 8:54am View
It might be possible that both your html pages contains BODY tag (Not sure on this), and due to this you are not able to get the ID of the textarea. May be you can try removing the HTML,HEAD, BODY tags from the child page that is getting included in the main page.
Niral Soni 18-Dec-12 7:10am View
What is the agenda behind this question ? through HTML/CSS its not possible to create any shape other than rectangle/square.

You can create two different triangle images with required colors and set them as a background of div, position div elements such that your required shape gets created.

Or else, make use of CANVAS tag in HTML to achieve this.
Niral Soni 14-Dec-12 5:38am View
Niral Soni 14-Dec-12 5:19am View
No, its not possible. But you can encode your javascript function so that its not readable correctly, but still it will execute.
Niral Soni 30-Nov-12 10:26am View
When you are dealing with the dynamic web applications, there is always issues related to the search engines, how they would find contents of your website (products, categories etc). I myself have never tried to create a website publiclly accessible, but from my understanding, there are some configurations you need to made on your web server which will allow your dynamic page contents to be searchable. You also need to improve your page ranking so that your site reaches to more and more people. check this url - (

Google has provided its own configuration so that your pages can come in the search results.

Hope this helps you out...
Niral Soni 27-Nov-12 6:26am View
Could you please tell me what kind of file(plain text, CSV, XLS etc) you want to open in HTML?

I have the code to implement this, but want to confirm your requirements first.
Niral Soni 12-Nov-12 7:16am View
try interchanging the code sequence -

//create result handler
xmlHttp.onreadystatechange = X;
xmlHttp.setRequestHeader("Content-type", "application/json");
//Send HTTP request"POST", url, true);

The third parameter in indicates that you are trying to invoke asynchronous call (having value set to true). there is different interpretation of this call for mozilla. hence. the open() method should be followed by send() method.
Niral Soni 9-Nov-12 6:25am View
Reason for my vote of 5
nice trick
NIRAL SONI 31-Oct-12 11:56am View
before adding textarea data into location, just encode them using javascript function - escape() or encodeURIComponent()
NIRAL SONI 31-Oct-12 11:51am View
Add "tooltip" attribute to every option tag (rather then providing it only on the "select" tag)
NIRAL SONI 5-Sep-12 12:16pm View
are you trying to upload a plain text file or something else ?
NIRAL SONI 29-Aug-12 3:30am View
I have updated the solution, rather then clone the actual property is cloneNode.
NIRAL SONI 1-Aug-12 10:35am View
Post some sample code please...
NIRAL SONI 28-Jul-12 6:34am View
Try getElementsByTagName('img')
NIRAL SONI 8-Jul-12 5:45am View
Go for a menu.. not possible with the html SELECT tag
NIRAL SONI 30-Jun-12 8:19am View
Please elaborate your question. Your current problem statement can be interpreted as - "person is going in a Hotel asking Waiter to serve for a meal that contains Beans !!!"
NIRAL SONI 22-Feb-12 16:17pm View
The basic rule for this is to store the state of every tree node at the time of refresh (either using url parameters or localStorage concept) and to re-apply those stored values back to the treeview to expand it.

For example,
step 1) webpage opened for the first time (treeview is in collapse form)
step 2) expanding one or more treenodes (also, preseving all those nodes that are expanded)
step 3) browser is refreshed because of some user action / event (passing all the preserved values to the request so as to get it back after refresh or storing the values in cookies or localStorage)

Thanks & regards,
Niral Soni
NIRAL SONI 19-Feb-12 14:14pm View
search for the line -
col.innerHTML = es.Cells(i,j).value || ' ';

replace it with -
col.innerHTML = es.Cells(i,j).text || ' ';

Hope it will help you.

Thanks for using this.

Niral Soni
NIRAL SONI 7-Oct-11 9:29am View
try renaming the function reset to resetForm (as reset being the keyword)
NIRAL SONI 7-Sep-11 12:19pm View
Welcome !!!
NIRAL SONI 7-Sep-11 12:18pm View
Welcome !!!
NIRAL SONI 7-Sep-11 12:18pm View
My understanding of the CURSOR is that it will store the WHOLE result of the query, thereby releases the occupied resources, and the result can be processed separately.

So, if that is correct then my problem area still remains the same. Because, I was thinking of a way to display the record as soon as it matches the search pattern.

May be my thinking is wrong as the Windows Search works on the file system, while database follows the ACID properties. And hence one can not add a kind of HOOK in the database search and return the partial result.

Thanks & Regards,
Niral soni
NIRAL SONI 5-Sep-11 19:30pm View
Reason for my vote of 2
See my alternative solution below.
NIRAL SONI 2-Sep-11 11:04am View
NIRAL SONI 2-Sep-11 8:24am View
pdf viewer and the web browser are all together a separate thing.
you can never have single JavaScript which can manage both these things.

Advertise | Privacy |
Web04 | 2.8.171207.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid