Frankey James

Ranch Hand
+ Follow
since Sep 27, 2008
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 Frankey James

elie haddad wrote:Dear All,

I need to know if the browser has the enable cookies option set to true or false using JSP or javascript.


Elie Haddad

Have you looked into the java Request object? That might have the functionality needed. Otherwise check here(random search):

Bear Bibeault wrote:

Frankey James wrote:and use AJAX to append the HTML needed in the created DIV container.

Huh, why does Ajax need to be involved? Ajax is not necessary to dynamically create new elements in the DOM.

true - i guess i thought he would be reading data from a file, but i misunderstood.

so then:
create a DIV element and assign it an ID where you want the box(es) to appear. use onclick event in ADD button and use AJAX to append the HTML needed in the created DIV container. "

of course there are other ways.

Abubacker Siddik wrote:Hi all,

I have a requirement to add text boxes in my web page when the user clicks a Button. I explain this very clearly. I have a text box to get "skill of an user". By defaut four text boxes have been given and at the end submit button is given. I have put another button called ADD next to submit button. If user wants to add extra skills, he must click the add button and then a new textbox should appear after the last text box entered. How to do using javascript?

create a DIV element and assign it an ID where you want the box(es) to appear. use onclick event in ADD button and use AJAX to append the HTML needed in the created DIV container.

Rob Hunter wrote:I'm trying to use table-fixed in 2 separate tables - 1 will serve as a column header and the other will be scrollable for the data. When I try displaying some data in the second table the text inside the cell gets cut off (the text I'm referring to is a constant string with no spaces). For example, the strings look something like this 0X00202-102-12990001, fairly long text and the td cells have a small width due to the number of other columns in the table. Is there a way for me to force this string to wrap by setting some property or using some other technique? Thanks.

i can't think of how to get it to wrap, but perhaps you can allow a scroll bar.

Bear Bibeault wrote:Have a separate page with links to the images?

Actually, this is a good idea. See, at first I didn't have to worry about non-JS users, except SEO issues, because 'everyone has JS enabled'. But this is not the case now. Anyways, talking out loud... I also didn't want to create 'extra' pages. For now I'm going to just wrap the content in a noscript and wait to get indexed again. I may use your suggestion later, though. I have multipe lnaguages to support for all these pages with dozens of images for some of the pages. The images are the same for all languages, though, so I could defininately use your idea if needed.


If I kill the page in a robots.txt, yet have it linked to my real pages, will the page still be spidered via traversing the link? I wouldn't want these html pages indexed in google, is what I'm getting at.

Bear Bibeault wrote:Google will not only ignore text-areas, it will most likely ignore any non-displayed areas.

Moreover, they frown severely upon "tricks" and your page rank will plummet if they think you are trying to game the system.

Do you have any specific suggestions for the problem statement (many large pictures) I described? I can simply replace the <textarea> with <noscript>, but human readers with JS disabled would get too many pictures/delay, therefore my use of textarea. The noscript is fine for a spider, however.

Eric Pascarello wrote:Develop pages to work with JavaScript disabled?


Are you suggesting using a <noscript/>?

(1) - Say for a page I have 50+ 200kb images. Would this still be a good idea/practice to load all these images when JS is disabled?

(2) - I'll tell you all what I did. I simply extracted all my data into elements and placed them in a TextArea so that the is interpreted as text and not rendered as HTML(picture doesn't load then). I then did a display:none; on the parent container holding these elements. This allows the content to be spidered; however, for human non-JS enabled broswers, users simply won't get any images and won't see the TextArea content....or I could just load a few pics in a <noscript/>. The latter part is what I'm leaning toward now....

The problem with the second way, the way I decided to do it (except the few pics by default), is that it doesn't appear my data within the TextArea is getting spidered. Does google ignore TextArea? I've seen many say no, but it's been a month and normally it only takes a week for my data to get into the indexes. Since this change, other content has made it in google indexes as well. Perhaps I'm being iimpatient? Perhaps google doesn't read TextArea? Perhaps it is somehow interpreting my CSS and seeing the parent container is set to deiplay:none? Perhaps #2 is a bad idea and I should be doing #1?
So here's how I have things:
- I have a DIV container that I AJAX by inserting a picture on page load. This data is read from an XML file that contains lots of other picture data(paths, desceriptions, etc).
- A user clicks a next/previous arrow and the next/previous element in the XML file is read and the new picture data is updated/Ajaxed in the DIV container.
- I have many large pictures that relate to a single page

I'm sure we've all seen a sort of image rotator....that uses AJAX so no post pack on the server.

Well, search engines don't like AJAX as they don't run the Javascript, for obvious reasons.

What is the best way to get around this? I'd like to see if someone else has had to deal with this and what they did....
So I finally nailed this thing! I got the 70-528 back in January.

How I did it....
I used the MS Press book for the 70-536 (isbn: 0-7356-2277-9 ). I studied for about 3 months, reading the book 3 times. I took MANY practice tests with the software provided by the book. it should be noted that I've written several smaller programs and have professionally worked in c# over the last 15 months.

