Jump to content

RichardRotterdam

Members
  • Posts

    1,509
  • Joined

  • Last visited

Everything posted by RichardRotterdam

  1. your if statement is incorrect either do: if($message == $cmdPrefx . "deleteall: "){ echo substr(strrchr($message, ' '), 1); } or: if($message == $cmdPrefx . "deleteall: ") echo substr(strrchr($message, ' '), 1); How does this have to do with a wildcard or regex? Edit After reading it again I think i missread. Do you mean you want it to do a comparison on what the message starts with? What exactly do you want the if statement to do?
  2. Show what it is you tried and paste the code.
  3. Here is another one to add to the cheese list. Flash intros (preferably without the skip intro button and with play again button). Reminds me of this cartoon which is about creating your own cool site http://www.homestarrunner.com/sbemail51.html
  4. It's pretty much all written out for you in the jQuery UI documentation. http://jqueryui.com/demos/tabs/#ajax
  5. Actually that what you showed doesn't mean DOMDocument doesn't exist. It means you ran the command wrong. The dollar sign just indicates it's on the command line you shouldn't run that.
  6. You don't have to create a file you could run it on the command line. http://www.php.net/manual/en/features.commandline.usage.php $ php -r 'echo (class_exists("DOMDocument")) ? "It exists \n" : "It Does NOT exist \n";'
  7. So you want to scrape the following url : =60119]http://schulen.bildung-rp.de/gehezu/startseite/einzelanzeige.html?tx_wfqbe_pi1[uid]=60119 And filter out the following data: Why not use DOMdocument instead? <?php $dom = new DOMDocument(); @$dom->loadHTMLFile('http://schulen.bildung-rp.de/gehezu/startseite/einzelanzeige.html?tx_wfqbe_pi1[uid]=60119'); $divElement = $dom->getElementById('wfqbeResults'); $innerHTML= ''; $children = $divElement->childNodes; foreach ($children as $child) { $innerHTML .= $child->ownerDocument->saveXML( $child ); } echo $innerHTML;
  8. Is simple_html_dom.php part of typo3? Also what is it you want to accomplish? I don't see a question anywhere
  9. Can you further elaborate what you mean by: When should this notification be?
  10. while($result = mysql_fetch_object($run)){ //dynamically generate input <input type="text" name="id[]" id="id" class="input" value="1" /> <input type="text" name="price[]" id="price" class="input" value="2.00" /> } var price = $("input#price").val(); var id = $("input#id").val(); I see your using the id selector where it wouldn't be unique in this loop. I suggest you remove the id and use a css selector instead. You can select the prices with a css selector like so: // get input elements where the name starts with price var priceInputElements = $('input[name^=price]'); Here is an example how you could make your script work. It's not complete and you'll have to finish it by yourself. I added comments to explain how it works var priceInputElements = $('input[name^=price]'); // create an new object with properties id and price var postData = { id: [] // the id is an array price: [], // the price is an array }; // loop over the price input elements and place the value in the postData object $.each(priceInputElements, function(index, el) { // push the value in the price array postData.price.push($(el).val()); }); // @todo do the same loop thing for id here $.ajax({ url : 'response.php', data : postData, // post the created object here type : 'POST', dataType : 'json', success : function(response) { console.log(response); } }); });
  11. How are you handling the array on your PHP file? Can you post that code? As it is now i don't know how you need to format the variable which you are using for the ajax request.
  12. This is how the data param should look then again i'm not sure. what does youre edit_template_1.php $.ajax({ url : '../web20forms/edit_template_1.php', data : { price : [101, 69, 51], id : [1, 2, 3] }, type : 'POST', success : function(data) { } });
  13. I suggest you create an object with all the values you wish to post and pass that with the data arguement. Also look at the $.each method in jquery with which you can easily loop through objects/arrays // First create an object var yourData = {}; // loop through your price var $.each(price, function(index, val) { // do something with yourData var }); // pass it as arguement $.ajax({ data: yourData })
  14. What's so special about that? It just places an image inside a table styled with css.
  15. As mentioned before, is it url of the iframe on the same domain or a different one? If you're trying to fetch what cookie is set on a different domain then js not the way to go. You could use cURL though.
  16. +1 What exactly do you mean by "store part of the page such as the menu in memory"?
  17. Can't you just replace the html tags with xml tags? And do you need to save this xml to disk as an xml file?
  18. You could use variables.variable But why would you want this? There is usualy a better way other then variable variables.
  19. Here is an example for you: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> <script type="text/javascript"> $(document).ready(function() { // place the element into a var var monkeyButton = $('#monkey'); // fetch the offset (returns object{top, left}) var offset = monkeyButton.offset(); // scroll the windo to the offset $(window).scrollTop(offset.top); }); </script> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> <button id="monkey">Monkey</button>
  20. You pretty much summed it all up for what you need. All you need to do is search for it how to do it. Do a search for "javascript element position" Search for javascript cookies Read cookie and do something like the following: window.location.href = 'your_url_here#your_anchor_here';
  21. Try it the other way around so it's easier to read. <button id="button" type="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"> <span onclick="<?php echo "gohere('viewpub.php?PubID={$row['PubID']})" ?>" class="ui-button-text">View Pub</span> </button>
  22. Here is a simple example with buttons instead of images. You could easily change the buttons for images. <script type="text/javascript"> window.onload = function() { // fetch delete button from DOM using var deleteButton = document.getElementById('delete_button'); // fetch undo button from DOM wich is hidden using CSS var undoButton = document.getElementById('undo_button'); // set onclick event for the delete button deleteButton.onclick = function() { // set the style to inline of the undo button so its not hidden any more undoButton.style.display = 'inline'; } } </script> <button id="delete_button">Delete</button> <button id="undo_button" style="display:none;">Undo</button>
  23. I suggest you focus on this part as you describe first: Search the web for javascript confirm box and let us know if you get stuck with your code.
  24. As stated before your description is quite hard to understand. However I do see something in your code that in your code that makes me think that your looking for the error handler of the ajax object. In your code I see this : var warning = "<font color=\"red\">Unable to load server details</font>"; To see if an error occurs try something like: $.ajax({ success: function() { // your normal action when the server call is running as expected }, error: function() { // your code when a error occurs on the server such as a timeout } }); if this was not what you were looking for can you try again describing your exact problem?
  25. So what you're saying is that you don't want any text when the status is locked correct? Looking at the defaults that shouldn't be much of a problem: var defaults = { // style these options with css to fit your application labelText: "Slide to Unlock:", noteText: "Proves you're human ", lockText: "Locked", unlockText: "Unlocked", iconURL: "../arrow_right.png", inputID: "sliderInput", onCSS: "#333", offCSS: "#aaa", inputValue: 1, saltValue: 9, checkValue: 10, js_check: "js_check", submitID: "#submit" }; notice the unlockText : "Unlocked" and lockText : "Locked" My guess is you do something like this (untested): $(document).ready(function() { $.slideLock({lockText:''}); });
×
×
  • 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.