Jump to content

Chocolate570

Members
  • Posts

    1,550
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Chocolate570

  1. Just W3schools. It has all of the resources I need. I actually only learnt half otf the HTML tutorial, and then picked up the rest on my travels on the web.
  2. You'd have to use an active X control, if it is possible to do it. Search on google if no one can help you.
  3. The setTimeout function can not handle executing a function as one of its parameters if the function has arguments. That's probably your problem.
  4. Some browsers don't support window.status, and in FireFox, you have to enable it as an option in the settings section. But this should work in IE: <html><head><script type="text/javascript">function roll(txt){window.status=txt;}</script></head><body><a href="#" onmouseover="roll('Home')" onmouseout="roll('')">Home</a></body></html>
  5. Chocolate570

    Flaperdubbers!

    It gives the T_VARIABLE error on this line:var $name = $this->data("name");(we were discussing this on MSN )
  6. I'd love more on SQL connections like boen said, and we need a detailed tutorial on classes. They're pretty important.Maybe some examples on how PHP can interact with AJAX and perform different things too. Sessions would be nice, along with (slightly off-topic) a PHP quiz? I've always wanted to check how much I can do (which shouldn't be much) :)I'll see if I can come up with some other things...I suggest you just look at the ASP section and try to balance each one out.
  7. Well, what I usually do is give the customer a list of questions (20-30), finish the site while they're answering the questions, show it to them, they're happy, i'm happy. :)
  8. More specifically, this post:http://w3schools.invisionzone.com/index.ph...indpost&p=19667You'll have to read the top comments and go to the first URL mentioned. There, download class_http.php.
  9. Yup, except I don't know why you have an extra bracket at the end. Is that just part of your main script? If so, that should work. You could remove those \'s behind the quotes, though.
  10. I suggest you also add this:print '<noscript><a href=\"index.php\">Click here to go back to index.php</a></noscript>';As some browsers don't support javascript.
  11. So you're doing this with an external file?
  12. You might want to look at this page. http://www.soxiam.com/Code/CSSCrossBrowserTransparency
  13. If only it weren't like that...that way you wouldn't need to make all of your scripts cross-browser. But like Scott said, you're correct, JS is proccessed by the browser.
  14. Hi,What are you trying to do with this for loop? Like, what's it supposed to do if it were fixed?
  15. Thank you so much aspnet! After a bit of adding on to that, it worked beautifully. It does exactly what I wanted it to do, and I don't have to do any work passing the stuff to the php from javascript. Thanks again!Choco(By the way, if anyone's interested, the code's beneath this line. Basically, at the end of it, $curTemp has the temperature in whatever city you chose. Just set this to whatever you want.)$h->fetch("http://weatherreports.com/United_States/STATE INITIALS/CITY"); <?php/* Name: Retrieve Weather Script;Creator: Chocolate570;Last Update: Monday April 4th, 2006 at 8:36 AM;Description: Use class_http.php to screenscrape weatherreports.com;Special Thanks To: [url="http://www.troywolf.com/articles/php/class_http/;"]http://www.troywolf.com/articles/php/class_http/;[/url]Special Thanks To: administrador(ensaimada)sphoera(punt)com's note on php.netCont: on how to retrieve part of a string based on its surroundings<start>*///Start Functionfunction get_string_between($string, $start, $end){ $string = " ".$string; $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; return substr($string,$ini,$len);}//Retrieve class filerequire_once('./class_http.php'); //New HTTP object$h = new http(); //Cache Directory$h->dir = "./cache/"; //Retrieve Weather Site$h->fetch("http://weatherreports.com/United_States/STATE INITIALS/CITY");//Save the temperature into a variable$curTemp = get_string_between($h->body,'<div class="currentTemperature">','°F</div>');/*Directions of Use: Do whatever you want with $curTemp.Cont: It contains something like "60". That's the tempCont: In farenhight. Have fun.</start>*/?>
  16. Can I make a PHP page on my server, include the website I need, and then use that in the iframe?
  17. See, the problem is, I can't use AJAX with this because I need a site that's not on my domain. So I was hoping to use an iframe.But thank you very much for that post script! :)Choco
  18. Hello,1. I'm making a script to retrieve the weather from a specific site. To do this, I need a way to access the innerHTML of that site while on my current one, therefore, I decided on an iFrame. However, how on earth do I access the innerHTML of the body of the document of the iframe in a cross browser way?2. How to pass a variable to a PHP script? I was thinking about setting an form value to the variable, submitting the form, and sending the contents through POST to get to the PHP. Will this work?Thank you so much in advance.Choco
  19. if (document.cookie.beenbefore !='TRUE'){I'm pretty sure you can't access a cookie like that. You'd have to find the appropriate variable in document.cookie using indexOf and substring, and then substring that to get the variable. The correct code is displayed in the W3S cookie example. :)Choco
  20. Inline CSS, from what I know, is only restricted in the strict XHTML doctype.
  21. Chocolate570

    Story page

    Or, adding on to what boen said, use an iframe, with links containing targets to the iframe, and have each page in a different file.
  22. Chocolate570

    Story page

    You'd have to use javascript to hide and show specific parts.
  23. You could dynamically build the page with javascript, making whatever parts you'd like first. It would be slightly bulky and take a bit of extra code to check when stuff is loaded, but is possible.
  24. Oh, thanks for pointing that out, Scott. Never knew you could use text. I've heard of innerText, just not text
  25. Wouldn't it bedocument.formname.Product.options[0].innerHTML="rulers";
×
×
  • Create New...