Jump to content

migroo

Members
  • Content Count

    171
  • Joined

  • Last visited

Community Reputation

2 Neutral

About migroo

  • Rank
    Member
  • Birthday 05/01/1994

Previous Fields

  • Languages
    (X)HTML, CSS, bits of PHP, SQL, and JS.

Contact Methods

  • Website URL
    http://
  • ICQ
    0
  • Yahoo
    airjeteric@gmail.com

Profile Information

  • Location
    Nebraska
  • Interests
    Web Design/Programing, Computer repair, Bicycling, Wood Working, Airsoft, Boffers, and video games.
  1. I'm not quite sure where this should go. JavaScript? I have a search bar, below it, results display in a slider of sorts. Picture I could use cookies or a session to remember the slider's position and what entry the user has selected but it seems easier to use a few hidden input fields and simply update them with a little JavaScript. Is there a reason not to do it this way? Providing that the information being stored is relatively harmless (not a password or anything like that).
  2. And as long as the JS is compatible with my target audience...
  3. 2MB of JavaScript. Wow!I guess I'm fine then.So as long as I'm not confusing the user by switching styles on them the file size on my JavaScript shouldn't be a problem.
  4. The title pretty much says it all. If I use AJAX and JS to make a webpage more user friendly and interactive should I worry about over using JavaScript?
  5. I'm trying to call an AJAX request from a java script function and I want to put the result into a variable so I can use it later in the function:The entire function is quite long. Here is the relevant part: if(type == "obitNextPage"){ message[0] = "infoRequest"; message[1] = "obitNavContent"; message[2] = "/supportingPHP/obitView.php"; message[3] = 4; message[4] = "obitNavTotalEntries"; pageNumTotal = sendRequest(message); pageNumCurrent = document.getElementById('pageNum').value; document.getElementById('obitNavContent').innerHTML = pageNumTotal;} Here is the sendRequest() function: function sendRequest(message){ var i = 4;var str = ""; //Generate the Str Varstr = "?message=" + message[3];while(i <= message[3]){str += "&var" + i + "=" + message[i];i++;}//Send the requestif(message[0]){if (window.XMLHttpRequest){request = new XMLHttpRequest();}else{request = ActiveXObject("Microsoft.XMLHTTP");} request.onreadystatechange = function(){if(request.readyState==4 && request.status==200){if(message[0] == "updateObitNavSearch"){document.getElementById(message[1]).innerHTML = request.responseText;}if(message[0] == "infoRequest"){return request.responseText;}}}request.open("GET", message[2] + str, true);request.send();}} I think I'm missing something simple but I've looked all over and I can't find anything on out how to do this. I could find a work around this time but I would like to know how to do this for future reference. Thanks.
  6. Wow, thank you! That worked great. Thanks a million!
  7. I have been working on this site for a while, I took a break for about 2 months, now I have this strange error. Everything looked fine before but now there is an odd underscore after three of my four image links. It displays just fine in FireFox but it acts up in Google Chrome. Does anyone know why I am having this issue? Here is a picture of the problem in both Chrome and FireFox: Here is a link to the page:http://wbvclan.com/I_index.php Here is the HTML right around the buttons: <div class="buttons"> <a class="home" href="" onmouseover="changeButtonColor('home', '/Images/homeButtonGreen.png')" onmouseout="changeButtonColor('home', '/Images/homeButtonRed.png')" > <img border="0" id="home" src="/Images/homeButtonRed.png" width="71" height="39" alt=""/> </a> <a class="forum" href="" onmouseover="changeButtonColor('forum', '/Images/forumButtonGreen.png')" onmouseout="changeButtonColor('forum', '/Images/forumButtonRed.png')"> <img border="0" id="forum" src="/Images/forumButtonRed.png" width="71" height="39" alt=""/> </a> <a class="profile" href="" onmouseover="changeButtonColor('profile', '/Images/profileButtonGreen.png')" onmouseout="changeButtonColor('profile', '/Images/profileButtonRed.png')"> <img border="0" id="profile" src="/Images/profileButtonRed.png" width="71" height="39" alt=""/> </a> <a class="apply" href="" onmouseover="changeButtonColor('apply', '/Images/applyButtonGreen.png')" onmouseout="changeButtonColor('apply', '/Images/applyButtonRed.png')"> <img border="0" id="apply" src="/Images/applyButtonRed.png" width="71" height="39" alt=""/> </a> </div> Here is the linked CSS: .home{margin-left:20px;}.forum{margin-left:10px;}.profile{margin-left:10px;}.apply{margin-left:10px;} And here is the JS function: function changeButtonColor(id, to){ document.getElementById(id).src = to; } Thanks in advance for your help.
  8. migroo

    auto sizeing div box

    Its because you are floating your textbox and picturebox.Try something like this: #center{ height:auto; width:740px; background-color:#000; margin:auto; margin-top:50px; margin-bottom:50px; padding:30px;}#textbox{ width:400px; height:auto; background-color:#000; margin-left: 0px;}#picturebox{ width:400px; height:auto; background-color:#000; margin-left: 0 px;}#bottom{ height:200px; width:800px; margin:auto; background-color:#000; clear:both;}
  9. migroo

    php error message

    Well I have never done anything with perl but this might help you.PHP Error Handling
  10. Well you are mostly right...It is my sql statement that is causing the problem.The problem though is it won't treat the variables I put in the sql statement as variables.Here is my new code: $local_host = 'localhost';$user_name = 'my_username';$password = 'my_password';$db = 'db_name';$dt = 'dt_name';$display = '';$connect = mysql_connect($local_host, $user_name, $password); if(!$connect){ die('Could not connect: ' . mysql_error()); }mysql_select_db($db, $connect);$query = 'SELECT * FROM $dt ORDER BY ID ASC';$query_result = mysql_query($query, $connect) or die(mysql_error());print_r(mysql_fetch_array($query_result));echo $display; And here is my new error: Now if I put the information that I have in the variables strait into the sql statement it works fine.Any Idea how to make it realize that those are variables not text?Thanks for the help I am lost on this one.
  11. I have bean playing around with data tables and I found this function, mysql_fetch_array(). I want to use it to put all of the data into an array so that I can get at it easier but it just isn't working for me.I am getting this error: I think this means that the data I put in the function's parameters is the wrong type of data, not a mysql_result. Here is my code:$local_host = 'localhost';$user_name = 'my_username';$password = 'my_password';$db = 'db_name';$dt = 'dt_name';$display = '';$connect = mysql_connect($local_host, $user_name, $password); if(!$connect){ die('Could not connect: ' . mysql_error()); }mysql_select_db($db, $connect);$query = 'SELECT * FROM $dt ORDER BY $by ASC';$query_result = mysql_query($query, $connect);print_r(mysql_fetch_array($query_result));echo $display;?> I hope someone here knows what I am doing wrong.
  12. This is awesome! I am a NTID I spend loads of time trying to find the right colors and then deciding they clash or I don't like them.Thanks for putting this up and pinning it.
  13. A year ago I didn't know what an html file was. I was using pro-boards to build small sites to chat with my friends on and it was frustrating because I couldn't do what I wanted. Then I found w3schools and started to build a website for some fiends. After about a year of continually asking questions on the forums and people helping me, I never had a question that didn't get answered, I have got to where I can make pages look like I want them to for the most part and validate properly. As Niche said I have answered countless questions just by having to think it through to post the question.I have spent somewhere around 1600 hours programing in the last year and so I have to agree with Niche again when he said you don't get good at some thing until you have done it for 10,000 hours. So I am not good yet but I am working on it.Just get a project and start working on it then when you have problems just ask the people on here are awesome and as far as I can tell have all the answers.Good luck.
×
×
  • Create New...