Jump to content

ScottR

Members
  • Content Count

    60
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ScottR

  • Rank
    Newbie
  • Birthday 03/12/1971

Previous Fields

  • Languages
    XHTML, CSS, XML, XSLT, PHP, MySQL, Javascript

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Ohio
  1. I must be a geek. I use the console.
  2. ScottR

    Pseudocode

    One of the main purposes of pseudo code is that it is supposed to be independent of any programming language. Just an algorithm at a high level. That kinda defeats the purpose.
  3. ScottR

    Pseudocode

    Thanks for the replies. Good stuff...@aspnetguyI often use a method similar to yours. I just list objectives, what the script is meant to accomplish. That seems to work well for me.@justsomeguyThat's a good idea. Damn, that seems like a no-brainer now that I think about it. Just write the loops, functions, etc.. with comments and go back and fill them in the variables and details.The one thing I like about pseudo code is that it forces me to consider if I am using the best approach before I start writing code. I have had several times when I would write a class and then decide I wanted to do things differently.Thanks, Scott
  4. ScottR

    Pseudocode

    I currently use pseudo code, but am thinking I am not using it properly. Here's an example of what I may write for a script that displays content depending on what is passed through a URL.(very simple for display purposes)1. If url does not contain ? then display page 1 else if url contains id get id from url else display error message and kill script2. If id contains invalid data then display error message and kill script else connect to database, select data, and display back to screenI like the idea of using pseudo code, but am not sure I am using it properly.Do you use pseudo code? If so, is it more specific? If not, what is your method?Thanks, Scott
  5. Glad someone mentioned that. I was sitting here thinking that would the first thing I would check. Also, make sure your connecting to database successfully before checking anything else.I prefer to put a small echo statement in my code when debugging such as echo "got to here" Place that in your code to find out where it is breaking.Example: mysql_connect(localhost,$user,$password);@mysql_select_db($database) or die( "Unable to select database");echo "got to here"; Now if "got to here" is printed in the screen when the script is executed you know your script has made it that far. Place it in different places to see where it is breaking.
  6. ScottR

    linking

    Any link to a web page must contain<a href>
  7. You might want to work on better file names too. Yikes!
  8. Make sure have the closing parenthesis in your argument list with the test() function. Synook included it, but wanted to make sure you are aware that it is missing in your code.
  9. ScottR

    custom fonts

    I've never done this. But it looks like you would just add "nameof font" (font names must contain quotes if they contain spaces) to your style declarations. #sample {font-family: "nameof font", Arial, "Times New Roman";}
  10. Try adding it in a function and call the function when the page loads. function check() {what="hid0";var tt=document.getElementById("hid0").value;return alert("tt="+tt);} And use an onload event handler <body onload="return check()";> The value is null before the page loads. Therefore, you have to call it after the page is finished loading.
  11. Your selection structure is not valid. You have to tell the script what to do upon finding a match to what your checking. I didn't test the code, but did rewrite some of it to point you in the right direction. You may also have parse the numbers in the text string as integers using parseInt(). Everything that comes into your script from any textfield will be text. Including numbers. Not sure if JS compares them using ASCII characters. <script type="text/javascript"><!--var number = prompt ("Please choose a number between 1 & 3")if ((number==1) || (number==2) || (number==3)) {instructions here}else if (number>3) {alert ("You entered a number higher than 3!");}else if (number<1) {alert ("You entered a number less than 1!");}else{alert ("You did not enter a number!");}// --></script>
  12. Just curious as to personal preferences. When you start developing a new application, what type of documentation (if any) do you prefer. ex: flowchart, TOE chart, pseudocode? For me, I usually use pseudocode. It's fast, easy, and usually leads me to think of better, more efficient ways to code that particular app.
  13. Just link to your css file. Your css file contains only css. So everything you would usually put into your head section between your style tags you now put in your external css file. body {styles;}p {styles;} Not sure, but I think that was your question.
  14. ScottR

    HTML question

    You might be talking about including files. There are several ways to do this. Mostly you want to use a server side language to do this, but it is possible with html. HTML <!--#include file="includedfile.html" --> PHP include "includedfile.php"; Keep in mind that in these included files you only want the content and syntax for that section of the page. Not the entire page syntax. Ex: head, body, etc..So if wanted to include your navigation it may look like this <div id="naviagtion"><a href="link.html">Link</a><a href="link.html">Link</a><a href="link.html">Link</a></div>
×
×
  • Create New...