This was a tough exam in the sense that the questions are often bloated (keeps from memorization) as are the answers. There were many questions related to collections, application domains, application security, serialization, and application configuration settings -- the things you may not be most familiar with. Not very many easy questions like what's the range for int, uint, etc, like you might find in the scjp/scja.

Anyways, that's probably not too informative, but I wanted a place to post my pass anyhow. So I'm now MCTS in web-dev 2.0!!!
thanks for the responses everyone. i read them several days ago, but i'm not allowed to post from work and i've not much time at home lately.

13 years ago

John de Michele wrote:Frankey,

I would argue that in your second example, the method should have been named reverse() or reverseString(). Then you wouldn't need a separate comment on what the code is doing. That's what is called self-documenting code.

As for my documentation, my work doesn't have rules requiring me to document my code. However, since I actually want other people to be able to use it, I always use a combination of javadocs and self-documenting code. I very rarely use internal comments, because I try to make my code as clear as possible so that someone who is familiar with the language I'm coding in, or even a reasonably experienced programmer who doesn't know the language, would know what was going on.


That code is not mine. It's from the first link Jesper provided. Still, I see your point. I think the author was just using that as a quick and dirty example to show that in situations that aren't obvious a little tip for your fellow human can go a long way.

'self-documenting'...I like that. By internal comments, do you mean internal to a mehtod or to a class? The latter meaning you rarely comment your code? What if your code is partially implemented and the 'other' person is to fnish the business. Do you still have JavaDocs for that, or do you do the JavaDocs when you think are done with the code?
13 years ago
Jesper, in the first link you provide they have a cod sample:

and then the author says "Indeed. It's not hard at all. Code can only tell you how the program works; comments can tell you why it works. Try not to shortchange your fellow developers in either area "

This I absolutely agree with! We dont' have comments on methods, class declerations, tricky blocks inside mehtods - just nearly nothing. My lead went to school as an EE and aside from some c it's my understanding he didn't take any traditional CS courses. Now I know it's not practical to comment every line like they want in class, but I find not commenting at all or almost at all unprofessional. Furthermore, JavaDocs provide documentation after all the code is done. WE won't have any sort of thing like this. What's worse, is we don't have any pre-documentation either. It's just a hack n' go sort of thing if you ask me. This is my first job as a programmer, but in a limited fashion I've worked iwth other programmers at other companies and their code usually had comments in them. So, this is why ask what others are doing.

Anyways, that's my rant. I guess I just think I shouldn't have to figure something out that someone else already has. At least not completely all over again. It's just a waste of company money in my opinion.
13 years ago
I don't want to hear if you program at home orhobby. I'm talking about working in a professional environment.

Does your employer require documentation? What kind? Who does this? Do you use JavaDocs? If you are an MS programmer, what do you do to document code.

I'd like to see what goes on in other shops. My boss/lead programmer seems to think commenting code is something you only do in college and makes his point by saying 'you don't need to document every line'. The reality is that almost no lines of code are documented and I find this rather annoying and unprofessional. I've always liked JavaDcos and commenting code/inline comments.

What says you?
13 years ago

Pat Farrell wrote:

Julio Cesar Marques wrote:And there is nobody talking about NetBeans IDE.

Its dead, Jim. Sun pulled most of their development engineers off before the IBM/Cisco/Oracle merger talks started. It will live on as a community project, but I expect that too few folks will bother to contribute. Sun put a lot of money into NetBeans.

I liked it better than Eclipse, but its just an IDE, not that big a deal.

This is truly sad. I think netbeans was awesome. I also don't like Eclipse. Gross.... I never even heard of JDeveloper by Oracle. What a disaster this is....

What will happen to Kathy Sierra and Bert Bates (my favorite IT-book authors)? I hope they can get on with Oracle and continue the Java education thing for them.
13 years ago

Kengkaj Sathianpantarit wrote:

Michael Tolenruc wrote:

Kengkaj Sathianpantarit wrote:

Akash Raje wrote:How will this affect certification exams ?

Oracle doesn't have similar certifications, I think there shouldn't be any affect to the existing Sun Java Certifications excepts their name are likely to be changed from Sun Certified XXX to Oracle Certified XXX.

In case of BEA Certification you can take a look at this link:

Nice link! as a follow up question for all of the guys, how about the people who already acquired/holding certification from Sun? Can we consider our certifications as Oracle certified even though we got it when still SUN owns the java?


I'm not sure, but I don't think that does matter much. People who already acquired certification from Sun were certified by Sun already, even in the near future there will be no Sun Microsystems anymore "Sun Certified XXX" still are valid.

It's like if in future somebody asks what company invented Java? The answer still is Sun Microsystems, not Oracle.

It might matter for companies that need oracle certified workers to keep some sort of relationsihp with Oracle. Cisco expires their certifications every 3 years. If a company is Oracle certified and has to keep X amount of workers on their staff to keep their special relationship, then it might matter. oracle surely grandfather in existing Sun certified individuals. So our papers will really show their age in a couple years.
13 years ago