Jump to content

AKalair

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

AKalair's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi, I'm trying to get this example working : http://aleembawany.com/2005/09/01/ajax-instant-tutorial/ This is my code <html> <head> <script type="text/javascript"> function loadurl(dest) { try { // Moz supports XMLHttpRequest. IE uses ActiveX. // browser detction is bad. object detection works for any browser xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { // browser doesn't support ajax. handle however you want } // the xmlhttp object triggers an event everytime the status changes // triggered() function handles the events xmlhttp.onreadystatechange = triggered; // open takes in the HTTP method and url. xmlhttp.open("GET", dest); // send the request. if this is a POST request we would have // sent post variables: send("name=aleem&gender=male) // Moz is fine with just send(); but // IE expects a value here, hence we do send(null); xmlhttp.send(null); } function triggered() { // if the readyState code is 4 (Completed) // and http status is 200 (OK) we go ahead and get the responseText // other readyState codes: // 0=Uninitialised 1=Loading 2=Loaded 3=Interactive if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) { // xmlhttp.responseText object contains the response. document.getElementById("output").innerHTML = xmlhttp.responseText; } } </script> </head> <body> <div id="output" onClick="loadurl('test.html')" >click here to load my resume into this div <br> tests</div> </body> </html> When I click on the text nothing happens though ? Any ideas ? Thanks !
  2. Hi, Thanks for the reply Is there no way to do this in the language ? How do things like Google Calander pop up alerts for events ? Thanks
  3. Hi guys, It is possible to trigger an event at a certain time in PHP and MYSQL ? For example I have a database of events and as each one occurs I want it to tweet out a message to Twitter So it is possible to do something like: if (time == timeofevent): Send message Thanks
  4. This is the code I use to insert data into the database (with some cropping) $newsstorytagline = str_replace("'","''",$_POST["tagline"]); mysql_query("INSERT INTO news (userid, categoryid, newstitle, newstagline, newsbody, imageurl) VALUES ('$realuserid', '$categoryid', '$newsstorytitle', '$newsstorytagline', '$newsstory', '$imageurl') ") or trigger_error('Unable to Create News Story' , E_USER_ERROR); Then this is how I recall it to be the default value $getnewstaglineone = $getrealarticle['newstagline']; <input type="text" name="tagline" size="50" value =" <?php echo "$getnewstaglineone" ?> " /> Thanks
  5. Hello, I'm taking data stored in a database and setting it as the default value for a form. However I have a problem if the data has a " in it then it wont appear as the default value. For example This: "virtually silent" some claim Wont appear in the form box as a default value but without the " it will Any ideas? Thanks
  6. Hi, When I display the results from this query the title and tagline changes but the image displayed is always the same despite having different images stored in the database. $getlateststories = mysql_query("SELECT * FROM reviews, news ORDER BY 'creationdate' LIMIT 0, 2 ") or trigger_error('Unable to get latest stories', E_USER_ERROR); while($Results = mysql_fetch_array($getlateststories)) { echo "<p class=Headings> <a href=/viewnewsstory.php?newsid=$Results[newsid]&catid=$Results[categoryid]>$Results[newstitle] </p></a> <img src=$Results[imageurl]> <br> <p class=Sub_Headings>$Results[newstagline]</p><br><br> "; echo "<p class=Headings> <a href=/viewreviews.php?reviewid=$Results[reviewid]&catid=$Results[categoryid]>$Results[reviewtitle] </p></a> <img src=$Results[imageurl]> <p class=Sub_Headings>$Results[reviewtagline] </p><br><br> "; } Any ideas? Thanks
  7. Hi guys, My query keeps throwing an error its the ORDER by clause thats causing it. $getlateststories = mysql_query("SELECT * FROM reviews, news LIMIT 0, 5 ORDER BY creationdate") or trigger_error('Unable to get latest stories', E_USER_ERROR); I have verified that the field is called "creationdate" in both tables Can anyone point me in the right direction? Thanks
  8. Hi, Thanks for the response I specified a width for the center box: /* Middle Column */ .row div { background: #0066FF; width: 70%; } But it still isnt wrapping?
  9. Hi, Thanks for the reply heres my CSS if it helps /* CSS to control colours and alingment in all browsers except IE 7 and below */ /* Unkown probably layout rules */ .equal { display:table; border-collapse:separate; } .row { display:table-row; } .row div { display:table-cell; } /* Styling rules to make the example look nicer */ html,body { background: #000000; /* Page background colour */ } body { font:76%/140% "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; } /* Box behind the three columns NOT page */ .equal { margin:10px auto; border-spacing:10px; background:#FFCC00; width:100%; } /* Left column, Navigation */ .row div.one { background: #F72406; width: 15%; } /* Middle Column */ .row div { background: #0066FF; } /* Right Colum */ .row div.three { background: #33CC99; width: 15%; } /* Banner */ .banner { height: 10%; } /* Footer */ #footer { text-align:center; background: #FFFFFF; } /* Fonts */ a.bargains:visited {color: #0000CC} a.bargains:link {color: #0000FF} .bargains { font-size:16px} .Headings { font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; font-size: 18px; } .Sub_Headings { font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; font-size: 16px; } .Standard_Text { font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; font-size: 14px; } a:link { color: #FFFFFF; font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; } a:visited { font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; color: #CCCCCC; }
  10. Hi, I am querying a mysql database to get the text of a news story But I have a problem. If the text is really long rather than wrapping down to the next line it just carries on and stretches the screen horizontally. Is there a way I can force it to wrap once it reaches the edge of the box ? Here is the design I'm using: http://www.axac22.dsl.pipex.com/ I'm trying to put the text in the center box Thanks
  11. Hi guys, I have a problem that is quite difficult to explain but I'll try my best ... To Begin With Heres my CSS: /* CSS Document */ /* Border Around Boxes not Page */ .equal { margin:10px auto; border-spacing:10px; background:#FFCC00; width:100%; } /* Right Column */ #container3 { float:left; width:100%; background:green; overflow:hidden; position:relative; } #container2 { float:left; width:100%; background:yellow; position:relative; right:30%; } #container1 { float:left; width:100%; background:red; position:relative; right:40%; } #col1 { float:left; width:26%; position:relative; left:72%; overflow:hidden; } #col2 { float:left; width:36%; position:relative; left:76%; overflow:hidden; } #col3 { float:left; width:26%; position:relative; left:80%; overflow:hidden; } /* Footer */ #footer { text-align:center; background: #FFFFFF; } and heres my HTML <head> <link rel="stylesheet" href="css.css" /> <title> Home </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css"> <!-- body { background-color: #000000; } --> </style></head> <body> <div class="equal"> <div id="container3"> <div id="container2"> <div id="container1"> <div id="col1"> <!-- Column one start --> column1 <!-- Column one end --> </div> <div id="col2"> <!-- Column two start --> column2 <!-- Column two end --> </div> <div id="col3"> <!-- Column three start --> column3 <!-- Column three end --> </div> </div> </div> </div> </div> <div id="footer"> Footer </div> </body> </html> Ok so the problem is I'm using the equal class to add a box around everything so I can add a background colour around them like this: http://www.axac22.dsl.pipex.com/ I'm trying to add a background like the yellow one. However all that happens is that the boxes are shifted down 10px Can anyone help me colour those 10px yellow like in the example? Thanks Aaron
  12. Hi Guys, Having some trouble IE 7 rendering my page wrong. This what it should look like: http://img34.imageshack.us/img34/9049/7eca3862eac7bda4411c995.png This is what it looks like in IE 7 http://img199.imageshack.us/img199/7817/29693b98ba99bb9fdece5de.png This is the HTML <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Playstation Online</title> <link rel="stylesheet" type="text/css" href="equalcss.css" /> <style type="text/css"> <!-- .style1 {color: #FFFFFF} a:link { color: #FFFFFF; } --> </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body> <div class="banner"> <center><img src="newbannerPSO.jpg" alt="b" width="726" height="113"></center> </div> <div class="equal"> <div class="row"> <div class="one"> <center> <p class="SideBar"><a href="index.html" target="_parent" class="standardtext">Home</a></p> <p align="center" class="subheadings">Reviews</p> <p class="standardtext"><a href="ps3rev.html" target="_parent">PS3</a></p> <p class="standardtext"><a href="ps2rev.html" target="_parent">PS2</a></p> <p class="standardtext"><a href="psprev.html" target="_parent">PSP</a></p> <p class="standardtext"><a href="blurayrev.html" target="_parent">Blu Ray </a></p> <p align="center" class="subheadings">News</p> <p class="standardtext"><a href="ps3news.html" target="_parent">PS3</a></p> <p class="standardtext"><a href="ps2news.html" target="_parent">PS2</a></p> <p class="standardtext"><a href="pspnews.html" target="_parent">PSP</a></p> <p class="standardtext"><a href="bluraynews.html" target="_parent">Blu Ray</a></p> <p class="standardtext"><a href="Trophy/main.html" target="_parent">Trophies </a></p> <p align="center" class="subheadings">Community</p> <p class="standardtext"><a href="forums.html" target="_parent">Forums </a></p> <p class="standardtext"><a href="about.html" target="_parent">About</a></p> <p class="standardtext"><a href="contact.html" target="_parent">Contact</a></p> </center> </div> <div class="two"> <p align="center"><span class="FrontPage style1"><a href="vidzone.html" class="headings">PS3's VidZone launching in PAL territories on June 11!</a></span><br> </p> <p align="center"><img src="vidzone.jpg" alt="vid" width="178" height="74"></p> <p align="center"><br> <span class="subheadings">Music video streaming confirmed for a June launch in UK, Australia, PAL countries.</span></p> <p align="center"><img src="line.jpg" alt="line" width="500" height="2"></p> <p align="center"><span class="FrontPage"><a href="uneralepiccc.html" class="headings">Playstation 3 Lands Huge Epic Game</a></span><br> </p> <p align="center"><img src="epic.jpg" alt="epic" width="150" height="150"> </p> <p align="center"><br> <span class="subheadings">Running a newer Unreal Engine.</span></p> <p align="center"><img src="line.jpg" alt="l" width="500" height="2"></p> </div> <div class="three"> <p class="headings">Bargains </p> <p class="standardtext">Bargains go here </p> <p> <span class="headings">Clan Matches</span></p> <p class="standardtext">Clan matches go here </p> <center><p class="headings"><span class="headings"> Sponsors </span></p> <p class="headings"><img src="gameadd.JPG" alt="game" width="120" height="60"> </p> <p class="headings"><img src="hmvadd.JPG" alt="hmv" width="145" height="66"></p> <p class="standardtext"><br> </p></center> </p> </div> </div> </div> <div id="footer"> Last Updated: June 20, 2009 1:50 PM © Playstation Online 2009 No Reproduction Without Permission </div> </body> </html> This is the CSS /* Unkown probably layout rules */ .equal { display:table; border-collapse:separate; } .row { display:table-row; } .row div { display:table-cell; } /* Styling rules to make the example look nicer */ html,body { background: #000000; /* Page background colour */ } body { font:76%/140% "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; } /* Box behind the three columns NOT page */ .equal { margin:10px auto; border-spacing:10px; background:#FFCC00; width:100%; } /* Left column, Navigation */ .row div.one { background: #F72406; width: 15%; } /* Middle Column */ .row div { background: #0066FF; } /* Right Colum */ .row div.three { background: #33CC99; width: 15%; } /* Banner */ .banner { height: 10%; } /* Footer */ #footer { text-align:center; background: #FFFFFF; } .headings { font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; font-size: 18px; } .subheadings { font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; font-size: 16px; } .standardtext { font: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; font-size: 14px; } Can anyone explain how to fix this ? Thanks
  13. Hi guys, I have four DIV's that I use to layout my page. If the content text reaches the edge of the DIV I want it to wrap down to the next line. To handle this in Chrome, Safari and IE I use "word-wrap: break-word;" But this doesn't work in Firefox. What alternatives do I have ? Thank You
  14. I use absolute because everything becomes misaligned if I use anything else
×
×
  • 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.