Jump to content

niche

Members
  • Posts

    3,671
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by niche

  1. This is one for my topic scrapbook. This one is truly a keeper! I've been needing something like this for years. Before recently, I didn't understand javascript well enough to even ask this question. A BIG thanks to justsomeguy who framed the answer, and to So Called, who knew he was pointed in the right direction, and to Don E, who solved my problem, and special thanks to dsonesuk who, as usual, provides that "something extra" in his posts. Thanks again to you all. This was a real present to wake up to.
  2. Thanks again, but no go. Did it display for you?
  3. Thanks,but I don't need anything back in this case. I just need to display what's in a php var assigned to a JS var when the JS var is rendered in php. This displays nicely, but there's no var in it: <?phpecho '<script type="text/javascript">';echo 'alert("Hello World")';echo '</script>';?> how do I re-define a php var to a JS var when the JS var is being rendered in php? <?php$str = "Hello World";echo '<script type="text/javascript">';echo 'var str = ?????';echo 'alert(str)';echo '</script>';?>
  4. I'm following you, but how do I get the php variable into the JS var when the JS is rendered in php? Script so far: <?php$str = "Hello World";echo '<script type="text/javascript">';echo 'var str = ?????';echo 'alert(str)';echo '</script>';?>
  5. Is there a way to produce an alert while a php while loop is running? If so, what's the keyword(s) do I need to reference? I'd like to pause my script as my page is being created.
  6. niche

    LOGIN AJAX

    What's your question?
  7. niche

    Debugging test

    Viola! For some reason the echo inside the second foreach didn't register and I thought it was coming from the for loop. I can't say for a fact I would've made the same mistake if I'd worked the problem earlier in the day. Any way, OUTSTANDING EXERCISE! We can't have too many "go find it in the manual" opportunities and I love the spoiler thing.. I think something like this would be great every two or three weeks. Hopefully, there would be some unifying theme for consecutive exercises and only moderators would initiate the exercises with suggestions from the membership. Bravo justsomeguy!
  8. niche

    Debugging test

    That was a great explanation jsg. I understand. Thanks Now, what about the for loop? Please explain how Array ( [0] => 1 [1] => 2 ) gets turned into this by the for loop? I haven't used for loops much, but I expected something different than: 1 21 1 EDIT: It's like it ran twice. once without the ref and once with, but the second foreach hasn't run.
  9. Actually, I'm using a button inside my form instead of an input. I put the onclick in the button and it checks out in ff, ie, s, c, o and validates with a transitional doctype, but not under strict. When I changed onclick to onsubmit and moved it to the form tag, JS failed, but I didn't try to debug.
  10. niche

    Debugging test

    By the numbers then, in Ingolme's #2, the first value is always the reference, when the ampersand is used, to pass a series of values? If so, why does $v echo as "2" after the first foreach? Per Ingolme #2, hasn't $v been re-assigned by "as" to the value of the reference, in this case "1"?
  11. niche

    Debugging test

    Sorry, but can't find the quick reply button. I thought I had one. I've clicked, searched and hovered everything I can find. Is it possible it's disabled somehow?
  12. niche

    Debugging test

    I think I have the answer. How do I use the spoiler?
  13. niche

    Debugging test

    Can you say what the ampersand is doing in the foreach? If not, can you show how to google for it?
  14. Is there a term for a form submission that's been disabled and redirected by javascript as in an element that contains something like this? onclick="addBop(this); return false;" :
  15. Thanks dsonesuk. I didn't know that. It never hurts to remind ourselves that we'll catch more bees with honey.
  16. I use FileZilla and it's free. It allows you to edit on your server. All you need is a logon to your FTP.
  17. Is this what you're talking about? http://www.w3schools.com/css/css_image_transparency.asp
  18. I like that scientist, but what putting that array in a table and doing a join? EDIT: That way it can all be done in sql.
  19. What happened to follow this topic button? EDIT: It was me. Left my JS turned-off when I stopped last night. First time for that.
  20. Have your done the css tutorials?
  21. Thanks So Called and Ingolme. We've taken this topic as far as we can.
  22. Is there something specific you have in mind in AJAX or are you referring to the general advantage of updating a page client side?
  23. What's the best way maintain position in a scroll upon refresh? I'm currently using anchors inside divs, but the page usually has some "jump" as the targeted div is sent to the top of the viewable page on refresh. If there's a better way what is it?
×
×
  • Create New...