squalleh
inherit
-148259
0
Dec 2, 2024 15:29:09 GMT -8
squalleh
0
January 1970
GUEST
|
Post by squalleh on Jun 28, 2005 3:31:07 GMT -8
No, you just made it do a completely different thing. The script before outputted "21", you just make it output "test". You didn't fix it at all <script type="text/javascript"> <!--
var iTest = 21; document.write (iTest);
//--> </script>
That's the script, fixed. Proper variable (i for integer), plus the proper HTML tags for it to be embedded into a document. There is no 'proper' standard for naming variables. Stop trying to push your coding preferences on us Google Search: proper javascript variable names pulls up absolutely nothing about naming integer variables with i's. And if i is for integer then why do you use it in iTD? Table cells are not integers. When you define iTD as a document.getElementsByTagName () you're returned an array-based integer on how many tags were found in the document. So yes it is an integer
Variable-naming isn't specific to one language. It's a very general concept.
|
|
inherit
The Jedi Master of Proboards PBS Oscars: Most Unique
6777
0
Nov 19, 2012 0:15:08 GMT -8
Tommy Huynh
Coffee isn't my cup of tea.
19,374
January 2003
swg2
|
Post by Tommy Huynh on Jun 28, 2005 9:02:39 GMT -8
I think the only language that you have to declare variable types is C++ and java?
I don't know, but I know it's for sure those two languages at least.
|
|
inherit
38464
0
Jun 8, 2007 12:03:04 GMT -8
[HkK Rly]
1,742
March 2005
maddenking2
|
Post by [HkK Rly] on Jun 28, 2005 13:14:43 GMT -8
I fixed it more No, you just made it do a completely different thing. The script before outputted "21", you just make it output "test". You didn't fix it at all <script type="text/javascript"> <!--
var iTest = 21; document.write (iTest);
//--> </script>
That's the script, fixed. Proper variable (i for integer), plus the proper HTML tags for it to be embedded into a document. Thats the way I always do it and it works? I put everything in the document.write() in single quotes. I don't change the variable name to some integer crap var BlahBlah = "blah"; document.write('BlahBlah'); Easily works for me. No integer stuff in there.
|
|
inherit
22517
0
Apr 30, 2009 18:49:13 GMT -8
Bradley
Has a new webhost. :) Needs to transfer a lot of stuff. :-/
5,246
April 2004
ccworldwebmaster
|
Post by Bradley on Jun 28, 2005 14:38:05 GMT -8
Proficient:- XHTML 1.1
- CSS 2.1
- ASP.NET 1.1 w/ VB.NET 1.1 Codebehind
- VB.NET 1.1
- Javascript
- XML
Some Knoweldge:- XPath (the kind used in .NET)
- C++
- ASP
- VBScript
- C#
|
|
inherit
39088
0
Apr 21, 2008 12:12:45 GMT -8
Lou
1,257
March 2005
lou
|
Post by Lou on Jun 28, 2005 21:23:05 GMT -8
For me:
Html CSS PHP(some) Javascript XHTML(some)
That is about it. I am trying to learn more.
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Jun 28, 2005 22:56:44 GMT -8
No, you just made it do a completely different thing. The script before outputted "21", you just make it output "test". You didn't fix it at all <script type="text/javascript"> <!--
var iTest = 21; document.write (iTest);
//--> </script>
That's the script, fixed. Proper variable (i for integer), plus the proper HTML tags for it to be embedded into a document. Thats the way I always do it and it works? I put everything in the document.write() in single quotes. I don't change the variable name to some integer crap var BlahBlah = "blah"; document.write('BlahBlah'); Easily works for me. No integer stuff in there. That will output "BlahBlah" and not "blah". Try it: var BlahBlah="blah"; document.write('BlahBlah');Did anyone else know you could use tags to execute javascript on the click of any text link?
close windowfreakin cool... When you define iTD as a document.getElementsByTagName () you're returned an array-based integer on how many tags were found in the document. So yes it is an integer An array is not an integer. The length property of the array is an integer, but not the array itself. var td=document.getElementsByTagName("td"); var iThisIsAnIntegerVariable=td.length;
|
|
squalleh
inherit
-148265
0
Dec 2, 2024 15:29:09 GMT -8
squalleh
0
January 1970
GUEST
|
Post by squalleh on Jun 29, 2005 6:50:28 GMT -8
When you define iTD as a document.getElementsByTagName () you're returned an array-based integer on how many tags were found in the document. So yes it is an integer An array is not an integer. The length property of the array is an integer, but not the array itself. var td=document.getElementsByTagName("td"); var iThisIsAnIntegerVariable=td.length;So now you want to talk Data Structures, eh? An array is indexed by integers. When you assign an array to a variable you're assigning the indexes and the values to the array. To access the array you must then put into it the integer index. So, from all points of view, you're using the variable as an integer while outputting a string/element. I probably should've mentioned before that if you want to be real technical you'd use a letter for arrays all together. So: aTD = document.get.....That's because Arrays are their own Data Types. Arrays in and of themselves are not integer, string, long, boolean, short, double, anything but Array. However, as I mentioned before, most call them by an Integer because that's how you access the values. The keys (indexes) are integers. Unless we're talking Associative Arrays, as those are accessed by strings. But, getElementsByTagName doesn't return a Hash (another term for Associative Array).
|
|
inherit
EXOH
27575
0
Nov 12, 2007 22:40:30 GMT -8
J. Meeter
i do my crosswords in pen
8,249
July 2004
modernxxromance
|
Post by J. Meeter on Jun 29, 2005 8:20:42 GMT -8
Does anyone else here know ColdFusion?
|
|
inherit
9767
0
Jun 29, 2005 10:58:22 GMT -8
Michael2003
523
May 2003
michael20032
|
Post by Michael2003 on Jun 29, 2005 8:58:17 GMT -8
I fixed it more No, you just made it do a completely different thing. The script before outputted "21", you just make it output "test". You didn't fix it at all <script type="text/javascript"> <!--
var iTest = 21; document.write (iTest);
//--> </script>
That's the script, fixed. Proper variable (i for integer), plus the proper HTML tags for it to be embedded into a document. Yours is different too. You've assumed it was going in an HTML document (not an XHTML one though since you have no guarantee that would be run then). Variable-naming isn't specific to one language. It's a very general concept. The keyword here is concept. There is no one correct way to name variable like you implied. There is only a correct way when the people writing the code decide on one, and it is still because of things like personal preference. There are many disadvantages of Hungarian notation, and trying to force it on people without explaining the disadvantages is a decent thing to do. An array is not an integer. The length property of the array is an integer, but not the array itself. var td=document.getElementsByTagName("td"); var iThisIsAnIntegerVariable=td.length;So now you want to talk Data Structures, eh? An array is indexed by integers. When you assign an array to a variable you're assigning the indexes and the values to the array. To access the array you must then put into it the integer index. So, from all points of view, you're using the variable as an integer while outputting a string/element. I probably should've mentioned before that if you want to be real technical you'd use a letter for arrays all together. So: aTD = document.get.....That's because Arrays are their own Data Types. Arrays in and of themselves are not integer, string, long, boolean, short, double, anything but Array. However, as I mentioned before, most call them by an Integer because that's how you access the values. The keys (indexes) are integers. Unless we're talking Associative Arrays, as those are accessed by strings. But, getElementsByTagName doesn't return a Hash (another term for Associative Array). getElementsByTagName doesn't return an array anyway, so I don't see how talking about them will help you with your "proper variable naming" argument, since it's not even how the Hungarian notation you seem to want to use is supposed to be done. Hungarian notation is only any good when the prefix describes the actual datatype. If you use anything else it is even worse than normal. ***RANDOM*** i know no languages, i only know parts of languages for what i need. hell i cant even get simple var test=21 document.write(test); To work lol i suck That is correct code. Everyone who was "correcting" it needs to be aware of the disctinction between correct and preferable.
|
|
inherit
38464
0
Jun 8, 2007 12:03:04 GMT -8
[HkK Rly]
1,742
March 2005
maddenking2
|
Post by [HkK Rly] on Jun 29, 2005 13:13:16 GMT -8
Thats the way I always do it and it works? I put everything in the document.write() in single quotes. I don't change the variable name to some integer crap var BlahBlah = "blah"; document.write('BlahBlah'); Easily works for me. No integer stuff in there. That will output "BlahBlah" and not "blah". Try it: var BlahBlah="blah"; document.write('BlahBlah');Did anyone else know you could use tags to execute javascript on the click of any text link?
close windowfreakin cool... When you define iTD as a document.getElementsByTagName () you're returned an array-based integer on how many tags were found in the document. So yes it is an integer An array is not an integer. The length property of the array is an integer, but not the array itself. var td=document.getElementsByTagName("td"); var iThisIsAnIntegerVariable=td.length;Oh. Well that sucks
|
|
inherit
29687
0
Dec 11, 2006 0:27:09 GMT -8
Legendary SSJ Goku
The Legendary Strength revealed...
450
August 2004
lssjg
|
Post by Legendary SSJ Goku on Aug 2, 2005 1:12:19 GMT -8
I didn't know that.... it's cool... I know.... HTML - very simple, first thing i knew XHTML - just the correct way to write HTML with a few lines at the start basically PHP - i'm learning mySQL - i'm learning JS - i'm learning CSS - Very basic and my fav friend when updating stuff C++ - I'm learning Java - I'm learning If i know something that i havent put then... you can just presume i don't know it,... or i forgot! Anyway.... i'm probebly also going to learn Delphi - because at my school if you do the programming course, you do half a year on web pages... so basically JS, XHTML, (it ends up as HTML, because everyone mucks it up), and then we start PHP and mySQL... then 2nd half if the year you learn the other stuff (i don't know what there called), and you start with Delphi, but if you know it well then you can start Java or C++, or if you know Java or C++ prety well you do that, but if you know lots of Java or C++ you have to learn Delphi...... Bacl and BackAnd that should send you backwards.......
|
|
inherit
53203
0
Nov 21, 2005 17:11:41 GMT -8
pippinoftook
My king will return.
109
August 2005
pippinoftook
|
Post by pippinoftook on Aug 2, 2005 10:39:17 GMT -8
okay I feel really out of place here... I know...
HTML a little but not enough to use BASIC, C, C++ am learning XHTML, CSS, Java, Javascript...
I really need help...
|
|
inherit
29687
0
Dec 11, 2006 0:27:09 GMT -8
Legendary SSJ Goku
The Legendary Strength revealed...
450
August 2004
lssjg
|
Post by Legendary SSJ Goku on Aug 2, 2005 22:45:12 GMT -8
Ok.,.. HTML... start with that.. you know it,.,... good... XHTML - go to www.w3schools.com to learn it, all it is, is a line at the top and the correct way top write HTML... bawsically..... but just go to w3schools NOW YOU HAVE A CHOICE.... 1. Go on to Java or C++ or something like that 2. Go on to make better pages with member systems, dynamic stuff, etc... If you choose 1.... go search some sites.... i can't remember any now.. If you choose 2.... learn JS (Javascript [not java]), and then decided on two things, 1, flatfiles or mySQL for a database to learn 1st.... 2nd thing is PHP or Perl to learn 1st,... i think that mySQL and PHP are better.... but anyway, this is where w3schools suck... don't bother with PHP there, go search "php learn" without the " and " on www.google.com and enjoy
|
|
inherit
53203
0
Nov 21, 2005 17:11:41 GMT -8
pippinoftook
My king will return.
109
August 2005
pippinoftook
|
Post by pippinoftook on Aug 3, 2005 4:07:47 GMT -8
I need help with the CSS XHTML and Javascript
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Aug 3, 2005 15:04:42 GMT -8
I need help with the CSS XHTML and Javascript Then start a new thread instead of hijacking. This thread is about languages you know, not languages you need help with.
|
|