![]() |
Need Help With a Small Javascript Project
I am working on a small Javascript based project for someone, but I have come to a standstill. I need to find a way to add a scroll bar to my output boxes. I borrowed my output box function from my old JS teacher(And before anyone asks, I didn't steal it. He let me use it.), so I don't really how to mold it. It would help if I was better in this language, but I only had basic JS training. Any and all help is much appreciated.
Code:
function Createoutput(name, width, height) { |
Try
Code:
function Createoutput(name, width, height) { |
Awesome! I can't thank you enough for that!
|
This is just a SWAG about what you are trying to do ...
Code:
<!DOCTYPE html> |
thanks for your help. i need this js also.:D
|
Thanks for the help guys, I really needed to figure that out. But now I have a new problem.
Code:
function Write(output, text) { |
I'm not sure why you would want to use an associated array for this task
instead of just a normal array. There is more to be gained using a normal array than trying to bypass the element reference. But if you really must accomplish this task, you could do this, but it is not the most efficient way to do it. Code:
<!DOCTYPE html> |
Well, I'm not a JavaScript genius. I only had a couple of semesters worth of basic JS in high school, so I was trying to use what I know. I guess that I should brush up on some other methods though... Thanks for the help!
|
Same idea, different execution ...
Code:
<!DOCTYPE html> |
Quote:
from http://es5.github.com/x11.html#x11.1.5 PropertyName : IdentifierName StringLiteral NumericLiteral so Code:
|
I really appreciate all of the help you guys have been giving me. I know that I have been asking for a lot of help, but this project was a bit harder than I anticipated. Now, is it possible to identify part of an input, rather that all of it? Also, is it possible to make the scrollbar I asked about above auto-scroll?
|
Quote:
What part of what input do you want to identify? What are you trying to do with the scrollbar? Can you be more specific? :confused: |
Quote:
|
Oh by the way, I'm sure you wanna know what I'm making. I'm working on a Text Game for someone. I'm not sure if that's relevant, but I hope explains my awkward requests
|
Quote:
Continuously scroll down to bottom? Then what? Stop? Scroll back to the top? Jump back to the top? What does the scrolling display contain? How big is the area to be scrolled? Does the scrolling action ever stop? The second part of splitting the input is possible. The following will split the string input into two elements of an array. You could test for either with: if (words[0] == ?????) { foundAction(); } else { notfoundAction(); } Code:
var words = 'eat watermelon'.split(' ');What is to be executed when the identified words are found. What have you coded so far? Even if the game does not work, you could at least provide the layout and a general idea of the play. Need more information to be able to respond with a coherent voice. :confused: |
| All times are GMT +1. The time now is 05:48 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.