Recent content by sikuneh

  1. S

    Javascript Question: What is the difference between calling funcName and funcName()?

    Re: Javascript Question: What is the difference between calling funcName and funcName Okay, I think I understand. Now if you assign a variable function to say, an element onclick event, is it possible to sent parameters through that onclick? function foo() { // Initialize e...
  2. S

    Javascript Question: What is the difference between calling funcName and funcName()?

    I have never fully understood this and it's been bothering me. What is the difference between calling a function like this funcName and funcName(). I know that funcName returns the result but I don't know exactly when I should use either. Thanks in advance.
  3. S

    Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle cells

    Re: Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle c Great! Thanks, I finally got it working. That off-by-one can kill you.
  4. S

    Saving to an XML file in Javascript

    I prefer using XML because it's easy to write/read, but I'm flexible. Ok then, can I use like an AJAX request to a PHP page to write to a file? I can understand saving one record at a time but dynamically through post parameters is the only way I know of and that probably won't work.
  5. S

    Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle cells

    Re: Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle c It's all relative so I don't think it's an off-by-one. I get rows.length and start the loop at 0. It says rows[y] is undefined rather than rows[20] is undefined so I don't think it has to do with the loop.
  6. S

    Saving to an XML file in Javascript

    So I'm trying to create a feature of a tool to save to file so that it can be loaded. I'm not sure exactly how to do this. I want it to save to a file on the users computer (this is local only, I recognize the danger of saving to a user's computer with or without their consent) in an XML format...
  7. S

    Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle cells

    Re: Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle c So narrowing it down little by little, chrome game me a little insight. It is indeed the cols variable but it can't find all the elements with the tag of td. So in verbose, is this incorrect and is there a...
  8. S

    Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle cells

    Re: Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle c I do not at the moment, it's local while it's testing. I can provide my entire code which is relatively small. <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> <head> <style...
  9. S

    Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle cells

    Re: Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle c My bad for not showing the HTML, although I dynamically create the HTML through Javascript. And yes I did make it an ID rather than a name so we can rule that out. Here is the part that creates the battle...
  10. S

    Tabletop Map Tool Javascript Help - Creating characters on the fly cannot cycle cells

    After the earlier debacle with FireBug and that problem being fixed, I ran into a new one. I'm working on the create character entities input which will allow you to put a first/last name specify which cell (in a 20x20 grid) that character occupies and give it a codename to shorten the...
  11. S

    Tabletop Map Tool Javascript Help - onclick event fails when text is in the box

    Fixed. Just a note, FireBug apparently adds text/html just cosmetically and it doesn't register onclick events.
  12. S

    Tabletop Map Tool Javascript Help - onclick event fails when text is in the box

    I'm creating a tabletop role-playing game map tool. At the moment I'm working on a move function to change the position on a 20x20 grid. Whenever I click on an empty square I get the two debug alerts that I wanted. When I add text through FireBug on a specific cell, then click on the square...
  13. S

    How to set a predetermined value into an HTML select element via PHP

    Within a select element, select the predetermined option. I can see how, although, assume I have a list as such: <select name="list"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> If it was susceptible to change, based on...
  14. S

    How to set a predetermined value into an HTML select element via PHP

    I have a review site and just added a preview button. I have a select element with a score rating from 1 to 100, and I was wondering how to set the value as the value that was selected when the preview button was pressed. Basically, how do I set the value from the previous page in a select...
  15. S

    JavaScript Regular Expression - Validating street address, city, zip and phone number

    I am not very good with regular expressions, and for a school project I need to validate street address, city, zip and phone number fields in a form using JavaScript. I don't know where to start with regular expressions. I just need the basic validation: not empty (which I can do myself) and...
Top