Search results

  1. 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.
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. S

    How do I get multiple buttons in a form going to different places?

    I was wondering how forums have two buttons "Submit" and "Preview" which go to different places from the same form. I would like to duplicate that effect for a review posting site. Could someone tell me how that works and how to do that?
  8. S

    PHP header location not working on X10hosting

    I am trying to use the php header("Location:url") to redirect a user to a login page if they have not logged in yet. It works fine on my local copy but on X10 the redirect does not work. Is there some setting which does not allow PHP header or something on the X10 servers?
  9. S

    Post multiple images in a form - Upload to server help

    I am updating a review site. I would like the posters to be able to add multiple images into their posts. First, what would be the best way for the form to handle this, and second, what would be the best way for the addPost script to upload all the images? My thought was to have a button...
  10. S

    Login gives "500 Internal Server Error"

    I'm not sure if this is the right place, but when I submit my login form and it goes to the page to validate I always get a "500 internal server error." Everything else seems to work just fine. Validation form <?PHP // validate.php // Validate user input and login // include form_data class...
  11. S

    Embeding videos in user submission site

    I am making a user submission site where people can post anything they want. I want them to be able to post videos but I also want to be safe from XSS. Currently I just use the strip_tags() function in PHP but that removes the videos tags. What would be a good way to allow safe embedding videos?
  12. S

    Registration Script Optimization

    I want to make sure there is nothing substantial that I'm missing, security or performance, on my registration script. PHP scripts (adduser.php) <?php ## Validate Registration ## session_start(); include("../../scripts/modules.php"); $vars = array( 'username'=>$_POST['username']...
  13. S

    Service taking too much resources

    I think I may have a virus, or the remnants of a virus because my process "svchost.exe" is taking upwards of 100,000 k and if I'm not mistaken, that is a bit too much. Can someone tell me how to find which service is taking up so much memory and fix this?
  14. S

    User Submission Video Embed Parse HTML tags

    I have a user submission site and I want to allow them to embed videos, currently I just let them paste the embed code but I have no way of getting rid of HTML tags that would mess up the CSS (I.E. adding a div without closing it). Is there a good way to fix this?
  15. S

    Login not working - Information not kept across pages?

    On my login page when a user tries to login it takes them to the next page but nothing shows up and on the source code it shows I have some errors that shouldn't be there. It seems it loses the information when it goes to validate the information. login page <form...
  16. S

    MySQL Database will not load

    I've been trying to get to my PHPMyAdmin through cPanel and it takes like 10 minutes to get past the redirect, then 10 minutes before it stops loading and it's unfinished, meaning I can't access it at all. Can anyone help me with this?
  17. S

    phpBB database settings

    I'm trying to set up a phpBB forum on my website but I can't get past the database settings. There is an option called "Database Server Port" an I left that blank (default) I was wondering if it was on a different port than standard which would not let it connect and connect to my db info...
  18. S

    jQuery td onclick location change - Destination continues to be 'undefined'

    On my site I am working on a jQuery script that when you click anywhere in a td (not just on the link) it will take you to the link's destination, but whenever I click it always say it is undefined which always returns a false page. jQuery: $(document).ready(function() {...
  19. S

    Javascript and radio buttons help

    I have been having some trouble with my javascript that involves radio buttons. I have no idea how to check if either radio A or radio B have been selected. My guess: JS <script type="text/javascript"> function validate(radios) { var confirm = document.getElementsByName(radios).value; var...
Top