Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by mgh730

  1. mgh730

    Problems with animation quality..

    I'm not sure what's causing the bad quality... but it could be that you have fast preview turned on - the button immediately to the right of the big render button that causes the render to occur in a single pass rather than multiple passes. Try turning it off. Also, note that clicking the lowest...
  2. mgh730

    trigger/fire an attachEvent

    Thanks! I had looked around the msdn library, but I guess I wasn't looking in the right places. The JS file I'm using doesn't revolve around attachEvent - it creates a series of objects that get events attached to them. I'm controlling those objects through JS - and thus I needed control over...
  3. mgh730

    trigger/fire an attachEvent

    I have an object with an event attached to it. Is there a way to trigger this event through JavaScript? Here is an extremely simplified version of the scenario: obj = document.createElement("select"); obj.appendChild(document.createElement("option"))...
  4. mgh730

    Finding the parent object of a script

    I had thought of doing something like this, but I haven't figured out how to identify which of the resulting spans contains the script that was just run. I see that you have given each span a different class as a way to identify them, but if they all have the same class and no id, I can't think...
  5. mgh730

    Finding the parent object of a script

    That would normally work, but in this case, the document may not call the function on load. My example above is extremely simplified... but what I am writing does require the code to execute both onload and afterwards. The document is very dynamic... What I need is a simple method of...
  6. mgh730

    Finding the parent object of a script

    I have the following code: <script> function toolbar() { newDiv = document.createElement("div"); ???.appendChild(newDiv); } </script> <body> <span class="toolbar"> <script>toolbar( ... )</script> </span> </body> In the function toolbar, I create a new element called newDiv. I...
  7. mgh730

    Carriage Return in Text Area

    Don't forget \n too! function requiredfields() { var form = document.getElementById(&quot;New_Hire&quot;); str = form.General.value; if ((/^[a-zA-Z0-9\n\r\.,~\(\)\-\!]+$/).test(str)) { return true; } else { alert(&quot;Only alphanumeric characters are allowed in the...
  8. mgh730

    performance

    Sorry, I don't have an answer for you, but I do have a few comments that might help. First, it loads fine on my computer (Internet Explorer 6). Second, I would highly recommend reading some tutorials on classes and objects. It's a little too much to explain here, but I believe that by using...
  9. mgh730

    Best way to Implement Relative Positioning for a PopUp Menu?

    var cNode = document.getElementById('myCell'); var x = 0; var y = cNode.offsetHeight; while (cNode.offsetParent) { x += cNode.offsetLeft; y += cNode.offsetTop; cNode = cNode.offsetParent; } You almost had it :-) Add the offsetTop during each loop (the distance between the object and...
  10. mgh730

    CHR$(0)

    Or you could go to http://www.asciitable.com/ - Martin
  11. mgh730

    download the qbasic magazines!

    Thanks! These are really useful.
  12. mgh730

    Changing variables to strings

    c$ = str$(c)
  13. mgh730

    prime numbers

    Actually, the formula I implemented above is quite quick! If you modify the array and the number variable: dim primes(10000) as long dim number as long and then put a loop around the main code like: for number = 5000000 to 6000000 ... next number Modify the code so it only prints when the...
  14. mgh730

    get table name into another table

    I'm trying to do an &quot;insert... select&quot; to get data from multiple tables matching certain criteria into a temporary table. I'd then like to order the data in the temporary table, but look at each entry in the table and know what table it came from originally. I was thinking there must...
  15. mgh730

    prime numbers

    Well, I'm not quite sure what you mean by &quot;logarthmic integrals and x/ln x&quot;, but here's how I would do it: A number is prime if all the prime numbers less than the square root of it do not divide into that number. So I would take the square root of the number you want to test...

Part and Inventory Search

Back
Top