Reputation: 0 Apprentice
- Active Members
- Active Posts:
- 62 (0.04 per day)
- 15-November 09
- Profile Views:
- Last Active:
- Apr 16 2013 03:32 AM
- Who Cares
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 14 Feb 2013Yeah, I wrote this code and I know each part of it. The only problem being that it loops through each line of a text file and it doesn't stop for the line where fileUser and result2 are the same.
How do I know that? Well, I already said that I tested it by printing it to a file (fileUser variable) and it outputted the first word of the last line. So this should already be a proof that it loops through all lines and assigns the fileUser variable, each loop, the first word of each line of the text file.
Would you consider using the break or continue commands? I don't really think they'd help, but then again...
Posted 14 Feb 2013
Quotethe result2 == fileUser is never true! How come?
013 if (result2 == fileUser)
When you put a breakpoint on this line and look at the actual values of these two variables at run time, what are the values? Can you show us a screenshot of your IDE showing these values?
My first guess is the cases don't match. fred.txt != FRED.txt
OK, here's the screenshot.
Click on the image when you open the link for higher resolution and clarity.
Anyway,notice that this may not be the final value of fileUser variable, because the 'if' condition is located inside the while loop, and so fileUser's value constantly changes each time it loops.
I even once tested the value of fileUser by outputting it to a text file, and after a full execution of a program, it showed me the first word of the last line! The word USERNAME that you see is the first word of the first line, which is a header line. The second line contains boris90 as a first word and some other info, too.
I think I know what's the problem, but I just need the opinion and a solution suggestion.
I think it goes through each line and somehow extracts the first words, but it doesn't stop when it should show the message, but rather continues through every other line...
Posted 5 Nov 2012Yeah, if someone else could help me, that'd be great.
Posted 5 Nov 2012Won't work. Tried putting the absolute path (from C:\), but the images still don't show up.
I tried placing the EXACT same code back in the original HTML page, and they show up normally. And both the original and the external page are in the same directory.
Posted 3 Nov 2012Hello there,
I can think of one way to achieve a page reload while maintaining scroll position, but it is tacky and not something I suggest, so I shall leave that out for now.
What I think you would be more suited looking at is the ability to hide the popup, which is very simple! I assume the popup has the id popup.
Thanks anyway, I think I solved it!
In the draggableLayer.js file, I made the following changes (marked with bold).
What this part of code actually does is that is simply does not do anything at all! For a certain object, it returns nothing, as I understand, because we haven't added what it should return).
I noticed that if I had the poziv part instead of what I have now in bold, the browser actually just opens the page we were on before, but now it just closes the popup window and does nothing.
- Member Title:
- D.I.C Head
- 23 years old
- November 8, 1990
- Belgrade, Serbia
- Video games, music composition, programming, TV
- Full Name:
- Boris Jakovljević
- Years Programming:
- Programming Languages:
- Pascal, Java, C++, HTML, CSS
boris90 hasn't added any friends yet.