Jump to content

spider_designs

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by spider_designs

  1. I know Java and Javascript are completely different. In Java you need to use methods to compare strings to return a boolean answer. In javascript do you use some type of other method? or just use "==" in an if statement? I don't know if Strings are objects in this script. I'm new to learning and understanding it. Thank you for your help.Nate :)

    == I think:)eg.if ("xxx" == "xx") {alert ('xxx')}if ("xxx" == "xxx") {alert ('xx')}spider
  2. <html><head><script type="text/javascript">const nochange='This should always be the same';function writeIt () {	document.writeln (nochange);}</script></head><body><input type="button" onclick="writeIt()" value="Write"></body></html>

    how come any time I add a const statement to a script I get an error at the line of the const statement? also functions called from an event eg onload="test()" return an object expected error ( even if they are not related to the const statement).Core javascript guide says:You can create a read-only, named constant with the const keyword. The syntax of a constant identifier is the same as for a variable identifier: it must start with a letter or underscore and can contain alphabetic, numeric, or underscore characters. const prefix = '212'; spider

  3. Ok ... I have been learning dhtml (js/html/css) for the past few days and what Im trying to do is create a layer that can be added to the page after it has been loaded (Currently I am only working with internet explorer)I had intended to use the <tag class="thisclass"> to format the style and <tag id="thisid"> to keep track of it through js

    var winTH = document.createElement('div');winTH.id = "win_T_Holder" + dynWinCount;//winTH.class = "ThisClass"  -- returns error even although -//<div id="win_T_Holder0" class="thisClass"> is validhtml (forgive me if its not :-) )

    so I guess my question is :- Is there any way to set class="thisClass" through javascript??btw this is my first post ever Go Easy;)Spider

×
×
  • Create New...