Win a copy of Microservices in Action this week in the Web Services forum!

John Morgan

Ranch Hand
+ Follow
since Jul 31, 2014
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
8
Received in last 30 days
0
Total given
26
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Morgan

Is anyone willing to point me to a tutorial on how to select a whole row in a table and put up a complete detail page....

i.e. an address book that has the first and last name and the city/state they live in is what is on the table. Clicking on any line with bring up a detail page with complete address, DOB, notes, phone numbers etc.

Thanks in advance.
I have the bootstrap extension installed in VS code but I would like it to automatically be installed and running in any new project I create.  Has anyone found a way to do this or do I need to keep manually adding it to my project at createion?

TIA
I know there are other ways to do this (i.e. just using if statements) however I wanted to work on while loops in javascript and this seemed like a simple project to do the count down. The idea is to put a user interaction in the while loop instead of just having it run for a count down and such. This was just for my own knowledge and I know there are lots of other and better ways to accomplish what I want in the program, but not learning what I am trying to figure out (user interaction in a while loop).

Bear Bibeault wrote:OK, I'll ask the question one more time, so please think about it a bit:

Why is the loop there in the first place?

Yup, I got that far, the loop is there to keep the count of the number of guesses and the high and low. I think I need to add the checkGuess inside the while loop but I am not sure who I could do that, and if I recall the function again I will reinitialize all the variables.

Bear Bibeault wrote:Your click handler checks the answer by going into a loop. If the answer is wrong, how does the user get a chance to enter another guess?

Hint: ponder on why the loop is there in the first place.

I am trying to work on a simple HTML program with javascript that has the user guess a number between 1-100 and then tries to narrow down the number until they get it correct

1.e.
Random number is 27
guess #1 = 50 ... next guess is 1-50
guess #2 = 25 ... next guess is 25-50
guess #3 = 37 ... next guess is 25-37
and so on... but I get caught in an infinite loop and I am not sure why... any suggestions?
Bear, first and foremost I want to thank you. I had not gotten to the includes as part of my learning and it also solved a couple other problems I was trying to figure out.

I am still unsure of the script I need to add the include into a specific div, but I am at least on the right track. Once I get that figured out I will post the code here so others can learn from it also.
To answer your other questions

1) I will research putting fragments into a JSP. The last time I did anything like this I used frames to put content into the correct place.
2) This is a work proof of concept that I am working on. Right now we have developers doing data entry and I want to get away from that and have developers actually develop software. At the same time I am teaching myself Java, HTML 5 and CSS.
3) I will look more into some jQuery tutorials... It could be that I have been looking at the with the wrong way of developing it due to my lack of knowledge.
4) Using the developer tools in FireFox and Chrome were ways that I actually got what I was looking for to this point, but some of it is still sanskrit to me. (I actually understand a very little bit of greek)

Learning is not a path but a never ending journey - me

Bear Bibeault wrote:So, that all said, where in your CSS is the code that you think should be causing the div to stretch the height of the available space?



Sorry did not realize that it was not in the one I pasted (I had been trying different methods so I kept my base one aside so I would not lose what I had already done.

Bear Bibeault wrote:First a couple of questions:

  • Why are you creating elements in script rather than in the HTML? I assume there's a reason, but it is not stated here and may be important for context.

  • This is the only way I could find to pull a JSP page into a div. If there is a better way please let me know, I do not mind doing the research but I only know what I know.  

    Bear Bibeault wrote:

  • Is this a school project in which the technologies you are allowed to use is limited?

  • Yes, technologies are limited by the equipment and software in use. Must be compatible with IE9 (managed to dodge out of IE8)

    Bear Bibeault wrote:

  • If not, why aren't you doing all this with jQuery?

  • I am not familiar with using jQuery for just pulling text into a div. I will look into this more.

    Bear Bibeault wrote:

  • You are using let which presupposes that this is limited to modern browsers. So why not use modern CSS techniques such as flex and grid?

  • Again, this is code that I found on the internet and it seemed to work fine, except for the lack of the filling the div.
    This shows what I am talking about... should fill the whole area with the appropriate colors (grey for the menu, light blue for the content).

    I have a standard 4 panel webpage... Header, Footer, Menu (on left), main content. The content gets filled based on the selection of the menu bar but for some reason the the main content area does not fill all the way and I get scroll bars in the content.

    I have tried everything I could think of and anything that is on the internet (CSS position, height (both % and vh), etc) but for some reason only a small area of the main content is filled.  Any suggestions on how to fix this?

    jsp code for menu option:


    jsp code for content div:


    JavaScript Code


    CSS Code:


    Just not sure why the content is not filling the whole div.
    Those work for aligning a full element but I am trying to align based on the left side of the input box with the labels being variable lengths.

    label: [.....]
      lbl: [..........]
      id: [......]

    (this is hard to do with this but ultimately it needs to align on the [ for each row)
    Thank you for that information. Now I just need to figure out how to align on the left side of the input field and right align the labels.
    I am trying to align 3 rows of 3 element vertically without using a table. What I am trying to accomplish is something like this

    label [.........]  label [.....]      label [.....]
    label [.....]      label [.........]  label [.....]
    label [.....]      label [......]     label [.........]

    Any suggestions with just HTML and CSS?
    Sorry for the delay in responding... What I am trying to accomplish is when a user clicks on a hyperlink MS Excel opens with a specific spreadsheet.  This is a function that is working in most of our applications (both excel and word opening up) but anything that I try seems to be blocked from opening up the applications. This seems to be as a result of new security that has been put into modern browsers but as applications are being turned into web apps I am trying to find the best solution to address this.