Jump to content

Chocolate570

Members
  • Posts

    1,550
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Chocolate570

  1. Wierd--when I tested the pop up and changed my resolution, it gave me the 350x200 window or whatever that was. :S
  2. Hey,Try this. You had a bit of a mix up with your bracket nestings. <script type="text/javascript">function popitup(url){ newwindow=window.open(url,'name','height='+scrnH+', width='+scrnW+', scrollbars=yes, status=yes, location=no, resize=yes, toolbar=no, directories=no, menubar=no, status=no left=5, top=5'); if (window.focus) {newwindow.focus()} return false;}scrnH=screen.height;scrnW=screen.width;if (scrnH<1200) { scrnH=800;scrnW=800}else { if (scrnH>1000 && scrnH<1200) { scrnH=800;scrnW=450 }else { scrnH=350;scrnW=550}}</script> It worked perfectly for me (in a couple of different resolutions) in FireFox. Try it out :)Choco
  3. You must remember: The W3C validator checks your syntax. It saw this:directory:\subdirectory:\name.extensionAnd said it was a valid entry--and it is.Also, the W3C validator is sometimes used more for aesthetic purposes---so you can stick a big ol' tag on your site saying "VALIDATED!"
  4. Please do not make duplicates of the same topic. There is no need to spam the forum if you already put your question in another category.Thanks.Reference: http://w3schools.invisionzone.com/index.ph...view=getnewpost
  5. Here's a way to do it with javascript.Put this script between the <head> and </head> tags in your HTML document. And make sure that the form element that has the text in it has an id of "searchGet" <script type="text/javascript">function goTo(val) { window.location="http://folk.ntnu.no/khanghyv/Arcade/index.php?b=rswild&u="+val;}</script> Your form should look like this:<!-- The text input --><input type="text" id="textval" /><!-- The button --><input type="button" value="Go" onclick="goTo(document.getElementById('textval').value)" />
  6. If I understand what you mean, you have a form input that has a sample text like "Enter search terms here" and when focused on, that text dissapears. But when you submit it, the text is still submitted along with what the user put in?It shouldn't do it if you are using this code in the onfocus= event of the form input.onfocus="this.value=''"It should clear it, and not submit it. Is that what you're doing?Hope that helps,Choco
  7. Try this. <script type="text/javascript">function popitup(url){scrnH=screen.height;scrnW=screen.width; newwindow=window.open(url,'name','height='+scrnH+', width='+scrnW+', scrollbars=yes, status=yes, location=no, resize=yes, toolbar=no, directories=no, menubar=no, status=no left=5, top=5'); if (window.focus) {newwindow.focus()} return false;}</script> I set the variables scrnH and scrnW just in case you'd like to edit how big the pop up really is (like screen.width-12 or whatever )-Choco
  8. Please do not use caps in your topic titles. It's very disturbing. Thank you.Also, you might want to try this page.http://www.quirksmode.org/js/mouseov.html
  9. It works in FireFox. Dunno about Opera, but why wouldn't it? It's simple javascript
  10. What would you like to do with the script? Just fetch the weather? Then use the following PHP script on a .php page anywhere you want the weather to be. :)In the script, just edit the variables labled "state" and "city" and then the script will go procure the temperature of that place. <?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: http://www.troywolf.com/articles/php/class_http/;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$state="put state here, initials!"$city="put city here"$h->fetch("http://weatherreports.com/United_States/".$state."/".$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>*/echo $curTemp;?>
  11. You mean like a shoutbox? Where people can write their comments and anyone can view them as they go to the site?It's actually quite simple, if you don't want one that's complex. It's just a matter of a small php database script.Or, you can download one of the hundreds available on the web. Just search google for "free shoutbox".
  12. Chocolate570

    text box

    Try this? <html><head><script type="text/javascript">function goSub() {var name=document.getElementById("namebox").value;var age=document.getElementById("agebox").value;document.getElementById("namebox").style.visibility="hidden"document.getElementById("agebox").style.visibility="hidden"document.getElementById("gobut").style.visibility="hidden"try{if(age<18)throw "Err1"else if(isNaN(age))throw"Err2"elsethrow"right"}catch(re){if(re=="Err1")document.write("sorry "+name+" you are too young to enter")if(re=="Err2")alert("You must enter a number")if(re=="right")document.write("Hello "+name+" you are "+age+" years old!")}}</script></head><body><input id="agebox" type="text" value="Age?"><input id="namebox" type="text" value="Name?"><input type="button" value="Go" onclick="goSub()" id="gobut" /></body></html>
  13. Try this page -- I'm not sure if it works with 9.0.1.
  14. Well, there is one way. :)Go here: http://www.codehouse.com/webmaster_tools/html_encoder/Enter the HTML code for the embed in the box.Then take the javascript code that is given to you and put it where you want your embed you appear. For example, here's how to write <embed>Hi</embed>: <script type="text/javascript">document.write('\u003c\u0065\u006d\u0062\u0065\u0064\u003e\u0048\u0069\u003c\u002f\u0065\u006d\u0062\u0065\u0064\u003e')</script> And it validates!
  15. http://hoohoo.ncsa.uiuc.edu/cgi/intro.htmlTry googling "what is cgi" :)Hope that helps.
  16. Try this page. http://www.dynamicdrive.com/dynamicindex1/index.html
  17. Try this as your main, first, large code: <script type="text/javascript">function chan() { document.getElementById("osspan").innerHTML=BrowserDetect.browser+" "+BrowserDetect.version+" / "+BrowserDetect.OS}var BrowserDetect = {init: function () {this.browser = this.searchString(this.dataBrowser) || "An unknown browser";this.version = this.searchVersion(navigator.userAgent)|| this.searchVersion(navigator.appVersion)|| "an unknown version";this.OS = this.searchString(this.dataOS) || "an unknown OS";},searchString: function (data) {for (var i=0;i<data.length;i++) {var dataString = data[i].string;var dataProp = data[i].prop;this.versionSearchString = data[i].versionSearch || data[i].identity;if (dataString) {if (dataString.indexOf(data[i].subString) != -1)return data[i].identity;}else if (dataProp)return data[i].identity;}},searchVersion: function (dataString) {var index = dataString.indexOf(this.versionSearchString);if (index == -1) return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},dataBrowser: [{string: navigator.vendor,subString: "Apple",identity: "Safari"},{prop: window.opera,identity: "Opera"},{string: navigator.vendor,subString: "iCab",identity: "iCab"},{string: navigator.vendor,subString: "KDE",identity: "Konqueror"},{string: navigator.userAgent,subString: "Firefox",identity: "Firefox"},{ // for newer Netscapes (6+)string: navigator.userAgent,subString: "Netscape",identity: "Netscape"},{string: navigator.userAgent,subString: "MSIE",identity: "Explorer",versionSearch: "MSIE"},{string: navigator.userAgent,subString: "Gecko",identity: "Mozilla",versionSearch: "rv"},{ // for older Netscapes (4-)string: navigator.userAgent,subString: "Mozilla",identity: "Netscape",versionSearch: "Mozilla"}],dataOS : [{string: navigator.platform,subString: "Win",identity: "Windows"},{string: navigator.platform,subString: "Mac",identity: "Mac"},{string: navigator.platform,subString: "Linux",identity: "Linux"}]};BrowserDetect.init();window.onload=chan;</script> And put a span with the id of "osspan" anywhere on the page.
  18. Hey!You might want to check out a php script I put together. Emphasis on put together, nothing is mine in this...I just assembled it so it would work http://w3schools.invisionzone.com/index.ph...ost&p=19667If you need help modifying that for your needs, I'll gladly do it.
  19. Pretty much, James. I just wanted the page to refresh it's content. Could I get the code for that?
  20. Hi guys,I need someone to help me with this.What I'm aiming for is a function I can call, like pgref(), and ajax will re-request the server for the page data (all of it) and then replace the page with that data, but without the user having to refresh.Is it possible?Thanks!Choco
  21. Aspnetguy's right: It's parseInt(string,base). The base allows you to convert the string into a number, and then format it according to the base---for example,parseInt('077',10) is 77, because 077 in base 10 is 77.
  22. You're asking for a CSS or JavaScript "tree menu". Some of the ones I recommend:http://www.benefit-from-it.com/index.php?f....cssULmenuIntrohttp://www.dynamicdrive.com/dynamicindex1/navigate1.htmHope that helps. :)Choco
  23. Check this page out.http://msconline.maconstate.edu/tutorials/...sdhtml15-03.htmI think that's what you want?
  24. We can't change it now Too much has been decided. Also, there wouldn't be much backend involved, would there.
×
×
  • Create New...