270 Posted Topics
Re: Use the rows[] and cells[] collections to validate the desired cell(s) in the desired row(s). Using them together [iCODE]rows[i].cells[j][/iCODE] makes accessing a table almost as easy as accessing a two-dimensional array. | |
Re: Since you mention querying a database, I assume that you have server-side scripting; if so, you should start there (as they all have a way to do what you want). That aside, here [url]http://msdn.microsoft.com/en-us/library/ms532998(VS.85).aspx[/url] is a [B]complete [/B]tutorial using only javascript. Assuming that a table already exists, you don't need … | |
Re: The first problem is that the correct spelling is [iCODE]getElementsByClassName[/iCODE] The second problem is that some browsers do not support it [url]http://www.quirksmode.org/dom/w3c_core.html#fivemethods[/url] | |
Re: [QUOTE] client-side JavaScript for version 1.3[/QUOTE] Obsolete. | |
Re: Webkit browsers start executing javascript that is not tied to any event before the DOM finishes loading. The exact cure depends on what is where, but the general idea is to put everything in onload= or readystatechange= event handlers. Sometimes moving everything to the end of the body [out of … | |
Re: [QUOTE]get me started on the calculate function [/QUOTE] The first problem is that [iCODE]function calcuate()[/iCODE] is misspelled. | |
Re: No container is needed. Just define a placeholder IMG with the desired width= or height= (but NOT both, and do NOT use style). When the src= is changed, the browser will [by default] scale the image without changing the aspect ratio. Note: the scaled image may look awful [especially if … | |
Re: [QUOTE] function activateLink(obj) { obj.className = obj.className.replace("link_fresh", "link_visited") // do something else such as display stuff you want to display } [/QUOTE] That only toggles one object. You need to cycle through all 'related' objects; something like [INDENT]if "this" then "set" else "clear".[/INDENT]will do the trick. In one of scrappedcola … | |
Re: [QUOTE] return [img.width, img.height]; [/quote] Try [CODE]return [img.clientWidth, img.clientHeight];[/CODE] instead. Note, however, that if you need to know the total area occupied by the element (not just the area of the actual image) you will have to deal with borders, etc. | |
Re: [QUOTE] I am using zRSS reader on my site: [url]http://www.zazar.net/developers/zrssfeed/[/url] how i can shorten the blog description for each entry? and even the title? [/QUOTE] The 'real' way would be to look through the code and modify the values before they are sent to the target fields. If you don't … | |
Re: Without seeing your code it is not possible to give an exact answer. In general, however, the same approaches used to 'populate' the <div> in the first place [[iCODE].appendChild()[/iCODE] or [iCODE].innerHTML +=[/iCODE] or whatever] could be used 'onclick' in the accordion to add to the <div>. | |
Re: A bookmarklet alone can't do it, but a bookmarklet that calls an extension in principle could. These [INDENT][url]http://www.snaphow.com/2-ways-to-add-an-useful-mini-notepad-to-firefox/[/url][/INDENT] may be marginally better than the window.open method you were previously using. | |
Re: You appear to be having the problem described here[INDENT][url]http://www.google.com/support/forum/p/Chrome/thread?tid=08495cc4ceabab5b&hl=en[/url][/INDENT] If so, perhaps the workaround suggested there will work in your case as well. | |
Re: You are describing flyout menus. They can be done [almost] entirely with CSS. Google for [INDENT]CSS flyouts[/INDENT] | |
Re: [QUOTE] IE6 failing when it does the req.send() [/QUOTE] Could we please see your code? | |
Re: [QUOTE] Difference is that I put the code straight to the onClick and it works? [/QUOTE] If I undertand correctly, you think that when this [iCODE]onclick="Effect.BlindDown('error'); return false;" [/iCODE]is in place, the code is working. It isn't. It merely displays a message with an effect and then stops (because of … | |
Re: That is an expected result. On most 32-bit platforms the largest javascript integer is 2^31-1 and the maximum precision of a floating point number is 15 digits. | |
Re: [QUOTE] [onkeyup] [/QUOTE] In this case [iCODE]onblur=[/iCODE] is more useful. This[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <script type="text/javascript"> function copyThem() { var oDiv = document.getElementById('copy') oDiv.innerHTML = '' var cINs = document.getElementsByTagName('input') for (j … | |
Re: [QUOTE] get the selected text from the i-frame where the source is from different domain [/QUOTE] By design, no modern browser will do that. For special cases [your own desktop or intranet] more-or-less ugly work-arounds are possible; in the general case, none of them is likely to be practical. | |
Re: [QUOTE]I save the web page to my hard disk and play the game the game graphics do not show, [/QUOTE] Precisely how are you saving the page? | |
Re: This [url]http://home.comcast.net/~dyscdbc/NoName02.html[/url] is the URL of a working demo, and here [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> <script type="text/javascript"> var getURL = "http://home.comcast.net/~dyscdbc/A.HTM" var altURL = "http://home.comcast.net/~dyscdbc/AR.HTM" function ckFrm() { var gotURL = … | |
Re: I suspect that it took longer to come to this forum and post your question than it would have taken to test some of the alternatives yourself. And you no doubt would have had an answer sooner if you had - horrors of horrors - checked an online tutorial. [CODE]<!DOCTYPE … | |
Re: [QUOTE] didnt give me real answer [/QUOTE] Change line 3 to [CODE]answer=0;[/CODE] and at least your code will start doing arithmetic. Unfortunately there are other problems. | |
Re: Some of the more-or-less effective workarounds are discussed here [url]http://www.mezzoblue.com/archives/2010/05/20/ie8_still_fa/[/url] but AFAICS there is no perfect solution yet. Googling turns up a number of similar ideas, and combinations. | |
Re: [QUOTE]This isn't as easy as you think. [/QUOTE] Agreed. By hitting more-or-less random digits and backspaces I was able to get such display values as 0.2333 23.2 33 instead of the expected 23.33 23.20 33.00 I haven't yet figured out where things go wrong, but I would make the general … | |
Re: If each IFRAME is responsible for toggling its own text, the solution is almost trivial. I have posted examples of toggling properties in two other current threads in the last 24 hours. Note: manipulating classes (instead of toggling properties) can get complicated. For starters, 'className' [as opposed to 'class'] is … | |
Re: [QUOTE]How to stop the scroll position when webpage gets refreshed[/QUOTE] Let's see... This thread had been dead for three years. Your question quotes the subject word-for-word, and adds nothing new. Did you read the answer already given? | |
Re: [QUOTE] load different images into page every time the website is viewed? [/QUOTE] Write an onload= function to set the src= field of the IMG(s). You can use Math.random() to compute filenames based on a pattern (cloud0.jpg, cloud22.jpg, cloud7.jpg, etc.) or choose arbitrary filenames from an array [ICODE]["sky.jpg","cloud.gif","rain.bmp","snow.jpg"][/ICODE]. To change … | |
Re: You can set [iCODE]onclick="doSwap(this)" [/iCODE]on each element (so they all invoke the same function). That single function [iCODE]doSwap(that){}[/iCODE] cycles through the elements of interest, setting each associated color to 'default' and each associated <div> to display:none. Then the special color and display:block can be set for (that) one. This doesn't … | |
Re: This [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <script type="text/javascript"> function colorIt(){ var term = document.getElementById('term').value var cSpns = document.getElementsByTagName('span') for (j = cSpns.length, i = 0; i < j; i++) { if (cSpns[i].firstChild.data … | |
Re: I think you were trying to write something like this [CODE]<script type="text/javascript"> function validate_form() { if (document.contactform.firstname.value == '') { alert('Please enter your First Name.'); return false; } if (document.contactform.lastname.value == '') { alert('Please enter your Last Name.'); return false; } if (document.contactform.company.value == '') { alert('Please enter your Company.'); … | |
Re: I'm sorry, but your problem is not clear. Are you trying to make sure that a box is checked before leaving the page? Or something else entirely? BTW: please use the 'CODE' button when posting code.. | |
Re: [QUOTE] var newtext4=("<a href=" + number + "><img src=" + newtext2 + " /></a>"); [/QUOTE] If [ICODE]number[/ICODE] or [ICODE]newtext2 [/ICODE]contains spaces or certain characters that code won't work - and it may even break the entire page. At a minimum, you need another layer of quotes [CODE]"<a href='" + number … | |
Re: Java != javascript. Plus, your new post is a total non-sequitur to this ancient thread that you previously resurrected. | |
Re: This[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta http-equiv="refresh" content="10;url=subscribeJ.asp"> <link rel="stylesheet" href="../maiccss/index.css" type="text/css" media="screen"> <link rel="stylesheet" href="../maiccss/indexprint.css" type="text/css" media="print"> <meta name="generator" content="HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title> MAIC Newsletter and Updates Subscription Form </title> </head> <body> <!--#include virtual="include/header.htm" --> <!--#include virtual="include/skyscraper.htm" --> <p> … | |
Re: This [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <script type="text/javascript"> var tst = 'name@M1.com' var okd = ['m1.com','whatever.net'] for (var i = 0; i < okd.length; i++) { okd[i] == okd[i].toLowerCase() } var emailRE = /^[a-zA-Z0-9._+-]+@([a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})$/ … | |
Re: View the source of that page. You will see CSS for every effect and some [admittedly somewhat sparse] comments. | |
Re: Don't hold your breath waiting for a thank-you. This thread was even older than the other one, having been dead for just under two years; plus, it had been marked [B]solved[/B]. | |
Re: Examples don't get much clearer than this one [url]http://www.htmlcodetutorial.com/images/images_famsupp_220.html[/url] | |
Re: I suspect that [ICODE]makeslider() [/ICODE]is being called too soon. Use $(document).ready() or equivalent. Note: sometimes merely placing the script containing the call at the end of the body is enough to solve the timing problem. | |
Re: [QUOTE] I want to make a menu like this web site :[url]http://www.petrobras.com.br/pt/[/url] [/QUOTE] It is done almost entirely with CSS. View the page source and you can see most of it (plus links to the rest of the src). Googling for [B]CSS navigation[/B] will turn up this site [url]http://www.alvit.de/css-showcase/css-navigation-techniques-showcase.php[/url] (among … | |
Re: Does the element have an id (as opposed to a name)? If so, the code is fairly simple. If not, it is more complicated. | |
Re: See the [ICODE].toFixed() [/ICODE]method. | |
Re: The code [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> </head> <style> body {font-family:monospace; font-size:10pt} </style> <body> <img style="position:absolute" src='check.gif'> <div id='nam' style="position:absolute; top:.85in; left:.85in"></div> <div id='amt' style="position:absolute; top:.85in; left:4.35in"></div> <script type="text/javascript"> document.getElementById('nam').innerHTML = "~~~~~~ … | |
Re: [CODE].style.opacity = 0.4; .style.filter = "alpha(opacity=40)";[/CODE] | |
Re: This post [url]http://www.daniweb.com/forums/post1204933.html#post1204933[/url] shows how to examine all rows, all cells using javascript. You can limit the indices to specific rows and/or cells. | |
Re: [QUOTE] Fact[1] = "The word "queue" is the only word in the English language that is still pronounced the same way when the last four letters are removed."; [/QUOTE] It isn't obvious to me how that code could ever work; that string is malformed. Anyway, this[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML … | |
Re: This thread was started 2 1/2 years ago. Since that time a lot of solutions of varying quality have come along, some of them free. You might start by Googling for [ICODE]"html to pdf"[/ICODE]. | |
Re: [QUOTE] this button should do both but only changes bg or div content whichever is called first in onclick script [/QUOTE] That's because your [ICODE]function load () [/ICODE]ends with [ICODE]return false;[/ICODE]. The first call to load() in button3 thus prevents the second call from even happening. |
The End.