Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by skaterdav85

  1. this is the link http://www-scf.usc.edu/~dtang/hce2/index.phpIm concerned with both the masthead (where it says Health Care Engineering) and the div with the three images. When i resize the browser and keep making the width smaller, the divs that hold these images keeps getting smaller because i specified a margin-left and margin-right of 5%. The divs keep getting smaller even when i go past the images. Instead, I just want the div to stop getting smaller once it hits the image and then make the margins smallers and show less of my page as you continue to make the browser window width smaller.
  2. so here i want to plot points on a google map. the points are coming from an array. I want to loop through the 'for loop' towards the bottom of the script, and each time it calls my plotPoint function and passes it a new address. But its not working. What am i doing wrong? anyone know? Thanks! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>ITP 404 - HW 6</title>
  3. mysql_connect(servername,username,password);Im using XAMPP, so on my files where i connect to my MYSQL db, my servername by default is localhost, username is 'root', and the password is blank.When i host, do i need to change this, even if i place my mysql db in a secure directory?
  4. what does return do? Ive never really been familiar with this, except the fact it can return a value. what does return alone do?
  5. So here is my routine. I want to abort the script inside the first if statement, so that when you click once, the div is displayed, and when you click a 2nd time, it hides. But this doesnt work if you reset x equal to 0, because it just keeps the div displayed. And if you dont reset x to 0, the 3rd click (if you wanted to show the div again), wont do anything. Any ideas?<script language="javascript">var x = 0;function showBody() {if(x == 1) { document.getElementById('body').style.display='none'; x=0;//NEED EXIT OR ABORT FUNCTION HERE...............................................
  6. So would i be using a function in SQL that escapes out quotation marks? haha good point.
  7. is there a way you can view how many times your site has been viewed without putting an actual counter on the page? I use Google Webmaster Tools but I dont think it has that feature.
  8. I created the site in ColdFusion. Are you familiar with the language? Right now the page errors if any of the following words or characters are submitted.* < > = - _ ; insert update delete Would this prevent a good number of sql injections? I didnt want to eliminate single quotes, since that can be used regularly and i didnt know how to parse that out.
  9. Basically what i did was on my process page, if any of the form fields contained * or < or >, the page would give an error message and not load the rest of the page or process any of my server code. does that work partially to?for a sql injection to work, wouldnt the hacker need to know the db table and field names? the file permissions were changed on my db file so that someone browsing couldnt view it.
  10. I recently created a coldfusion site using an access database. I did both client (javascript) and server side validation so that all form fields wont accept characters like * < or > or certain words like (insert, delete, update). I also put maximum lengths on all form fields through server side validation. I was wondering what other measures i could do that would prevent hacking or sql injections. Im not too familiar with sql injections and how they work, so any feedback would be appreciated!
  11. is there a function in CF similar to javascript's indexOf method? i wanted to do server side validation but the Adobe CF book vol 1 doesnt go over much server side validation w/ cfif blocks.
  12. in php/mysql development, do most people use the GUI or the command line utility?
  13. do i use these to create the db examples? if so, how?
  14. thanks.also, i am using a book to help me learn, and it came with 2 .sql files. What are these? and where in my XAMPP folder would i put them to use them?
  15. sorry if this is a newby question, but im new to mysql. So I installed MySQL, but i dont know how to access the mysql command-line utility. how do i get there?I also installed XAMPP on my other computer and am using phpmyadmin to create a mysql database. does that have a mysql command line prompt instead of teh GUI?Thanks!
  16. why is there three equal signs? still confused on that.
  17. Hi,So i used the strpos method in my condition to see if a state begins with the letter 'c', then make the table cell red. However this doesnt work. I used the substring method to achieve the same thing and this DID work. Anyone know why? <body><?php $state[0] = 'alabama'; $tax[0] = 4;$state[1] = 'alaska'; $tax[1] = 0;$state[2] = 'arizona'; $tax[2] = 5.6;$state[3] = 'california'; $tax[3] = 7.25;$state[4] = 'colorado'; $tax[4] = 2.9;$state[5] = 'connecticut'; $tax[5] = 6;$state[6] = 'delaware'; $tax[6] = 0;$state[7] = 'florida'; $tax[7] = 6;$state[8] = 'georgia'; $tax[8] = 4;$state[9]
  18. So i wrote a script where when a user mouses over a link, it shows a layer and the layer moves according to where the mouse is. Now this works fine in IE and Safari, but in FF, it only shows and hides the layer and FF spits an error saying 'event is not defined' on line 22. However, when you use "event" as an argument for 'moveLayer(event)', it works fine in all 3 browsers. Does anyone know why? <html><head><style>#lay1 {border: 1px black solid;position:relative;top:200px;left:150px;z-index:1;background-color:red;width:100px;visibility:hidden;padding:5px;margin:5px;}</sty
  19. good idea using the display property instead of innerHTML. that worked in IE and FF, and im assuming it will be fine in the other browsers. Thanks!
  20. anyone know of a program for Mac OSX similar to MS XML Notepad that validates against an XSD file?
  21. skaterdav85


    ok well i want to learn how to create layered menus. but i dont know how to position layers so they stay under a particular link all the time.
  22. skaterdav85


    i created a layer, but how do i always keep it under the link, despite when i resize the browser window? this is my code: <html><head><title>layers</title><style>#layer1 {position:relative;top:5px;left:10px;border:1px solid black;background-color:yellow;width:80px;visibility:hidden;}</style><script language="javascript">function showLayer() {document.getElementById('layer1').style.visibility='visible';}</script></head><body><div id="layer1">this is my first layer.</div><div align="center"><a href="#" onclick="sho
  23. ok here is the link where its at. just try typing in the email field a valid email address, and you'll notice how everything gets shifted down. I was using IE 7. it works fine though in safari, opera, and ff.http://www-scf.usc.edu/~dtang/PellaBella/contact.php
  24. so i created a form and did some JS validation on it. I have a text input field for emails, where if a condition is not met, it writes to an h3 tag"*please enter a valid email address".this works fine in the browsers, but in IE, it acts a little weird. even if the form is valid, it writes a blank space or line break or something to the h3 tag, shifting everything under it down a bit. In firefox, opera, and safari, it just doesn't write anything to the h3 tag, leaving all the text etc where it should be.anyone know how to stop IE from doing this? Thanks!
  25. well i went to this link: http://www.entropy.ch/software/macosx/php/and followed the following instructions. i can restart php by just reinstalling everytime, but that takes like 5 minutes each time. im sure theres another way to do it, im just too new at this to know haha.
  • Create New...