comp500 wrote:
ssss wrote:
HTML5 won't work on 3DS
We'll have to use divs...
Yes it will, at least canvas will.
Offline
johnnydean1 wrote:
rdococ wrote:
How do we return the "row" of a textarea (it's contents)?
What are you talking about?
A row (or is it column?) is a line of contents. This is a row.
This is another row/column.
Offline
So what a user input box, and you want to get a select row?
Offline
No of rows:
oArea = document.getElementById('myTextField');
var aNewlines = oArea.value.split("\n");
var iNewlineCount = aNewlines.length();
To get a row make a function that spots the "/n" and cuts out text between them.
Offline
BTW Guys...
Massive improvement to Pokemon, now super-fast by using off-screen canvas'.
Here
Look at function 'prepTiles()' to see how its done...
Offline
johnnydean1 wrote:
So what a user input box, and you want to get a select row?
No, I want to report a line of the textarea value. For example:
Text area
Some text
...would appear as if to report line 1: Text area
...would appear as if to report line 2: Some text
Offline
rdococ wrote:
johnnydean1 wrote:
So what a user input box, and you want to get a select row?
No, I want to report a line of the textarea value. For example:
Text area
Some text...would appear as if to report line 1: Text area
...would appear as if to report line 2: Some text
Do a search for the enter key ASCII code and cut out the text.
Offline
johnnydean1 wrote:
rdococ wrote:
johnnydean1 wrote:
So what a user input box, and you want to get a select row?
No, I want to report a line of the textarea value. For example:
Text area
Some text...would appear as if to report line 1: Text area
...would appear as if to report line 2: Some textDo a search for the enter key ASCII code and cut out the text.
How?
Offline
Try this:
function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}
Untested, but worth a try.
Offline
TheSuccessor wrote:
Try this:
function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}
Untested, but worth a try.
What does the (text, line) do?
Offline
johnnydean1 wrote:
BTW Guys...
Massive improvement to Pokemon, now super-fast by using off-screen canvas'.
Here
Look at function 'prepTiles()' to see how its done...
hmm i liked the thing where u could use arrow keys to move. it seeems slower and doesn't always respond
Offline
rdococ wrote:
TheSuccessor wrote:
Try this:
function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}
Untested, but worth a try.What does the (text, line) do?
Offline
rdococ wrote:
rdococ wrote:
TheSuccessor wrote:
Try this:
function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}
Untested, but worth a try.What does the (text, line) do?
It's the parameters.
for example when you call it i think u use this:
alert(getLine(text, 5));
if text is the text in the textarea, it will say line five of the text in an alert box.
Offline
comp500 wrote:
rdococ wrote:
rdococ wrote:
What does the (text, line) do?It's the parameters.
for example when you call it i think u use this:Code:
alert(getLine(text, 5));if text is the text in the textarea, it will say line five of the text in an alert box.
So you can create things like reporters in Javascript?
Offline
you have to use the variable
document.form.textarea.value
for the text param
where form is the name of the form ( <form name="whatever"> )
and text area is the name of the text area (same as above except with textarea tag).
Last edited by RUMCHEERYPOOPOO (2011-06-07 12:44:33)
Offline
oh and also guys I'm pretty good at php & js (even if I do say so myself).
So I can help you guys a bit if you want.
Offline
rdococ wrote:
comp500 wrote:
rdococ wrote:
It's the parameters.
for example when you call it i think u use this:Code:
alert(getLine(text, 5));if text is the text in the textarea, it will say line five of the text in an alert box.
So you can create things like reporters in Javascript?
Yup. use
return
Offline
RUMCHEERYPOOPOO wrote:
you have to use the variable
Code:
document.form.textarea.valuefor the text param
where form is the name of the form ( <form name="whatever"> )
and text area is the name of the text area (same as above except with textarea tag).
you don't. you can use id... or classs...
Offline
RUMCHEERYPOOPOO wrote:
oh and also guys I'm pretty good at php & js (even if I do say so myself).
So I can help you guys a bit if you want.
yay! can u help with php soon...
Offline
So is this going to be an online project or what? Playing scratch projects with portable devices, or making projects with portable devices?
Offline
I could advertise.
Offline