1,330 Posted Topics
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. … |