1,330 Posted Topics
Re: Sunilsinha, Background images can be made to "tile" but not stretch (at least not easily). You ned to use a standard <img> tag then change its width and height dynamically in Javascript. You don't need a <div> wrapper, but there's no harm (with default div styles). Page will "reflow" when … | |
Re: Ryanwhite17, Something like this maybe? Paste the code into a new document, save as test.html then open in your browser. [CODE]<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Untitled</title> <style type="text/css"> form { margin:0; } .hide { display:none; } </style> <script language="JavaScript" type="text/javascript"> function showFields(menu){ var selected_bindings = … | |
Re: Shadiadiph, I've seen this before and it's a weird one! An language/browser bug in my opinion. In your submit button's tag, [ICODE]name="submit"[/ICODE] kind of hijacks [ICODE]submit()[/ICODE], or even [ICODE]this.form.submit()[/ICODE] within the form, so you get a javascript error. [B]Solution[/B]: Change [ICODE]name="submit"[/ICODE] to eg. [ICODE]name="formSubmit"[/ICODE]. If you read $_POST['submit'] server-side, remember … | |
Re: AppDevGuy, Try this (tested in IE6, Opera 9.01 and Moz 3.0.7). It's pretty simple but seems to work: [CODE]<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Untitled</title> <style type="text/css"> ul#test { list-style-type:none; margin-left:0; padding-left:0; } ul#test input.radio { position:relative; left:-2000px; } ul#test input.radio.checked { left:0px; } </style> <script … | |
Re: Mmmmm, tricky one Essential. It's all yours. | |
Re: Coolkille, As this is a JavaScript question, can you post the server's response HTML rather than the php source. Use "view source" in your browser? That way people can paste it straight into a file, browse it and play around with the code. [B]Airshow[/B] | |
Re: JooClops, You have set yourself a nice little problem. First, Fibonacci/Lucas sequences need two seeds to get them started, "seed1" and "seed2", (1,1 for Fibonacci and 2,1 for Lucas), and you also need to specify how many terms are generated, "nTerms". This will have the advantage of allowing users to … | |
Re: Dudegio, Many (maybe most) commercially available barcode readers come ready to connect to a PC, with software, to do exactly what you describe. No need to write complex code yourself, but you may need to get an expert in to integrate the device with other application software (Sage or SAP … | |
Re: Danishbacker, Before you do anything else, research "GEDCOM" a well supported genealogical/family tree data storage/transmission format. As I understand it, t's pretty well the international standard. You will find a number GEDCOM-compatible applications out there, for data entry and viewing. [B]Airshow[/B] | |
Re: I looked at this a couple of hours ago and just realised ..... the formula's wrong! Volume will increase as both area and thickness increase, therefore the formula must be of the form [ICODE]volume = area * thickness * k[/ICODE], where k is a constant that give the resulting measure … | |
Re: Mlohokare, Is the processing client-side (Javascript) or do you go server-side? Similarly, where is the source file; server-side or client-side? If server-side is involved, then what are you running there: php, jsp, asp, cgi etc.? It's not possible to answer your question witout knowing the basic architecture. [B]Airshow[/B] | |
Re: Fitse, XML is text, just like HTML. You can therefore edit in something as simple as MS Notepad, though XML-savvy products are available - eg. from Altova (IIRC). Be sure: a) Not to violate the XLM schema to which your XML file conforms (if specified). ie. You can't just do … | |
Re: First thing to try is to store [ICODE]escape(text)[/ICODE] rather than [ICODE]text[/ICODE]. Then use unescape('#get_text.text_content#') to restore. This may work for you. For what it's worth, there are other ways of "tokenising" tags (and bbCode). Forum/content management systems are quite sophisticated in this regard. I am not greatly experienced but once … | |
Re: Kinger, I'm away from home at the mo' and it's getting late. I'll post a DHTML solution a.s.a.p. It will employ HTML, CSS and JavaScript. Airshow | |
Re: Ahmksssv, Unless you have an unusual (or very old) Apache distribution/compilation then mod_rewrite should be included. In httpd.conf, try adding the indicated LoadModule directive (if it is not already there), otherwise simply uncomment it as you have already read (ie. remove the leading #). [CODE]LoadModule rewrite_module modules/mod_rewrite.so[/CODE] Add it at … | |
Re: dwatycha, For file upload, you really need to do some background reading. The PHP Manual is a good place to start: [url]http://www.php.net/manual/en/features.file-upload.php[/url] But if you want to avoid a lot of heartache, then there's no shame in using a ready-written downloadable php blog script. There are many to choose from … | |
Re: Tonkz, Oh boy, you're going to have fun. You're about to learn all about [COLOR="Red"]SQL joins[/COLOR]. Look them up in the MS SQL manual (w3schools provides a reasonable primer). In short, there's no unique answer to your question. It depends on which type of join is appropriate to your tables … | |
Re: The PHP Manual says: "$_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. [B]There is no guarantee that every web server will provide any of these; servers may omit some, or provide others not listed … | |
Re: treyk4, This looks like a real-time issue, ie. the code may be trying to set focus before the toggle action has been wholly completed, though theoretically it should be OK. Try introducing some delay by setting a timeout, thus: [CODE](addboxState == "block") ? setTimeout('document.getElementById("add_date").focus()', 200) : null;[/CODE] and similarly in … | |
Re: Bigtalk, Your code will compact down nicely, like this: [CODE]function topdivOpen(n){ for(var i=1; i<=3; i++){ [INDENT]var divRef = document.getElementById("topdiv"+i); if(divRef){ [INDENT]divRef.style.display = (i==n) ? 'block' : 'none';[/INDENT] } [/INDENT] return false; }[/CODE] The secret is to pass in simple integer values from the HTML onclick calls, so you can test … | |
Re: Potato.Head, JavaScript variables and objects are available to all frames in a frameset with one proviso: the pages loaded into the frames must be served from the same domain. Browsers' security model prevents cross-domain penetration. Use eg. [ICODE]parent.otherFrame.variable[/ICODE] or [ICODE]parent.otherFrame.object.xxx[/ICODE] Suggest that you normally won't want to have a copy … | |
![]() | Re: I guess Moz simply doesn't fire [ICODE]body.onload[/ICODE] . Try changing: [CODE]var b = document.getElementsByTagName("Body"); b[0].onload = function() { [INDENT]showpage(); subtotal(); ChangeQ2();[/INDENT] }[/CODE] to [CODE]onload = function(){ [INDENT]showpage(); subtotal(); ChangeQ2();[/INDENT] }[/CODE] [ICODE]onload[/ICODE] is shorthand for [ICODE]window.onload[/ICODE] You can also considerably compact your code by using a loop, eg.: [CODE]function ChangeQ2() { … |
Re: I'm confused! I am one of three people who provided a solution to this question from the same OP just yesterday. Airshow | |
Re: qaokpl, There is an infinite number of ways in which this could be achieved. Typically, somewhere in the advertising site, they provide instructions and offer a short piece of Javascript for you to include on your page. This will (again typically) cause an advertising link/banner to appear on your page … | |
Re: Dabeam, This is easy if your array to be both "dense" and "contiguously indexed", ( [0], [1], [2], [3] etc.) but far trickier if it is either "sparse" ( [2], [5], [12], [100] ) or if you are exploiting JavaScript array's "associative" properties ( ['one'], ['fido'], ['New York'], ['football'] ). … | |
Re: To address/create document elements in your intended way, you need to learn Javascript DOM methods, in particular: [TEX]document.getElementById();[/TEX] [TEX]document.createElement();[/TEX] [TEX]element.appendChild();[/TEX] [url]http://www.w3schools.com[/url] is a good place to start. Airshow | |
Re: EJ, I take it you know how to cause a particular option in a < SELECT > menu to be selected? HTML < option value="xxx" selected > XHTML < option value="xxx" selected="selected" >MyText< /option > You need to build your select menu dynamically, inserting [I]selected[/I] into the appropriate option. Do … | |
Re: The function showStars() below uses DOM methods to build and insert lines of asterisks and will allow you to specify: [LIST] [*]the id of the containing div in which you want your asterisks to appear (first paramerter). [*]the maximum number of asterisks (second parameter). [*]their appearance (CSS class .mystars). [/LIST] … | |
Re: Solocky, as I understand it, you don't need to pass all those hidden strings in HTML to the client; the user never sees them; they just get written to your text file with the users "say" input embedded, so all those strings only need exist in PHP, not HTML. Try … | |
![]() | Re: There are plenty of ready-made Blog scripts available, some free. These will be typically many thousands of lines of php/css/templates, giving you some idea of the complexity of your project. The best of them will be significanty more secure than a DIY job, which is a real issue with php. … |
The End.