Jump to content

watagal

Members
  • Posts

    120
  • Joined

  • Last visited

Everything posted by watagal

  1. dukxud

    If you have questions, post them to the appropriate forum - that way everyone can benefit. -WataGal

  2. Thanks for all the help and advice. It was a relative path problem (doh!).Thanks again
  3. 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
  4. 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
  5. What do you initially set your element "elmnt" to in your HTML code? Try:<div id="elmnt" style="visibility:hidden"> WG
  6. Your condition statement in your "for" is i>=10 and perhaps should be i<=10. Your code within is never executed. Think of "for" as:loop i (starts at 1) while i is less than or equal to 10, incrementing i by 1 after each loop.WG
  7. Thanks, that's the ticket! I wanted to do it this way (in lieu of passing the actual function name as a string) is that it is less maintenance down the road.Thanks so much!
  8. 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
  9. 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
  10. I don't think so. When I pass a function as an argument of another function, it is not a string, rather a reference to some code to execute. What I want is to get the actual name of the passed function.Thanks,WG
  11. 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
  12. yes, thankyou - that's the idea. I was incorrectly passing the function as a string (in quotes). Following your example, it works!TA
  13. 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
  14. greetings,I need help in the syntax for passing a function as an argument for another function and then call it: function wrapper(f){ var return = f;} I've tried every which way I can think of -- any help?TIA
  15. GreetingsI want to do something like:document.getElementById('id').class = "myCSSclass";ordocument.getElementById('id').style.class = "myCSSclass";I realize the above code doesn't work, but is there a way to do it?WG
  16. Are they equally searchable? How would one search a folder of XML files?Thanks, WG
  17. I've used this "ajaxInclude()" function to load pages in <div> section -- but noticed it does not process any header scripts, includes, or the body's 'onload' event. It processes raw HTML tags only.One, is this the norm? and two, it there a way around this?WG
  18. Thanks all, that's what I was looking for.Playing around with it more I found <input type="reset" value="Reset" name="btnReset" onclick="dspDiv('divTest','off')"> also works, but I like the 'onreset' event.TA
  19. 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
  20. 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
  21. Thanks, it works now - I guess I was doing an [F5] refresh and it wasn't happening. I invoked a new IE window and it worked.Sorry for the false alarm, thanks again.
  22. 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
  23. 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
  24. That's the ticket! Third time is a charm. Works great - thanks again
×
×
  • Create New...