etsted

Members
  • Content count

    274
  • Joined

  • Last visited

  • Days Won

    1

etsted last won the day on May 9 2014

etsted had the most liked content!

Community Reputation

3 Neutral

About etsted

  • Rank
    Member

Contact Methods

  • Website URL
    http://www.widegrass.com

Profile Information

  • Gender
  1. i checked it, and those two are the errors
  2. maybe it goes directly to the url defined in the action attribute
  3. lol i didnt notice that you had posted the same as me
  4. If you give body a background color in external stylesheetbody {background-color: red;}There is nothing there that will make it target a specific page.If you a apply id ref OR class to body element you can uniquely target that page, for example using a id ref.Page1<body id="bg-color01">Page2<body id="bg-color02">Page3<body id="bg-color03">Then target those id ref to apply different color to those specific pages,#bg-color01 {background-color: red;}#bg-color02 {background-color: green;}#bg-color03 {background-color: yellow;}IF you are able to insert style element within the <head>...</head> of each individual page, then you could just usePage1<style>body {background-color: red;}</style>Page2<style>body {background-color: green;}</style>Page3<style>body {background-color: yellow;}</style>But i suspect it might be template system where you will add this specific style and it will be applied to all.
  5. then use a for loop to loop trough the properties. Store the values in a variable then place the variable where u want it
  6. you are using concatenation here content.innerHTML += propiedades + ':' + objeto[propiedades] + "<br />"; change it to: content.innerHTML = propiedades + ':' + objeto[propiedades] + "<br />";
  7. maybe echo"<script>alert('Timeout!');</script>"; was interpreted as a string instead of javascript
  8. yes that is right. You can get a clear demonstration at my website widegrass.com. Search for "n" using my search bar, then add more "n" and see what happen
  9. when i console.log the str variable it says "No suggestions", but when i try to use that statement in a if statement it doesnt work. var suggested_titels = ajax.responseText.split("S_E_C_R_E_T__S_I_G_N__!_|_!_|"); for(var i =0;i < suggested_titels.length; i++){ var space = document.createElement("BR"); var node = document.createElement("SPAN"); var textnode=document.createTextNode(suggested_titels[i]); var check = document.createTextNode(suggested_titels[0]); var str = document.createElement("DIV"); str.appendChild(check); node.appendChild(textnode); node.appendChild(space); sQ.appendChild(node); if(suggested_titels[0] == "No suggestions"){ sQ.innerHTML = ""; } } console.log(str); sQ is supposed to get empty when there is not suggestions in the DB
  10. i want sQ to empty when the response from ajax.responseText returns No suggestions, but instead it keeps the content of the div and append No suggestions at the end of the div
  11. var sQ = document.getElementById("suggest_query");var suggested_titels = ajax.responseText.split("S_E_C_R_E_T__S_I_G_N__!_|_!_|"); for(var i =0;i < suggested_titels.length; i++){ var space = document.createElement("BR"); var node = document.createElement("SPAN"); var textnode=document.createTextNode(suggested_titels[i]); node.appendChild(textnode); node.appendChild(space); sQ.appendChild(node); if(suggested_titels[i] == "No suggestions"){ sQ.innerHTML = ""; } It seem to be working, but from my code you can see that i want to empty the div when the request equal "No suggestions", but instead it appends "No suggestions" at the back of my div, so it will contain all of the suggested terms and "No suggestions" at the end
  12. so it wont work?
  13. i dont know why but it stopped working, then when i console.log it i get this: GET http://widegrass.com/suggested_query.php?q=N&type=images 500 (Internal Server Error) . What does that mean?
  14. go to my website widegrass.com and search "n"
  15. when i search for something there is always a <br> tag infront of the search term, other than that it works for(var i =0;i < suggested_titels.length; i++){ //nr1 += "<span onmouseover='pick_this(this.value)'>"+ suggested_titels[i] +"</span>"; var space = document.createElement("BR"); var node = document.createElement("SPAN"); var textnode=document.createTextNode(suggested_titels[i]); node.appendChild(textnode); node.appendChild(space); document.getElementById("suggested_query").appendChild(node); }