-
WSannoyingmouse
AskWoody LoungerThe answer from dg1261 is brilliant but when it comes to things like this I cheat and stand on the shoulders of giants and “borrow” from Bootstrap. I’m not 100% sure but it would help to see what your standard CSS files have and whether or not they already have a grid system to use (most do already if you’re using a framework). However, if you add the Bootstrap CSS then you can wrap your ULs in a row class (your container will already proide some level of centering) and add col-md-6 to each div containing the UL:
[HTML]
Our products and services
- 1234
- 12345
- 111111111111
- 2222222222222222
- 3333333
- 4444444
- 55555555555555555
- 666666666666
- 77777777777777
Our data is ustilised for:
- aaaaaaaaa
- bbbb
- ccccccccccc
- dddddddddddddd
- eeeeeeeeee
- ffffffffffffff
- gggggggggggg
[/HTML]
This is a working JSFiddle with the CSS linked.
-
WSannoyingmouse
AskWoody LoungerI’ve used MobaXterm quite a lot in the past, though don’t need to so much anymore – those people who I know who do require SSH access from Windows boxes rate it highly though.
-
WSannoyingmouse
AskWoody LoungerYou could put FullCalendar on your page backed with a public Google Calendar. It’s a pretty cool approach and seems to work a treat. That way you can theme it to your hearts content.
-
WSannoyingmouse
AskWoody LoungerI’d suggest using XAMPP and then putting your whole site on a thumb drive on to serve from a machine (either yours or theirs). That way they’ll be able to see it in all it’s glory (assuming your present site is being served using Apache). If it’s something like a catalog site then you could perhaps leave it with them as a promotional item…?
-
WSannoyingmouse
AskWoody LoungerAugust 27, 2015 at 12:23 pm in reply to: My webpage won’t display JavaScript in Chrome or Firefox #1525364Here you go, you’ll need to include jQuery and then this should work:
Code:var images = [ “data:image/gif;base64,R0lGODlhAwADAKEBAICAgP///////////yH5BAEKAAAALAAAAAADAAMAAAIERBx3BQA7”, “data:image/gif;base64,R0lGODlhBQAFAMIDAAAAAICAgMDAwP///////////////////yH5BAEKAAIALAAAAAAFAAUAAAMJKDKqvCO+51QCADs=”, “data:image/gif;base64,R0lGODlhBwAHAKECAAAAAMDAwP///////yH5BAEKAAMALAAAAAAHAAcAAAIMnGU5qOLnIotqVWsKADs=”, “data:image/gif;base64,R0lGODlhCQAJAKECAAAAAMDAwP///////yH5BAEKAAMALAAAAAAJAAkAAAIQnCenuCa/nnSyJlQjbJerAgA7”, “data:image/gif;base64,R0lGODlhCwALAKECAAAAAMDAwP///////yH5BAEKAAMALAAAAAALAAsAAAIUnC2nl8vSHIxvQmRz0xT36jChqBQAOw==”]; var Amount = 10; var Ypos = []; var Xpos = []; var Zpos = []; var SpeedX = []; var SpeedY = []; var ScrXpos = []; var ScrYpos = []; var Speed = []; var Size = []; var Step = []; var WinHeight = $(window).height() – 20; var WinWidth = $(window).width() – 70; $(function(){ for(var i = 0; i < images.length; i++){ var flake = $("“, { “style”:”position:absolute;top:0px;left:0px;” }).append($(““, { “style”:”position:relative” }).append($(“
“, { “style”:”position:absolute;top:0px;left:0px;”, “id”: “si”+i, “src”: images[i] }))); $(“body”).append(flake); } for (var i = 0; i < Amount; i++){ Speed[i] = (i+1) * 6 / Amount + 4; //speed range from 4 to 10 Xpos[i] = (Math.random() * WinWidth – WinWidth / 2) * (Amount – i / 3) / Amount; Ypos[i] = (Math.random() * WinHeight – WinHeight / 2) * (Amount – i / 3) / Amount; Zpos[i] = Math.random() * 900 * (Amount – i / 3) / Amount + 100; } fly(); }); function fly(){ var WinHeight = $(window).height() – 40; var WinWidth = $(window).width() – 90; var hscrll = $(window).scrollTop(); for (var i = 0; i WinWidth || ScrXpos[i] WinHeight || ScrYpos[i] < 0 || Zpos[i] <= 0) { Speed[i] = (i + 1) * 6 / Amount + 4; Xpos[i] = (Math.random() * WinWidth – WinWidth / 2) * (Amount – i / 3) / Amount; Ypos[i] = (Math.random() * WinHeight – WinHeight / 2) * (Amount – i / 3) / Amount; Zpos[i] = Math.random() * 900 * (Amount – i / 3) / Amount + 100; } ScrXpos[i] = Xpos[i] / Zpos[i] * 100 + WinWidth / 2; ScrYpos[i] = Ypos[i] / Zpos[i] * 100 + WinHeight / 2; $("#si"+i).css("left", ScrXpos[i]); $("#si"+i).css("top", ScrYpos[i] + hscrll); } setTimeout(function(){ fly(); }, 20); }
Working here.
There’s an odd issue whereby the scroll bars suddenly appear and I’ve base64 encoded the image to reduce the requirements for added image files. Should be easy enough for you to work out what does what. The interesting thing about reusing old code is that it used to require lots of browser detection. jQuery means that that isn’t needed anymore… in fact it could be argued that modern browsers should all act pretty much the same. You’ll probably need to wrap it all in a $(function(){…}) within your script tag as well.
Hope that helps.
EDIT
I’ve included everything you’ll need to implement it on the link. Just copy and paste the code to the head of your page and it should work… probably remove the old one first though.
-
WSannoyingmouse
AskWoody LoungerAugust 27, 2015 at 6:39 am in reply to: My webpage won’t display JavaScript in Chrome or Firefox #1525216This actually seems like a fun thing to tweak. Would you be okay with me working on it over the weekend and I’ll try to get the script to work in more modern browsers? I don’t think it’s anything more than the script having a reliance on browser detection TBH. If we abstract that out using jQuery then we could get it up and running quite quickly as it’s simply a question of creating and then moving elements in the DOM.
-
WSannoyingmouse
AskWoody LoungerSome hosts have had similar issues with FTP being broken or just plain inherently insecure. Perhaps ask them to enable sFTP and disable FTP or ask them to disable FTP it unless you’ve selected to open it for a period. My hosts do that. I need to login to their control panel and unlock FTP whereupon it remains unlocked for 24 hours and then is automatically disabled afterwards.
-
WSannoyingmouse
AskWoody LoungerIn terms of your business site then WordPress can be made to look shiny with a decent theme. I’ve been using the free version of Make. As @RetiredGeek notes own your own domain and find some hosting that will allow you to run PHP and hopefully has a one-click WordPress install option.
I think that with the use of RootsPersona you’ll also have some measure of success with getting WordPress to sort out the showing of your family tree for your personal site. If your host allows subdomains (and most do), then you can have two sites running off of the same domains http://something.com for business and then http://family.something.com for your personal stuff. I’ve been using 34sp for years and they offer all that I’ve suggested.
-
WSannoyingmouse
AskWoody LoungerThink your issue might be down to the way you’re using an array value within the string… I always get confused so am perhaps a little guilty of defensive coding in such instances. When you add your $_PUT value I’d prefer to concatenate it rather than embed it like you do, but if you do embed it you can enclose the value within brackets. Here’s an example:
[PHP] $arr = array(
“one” => “one”,
“two” => “two”,
“three” => “three”);echo “Hello $arr[‘one’]
“; // Won’t work
echo “Hello “.$arr[‘two’].”
“; // Will work – preferred by me in a defensive way
echo “Hello {$arr[‘three’]}
“; // Will also work
[/PHP]
So one possible solution would be to do this:[PHP] $url=’http://www.loventhal.com/Public/SL_’.$_PUT[‘month’].’.pdf’;[/PHP]
or
[PHP] $url=’http://www.loventhal.com/Public/SL_{$_PUT[‘month’]}.pdf’;[/PHP]
It looks as though you were thinking along those lines anyway as you had an period in your code before the month…?
Other than that I’d remember to tell the browser to expect a PDF as well
Also, bear in mind that PHP deals with single and double quotes in different ways!
Hope that helps.
-
WSannoyingmouse
AskWoody LoungerI’d echo Paul T in saying it’s not a simple site. From what I’ve heard SquareSpace might do what he requires with little or no knowledge of coding. With the low bar to access comes a higher price though. I’ve not used it myself though so I can’t recommend without reservations.
-
WSannoyingmouse
AskWoody Lounger[PHP]setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$dbconn->exec(‘SET NAMES “utf8″‘);
}catch (PDOException $e){
$error = “Unable to connect to the database server.”;
}
if(!empty($_POST[“submit”])){
try{
$query = $dbconn->prepare(”
SELECT
*
FROM
`payments`
WHERE
`apt` = :apt
“);
$query->execute(array(
“:apt” => $_POST[‘acctno’]
));
$lines = array();
if($query->rowCount() > 0){
while($row = $query->fetch()){
$lines = array(
“acctno” => $row[“acctno”],
“bname” => $row[“bname”],
“purpose” => $row[“purpose”],
“paidamt” => $row[“paidamt”],
“amtdue” => $row[“amtdue”],
“prevbal” => $row[“prevbal”],
“datepaid” => $row[“datepaid”],
“pd” => $row[“pd”]
);
}
}else{
$error = “No listing for apartment!”;
}
}catch(PDOException $e){
$error = “Error retrieving payments: “.$e->getMessage();
}
}else{
if(!empty($_POST[“update”])){
try{
$query = $dbconn->prepare(”
UPDATE
`payments`
SET
`name` = :name,
`amtpaid` = :amtpaid,
`rentdue` = :rentdue,
`prevbal` = :prevbal,
`hudpay` = :hudpay,
`tentpay` = :tentpay,
`datepaid` = :datepaid,
`late` = :late,
`comments` = :comments,
`paidsum` = :paidsum
WHERE
`apt` = :apt
“);
$query->execute(array(
“:name” => $_POST[“name”],
“:amtpaid” => $_POST[“amtpaid”],
“:rentdue” => $_POST[“rentdue”],
“:prevbal” => $_POST[“prevbal”],
“:hudpay” => $_POST[“hudpay”],
“:tentpay” => $_POST[“tentpay”],
“:datepaid” => $_POST[“datepaid”],
“:late” => $_POST[“late”],
“:comments” => $_POST[“comments”],
“:paidsum” => $_POST[“paidsum”],
“:apt” => $_POST[‘apt’]
));
}catch(PDOException $e){
$error = “Error updating payments: “.$e->getMessage();
}
}
}
include “dom.html.php”;[/PHP][HTML]
12 String <input type="text" class="form-control" name="acctno" disabled value="”><input type="text" class="form-control" name="bname" disabled value="”><input type="text" class="form-control" name="purpose" disabled value="”><input type="number" data-original="” class=”form-control” name=”amtdue” value=”” disabled><input type="number" data-original="” class=”form-control” name=”paidamt” value=”” disabled><input type="text" class="form-control" name="pd" value="”>$(function(){
$(“input[name=’pay’]”).on(“change”, function(){
var $this = $(this);
var $due = $(“input[name=’amtdue’]”);
var $payed = $(“input[name=’paidamt’]”);
var pay = parseInt($this.val(), 10);
var due = parseInt($due.data(“original”), 10);
var payed = parseInt($payed.data(“original”), 10);
$due.val(due – pay);
$payed.val(payed + pay);
});
});[/HTML]
My bad – spun up a server and had a play with the following SQL:
Code:CREATE TABLE IF NOT EXISTS `payments` ( `acctno` int(11) NOT NULL, `bname` varchar(255) NOT NULL, `purpose` varchar(255) NOT NULL, `paidamt` float NOT NULL, `amtdue` float NOT NULL, `prevbal` float NOT NULL, `datepaid` datetime NOT NULL, `pd` int(11) NOT NULL, `apt` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; — — Dumping data for table `payments` — INSERT INTO `payments` (`acctno`, `bname`, `purpose`, `paidamt`, `amtdue`, `prevbal`, `datepaid`, `pd`, `apt`) VALUES (1, ‘Something here’, ‘Fix the sink’, 10, 100, 110, ‘2014-07-30 11:28:26’, 12, 1);
Will work on dom.html.php in order to show the data returned from the query now.
-
WSannoyingmouse
AskWoody LoungerAye, that’s grand! The 1st one that is! You need to enter an account# number and then press enter… what is displayed when you do that? Anything? What should happen is that the underlying PHP should pick up the account# and query the MySQL DB with that account# – which will then be displayed at the top of the page (using the var_dump)… it might not show so if that’s the case have a look at the source of the page (looks like you’re using IE – think you right-click and select view source). If you get the record that you’re expecting then the next step is to display the record and we’ll do that with a simple PHP if within the dom.html.php. That way we can reuse the same page – once for searching for an account# and then again for displaying and editing the account#.
Does that make sense?
Cheers,
Dom
p.s. Looks like you’re using xampp locally? How cool! Haven’t used that in ages but it’s a fine tool!
-
WSannoyingmouse
AskWoody LoungerHey 12Strings – where is this being hosted? If it’s a local machine you could zip up the whole code base and db and I can have a crack at it – if it’s not you maybe want to grant me access and then revoke it when I’ve finished looking? I’m doing this nigh on 12 hours a day at the minute so I’m used to playing within this sphere – I prefer nodejs but this is nice because it’s comfortable and something I can do with my eyes closed (as long as I’ve access to my list of handy functions
)
From what you’ve said you’re not getting anything through after entering the account# – that’s cool and to be expected but when the page refreshes there should be the output from the SQL query…? Is there really nothing? I was going to alter the dom.html.php to display a table once we knew we were getting some results out of the query…
Another fun thing to do is add these lines to the top of the dom.php script:
[PHP] error_reporting(E_ALL);
ini_set(‘display_errors’, ‘1’);[/PHP]That’ll hopefully tell us if I/we’ve done something really silly
If you get back to me and we know what we’re dealing with then we can work at altering the dom.html.php to display the results.
Just a though but are you expecting just one or is there likely to be more than one result from the query? I’m only asking because of the use of a table to display the data – if the table was used to sort out the positioning on the page then that’s all gravy! If there’s likely to be more than one then we’re looking at something that might benefit from nice AJAX – I LOVE AJAX!
I’m thinking that it’s likely to be just one result though – in which case a lot of the logic you’re passing to the JavaScript should perhaps be moved to the PHP as some (most – but not all) users disable JavaScript…
Anyway, let me know how you get on – I’m about to dive into the joys of the AWS SKD for PHP (it’s actually lovely!). When you get some time have a look at composer – it’s lovely!
Hope that that helps.
Dom
p.s. Just as a though – could you write a query that’ll populate a list of account#s – users a great at adding silly things to search for and while PDO is brilliant at avoiding SQL injection attacks – it might be nice to help them out with limiting what they can enter…?
-
WSannoyingmouse
AskWoody LoungerThis is dom.php
[PHP]setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$dbconn->exec(‘SET NAMES “utf8″‘);
}catch (PDOException $e){
$error = “Unable to connect to the database server.”;
}
if(!empty($_POST[“submit”])){ // Should perhaps check to see if $_POST[‘apt’] exists in the first place…?
try{
$query = $dbconn->prepare(”
SELECT
*
FROM
`payments`
WHERE
`apt` = :apt
“);
$query->execute(array(
“:apt” => $_POST[‘apt’]
));
if($query->rowCount() > 0){
$lines = array();
while($row = $query->fetch()){
$lines[] = array(
“acctno” => $row[“acctno”],
“bname” => $row[“bname”],
“purpose” => $row[“purpose”],
“paidamt” => $row[“paidamt”],
“amtdue” => $row[“amtdue”],
“prevbal” => $row[“prevbal”],
“datepaid” => $row[“datepaid”],
“pd” => $row[“pd”]
);
}
}else{
$error = “No listing for apartment!”;
}
// JUST TO CHECK:
var_dump($lines);
}catch(PDOException $e){
$error = “Error retrieving payments: “.$e->getMessage();
}
}else{
if(!empty($_POST[“update”])){
try{
$query = $dbconn->prepare(”
UPDATE
`payments`
SET
`name` = :name,
`amtpaid` = :amtpaid,
`rentdue` = :rentdue,
`prevbal` = :prevbal,
`hudpay` = :hudpay,
`tentpay` = :tentpay,
`datepaid` = :datepaid,
`late` = :late,
`comments` = :comments,
`paidsum` = :paidsum
WHERE
`apt` = :apt
“);
$query->execute(array(
“:name” => $_POST[“name”],
“:amtpaid” => $_POST[“amtpaid”],
“:rentdue” => $_POST[“rentdue”],
“:prevbal” => $_POST[“prevbal”],
“:hudpay” => $_POST[“hudpay”],
“:tentpay” => $_POST[“tentpay”],
“:datepaid” => $_POST[“datepaid”],
“:late” => $_POST[“late”],
“:comments” => $_POST[“comments”],
“:paidsum” => $_POST[“paidsum”],
“:apt” => $_POST[‘apt’]
));
}catch(PDOException $e){
$error = “Error updating payments: “.$e->getMessage();
}
}
}
include “dom.html.php”;[/PHP]and this is dom.html.php:
[HTML]
Make an url! [/HTML]
Give that a try… and then we’ll get onto the JavaScript
Don’t forget the var_dump, see if what you’re getting back is what you’re expecting!
Take care,
Dom
-
WSannoyingmouse
AskWoody LoungerWOW 12Strings, no wonder I was getting confused… one document with PHP, HTML, JavaScript, SQL and the odd bit of CSS all mixed up? I code a lot with JavaScript and PHP and I still end up putting var in my PHP… also, there must be a special hell for people who make coders look at old code – I look at things that I coded 6 months ago and feel slightly poorly!
Your 2nd version looks like it won’t work – I’ve copied and pasted it and it seems as though it’s incorrectly nested… probably down to the mixture of languages
For instance – your table and form don’t get started for the rows!
Over the course of the years I’ve been at this I’ve clocked the value of splitting things down. I think I mentioned this in my original reply but write your whatever code within a PHP file then get it to var_dump what you want at the bottom of the script as basic text… then write your html… then your JavaScript… does that make sense. Bear with and I’ll have a crack:
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Blocking Search (on task bar) from going to web
by
HenryW
3 hours, 3 minutes ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
8 hours, 11 minutes ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
8 hours, 17 minutes ago -
regarding april update and may update
by
heybengbeng
9 hours, 47 minutes ago -
MS Passkey
by
pmruzicka
5 hours, 51 minutes ago -
Can’t make Opera my default browser
by
bmeacham
17 hours, 27 minutes ago -
*Some settings are managed by your organization
by
rlowe44
4 hours, 10 minutes ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
16 hours, 21 minutes ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
1 day, 12 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
1 day, 21 hours ago -
AI slop
by
Susan Bradley
11 hours, 9 minutes ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
1 day, 22 hours ago -
Two blank icons
by
CR2
10 hours, 4 minutes ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
2 days, 7 hours ago -
End of 10
by
Alex5723
2 days, 9 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
1 day, 7 hours ago -
test post
by
gtd12345
2 days, 15 hours ago -
Privacy and the Real ID
by
Susan Bradley
2 days, 6 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
8 hours, 23 minutes ago -
Cant log on to oldergeeks.Com
by
WSJonharnew
2 days, 20 hours ago -
Upgrading from Win 10
by
WSjcgc50
1 day, 7 hours ago -
USB webcam / microphone missing after KB5050009 update
by
WSlloydkuhnle
1 day, 11 hours ago -
TeleMessage, a modified Signal clone used by US government has been hacked
by
Alex5723
3 days, 11 hours ago -
The story of Windows Longhorn
by
Cybertooth
2 days, 23 hours ago -
Red x next to folder on OneDrive iPadOS
by
dmt_3904
3 days, 13 hours ago -
Are manuals extinct?
by
Susan Bradley
14 hours, 16 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
3 days, 23 hours ago -
Network Issue
by
Casey H
3 days, 10 hours ago -
Fedora Linux is now an official WSL distro
by
Alex5723
4 days, 11 hours ago -
May 2025 Office non-Security updates
by
PKCano
4 days, 11 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.