Jump to content

boylesg

Members
  • Posts

    112
  • Joined

  • Last visited

Everything posted by boylesg

  1. Yes I did Dave, and it suffered from the same problem. I just experimented a little and found that I could acheive the same result without the additional logo container. What if I was to put the extra container around the 3 columns and then used clear: both?
  2. The following CSS produces the following result in the attachment. Almost right but the 'navigation' should appear as a green column to the left of the 'content' column. I can't figure out how to do this when my CSS logo correctly appears to the left of my company name heading. Also I suspect I should be positioning to two rectangles that form the + symbol inside the circle relative to the the position of the circle. At present they are posotioned 'absolutely' which will probably result in the logo being messed up if user re-sizes the browser window. But I am not sure how to do this with relative 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 content="text/html; charset=windows-1252" http-equiv="Content-Type" /> <title>Untitled 1</title> <style> h1 { font-family: "Arial"; font-size: xx-large; font-weight: bold; color: white; } h2 { font-family: "Arial"; font-size: x-large; font-weight: bold; color: white; } h3 { font-family: "Arial"; font-size: large; font-weight: bold; color: white; } h4 { font-family: "Arial"; font-size: medium; font-weight: bold; color: white; } h5 { font-family: "Arial"; font-size: small; font-weight: bold; color: white; } h6 { font-family: "Arial"; font-size: x-small; font-weight: bold; color: white; } </style> </head> <body> <style> #container { width: 100%; margin: 0 auto; background-color:#006600; font-family: "Arial"; font-size: small; color: white; text-align: left; } #header { clear: both; } #navigation { float: left; width: 20%; font-family: "Arial"; font-size: small; color: white; text-align: left; clear: right; } #content { float: left; width: 70%; background-color:white; font-family: "Arial"; font-size: small; color: black; text-align: left; } #feature { float: left; width: 10%; font-family: "Arial"; font-size: small; color: white; text-align: left; } #symbol { float: left; } #footer { clear: both; font-family: "Arial"; font-size: small; color: white; text-align: left; } #heading { float:left; margin:0 10px; } #circle { width: 79px; height: 79px; border-radius: 45px; border: 5px solid #330396; background: #039C35; position: relative; z-index: 1; float: left; } #rectangle1 { width:75px; height:25px; background-color:#330396; top:28px; left:2px; position:absolute; } #rectangle2 { width:25px; height:75px; background-color:#330396; top:2px; left:28px; position:absolute; } </style> <div id="container"> <div id="header"> <div id="circle"> <div id="rectangle1"></div> <div id="rectangle2"></div> </div> <div id="heading"> <h1>Bushland Recovery</h1> <h4>Protecting our remnant native flora</h4> </div> </div> <div id="navigation"> <p>Navigation</p> </div> <div id="content"> <p>Main content</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="feature"> <p>Feature</p> </div> <div id="footer"> <p>Footer</p> </div> </div> </body></html>
  3. I have created a symbol with a circle containing two rectangles, and I wish to place a heading to the right of this symbol. At present the heading display beneath the symbol and everything I have tried to get the heading to the right of the symbol messes up the rest of the page structure. How do you acheive this? <body> <style> #container { width: 100%; margin: 0 auto; background-color:#006600; font-family: "Arial"; font-size: small; color: white; text-align: left; } #header { clear: both; } #navigation { float: left; width: 20%; font-family: "Arial"; font-size: small; color: white; text-align: left; } #content { float: left; width: 70%; background-color:white; font-family: "Arial"; font-size: small; color: black; text-align: left; } #feature { float: left; width: 10%; font-family: "Arial"; font-size: small; color: white; text-align: left; } #symbol { float: left; } #footer { clear: both; font-family: "Arial"; font-size: small; color: white; text-align: left; } #circle { width: 79px; height: 79px; border-radius: 45px; border: 5px solid #330396; font-family: Cambria; font-size: 11px; line-height: 20px; text-align: center; background: #039C35; position: relative; z-index: 1; } #rectangle1 { width:75px; height:25px; background-color:#330396; top:28px; left:2px; position:absolute; } #rectangle2 { width:25px; height:75px; background-color:#330396; top:2px; left:28px; position:absolute; } </style> <div id="container"> <div id="header"> <div id="circle"> <div id="rectangle1"></div> <div id="rectangle2"></div> </div> <div id="heading"> <h1>Bushland Recovery</h1> <h4>Protecting our remnant native flora</h4> </div> </div> <div id="navigation"> <p>Navigation</p> </div> <div id="content"> <p>Main content</p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div id="feature"> <p>Feature</p> </div> <div id="footer"> <p>Footer</p> </div> </div> </body>
  4. Can you explicitly set the domain of a localStorage item?
  5. <script type="text/javascript"> $(function () { //Change the key size value for new keys $(".change-key-size").each(function (index, value) { var el = $(value); var keySize = el.attr('data-value'); el.click(function (e) { var button = $('#key-size'); button.attr('data-value', keySize); button.html(keySize + ' bit <span class="caret"></span>'); e.preventDefault(); }); }); // Execute when they click the button. $('#execute').click(function () { // Create the encryption object. var crypt = new JSEncrypt(); // Set the private. crypt.setPrivateKey($('#privkey').val()); //return; // If no public key is set then set it here... var pubkey = $('#pubkey').val(); if (!pubkey) { $('#pubkey').val(crypt.getPublicKey()); } // Get the input and crypted values. var input = $('#input').val(); var crypted = $('#crypted').val(); // Alternate the values. if (input) { $('#crypted').val(crypt.encrypt(input)); $('#input').val(''); } else if (crypted) { var decrypted = crypt.decrypt(crypted); if (!decrypted) decrypted = 'This is a test!'; $('#input').val(decrypted); $('#crypted').val(''); } }); // If they wish to generate new keys. $('#generate').click(function () { var sKeySize = $('#key-size').attr('data-value'); var keySize = parseInt(sKeySize); crypt = new JSEncrypt({default_key_size: keySize}); var async = $('#async-ck').is(':checked'); var dt = new Date(); var time = -(dt.getTime()); if (async) { $('#time-report').text('.'); var load = setInterval(function () { var text = $('#time-report').text(); $('#time-report').text(text + '.'); }, 500); crypt.getKey(function () { clearInterval(load); dt = new Date(); time += (dt.getTime()); $('#time-report').text('Generated in ' + time + ' ms'); $('#privkey').val(crypt.getPrivateKey()); $('#pubkey').val(crypt.getPublicKey()); }); return; } crypt.getKey(); dt = new Date(); time += (dt.getTime()); $('#time-report').text('Generated in ' + time + ' ms'); $('#privkey').val(crypt.getPrivateKey()); $('#pubkey').val(crypt.getPublicKey()); }); });</script> I don't understand what this sort of stuff is doing: "$(function () {" "$('#generate').click(function ()" "$('#pubkey').val(crypt.getPublicKey());" It is suppsed to be javascript "type="text/javascript" but it does not look any javascript that I have ever seen.
  6. To be more specific iexplorer 11. The insert image and insert hyperlink dialog boxes don't work. They popup but both the OK and cancel buttons are disabled and there is no apparent way to get them enabled. Nor can you get rid of the dialog box by pressing the X. The only way to pi$$ the dialog boxes off is to refresh the page. What is the story here?
  7. Can you point me in the direction of both javascript and php examples of this?
  8. Is it possible to intercept the raw form data in javascript on the client, manipulate it, then again intercept the raw form data at the server in php and again manipulate it before accessing it through $_POST?
  9. Is it possible to intercept the raw form data in javascript on the client, manipulate it, then again intercept the raw form data at the server in php and again manipulate it before accessing it through $_POST?
  10. Bloody ###### it would seem to be a whole lot easier to do away with the php date object and simply calculate the day of week myself manually with function.
  11. Either that or getDay() is simply calculating the wrong value for what ever reason. I am entering 1/3/2014 and according to getDay(), after setDate(1) setMonth(3) setYear(2014), the day of the week is 2 which is simply not correct.
  12. Actually if I do alert(dateEOF.getDay()) then I get the value I expect, however toDateString() still returns the current system date. Further getDay() function returns the day of the week for the current system date rather than the date that I have set using setDate(...) etc What the ###### is going on with this date object??? Is there some other function you have to call after using setDate(...) etc to make the internals of the object consistent??????
  13. var dateEOW = new Date();dateEOW.setFullYear(2014);dateEOW.setMonth(3);dateEOW.setDate(1);alert(dateEOW); I give up! Why can't I change the value of a date object with the setDate(...) etc. These functions seem to have no effect and alert(...) simply outputs the current date.
  14. <form action="Database.php" method="post"><p> <input type="submit" value="Go back" name="Back"></p><fieldset style="padding: 2"><legend>Database status message</legend><p> </p><p></p></fieldset><fieldset name="GroupEmployee"><legend>By employee<input name="ByEmployee" id="ByEmployee" type="checkbox" tabindex="1" value="ON" onclick="doEnableEmployee()"></legend><br><table width="100%"><tr><td width="15%">Employee</td><td><select name="Employee" id="Employee" tabindex="2" disabled="disabled"><option>aaaaaa</option><option>bbbbbb</option><option>cccccc</option></fieldset><br><fieldset name="GroupSingleDay"><legend>By single day<input type="radio" name="ByDate" id="ByDate1" value="1" onclick="doEnableDates()" value="1" tabindex="3"></legend><br><table width="100%"><tr><td width="15%">Date</td><td><input type="text" name="SingleDay" id="SingleDay" size="20" tabindex="4" value="" disabled="disabled"></td></tr></table></fieldset><br><fieldset name="GroupEndOfWeek"><legend>By end of week<input type="radio" name="ByDate" id="ByDate2" tabindex="5" value="2" onclick="doEnableDates()" value="2"></legend><br><table width="100%"><tr><td width="15%">Date</td><td><input type="text" name="EndOfWeek" id="EndOfWeek" size="20" tabindex="6" value="" disabled="disabled"></td></tr></table></fieldset><br><fieldset name="GroupDateRange"><legend>By date range<input type="radio" name="ByDate" id="ByDate3" value="3" tabindex="7" onclick="doEnableDates()"></legend><br><table width="100%"><tr><td width="15%">Start date</td><td><input type="text" name="StartDate" id="StartDate" size="20" tabindex="8" value="" disabled="disabled"></td></tr><tr><td width="15%">End date</td><td><input type="text" name="EndDate" id="EndDate" size="20" tabindex="9" value="" disabled="disabled"></td></tr></table></fieldset><br><table width="100%"><tr><td width="15%"><input type="button" name="WagesReportResults_" id="WagesReportResults_" tabindex="10" value="Display report" onclick="doSubmit()"></td><input type="hidden" name="WagesReportResults" id="WagesReportResults" tabindex="10" value="Submit"></tr></table></form> Why is it that I can type into the following disabled text field when I load this on the web server and view it in iexplorer? Is there a html error I am missing here? Fields are 'SingleDay', 'EndOfWeek', 'SartDate' and 'EndDate'. The select field 'Employee' is however properly disabled.
  15. Well it just aint working for me I am afraid. I can't insert quotes either. The button above inserts the quote edit window but I am not able to paste any text into it. I am using Internet Explorer on a laptop at present, although I use Firefox on my PC
  16. Well there does not seem to be any way that I can insert a URL in here without typing it out manually - bugger that. Suffice it to say that I do not see anything in red or any examples that explain how to tell the difference between FALSE and index 0 underneath the function details above. I tried echo "$$$$$$$$$$$$$$$$$$".strops(....) === FALSE."$$$$$$$$$$$$$$$"; and the output was "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" So apparently === does not work in this instance. Surely the most sensible way of implementing php strops would follow the C standard of >=0 for substring found and -1 if substring not found.
  17. You have a bug in the dialog box that is supposed two allow you to insert URL link into a post. I open it up and paste my link into the edit box but I am not able to close the dialog box via either of the buttons. I have to kill the tab and then re-open the forum to get rid of it. The end result is that there is no way to insert a hyperlink unless I sit there and type it all out manually. I have to say that the inability to paste anything directly into the edit window is a real pain in this forum. Why don't you do it the way most other forums do it? Where to create the tags for hyperlinks or code with the buttons above and then you paste the code or URL between the tags. Or paste the code of URL into the edit window, highlight it and then insert the tags around it by pressing the buttons above. It would be far simpler and easier to my way
  18. Syntaxstrpos(string,find,start) ParameterDescriptionstring Required. Specifies the string to search find Required. Specifies the string to find start Optional. Specifies where to begin the search Technical DetailsReturn Value:Returns the position of the first occurrence of a string inside another string, or FALSE if the string is not found. Note: String positions start at 0, and not 1. This seems like a pretty stupid way to implement this function. How are you supposed to tell the difference between a return value of FALSE and a return value of 0 for the first character of the search string?
  19. Wednesday 12/2/2014 14:19:34 function getSystemDateTime($bTime = true){ $Date = date_create("NOW"); if ($bTime) $DateStr = date_format($Date, "l j/n/Y G:i:s"); else $DateStr = date_format($Date, "l j/n/Y"); return $DateStr;} How do you get this to work? It is returning the incorrect date and time? It returns the date and time at the top of the post but my laptop shows 13/2/2004 01:24
  20. I can perhaps understand not wanting code pasted into the main window but, with the contents of database table, I had to type it in manually batting against an edit window that kept dumping the cursor back at the home position.
  21. Is there a deliberate policy of not allowing pasting of text directly into the post window or is there something wrong with my browser settings? Because I have to say it is a PAIN IN THE ARSE not being able to do so. Here is the function being called: function getOverheadDetailsShortkey($DailyDetailsShortkey, $OverheadType, $OverheadHours){ $SQLString = "SELECT * FROM DailyOverheadDetails WHERE DailyDetailsShortkey=".$DailyDetailsShortkey." AND OverheadType='".$OverheadType."' AND Hours='".$OverheadHours."'"; $Shortkey = -1; if ($QueryResult = doDBOp($SQLString, "", "")) {echo "1111111111111111111<br>"; if ($Row = mysqli_fetch_assoc($QueryResult)) {echo "2222222222222222222<br>"; $Shortkey = $Row["Shortkey"]; } }echo "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ<br>";echo $SQLString."<br>";echo $Shortkey."<br>";echo "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ<br>"; return $Shortkey;} Here is the data in the table: Table: DailyOverheadDetailsShortkey DailyDetailsShortkey OverheadType Hours -------------------------------------------------------------------------------50 107 Website 3.549 107 Vehicle maintenance 0.548 106 Website 3.547 106 Vehicle maintenance 0.546 105 Website 3.5 45 105 Vehicle maintenance 0.5 This is my debug output showing the constructed SQL string. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZSELECT * FROM DailyOverheadDetails WHERE DailyDetailsShortkey=107 AND OverheadType='Vehicle maintenance' AND Hours='0.5'-1ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ1111111111111111111ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZSELECT * FROM DailyOverheadDetails WHERE DailyDetailsShortkey=107 AND OverheadType='Website' AND Hours='3.5'-1ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ So why is my code and SQL string failing to find the record with DailyDetailsShortkey=107, OverheadType='Vehicle mainenance', Hours='0.5', because it clearly exists. What am I doing wrong?
  22. function emptyOptions(lpszSelFieldID){ var SelField = document.getElementById(lpszSelFieldID); var strTxt = ""; for ($I = 0; $I < SelField.length; $I++) { strTxt = $I; strTxt += " "; strTxt += SelField.length; alert(strTxt); SelField.remove($I); }} Using alert reveals that SelField.length is the correct value in all circumstances. But regardless of this the loop only iterates once when SelField.length greater than 1. If I comment out SelField.remove($I) then the loop iterates the correct number of times. So I don't get it. Why does the call to SelField.remove($I) fail (and cause the loop to break prematurely) for $I > 0 when SelField.length is greater than 1????? Does remove still work if you have not numbered the options? As in <option value="0"> etc
  23. boylesg

    Encryption

    It is small company with about 8 employees at present, of which I am one. And due to OH&S complience issues that have finally caught up with the boss and are severley effecting our ability to get work at present, we are in a financially vulnerable position. Having to get our OH&S stuff up to scratch is reducing the amount of productive work some of are doing per week. So imposing what is a seemingly small cost of https is not wrranted in my view, especially when this is the first time that the boss has decided he should have a website. I have been suggesting to him for some years that he should have one because a website is or can be an invaluable tool for attracting more diverse work......I know because I have my own business website and my own part time small business. Look if bank bsb and account number are deemed to be too much of a risk without https, then we simply will not use those database fields at this time. But at least they are there and setup for future use. How exactly do the hackers 'listen' for such things as credit card numbers flying between client PCs and servers.....out of interest?
  24. boylesg

    Encryption

    http://bitwiseshiftleft.github.io/sjcl/ I had a look at this one and it seems pretty good. It says you install the js file on the server. So how does that work exactly. You must have do a javascript include directive so presumeably that means the js file is downloaded alongside the web page including it?
×
×
  • Create New...