Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Don't use $GLOBALS. Forget it exists. There is never a good reason to use it. Pretend you never saw it.
  2. Your video markup has an ID. The Javascript code tries to use an ID. They don't match.
  3. That could work. If it didn't then there was a problem with it. Well yes, but this isn't about admin. This is about everything that the rule tries to run on. Make sure that it only runs on something if it does not exist. This is just A Good Thing To Do, but it will also solve your problem.
  4. This is one of those things people tend to forget: mod_rewrite will apply your rules, but it starts over again with the new URL too. Use a couple RewriteConds to make sure that the thing you are rewriting does not exist as a file or directory.
  5. Look at the new HTML you're trying to insert. Does it say anything about video URLs? Check what I said again:
  6. Then there is only one video. The error is something else. Could it be that you need to pass the ID of the <video> on the page?
  7. There is only one video on the page, yes or no?
  8. There's only one single video there. What do you mean?
  9. I mean from the page you're working with. If there are more videos then there is code that is outputting them and it isn't included in what you posted.
  10. Then there are more changes besides just the player that will need to be made. What's the rest of the code?
  11. Of course.
  12. Makes sense to me. Does it make sense to you?
  13. ...ah. IDs need to be unique on the page. Get rid of the one you have there and apply your event handler using some other selector.
  14. I know you said you're learning Javascript and want to understand what's going on, but this really is one of those times that using jQuery is helpful. You can't easily determine the original HTML because it's mostly gone by the time your code is running (the browser turned it into objects in memory instead), but you can clone the elements and add the copy into the page. The downside is that you'll be cloning the objects as they exist at that moment, including whatever changes the user has made to them like by typing in the textbox or selecting a menu item. But ignore that for the moment. Try using jQuery to find the row element, clone it, and add it wherever.
  15. You say it should go into the header but what I see makes me question that. I can't say for sure that the header is the wrong place, just that I'm not sure it isn't. What you posted does not include the header. As in the <head>. But fortunately putting stuff into the header is a discouraged practice anyways. You have a <div class="video-player-container"> that holds stuff for the video. You have some <script>s related to it. Put the scripts after the video.
  16. So to be absolutely clear, your code is var button2 = $(event.relatedTarget) console.log(button2[0]); console.log(button2.data('userid')) console.log(event.relatedTarget) and the first and third outputs show two different elements?
  17. Oh right, it's a jQuery object. console.log(button2[0]) Or expand/click on the element it logged. Is it the right one? Sally Lawrence?
  18. I'm not sure why you're doing it that way... What if you literally console.log(button2)?
  19. And if you console.log(button2) as well?
  20. Time to learn! There's a bit in there where it takes the value entered by the user and compares it to the correct answer. Use strtolower (check the examples on the page kicken linked) to get a lowercased version of the user's answer, and compare that result to the correct answer.
  21. I guess I'm not really sure where the difficulty is? You have the HTML that puts the video on the page, and you have the HTML (containing Javascript) to set up the video. You put them together. Do you know what the resulting HTML is supposed to look like? If you know that then it shouldn't take much to see where the <script>s need to go.
  22. You only changed a 529KB/11MB portion of it. PHP doesn't need to create a whole new damn array if you change something in the middle of it... I can't tell if you're saying it added 11MB or did not drop 11MB. Ditto. Also, stop calling it a reference. It is not a reference.
  23. FYI, this can be (and should be) handled entirely with CSS using nth-child(), not(), and first-child.
  24. Exactly what does it show?
  25. Sure looks like HTML to me. The "phtml" just means it's HTML that has some PHP in it. What code?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.