Jump to content

watagal

Members
  • Posts

    120
  • Joined

  • Last visited

Posts posted by watagal

  1. A class is a blueprint for an object. You can use the same blueprint (class) to create multiple objects. The class will define what properties are used to describe the object(s) and define what methods are used to interact with the object(s).Assume you create a class for cars, the properties may be the 'engine_size', 'color', 'make', and 'year' of the car. Methods may calculate the MPG based on the 'engine_size' property.Objects are self-contained black boxes, making them easy to use -- you don't have to know the inner workings of the class to use them.WG

  2. greetings,I'm trying to create an include file that contain variable definitions I use throughout my site, yet when I include this file on other pages (files) - I don't get the variables.Here's my "test.inc" file:

    <?php    $test1 = "This";    $test2 = "is a";    $test3 = "test";?>

    Next page:

    <?php include "test.inc"; ><html><head>....<body><p><?php echo $test1 $test2 $test3 ?></p></body>

    Can I do this? How?Thanks, WG

  3. // JavaScript Documentfunction showmenu(elmnt){    document.getElementById(elmnt).style.visibility="visible";}function hidemenu(elmnt){    document.getElementById(elmnt).style.visibility="hidden"}

    What do you initially set your element "elmnt" to in your HTML code? Try:
    <div id="elmnt" style="visibility:hidden">

    WG

  4. Thanks aspnetguy. I know these are stupid questions, but I've seen "bgcolor", "backgroundColor", and "background-color" used for the same thing. I'm pulling my hair out.Is there rhyme or reason to all this? Better yet, is there a reference as to when to use what where?Thanks again - done venting.WG

  5. greetings,Trying to do:

    <div id="divToc"    onmouseover="style.background-color='blue'"    onmouseout ="style.background-color='red'"    style="cursor:e-resize"></div>

    yet nothing changes. I've tried: "style.bgcolor=...", "this.style.back..." and nothing yet.Can I do this to a <div> tag or is my syntax wrong (again)?TIA,WG

  6. greetings,along the same thread of passing a function as an argument in another function, is there a way to get the name of the passed function as a string. Like:

    function wrapper(func){    alert(func.name.toString);}

    If the passed function was sayHello(), than the alert should display "sayHello".TIAWG

  7. No, I don't want to pass the returned value of a function, rather I want to pass a function name and then subsequently execute it within.The idea is to write a wrapper function for several other functions and add additional functionality.Clear as mud?WG

  8. GreetingsI'm new at all of this, so I have a general question on 'when to use' what. I'm writing a front end to a manual. The data is stored in a MySQL db. I can write a query to get the topic data from MySQL, write an XML schema, and (in the future, I hope to) write the HTML code to display it (more questions on that later). The data is pretty static, so should I regenerate the XML everytime it is called or store XMLs as they are created for future recall - or is this more complicated.I would really like to hear how others are using this.TIA,WG

  9. GreetingsWhen a user clicks the "reset" button on a form -- it restores the form elements back to their oringinal values. Yet as usual, I want it to do more - like toggle a <div> display.How can I write a wrapper or tap into the "Reset" button to do more than it's original function?TIA

  10. question to scott: wouldn't the PHP clock be more of a timestamp and a JS clock could be an ongoing (ticking) clock? just curious.To businessman: I find that JS can go a long way towards simplifying the GUI to your web page, making it less clutter - easier to navigate. Also look at AJAX, it combines JS with PHP and HTML to provide a more interactive experience for your users.WG

  11. GreetingsI want to pass the entire <input> object to the JS function to be able to access all of its properties. I can pass individual properties by specifying "this.(property)" as an argument (ie this.value, this.name, etc)my HTML code:

    <input name="txtTest" size="20" type="text" value="Test"  onfocus="testTextbox(this)">

    BTW, the above does not work.My JS code:

    function testTextbox(oTag){ alert(oTag.value); }

    But how do I pass the entire object?TIA

  12. GreetingsWith Dan's help, I've come to the conclusion that frames do not play well. Therefore, I'm converting my framesets to a single table with <div> statements defining the 'frame' areas.Now I want to load external (file) HTML code in the <div> area by setting the innerHTML in JS. Should I approach this by parsing the HTML file, forming a large string, and then set the innerHTML?As always, Thanks

×
×
  • Create New...