Kevin manoj

Ranch Hand
+ Follow
since Jul 19, 2002
Merit badge: grant badges
For More
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 Kevin manoj

I have a need to compare an URL parameter value with some HTML values which come from a data repository. The problem is the special characters, such as ü, á, <, ´

the sample URL:Über%20%2020

The value from DB is "Über 20".

In essence, they are equal strings. But How can I get the correct comparison result by using some java methods?

Thanks in advance
15 years ago
We have a page which have several tabs on. It is implemented by JQueryUI. All the tab contents are loaded when page is loaded. And tab switch is implemented by show/hide of correspondent tab contents.

now we want to implement: Only load selected tab content when page is loaded. When user switch the tab, the tab content will be loaded from server by an Ajax call. The reason we do this is to shorten the initial page load time and make google crawler index/capture our tab content.

Is there an Ajax libraries that can be used to implement the approach above?

Thanks in advance.
I figure it out. It is a stupid error.

It seems that tabs('select', index) only accept integer as the type of parameter index. SO i made following change and it works.

$(".wirelessPlansTabs > .tabs").tabs('select', parseInt(tabIndex));

And this makes me really confused. Because in RSH's listener, I use following code :
function historyChange(newLocation, historyData)
$(".wirelessPlansTabs .tabs").tabs();
$(".wirelessPlansTabs .tabs").tabs("select", newLocation*1);
it works fine. but it does not work with parseInt().

I used RSH to implement the in-page switch. RSH works fine with the browser "back" button

But when I navigate away and come back by using the browser "back" button, it always go back to the first tab even though the URL is correct: For this example, I expect it will go back to the fourth tab ( tab index start from 0).

I use following code:

As can be seen from the code above, I retrieved the hashed value ( the tab index in this case) from the URL, and select the tab mandatorily. It still does not work: given the sample URL above, it always go to the third tab ( Tab index == 2).

Any idea?

I have a page which implement the tabs by JQUERY. Thanks to Javaranch, I add in-page navigation by RSH. The same code works fine in FF3. But in IE6, it has some tab rendering problem: all the tab contents are showed up on page, not "show one tab and hide all the others".

I guess the problem is caused by RSH: because of the RSH javascript error, the jQUERY can not render the tabs propertly. Only thing I can think of is the location of blank.html. I deployed it with rsh.js. I am using weblogic portal and JSP file reside in applicaiton server and javascript file is located on web server.

Is there anyone who has the same problem like me? Any clue is appreciated.

Thanks in advance

Thanks to your suggestion, I implemented the in-page tab navigation by using Method 1.

Now the only problem left is: when users click some link on the page and leave, and then they click browser back button, page always show the first tab, not the tab they stay before they leave. I checked URL, it seems that the current tab index is remembered( the number after #) .

The URL format is as follow:

I do not know why it does not show tab2 to customers. Anyone has a clue?

if I paste it into address bar and hit return, it works: Tab2 is shown up to clients.
I have a page which contains several tabs. Tabs are implemented by CSS and Javascript. All the tab contents are loaded when page is loaded. And Javascript code is used to show/hide related tabs. Tab switch does not cause page refresh and does not change the URL in the address bar.

My problem now is how to make browser history remember the tab selected: when user click the browser back button, it will go back to the previous tab selected, not the previous page. And the solution should not cause page refresh or add new URL parameters.

I know Facebook photo album implemented such feature.

Thanks in advance

I have a table which have 3 columns. The first column is the holder for image (img tag), second column is always space ( ); and the third column is a text link.

I use this table to align the image and text link.

One weird thing is in some lines, td just wrap image well with no margins, no spacing and no padding. But for some other table lines, td is always 10 pixels wider than image width which causes the button alignment issue.

To solve this problem, i create a CSS rule as follow:

td { max-width:20px; width:20px}

20px is the width of the image. This rule works in FireFox3, but does not work for IE6.

Can anyone give me some clues about how to resolve the problem?

Thanks in advance
In order to validate the URL parameters, I created an String array in JSP. Only values in the array are allowed.

My problem is when strings contain some french character, equals method does not work.

For example:
strParameter = (String)request.getParameter("AAA");
String[] strArray= {"BBB", "Mobilit�","CCC" ... };

if strParameter is "Mobilit�", the weird thing is that when I use following code to search the match in array:

for (int i=0; i<strArray.length; i++){
if (strParameter.equals(strArray[i])

the code does not work.

I print out the bytes (UTF-8):
strParameter : 77 111 98 105 108 105 116 -61 -87
strArray[1] : 77 111 98 105 108 105 116 -17 -65 -67

The only difference is the character �. It may be encoded in different character set.

My question is how to define the string(Mobilit�) in an array to make it match the URL parameter ?

15 years ago
Every time I submit a search request to a search engine, the response is returned in xml format. In XML response, it contains the count of search results returned and search results.

In JSP, i need to develop a pagination logic. I need to know the number of search results returned. But it is in xml. Is there a simple way to get the value from xml response. DOM?SAX?

Thanks in advance
In IE7, when IFrame appears as a blank box, it shows what we want it to show after we click "refresh".

Does that mean IFrame has a timeout issue?

Help me!!!
I have a page. It works perfect in firefox2. But in IE7, sometimes it works fine and sometimes it just show me a blank box.

I embeded a jsp file in <IFRAME> tag.

My guess is: Depending on server workload, it takes various time for the embeded jsp to do its job. It will render itself correctly if not timeout. And it will show me a blank box when timeout.

My question is: Is my guess correct? And solution?
No, I mean at the end of JSP file, I need write some JSP code to analyze the output of the JSP.
16 years ago
I have a JSP. At the end of the JSP, I hope I can access the HTML code generated of the JSP. Is it possible?

Thanks in advance
16 years ago
I have read that info on w3school before I submitted the message. But still do not understand the statement.

For those 4 parameters: 600,450,200,200. I think it specify left/top/width/height. But which number is for height?

I rewrote the code as 'width=600,height=450,lef=200,top=200' ad tested it. It does not open a pop up window as before