Jump to content

Armed Rebel

  • Posts

  • Joined

  • Last visited

Everything posted by Armed Rebel

  1. Nope, the script still fails and the params are being passed as literals rather than the variable's value.
  2. I'm trying to change an onchange event, and I've got the code to do it and it's (almost) working, but I'm having a little problem with variables. Using this code: c2.onchange = function onchange(event) { replaceWord(inc1, (i - 1), r, (total - 1)) }; The variables int1, i, r and total have all been declared in the script I'm using with the above line, the problem is that instead of setting the new function with the values those variables contain, it sets the variable's names as a literal string so "inc1" become the parameter. The code (of actually setting the new onchange function) works, as if I tried alert('hi') it would work fine.Any solutions to this?
  3. I got what I wanted. I discovered the function insertBefore() which worked perfectly. Thanks though.
  4. Hi, I'm working on a spelling function that, when an incorrect word is found, it creates a dropdown box with the suggestions. When you change it, it replaces the word in the post box, and the select is replaced with the user's choice. The problem I'm having is with the replacement of the select/text. The problem being I have no idea how to do it, and I've looked everywhere with the help of google.This is all I've got (ignore the id): var c = document.getElementById("word"+id2+"."+id1); c.parentNode.removeChild(c); I had to code to add in a "text node", but that puts text in the <select> tag, so it's removed with the above code.Thanks for any help.
  5. Yup, the single form works perfectly, thanks a lot.Makes me feel dumb for not thinking of it.
  6. Given the way the page is set up, I can't get around nesting the two forms.I should have mentioned, that the stuff for form 1 is actually in that table, above form 2, it's just that the submit button is in the div.But thats a good idea anyway, I might be able to simply combine the two forms.
  7. Here is a clone of the page on my server. As you can see the "Delete Selected" button doesn't do anything in IE.I could give a link to the actual page, but it's on my localhost and you'd have to register, so if you want it I'd rather you PM me.
  8. Currently, the way I have a page set up (there is no other way, unless it's possible to horizontally invert two table cells), a form needs to span across one table and div, and somewhere within, another form starts and ends.This creates no issue with Firefox, but in Internet Explorer 6, the form won't submit. I know it's not a problem with anything else as if I remove the inner form, the page submits fine.Here is a basic layout of what this page looks like HTML wise: <form (1)><table> <!-- table stuff --> <form (2)> </form (2)> <!-- table stuff --></table><div> <!-- form 1 submit button --></div></form (1)> I'm hoping someone gets what I mean, and that they can give me a solution. Again, this works fine in FF but not IE6.
  9. I know your problem is already solved, but this may be an easier way: $file_name="12345.abcd";preg_match('/\.[^.]+$/', $file_name, $ext); So the extension there would be ".abcd" and the Preg_match would send it out as an array, so use $ext[0].
  10. You need to give us more information if you want help. Your code would be a start.
  11. Armed Rebel


    Where is your sql query message?
  12. Armed Rebel

    If statement help

    The code work for me, and I don't see a problem in the code at all.What is the exact error?
  13. It removes the cookie.Means to an end.
  14. Site Name: test.nwtclan.netSite Description: A test forums system I'm buildingSite Owner/Developer: MyselfSite Address: http://test.nwtclan.netExtra Comments: Anyone is encouraged to sign up! Also, nwtclan.net, the main site is for an AoE3 clan of mine, but I've never got around to doing anything with it, and that clan kind of fell apart (due to not playing the game).
  15. How would I check a remote linked images demensions?Thanks a bunch.
  16. Do you have mysql? (Or any db system)If you do you'll have to learn how to insert and display the shouts. Take a look at the w3schools sql tutorial.
  17. Well if you do a str_replace (or a preg_replace without any of the special symbols) it will change [ul] even if there is no ending for it, which I don't like.
  18. Eh, I guess that could be way, but I'd prefer it to be sued with preg_replace so it won't change just one.Thanks anyway.
  19. Armed Rebel

    @ in PHP

    I beleive it will make the functino not send an error message if there was one made.
  20. Okay, I have a new problem, for whatever reason, nested [ul] tags (for indent) don't work.So if I were to put this code in: It would turn into:1_2_[ul]32[/ul]1 Instead of what it should be: 1_2__3_21 ("_" == indent)Here is what is being searched for, followed by what is returned. "/\[ul\]([^$]*)\[\/ul\]/U""<ul>$1</ul>" Thanks
  21. Armed Rebel

    BBCode to HTML

    First off, try putting the include() at the top of the page.Also, try doing this: $post_body=$rows2[post_text];$post_body = markup($post_body);
  22. Armed Rebel

    BBCode to HTML

    You have to include the file. include("post2sitefunction.php");
  23. Armed Rebel

    BBCode to HTML

    The way I did it, is have it included in a function (the file is included) which cuts down a lot of code on your thread view page, thats the way I suggest doing it, so if you ever need to have it multiple place, it's very easy to edit.So, what'd you'd do is make a file, say, functions.php, and add in my code (read the thread, my original code doesn't work well).Then to call is later, you'd do $post_body = markup($rows2["post_text"]); Hope that helps.
  24. If you didn't figure it out (Took me like, a month ), to use PHPmyAdmin, go into the menu and to configuration and PhpmyAdmin.
  • Create New...