autismuk
Members-
Posts
12 -
Joined
-
Last visited
Reputation
10 GoodAbout autismuk

Personal Information
-
Occupation
Layabout
-
Location
Norfolk, England
-
Yep. I have one There are a lot of problems with it but its fun to play with. The keypad isn't as bad as you think but the actual buttons are horrible In reality I think it is aimed too low. You could upspec it a lot, both speed and graphics by using (say) an ARM board or a PIC32. There are breakout boards for both that could be used as a base.
-
As far as I can see your approach is fundamentally wrong. You want to output the same HTML each time, whatever you are doing. Then on your postback, validate the form (this would include checks on the combobox select, obviously). If the validation(s) fail then you need to mark them somehow - for example have an red asterisk alongside those which are wrong, and reseed the HTML Form controls with the data, so they don't have to type it in again. What you have popped up on the thumbnail (the first one) is a Javascript Alert box (I think !). This is a Javascript function, not a PHP one, and whilst you can theoretically do this by outputting script in PHP this is a strange way of doing it. If you want alert() boxes (Javascript message box) then you should be client side validating your form in Javascript before it is Posted back to the server. If you google there are plenty of articles on client-side validation. Don't assume this works however ; your server side PHP should still cope with bad values - even if it just throws an error if it gets a value that the validation says it shouldn't.
-
Problem is doing these from many IDEs is appalling. Why not start by tinkering with XNA Game Studio ? Admittedly it is C# but the VB.Net is just C# with a new syntax. I have seen DX/OGL and other tuts for VB but they tend to be less common because most people don't like VB.
-
Teaching programming in schools
autismuk replied to polarlemniscate's topic in Network and Classroom Management
Well, if things like Netbeans and so on don't work, what about using VirtualBox ?- 24 replies
-
- cc3
- programming
-
(and 1 more)
Tagged with:
-
Okay - now this one works - on Firefox 3.1. Everything is chucked together here in one file with some silly tables to play with, but you can put different bits in different files if you like. It is difficult to say if it will work on IE, Safari, Opera as I work on Linux. There may be gotchas - for example even if you set the attribute to height:50mm; Firefox 3.1 (helpfully) inserts a space so the attribute returns height: 50mm; - this is the reason for using the regexp which allows any number of spaces in there. Your best bet is to get this working in Firefox (should be trivial), then see if it works in other target browsers ; if it does port it into your HTML code. <br /> <br /> //<br /> // This function changes the data table according to how you want it <img src='/uploads/emoticons/smile.png.e38e01f2a4850c4158c039aea82ac2a8.png' alt=':)'><br /> // This has only been tested on Firefox 3.0.10 but it should work on anything. <br /> // ..... theoretically ..... you know what Internet Explorer is like <img src='/uploads/emoticons/frown.png.cbbd7587b7aef409d872880bc9183d5d.png' alt=':('><br /> // If something this simple doesn't work cross browser God help us all :<<br /> //<br /> function changeTableDataStyle() {<br /> <br /> // Store references to all the <td> elements in array tdList<br /> var tdList = document.getElementsByTagName("td");<br /> <br /> // This is required because Firefox (at least) returns it with spaces even if you don't provide any in the HTML. Fun eh <img src='/uploads/emoticons/smile.png.e38e01f2a4850c4158c039aea82ac2a8.png' alt=':)'><br /> // This matches height:(any number of spaces or one)80mm;<br /> var tdRegExp = new RegExp("height:\\s*80mm;");<br /> <br /> // Go through all the <td> elements in the array.<br /> for (var i = 0;i < tdList.length;i++) {<br /> <br /> // Does the style match the regular expression ?<br /> if (tdList[i].getAttribute("style").match(tdRegExp)) {<br /> <br /> // If so update the height to whatever you want, e.g. 50mm. <br /> tdList[i].setAttribute("style","height:50mm;");<br /> } <br /> }<br /> }<br /> <br /> </pre><table border="1" cellspacing="0" cellpadding="0"> 15mm15mm15mm 80mm80mm80mm 30mm30mm30mm </table><b
-
DanIT, I am going to the hospital tomorrow, I will try and check that it actually works and post how to 'fix it in' Wednesday sometime - if you aren't too desperate.
-
I presume from this that you can't modify the HTML directly - it's held on another server or something like that ? You can't insert an ID or a class either ? It sounds like a job for JavaScript, attached to the OnLoad event as you suggest. But beyond that it's difficult to say, exactly ? Do you want to change *every* instance of this in the DOM, e.g. every instance of ? Is it just one ? Is it always in the same place ? As a hack, if it is always in the same place, you could walk the DOM from the DocumentRoot to the place where you wanted to go and change the HTML directly. Something like this might work - *unfortunately* I'm not in a position to be able to test it right now so this is untested code. I will try and run it later // Get all the td tags into an array var tdArray = document.getElementsByTagName("td"); var n; // Scan through all the td tags for (n = 0;n // Get the individual tag var tdElement = tdArray[n]; // If it's style is set to "height:80mm;" if (tdElement.getAttribute("style") == "height:80mm;" { // Set its style to "height:50mm;" tdElement.setAttribute("style","height:50mm;"); } } }
-
I'm planning to do some development for school stuff (which will be freebies), mixture of Web Applications, SCORM compliant materials etc. I'm unsure as to whether to code in DHTML or Silverlight. Silverlight is easier, obviously, but has the problem of requiring the plugin. Could people advise me as to how prevalent the plug in is, and how easy it would be for teachers and/or network staff to install it, in primary or secondary environments ? Would 'lock downs' prevent the usual install method SL2 uses (offers the download if the plugin isn't found). I understand the tech. fine but I'm not au fait with the various network systems. TIA. All opinions gratefully accepted
-
That won't work, because the image will not reset when the mouse leaves the link. Try something like this. Javascript Menu <br /> //<br /> // Set the Logo Image to the required state<br /> //<br /> function SetLogo(name) {<br /> var e = document.getElementById("menuImage"); // Get the element with the ID 'menuImage'<br /> e.src = name; // Set its src attribute to the required value<br /> }<br /> logo.gif default.gif Image 1 here Image 2 here Image 3 here
-
The main chunk, after the elseif (!_$GET['convo']) is the bit that's actually doing the work of the paging. On the face of the error message is wrong, because convo presumably isn't set when you come back with page 2. It is more likely to be the capital 'c' version as a result of the mysql_fetch_array failing. Definitely enumerate the error messages so you know which one isn't failing. I notice that in the main SQL fetch (the one with Limit), it is unsorted. It's a while since I've written any PHP/MySQL but it struck be that this being unordered might not help, as SQL doesn't guarantee the order of any returned dataset if you don't specify it (I think !) Might also be worth outputting the main SQL fetch as a debug effort just so you can check it using the CLI MySQL utility to see if it works. I presume you've removed the mysql_connects for clarity
-
As long as you don't want to change anything else - just change if (oRegExp.test(oElement.className)) to if (oRegExp.test(oElement.id)) All the outer loop does is to get an array of all the elements and go through them matching the className using the given regEx. having said that it's only checking for Dan with optional spaces, not containing Dan, so if you are pretty sure you haven't got the spaces you could cut most of it out with Document.getElementById("Dan") L8R: No it doesn't, wasn't looking carefully, it looks for the word Dan on its own ! Have you considered jQuery ?
-
For old BBC stuff try "Stairway to Hell"
