Jump to content

scott100

Members
  • Posts

    1,819
  • Joined

  • Last visited

Everything posted by scott100

  1. Replace this tutorials table with the one you currently have, i just added style="left:90px" to it and it works ok.<table class="menu" id="tutorials" width="120" style="left:90px"><tr><td class="menu"><a href="history.php/#C2">HTML</a></td></tr><tr><td class="menu"><a href="history.php/#C3">XHTML</a></td></tr></td></tr></table>
  2. Hi Kev,This fixed your border: body{margin:0px;padding:0px}This fixed your white bar: <table style="position:relative;top:-5px" code below now works ok in ie and ffps i tweaked your if statements cause some of the changes you made were contradicting each otherScott----<html><head> <meta http-equiv="content-type" content="text/html;charset=utf-8"><style><!--a {text-decoration: none; }--></style> <script language="JavaScript"><!--function SymError(){ return true;}window.onerror = SymError;var SymRealWinOpen = window.open;function SymWinOpen(url, name, attributes){ return (new Object());}window.open = SymWinOpen;//--></script><script>function findLivePageHeight() {if (window.innerHeight) {//alert ('uses Inner');return window.innerHeight;}if (document.body.clientHeight) {//alert ('uses Client');return document.body.clientHeight;}return (null);}function classChange(){livePageHeight = findLivePageHeight();var newHeigh=0;if((livePageHeight>0)&&(livePageHeight<100))newHeigh=3;else if((livePageHeight>100)&&(livePageHeight<150))newHeigh=5;else if((livePageHeight>150)&&(livePageHeight<250))newHeigh=7;else if((livePageHeight>250)&&(livePageHeight<350))newHeigh=9;else if((livePageHeight>350)&&(livePageHeight<450))newHeigh=12;else if((livePageHeight>450)&&(livePageHeight<550))newHeigh=13;else if((livePageHeight>550)&&(livePageHeight<650))newHeigh=14;else if((livePageHeight>650)&&(livePageHeight<750))newHeigh=15;else newHeigh=16;for (i=0;i<document.getElementsByTagName("table").length; i++){if (document.getElementsByTagName("table").item(i).className == "foo"){document.getElementsByTagName("table").item(i).style.fontSize = newHeigh+"pt";}}}</script><style>table.foo{font size:15px}body{margin:0px;padding:0px}</style></head><body onload="classChange();" onresize="classChange();" style="overflow: hidden"><div align="center"><img src="images/skyline.jpg" alt="" height="64%" width="100%" border="0"><table style="position:relative;top:-5px" class="foo" width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="navy" height="6%"><tr height="6%"><td align="center" width="20%" height="6%"><font size="3" color="white" face="Century Gothic">home</font></td><td align="center" width="20%" height="6%"><font size="3" color="white" face="Century Gothic"><a href="buy.html"><font color="white">buy</font></a></font></td><td align="center" width="20%" height="6%"><font size="3" color="white" face="Century Gothic"><a href="sell.html"><font color="white">sell</font></a></font></td><td align="center" width="20%" height="6%"><font size="3" color="white" face="Century Gothic"><a href="financial.html"><font color="white">financial</font></a></font></td><td align="center" width="20%" height="6%"><font size="3" color="white" face="Century Gothic"><a href="contact.html"><font color="white">contact</font></a></font></td></tr></table> <table class="foo" width="100%" border="0" cellspacing="0" cellpadding="10" height="18%"><tr valign="top" height="18%"><td valign="top" align="justify" bgcolor="white" width="40%" height="18%"><font face="Century Gothic">FSD’s philosophy is simple; we endeavour to take your brands and increase sales volume into secure non-traditional retail outlets. We have a hard earned reputation for innovation, quality and service. </font></td><td valign="middle" bgcolor="white" width="20%" height="18%"><img src="images/logo.gif" alt="FSD" align="top" border="0"></td><td valign="top" align="justify" bgcolor="white" width="40%" height="18%"><font face="Century Gothic">The FSD portfolio comprises a range of internationally renowned brand names from around the globe, as well as some exciting newcomers that will become the brands of the future.</font></td></tr></table></div></html><script language="JavaScript"><!--var SymRealOnLoad;var SymRealOnUnload;function SymOnUnload(){ window.open = SymWinOpen; if(SymRealOnUnload != null) SymRealOnUnload();}function SymOnLoad(){ if(SymRealOnLoad != null) SymRealOnLoad(); window.open = SymRealWinOpen; SymRealOnUnload = window.onunload; window.onunload = SymOnUnload;}SymRealOnLoad = window.onload;window.onload = SymOnLoad;//--></script>
  3. 1) I don't think it does run with all old browsers2) depends on what version u are using ie 1.23) people can switch it offsolution: use the noscript tag to display a message to people not seeing javascript<body><script type="text/javascript"><!--document.write("Hello World!")//--></script><noscript>Your browser does not support JavaScript!</noscript></body>
  4. scott100

    New window

    Right idea but it seems a bit complicated, you can do this with one line of code:<input type="button" onclick="window.open('http://www.google.com',null,'height=200,width=400,status=yes,toolbar=no,menubar=no,location=no');" value="click me" />
  5. This is one way you could split the browser into 2 sections using <div> works in IE and FF... <html><head><style>#leftnavigation { position : absolute; left : 0; width : 150px; margin-left : 10px; margin-top : 20px; color : #000000; padding : 3px;}#content { top : 0px; margin : 0px 0% 0 170px; padding : 3px; color : #000000;} </style></head><body topmargin="0" leftmargin="0"><div id="leftnavigation"><h2>Menu</h2><ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> <li><a href="#">Etc</a></li></ul></div><div id="content"><h2>Sample Content</h2><p>This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. This is the content section of the page. </p></div></body></html>
  6. Is this any use?http://www.w3schools.com/dhtml/tryit.asp?f...trydhtml_menu10
  7. No probs kevmeister glad i could help, enjoyed the challange The answer to your quickie is yes, you can use an onload event handler that will run the function when the page loads and check the screen size, replace the current body with this one.<body onload="classChange();" onresize="classChange();" style="overflow: hidden">
  8. You can make text auto adjust depending on the size of the window, use dhtml -To dectect when the window changes put this in the body tag: onresize="" Then find out the current height: findLivePageHeight()Use an if statement to set new text size: if((livePageHeight>0)&&(livePageHeight<200))newHeigh=2;change the font size: document.getElementsByTagName("table").item(i).style.fontSize = newHeigh+"pt";the code below should work ok. took me ages <html><head><script>function findLivePageHeight() { if (window.innerHeight) { //alert ('uses Inner'); return window.innerHeight; } if (document.body.clientHeight) { //alert ('uses Client'); return document.body.clientHeight; } return (null);}function classChange() {livePageHeight = findLivePageHeight();var newHeigh=0;if((livePageHeight>0)&&(livePageHeight<200))newHeigh=2;else if((livePageHeight>200)&&(livePageHeight<400))newHeigh=5;else if((livePageHeight>400)&&(livePageHeight<600))newHeigh=9;else if((livePageHeight>600)&&(livePageHeight<800))newHeigh=12;else newHeigh=15; for (i=0;i<document.getElementsByTagName("table").length; i++) { if (document.getElementsByTagName("table").item(i).className == "foo") { document.getElementsByTagName("table").item(i).style.fontSize = newHeigh+"pt"; } }}</script><style>table.foo{font size:15px}</style></head><body onresize="classChange();" style="overflow: hidden"><div align="center"><table class="foo" width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="navy" height="65%"><tr height="65%"><td colspan="3" height="65%"><div align="center"><img src="images/skyline.jpg" alt="" height="100%" width="100%" border="0"></div></td></tr></table><table class="foo" width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="navy" height="5%"><tr height="5%"><td align="center" height="5%"><font color="white" face="Century Gothic">home</font></td><td align="center" height="5%"><font color="white" face="Century Gothic">wholesale</font></td><td align="center" height="5%"><font color="white" face="Century Gothic">brands</font></td><td align="center" height="5%"><font color="white" face="Century Gothic">financial</font></td><td align="center" height="5%"><font color="white" face="Century Gothic">contact</font></td></tr></table><table class="foo" width="100%" border="0" cellspacing="0" cellpadding="10" height="30%"><tr height="30%"><td valign="top" bgcolor="white" height="30%"><font face="Century Gothic">FSD is a global leader in the residual wholesale of branded foods, beverages, toiletries and homecare. Built on more than 3 decades of quality and innovation, FSD International has grown from modest beginnings to become the largest residual wholesaler in the UK and?</font></td><td valign="top" bgcolor="white" height="30%"><img src="images/logo.gif" alt="" height="104" width="206" border="0"></td><td valign="top" bgcolor="white" height="30%"><font face="Century Gothic">FSD is a global leader in the residual wholesale of branded foods, beverages, toiletries and homecare. Built on more than 3 decades of quality and innovation, FSD International has grown from modest beginnings to become the largest residual wholesaler in the UK and?</font></td></tr></table></div></html>
  9. I think it should also distinguish between those who post questions and those who answer them.Someone could be an advanced member if they post 30 questions or answer 30 posts.Why not have two rankings for people, one for how many questions they post and another for how many they help with.You could even have a "rate this posts usefullness" after each reply to a post, this would allow the person who asked the original question or others to rate each of the replies that are received.... this could add or deduct to the helpers rank.Just an idea, could be abused though.
  10. What chocolate570 told you should work perfectly, did you use script tags, see below, btw you can put javascript in either the head or body of a page<html><head><script>//i am a single line comment/* I am a multi line comment */</script></head><body></body></html>
  11. Your link doesn't work, please try again!!
  12. Hi Gloria, try this i think it's what you were asking for, works in both IE & FF.<head><script>function check(){content=document.getElementById('txtName').value;document.getElementById('lgd').innerHTML=content;return false;}</script></head><body><form onsubmit="return check()">Name<input type="text" id="txtName" name="txtName" /><input type="submit" value="Submit" name="qry" id="qry"></p></form><fieldset style="width:100%;height:75%"><legend id="lgd">txtName.value</legend><div id="divResults"></div></fieldset></body>
  13. No need to use javasript for this, just plain css, examples attached:<a href="#" style="cursor:pointer">pointer</a><br /><a href="#" style="cursor:crosshair">crosshair</a><br /><a href="#" style="cursor:e-resize">e-resize</a><br /><a href="#" style="cursor:help">help</a><br /><a href="#" style="cursor:nw-resize">nw-resize</a><br /><a href="#" style="cursor:text">text</a><br /><a href="#" style="cursor:wait">wait</a>There are a few others but you get the idea.
  14. Full name: Scott WilsonAlternative name(s): nopeBirth date(dd/mm/yyyy): 25/09/80Gender: MaleZodiacal sign: LibraCountry of residance: ScotlandCity of residance: GlasgowHeight: 6'2"Weight:13.5Eyes:blueHair:brownishSmoking/Drinking/Drugs:no/no/noFavourite Music:Hard House, Chart - anything going thump thump reallyFavourite Movies:love horror films like chainsaw massacre & wrong turn, sick i know. Also like some girly stuff like 50 first dates and shalow hal to help keep me balanced. shrek rules though best film everInterest:Computers and internet are good, enjoy helping others in forums like this when/if i can. Follow my football team Celtic. Car and DIYPets: Budgie (it's my mums, honest!)Additional comments: Hello to all the other members hereps why are these forums not widely advertised, i just happened to stumble across one day when i was referring to the w3schools site and notice a link at the bottom of the list.
  15. scott100

    No Apostrophe

    Try the code below, i think your problem sounds like magic quotes, when the user enters an apostrophe into a text field it throws a wobbly when submitted because they have a special meaning.The build in function stripslashes should sort this out, look at this page for more info: http://uk.php.net/manual/en/function.stripslashes.php$conn=odbc_connect('ITLog','','');if (!$conn){exit("Connection Failed: " . $conn);}$department = $_REQUEST['department'];$contact = $_REQUEST['contact'];$problem = $_REQUEST['problem'];stripslashes($department);stripslashes($contact);stripslashes($problem);$sql="insert into IT_Log (department, contact, problem) values ('$department','$contact','$problem')" ;$rs=odbc_exec($conn,$sql);if (!$rs){ exit("Error in SQL");}
  16. You could use a server side language like php, you submit the form to a php file and have that file process the form, php has a built in function called mailto() which you could use. That function can be set up to send the information in your form to an email address that you specify.You wouldn't need a db to do this.p.s. You can send info from a form by email but it's not very reliable. Results can vary depending on what browser the client is using and they must have an email programme installed on there machine to send the info i.e. oulook, an internet email like yahoo wont work.
  17. scott100

    Best One

    I would go for php aswell, i don't know which one is better but it's cross platform which is great and if you know a language like JavaScript or C++ it's very similar. Plus there is tons of support and books on it. ASP only works with windowsColdfusion? never heard of it until i came here
  18. this?<img style="left:10px;top:0px;position:relative;" src="xxx.jpg" />
  19. One way would be to put this piece of code into the index.html page. The JavaScript will automatically forward the current page to the new page.<body onload="window.location.href = 'http://www.index.php'">This of course requires that the client machine has JavaScript enabled.hope this helps.
  20. Skemcin is right you won't be able to produce a hit counter with javascript as this is a client-side language and has no way of saving information that you can access.You would need to use a server-side language like php for example and link it to a file or databases that adds 1 to a variable each time the page is requested.
  21. scott100

    2 HTML codes

    1)You can change the mouse cursor by using CSS, example below:<a href="http://www.google.com" style="cursor:crosshair">Google</a>For a list of available cursors look here: (ps you can also create your own)http://www.w3schools.com/css/pr_class_cursor.asp--------------------------2)To make the page fade in and out go to this page and scroll down to Page Enter Effects at the very bottom of the pagehttp://www.w3schools.com/dhtml/dhtml_examples.aspThe page enter effects only work in ie though.
  22. Trybody{background: #add2ff; }
  23. Here's a few more freebiesCrimson Editor: http://www.crimsoneditor.com/orHTML Kit: http://www.chami.com/html-kit/download/Never used both in greate detail but html kit is quite good, i've heard that it's the best free editor out there. You can FTP, Validate Pages, Preview and more.Never really used either in great depth, like munch i prefer coding in notepad.
  24. yes, try this, just add it to the page within the frame you want to print.<input type="button" value="print this frame" onClick="java script:window.print()" />
  25. Hey, i think i said to you the other day, you use css you can do this.You can set it up so that the information display is set to none and wont be printed.
×
×
  • Create New...