Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. It would be easier to use your text boxes as array though. Take a look at the following post. http://www.phpfreaks.com/forums/index.php/topic,299599.0.html What does the complete php look like where you are trying to fetch the $name var?
  2. $(document).ready(function () { $("block").click(function ShowContent(d) { if (d.length < 1) { return; } var dd = document.getElementById(d); AssignPosition(dd); dd.style.display = "block"; }); }); If you are using jQuery I suggest you take a look at jQuery() and css() What does the html (when you click view source in the browser) look like?
  3. check the second link I posted it shows an example of parsing a XML file on a remote server using simpleXML
  4. Is the output of the php page xml data? If so it doesn't matter. you might also want to take a look at http://www.phpfreaks.com/tutorial/handling-xml-data
  5. Mixing mootools and jquery in my book fits in the bad category. I suggest sticking with just one js framework. However if you really must (can't think of any valid reason) there are ways to work around this. Take a look at the noconflict method in jquery and the document.id functionality in mootools.
  6. What does the javascript code look like? Normally javascript shouldn't be an issue for ie8
  7. That's indeed one way to do it. What that means is that you send an array using square brackets in the name attribute. For example if you have to following fields in your form: <input name="el[]" val="1" /> <input name="el[]" val="2" /> <input name="el[]" val="3" /> <input name="el[]" val="4" /> You can then loop through these values like so: <?php foreach($_POST['el'] as $item) { echo $item; }
  8. As mentioned before that's not ajax that's just javascript effects. The examples are pretty straight forward in the jQuery documentation http://api.jquery.com/category/effects/
  9. You need serverside code that translate bb code to a htmlfor that. BB code is not magically turned into html by itself. Try a search for BBcode on this form there are quite a few threads on that subject. You need to escape data so that it wont break the query when querying a database. Or in the worse case scenario hack your database because you haven't escaped the user input. for example: <?php $html = "<h1>It's a heading</h1>"; $sql = "UPDATE `your_table` SET `html`= '$html' WHERE id=1"; mysql_query($sql); In this case it would break the query. I also suggest you readup a bit on sql injections that will make it clear why you should escape string data before you do a query.
  10. It would work the same as putting normal text into a database. If it's very limited html you want to enter into the db you might want to concider using bbcode instead.
  11. Here is a thought try a combination of grease monkey + jquery (or another framework) http://www.google.com/#q=jquery+greasemonkey That what it will be easy to search for that code sniplet and filter out the number.
  12. Reading that it does seem the installation went well. Since youre xampp splash page seems to do just fine the server should be fine too. This however has nothing to do with your browser. Try any other browser you'll prob get the exact same thing. Most likely the trouble occured when you coppied the htdocs files from windows to your linux htdocs folder. Try setting the write permissions for your files in the htdocs folder.
  13. http://lmgtfy.com/?q=php+get+random+image+from+directory
  14. http://www.codeproject.com/KB/scripting/AutoSuggestControl.aspx
  15. the code indentation is horrid to even look if it is out of scope or not. But here it is with proper indents function getSQLInfo(info) { if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("msg").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "secure/getInfo.php?table=" + type + "&info=" + info, true); xmlhttp.send(); } function login() { var user = document.getElementById("user").value; var pass = document.getElementById("pass").value; document.getElementById("msg").innerHTML = "<img src='secure/images/loading.gif'"; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var returi = xmlhttp.responseText; if (returi = "forward") { window.location = "account.php"; } if (returi = "wrong") { document.getElementById("msg").innerHTML = "Incorrect Login Information!"; } } } xmlhttp.open("GET", "secure/login.php?user=" + user + "&pass=" + pass, true); xmlhttp.send(); } function doYes() { document.getElementById("officermsg").innerHTML = "<img src='secure/images/loading.gif'"; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var returi = xmlhttp.responseText; document.getElementById("officermsg").innerHTML = returi; } } xmlhttp.open("GET", "secure/base.php?yes=1", true); xmlhttp.send(); } function doNo() { if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var returi = xmlhttp.responseText; document.getElementById("officermsg").innerHTML = returi; } } xmlhttp.open("GET", "secure/base.php?no=1", true); xmlhttp.send(); } function changedivuser() { document.getElementById('changeuser').innerHTML = '<input type="text" id="username"><input type="submit" onclick="return changerUsername();" value="Change It!">'; } function changerUsername() { document.getElementById("changeuser").innerHTML = '<img src="pic/loading.gif">'; var name getElementById("username").value; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var returi = xmlhttp.responseText; if (returi != "") { document.getElementById("msg").innerHTML = ""; document.getElementById("changeuser").innerHTML = '<input type="submit" value="Change Username" onclick="return changeUser();">'; document.getElementById("user_name").innerHTML = returi; } else { document.getElementById("msg").innerHTML = "Internal Error Contact Admin!"; } } } xmlhttp.open("GET", "secure/changename.php?name=" + name, true); xmlhttp.send(); } function getAccountInfo(type) { document.getElementById("msg").innerHTML = "<img src='secure/images/loading.gif'"; if (type = "user") { if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var returi = xmlhttp.responseText; if (returi != "") { document.getElementById("username").innerHTML = returi; document.getElementById("msg").innerHTML = ""; } } } xmlhttp.open("GET", "secure/account.php?" + type + "=1", true); xmlhttp.send(); } if (type = "email") { if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function () { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { var returi = xmlhttp.responseText; if (returi != "") { document.getElementById("email").innerHTML = returi; document.getElementById("msg").innerHTML = ""; } } } xmlhttp.open("GET", "secure/account.php?" + type + "=1", true); xmlhttp.send(); } } Looking at that its just a bunch of functions don't really see any problem there. Can you show the line that's actually causing the error (the line in firebug or whatever js debugger youre using)?
  16. Did you get this script from codeprojects.com? There is a description on how to make it work with ajax if this is the case.
  17. You could use Ajax for this. You mean each selectable item in a dropdown stored in an array?
  18. use a variable that stores if something has been clicked. example: <script type="text/javascript"> window.onload = function() { // use var to check if a link has been clicked var clickedOnce = false; document.getElementById('my_link').onclick = function() { // will only alert when clickedOnce is false if(!clickedOnce) { clickedOnce = true; alert('you clicked me'); } } } </script> <a href=# id="my_link">clickme</a>
  19. Try to find tutorials that are about uploading the images to the server you can modify it later so it saves the image name to the database. There should be plenty of tutorials about this subject online even this forum has plenty of topics about it.
  20. I don't think you need a multi dimensional array for that a simple 2d array would be sufficient. So far your table structure seems like so: dividendparams - paramid - paramname dividendhistorydetails - detailsid - paramid (fk?) - year - dividenditem Here the field paramid in table dividendhistorydetails looks like a foreign key. Lookup how to use JOINS in sql.
  21. I find this sentence confusing do you or do you not use $_FILES ? If you don't know how to use it I suggest you check the manual with the link and maybe lookup some php file upload tutorials How do you mean that? can you elaborate?
  22. The code confuses me a bit. The relevant code seems the following: $(document).ready(function(){ $("select#game").change(function(){ var post_string = "game=" + $(this).val(); $.ajax({ type: 'POST', data: post_string, cache: false, dataType: 'game_type', url: 'json.php', timeout: '2000', error: function() { alert("Error has occured"); }, success: function(data) { alert(data.length); alert(data[1].text); } }); }); }); with the line url: 'json.php', You're calling the file json.php. Is the code you pasted in your last post indeed json.php? Offtopic why are you using ob_start, ob_clean and die if I may ask?
  23. I'm guessing bild stands for image which i see 4 fields of. Where is the part where you handle the form when it has been submitted? And are you using $_FILES for this?
  24. I (and most likely others too) disagree. Try and post what you have so far for your upload script and people on the forum can help you / advice you how to correct or improve the script. What does the table look like?
×
×
  • 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.