Jump to content

F1Fan

Members
  • Posts

    1,182
  • Joined

  • Last visited

Everything posted by F1Fan

  1. That doesn't make any sense. $_GET['v'] is a variable that has been passed through the URL string. Where are you getting $_GET['v']?
  2. I'm not sure how to do it the jQuery specific way, but generally you just append it to the URL string, like this: <script type="text/javascript"> $(document).ready(function() { showrecords(); function showrecords() { $("#display").load("http://www.peter-gosling.com/tagit/people/demo_show.php?v=someValue"); //Simple jquery load command, loads up demo_show.php document.getElementById('content').value=''; $("#flash").hide(); } </script>
  3. If you eval() your AJAX response, your AJAX could print out JavaScript code that would change either the CSS class or specific CSS attributes. A couple examples: document.getElementById('elementId').className = 'newClassName'; document.getElementById('elementId').style.color = '#FF0000';
  4. I believe you're gonna need JavaScript to do that. You could also look into jQuery.
  5. F1Fan

    money type...

    Where is your insert/update statement? Are you properly escaping your text before inserting? It doesn't appear so if commas are giving you errors.
  6. Your layout looks like a table. The <table> tag is very web 1.0, but many people still use them, including me. Sometimes there is no other way to get exactly what you want without using tables. In this case, you could get what you want using divs, but it would be much easier to get your desired result in all browsers using tables.
  7. I don't think this is possible with just CSS, but you could do it with JavaScript: document.formName.elementName.className = 'nameOfClass';
  8. I just looked at your site. You need to add the CSS display attribute to each of your elements. Use table, table-row, and table-cell in your div classes so they act like a table. Reference: http://www.w3schools.com/css/pr_class_display.asp
  9. Your problem could be margin.
  10. FYI, I searched for "javascript add textbox."
  11. That's a little complex to explain here without writing it for you, but here's a reference I found after a quick Google search. Search yourself for more. http://www.dustindiaz.com/add-and-remove-html-elements-dynamically-with-javascript/
  12. DavidAM is totally correct. I completely overlooked the fact that you weren't using the onclick event. Generally I use href="#" when there isn't one, so I'm not sure how various browsers will react with having no href attribute.
  13. Hmm. Is it possible that what you're naming your pop-up something that is significant? Try removing various parameters. Try this first: echo "<a href=\"javascript:window.open('page.php');\">pop-up</a>";
  14. OK, forget the pop-up aspect for a second. If you manually navigate to edit_profile.php in IE, what do you get?
  15. What is on "page.php?" Sounds like it may be that page.
  16. Try this: 'onChange': function(color) { $('myInput').value = '#'+color.hex; document.getElementById(bgcolor1).style.backgroundColor = '#'+color.hex;
  17. What you did basically just tried to do a parseFloat after the string addition. Try this: document.getElementById("total").value = parseFloat(_sub_total) + parseFloat(_tax) + parseFloat(_sh); For reference: http://www.w3schools.com/jsref/jsref_parsefloat.asp
  18. Because JS uses the + sign to add numbers and strings together, you need to explicitly tell JS that your variables are numbers. Use the parseInt() and parseFloat() functions on each of your numeric variables to "convert" them to what JS know is a number, not a string.
  19. F1Fan

    margin help

    Oh, I just realized something. You have the class tag on your <a>, not your image. Try one of these: // CSS #boxImgs a img { float: left; border:none; margin-right: 30px; } #boxImgs a .noMargin { float: left; border:none; margin-right: 0px; } // Script <div id="boxImgs"> <a href="#"><img src="images/testimonials/play3.jpg" /></a> <a href="#"><img src="images/testimonials/play4.jpg" /></a> <a href="#" class="noMargin"><img src="images/testimonials/houses.jpg" /></a> </div> Or: // CSS #boxImgs a img { float: left; border:none; margin-right: 30px; } #boxImgs a img .noMargin { float: left; border:none; margin-right: 0px; } // Script <div id="boxImgs"> <a href="#"><img src="images/testimonials/play3.jpg" /></a> <a href="#"><img src="images/testimonials/play4.jpg" /></a> <a href="#"><img class="noMargin" src="images/testimonials/houses.jpg" /></a> </div>
  20. F1Fan

    margin help

    What if you just did this: // CSS #boxImgs a img { float: left; border:none; margin-right: 30px; } .noMargin { float: left; border:none; margin-right: 0px; } // Script <div id="boxImgs"> <a href="#"><img src="images/testimonials/play3.jpg" /></a> <a href="#"><img src="images/testimonials/play4.jpg" /></a> <a href="#" class="noMargin"><img src="images/testimonials/houses.jpg" /></a> </div>
  21. F1Fan

    margin help

    Looks like that should work. Have you tested it?
  22. Javascript: function checkTransType(selectedType){ if (selectedType == 'drive'){ document.getElementById('driveDiv').style.display = 'block'; document.getElementById('publicDiv').style.display = 'none'; } else{ document.getElementById('driveDiv').style.display = 'none'; document.getElementById('publicDiv').style.display = 'block'; } } HTML: Do you <input type="radio" name="transType" value="drive" onclick="checkTransType(this.value)"> drive to work or <input type="radio" name="transType" value="public" onclick="checkTransType(this.value)"> use public transportation<br><br> <div id="driveDiv" style="display:none;"> Do you primarily use the <input type="radio" name="publicType" value="train"> train, <input type="radio" name="publicType" value="bus"> bus, or <input type="radio" name="publicType" value="other"> other </div> <div id="publicDiv" style="display:none;"> Do you drive a <input type="radio" name="driveType" value="car"> car, <input type="radio" name="driveType" value="truck"> truck, or <input type="radio" name="driveType" value="other"> other </div>
  23. That is correct, you can use JS and CSS to do this. First, you should use radio buttons. Name all the radio buttons in the same section the same, and just change the value appropriately. Then, you can add an onclick event that calls a JS function. That function would check which button was selected, and then show or create the additional radio button selections you want to display. You could use CSS to display and/or hide various sections of other radio buttons, depending on what was selected. Or you could use JS to actually create the new radio buttons, but the previous option would be easier.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.