Jump to content

theAntiGeek

Members
  • Posts

    17
  • Joined

  • Last visited

About theAntiGeek

  • Birthday 09/03/1984

Contact Methods

  • MSN
    roberthinckley84@hotmail.com
  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Location
    Scotland - Dundee and Orkney

theAntiGeek's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. alright guys. im having trouble getting a <div> to stretch to contain it contents. the prob is that it just isnt stretching at all. the div just sits at the top of the screen, (i can see it cos of the border i have on it), while the contents that the div is spose to contain, displays perfectly down the rest of the page. im using overflow:visible; to make the stretching happen.the div thats spose to stretch is called "content" and heres the css for it:#content{ position:relative; margin:auto; width:722px; height:420px; border:1px solid #000000; overflow:visible; background-color:#FFF; background-image:url(images/background.gif); background-repeat:no-repeat; background-position:bottom; padding: 10px; border-left:1px solid #d0bc0f; border-right:1px solid #d0bc0f; }heres the code on the html page: (could the problem be that "content" contains other divs that are placed using absolute positioning?) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Northstar New Media</title><link href="northstar.css" rel="stylesheet" type="text/css" /></head><body><div id="header"><h1 class="off-left">Northstar New Media - Web Design Services and Interactive Multimedia</h1></div><div id="nav"><div id="links"><ul><li><a href="#">Web Services</a></li><li><a href="#">Multimedia Design</a></li><li><a href="#">3D Landscape Visualisation</a></li><li><a href="#">Contact NorthStar</a></li></ul></div></div><div id="content"> <!--DIV CONTENT STARTS HERE--> <div id="featured"> </div> <div id="indextext"> <p><span id="startertext">NorthStar New Media</span> is an innovative web and multimedia design company with a large portfolio of projects. <br /><br /> If you are looking for a small <span id="purple">website</span> for your business, a full <span id="purple">e-commerce</span> solution, a database driven <span id="purple">web application</span> or a full business <span id="purple">web promotion</span> strategy NorthStar New Media’s web team has a solution for you. <br /><br /> Our multimedia arm specialises in promotional & training <span id="purple">multimedia CDROM</span> or <span id="purple">kiosk</span> driven applications and this part of our business has developed considerable expertise in <span id="purple">3d terrain simulation</span> and the <span id="purple">visualisation</span> of developments like windfarms, aquaculture and other industrial developments to assist in planning. <br /><br /> Our support services include poster or <span id="purple">print design</span> and also product or <span id="purple">digital photography</span> and <span id="purple">video</span> as well as professional <span id="purple">digital audio editing and post production</span> to commercial CD standards. <br /><br /> Please contact us for a competitive quote or more information.<br /> </p> </div> <div id="sidebarindex"> <div id="subnav"><a href="#">Web Design & Hosting<br /> E-Commerce & Web Applications<br /> Website Maintenance & Promotion<br /> Multimedia CDROMs<br /> Web Based Multimedia<br /> Multimedia Kiosks & Touch Screens<br /> Conventional Print Media<br /> The Virtual Terrain Project<br /> ZVI Analysis<br /> Photomontages</a></div> <div id="login"><a href="#">Web Customer Login Area</a></div> <div id="vtp"></div> </div> <div id="footer"><p>Validated for XHTML and CSS</p></div></div> <!--DIV CONTENT CLOSES HERE--></body></html>
  2. i have found a better way to do this so dont waste your time reading it.
  3. can anyone tell my why a variable in ASP is only storing characters in a string upto the first white space character? this string is from the value of "topic" from this SQL statement.rs.Open "SELECT topic FROM blogentrys ORDER BY entryNo DESC", connthe value of "topic" is "my first blog entry" i use the following code to assign this string to the variable:Dim topicValuetopicValue = rs.Fields.Item("topic").Valuebut when i display the value of the variable topicValue i get only "my".this def has something to do with the fact the string is coming from the sql statement.any help or explanation would be great.cheers guys
  4. thank you pulp that is working now!now if you just want to give me your bank details i shall pur some money your account for you
  5. cheers pulp. i tried that but it still isnt getting the value of the SQL query.heres what i have:<% dim val set conn=Server.CreateObject("ADODB.Connection") conn.Provider="Microsoft.Jet.OLEDB.4.0" conn.Open "D:/Inetpub/wwwroot/finesplice/htdocs/webdata/dbblog.mdb" set rs=Server.CreateObject("ADODB.recordset") rs.Open "SELECT topic FROM blogentrys", conn do until rs.EOF for each x in rs.Fields val = rs.Fields.Item("topic").Value Response.Write("<a href='blogpost.asp?mytopic='" + val + ">" + x.value + "<" + "/a>" + "<br" + "/><br" + "/>") next Response.Write("<br />") rs.MoveNext loop rs.close conn.close %>can you see why the value of "topic" isnt being passed on?
  6. hey everyone.this question is kinda like my last post in that its fairly simple as i can do it in coldfusion but i just cant figure it out in ASP.I need to take the value (topic) of this SQL statement:"SELECT topic FROM blogentrys"and put it into this link so it is passed to another page.heres what i have for the link so far but it isnt retrieving the value of "topic" from the SQL statement, i know this because i display the variable on the next page and no value is displayed, only the name.Response.Write("<a href='blogpost.asp?mytopic='"& rs.Fields.Item("topic").Value&"'>" + x.value + "<" + "/a>" + "<br" + "/><br" + "/>")any help much appreciated. cheers
  7. cheers pulp that works perfectly.
  8. hello everyone.this is something quite simple as i can do it in coldfusion but im learning ASP and cant figure out the correct syntax.i want to have the output from a SQL query be the text for an anchor tag.heres my output statement : Response.Write(x.value & "<br /><br />")can anyone tell me the correct way to wrap this output in an anchor tag so only the words and not the break tags are includded in the anchor text?cheers guys
  9. cheers scott that help loads.i have a question, the "objectID", i changed the name of it in my code, and then it didnt work, so obviously "objectID" is an attribute name. right? also, is it an attribute of the id passed into the fucntion from the html page or something else.just wondering for future reference. thanks again
  10. thanks for the help. i added the single quotes and now im getting a new error which is this:Error: menu.style has no propertiesits refferring to line 27 which is the if statement arguement for the toggleMenu function.i dont have a clue how to fix this :)so any more help is much appreciatted.cheers
  11. hello there. can anyone tell me why i am getting the following error for this small bit of javascript im running in the <head> of my html page when i open it in firefox. it works perfectly in IE. it has something to do with the function "togglemenu" as my other function "togglebutton" appears to be workin ok. its a drop down menu incase you wondered cheers guyserror massage:Error: sweetSub is not definedheres my code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Stockan and Gardens</title> <link href="styles/stock_and_gardens.css" rel="stylesheet" type="text/css" /> <script type="text/JavaScript"> function toggleButton(butt) { if(butt.style.borderTopStyle == "inset") { butt.style.borderStyle = "outset"; } else { butt.style.borderStyle = "inset"; } } function toggleMenu(menu) { if(menu.style.display == "inline") { menu.style.display = "none"; } else { menu.style.display = "inline"; } } </script></head><body> <div id="container"> <div id="header"> </div> <div id="nav"> <ul> <li><a href="index.html">HOME</a></li> <li>THE PRODUCTS</li> <li><a href="contact.html">CONTACT US</a></li> </ul> </div> <div id="main"> <div id="left"> <div class="button" onMouseOver="this.style.cursor='pointer'" onselectstart="return false" onmouseDown="toggleButton(this)" onmouseUp="toggleButton(this); toggleMenu(sweetSub)"> SWEET BISCUITS </div> <div class="sub" id="sweetSub"> <div class="menuSub"><a href="coconutcookie.html">Coconut Cookie</a></div> <div class="menuSub"><a href="">Lemon Cookie</a></div> <div class="menuSub"><a href="">Oat and Honey</a></div> <div class="menuSub"><a href="">Perkins</a></div> <div class="menuSub"><a href="">Stem Ginger</a></div> </div> <div class="button" onMouseOver="this.style.cursor='pointer'" onselectstart="return false" onmouseDown="toggleButton(this)" onmouseUp="toggleButton(this); toggleMenu(savourySub)"> SAVOURY BISCUITS </div> <div class="sub" id="savourySub"> <div class="menuSub"><a href="">Butter Biscuits</a></div> <div class="menuSub"><a href="">Butter Puffs</a></div> </div> <div class="button" onMouseOver="this.style.cursor='pointer'" onselectstart="return false" onmouseDown="toggleButton(this)" onmouseUp="toggleButton(this); toggleMenu(oatSub)"> OATCAKES </div> <div class="sub" id="oatSub"> <div class="menuSub"><a href="">Cocktail Oatcakes</a></div> <div class="menuSub"><a href="">Granary Oatcakes</a></div> </div> </div> <div id="contentproduct"> <h1>Our Products</h1> <p>We have three cartegories of products, please select which you want to view by using the menu on the left.</p> </div> <div id="footer"> Enquiries to stockan and gardens </div> </div> </div></body></html>
  12. ah ha!here are the errors that were produced:Error: nav is not definedSource File: file:///C:/www/Stockan%20and%20Gardens/htdocs/javascript.jsLine: 14andError: biffSub is not defined"nav" and "biffSub" are both id's for <div>s. il put the whole of my html page code up so you can see: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Stockan and Gardens</title> <link href="styles/stock_and_gardens.css" rel="stylesheet" type="text/css" /> <script type="text/JavaScript"src="javascript.js"></script> <script type="text/JavaScript"> var pagenum = 1; function toggleMenu(menu) { if(menu.style.display == "inline") { menu.style.display = "none"; } else { menu.style.display = "inline"; } } function toggleButton(butt) { if(butt.style.borderTopStyle == "inset") { butt.style.borderStyle = "outset"; } else { butt.style.borderStyle = "inset"; } } </script></head><body onload="menufunc();"> <div id="container"> <div id="header"> <div id="traditional"><h1>Traditional Scottish oatcakes and biscuits</h1> </div> </div> <div id="nav"> </div> <div id="main"> <div id="left"> <div class="button" onMouseOver="this.style.cursor='pointer'" onselectstart="return false" onmouseDown="toggleButton(this)" onmouseUp="toggleButton(this); toggleMenu(biffSub)"> Sweet Biscuits </div> <div class="sub" id="biffSub"> <div class="menuSub"><a href="">Biff 1</a></div> <div class="menuSub"><a href="">Biff 2</a></div> <div class="menuSub"><a href="">Biff 3</a></div> </div> <div class="button" onMouseOver="this.style.cursor='pointer'" onselectstart="return false" onmouseDown="toggleButton(this)" onmouseUp="toggleButton(this); toggleMenu(buffSub)"> Savoury Biscuits </div> <div class="sub" id="buffSub"> <div class="menuSub"><a href="">Biff 1</a></div> <div class="menuSub"><a href="">Biff 2</a></div> <div class="menuSub"><a href="">Biff 3</a></div> </div> </div> <div id="contentproduct"> <h1>Sweet Biscuits</h1> <table width="500px" border="0px" cellspacing="10"> <tr> <td><img align="left" src="../stuff/sweet biscuits/coconut-cookietest.jpg" /></td> <td> <h4>Coconut Cookie</h4><br /> Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty! </td> </tr> <tr> <td><img align="left" src="../stuff/sweet biscuits/lemon-cookietest.jpg" /></td> <td> <h4>Lemon Cookie</h4><br /> Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty! </td> </tr> <tr> <td><img align="left" src="../stuff/sweet biscuits/oat-and-honeytest.jpg" /></td> <td> <h4>Oat and Honey</h4><br /> Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty! </td> </tr> <tr> <td><img align="left" src="../stuff/sweet biscuits/perkinstest.jpg" /></td> <td> <h4>Perkins</h4><br /> Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty! </td> </tr> <tr> <td><img align="left" src="../stuff/sweet biscuits/stem-gingertest.jpg" /></td> <td> <h4>Stem Ginger</h4><br /> Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty!Mmmmmmmmmm biscuits, very coconutty! </td> </tr> </table> </div> <div id="footer"> Enquiries to stockan and gardens </div> </div> </div></body></html> and heres the .js file code again. the first error about "nav" orriginates in this .js file. but i dont understand why. function menufunc(){ switch (pagenum) { case 0: nav.innerHTML = (" &nbspHOME" + " <a href='sweet_biscuits.html'>THE PRODUCTS</a>" + " <a href='contact.html'>CONTACT US</a>"); break; case 1: nav.innerHTML = (" <a href='index.html'>HOME</a>" + " &nbspTHE PRODUCTS" + " <a href='contact.html'>CONTACT US</a>"); break; case 2: nav.innerHTML = (" <a href='index.html'>HOME</a>" + " <a href='sweet_biscuits.html'>THE PRODUCTS</a>" + " &nbspCONTACT US"); break; default: nav.innerHTML = (" &nbspHOME" + " <a href='sweet_biscuits.html'>THE PRODUCTS</a>" + " <a href='contact.html'>CONTACT US</a>"); break; }} the second error about "biffSub", could it be caused by the fact i have given it its id in the html page only and not in my css file as well?sorry if this is confusing
  13. okie dokie.heres the code in my html page: it is importing a .js file and it is also running some javascript functions in the <head> <script type="text/JavaScript"src="javascript.js"></script> <script type="text/JavaScript"> var pagenum = 1; function toggleMenu(menu) { if(menu.style.display == "inline") { menu.style.display = "none"; } else { menu.style.display = "inline"; } } function toggleButton(butt) { if(butt.style.borderTopStyle == "inset") { butt.style.borderStyle = "outset"; } else { butt.style.borderStyle = "inset"; } } </script> and heres my code in the .js file: its a switch statement used for another menu. function menufunc(){ switch (pagenum) { case 0: nav.innerHTML = (" &nbspHOME" + " <a href='sweet_biscuits.html'>THE PRODUCTS</a>" + " <a href='contact.html'>CONTACT US</a>"); break; case 1: nav.innerHTML = (" <a href='index.html'>HOME</a>" + " &nbspTHE PRODUCTS" + " <a href='contact.html'>CONTACT US</a>"); break; case 2: nav.innerHTML = (" <a href='index.html'>HOME</a>" + " <a href='sweet_biscuits.html'>THE PRODUCTS</a>" + " &nbspCONTACT US"); break; default: nav.innerHTML = (" &nbspHOME" + " <a href='sweet_biscuits.html'>THE PRODUCTS</a>" + " <a href='contact.html'>CONTACT US</a>"); break; }} this all works fine in IE, but it looks as if the java scripts arent even being run in FF.
  14. Hello.Im workin on a website and im using a bit of javascript to make the menus look like the poodles noodles . It all works fine in IE, but the javascript doesnt work in FF.it appears that my javascript file is simply not being accessed when the website is diplayed using FF as there are no error messages being generated..I was wondering if there is a common glitch that i need to fix for Javascript to work in FF? im sort've a noob at when it comes to websites and browsers so any help would be much appreciated.thanks.
×
×
  • Create New...