270 Posted Topics
Re: This [CODE]function toggle(that) { if (that.getAttribute('class') == 'level01_top_link_subnav_close') { that.setAttribute('class', 'level01_top_link_subnav_open') } else { that.setAttribute('class', 'level01_top_link_subnav_close') } } [/CODE] will do one of these[CODE]<a id="010" class="level01_top_link_subnav_close" href="javascript:void 0;" onclick="javascript:toggle(this);hideShow('D010');"> [/CODE] as shown. Either do the same for all the others or - probably better - modify [ICODE]hideShow()[/ICODE] to do likewise. … | |
Re: Unfortunately your comment comes almost three years too late for the participants in this thread. | |
Re: Line 56 is trying to use the id before it is set at line 59. | |
Re: [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 w=new ActiveXObject('Word.Application'); if (w){ w.Visible = true; w.Documents.Open("d:\\2.5\\test.docx"); w.ActiveDocument.PrintOut(); w.Quit(); } </script> <title></title> </head> <body> </body> </html> [/CODE] | |
Re: Works fine here (once the elements are assembled into a page in the proper order). | |
Re: If the height settings (there are two of them) are too small, the control box can't be seen. If the autoplay settings (there are two of them) are "false", the video doesn't start when it loads. | |
Re: The [ICODE]setAttribute()[/ICODE] does that for you. FWIW, this version [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"> <title></title> </head> <body> <div id='logo'></div> <script type="text/javascript"> var imgcur = -1 var imgs = ["company_logo-1.jpg", "company_logo-2.jpg", "company_logo-3.jpg", "company_logo-4.jpg", "company_logo-5.jpg", "company_logo-6.jpg", … | |
Re: [QUOTE] line breaks.[/QUOTE][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> <body> <textarea onclick="tfr()" id='ta'></textarea> <div id='dv'></div> <script type="text/javascript"> function tfr() { document.getElementById('dv').innerHTML = document.getElementById('ta').value.replace(/\n/g, "<br /><br />") } </script> </body> </html> [/CODE] | |
Re: [QUOTE] first way works fine[/QUOTE] Yes, but does that make any sense? An error is returned only when: dobday exists and BOTH dobyear and dobmonth are absent. I suspect that you really want: dobday exists and EITHER dobyear or dobmonth is absent. | |
Re: To remove _whatever the expression is [CODE]src = src.replace(/^(.+)(_[^.]+)(.+)$/, "$1$3");[/CODE] To insert _whatever the expression is [CODE]src = src.replace(/^(.+)(\.[^.]+\?.+)$/, "$1_whatever$2"); [/CODE] | |
Re: [QUOTE]why here newWindow variable equals to null. [/QUOTE] That is a way of preventing [ICODE]closeNewWindow()[/ICODE] from trying to close an already closed window. Once the window has been closed [and newWindow has been set to null] the test [ICODE]if (newWindow) [/ICODE] at the beginning of that function will not be … | |
Re: What is the element with id='id'? Exactly what characters does it contain? Is id='id' unique within the document? Exactly what characters are in the childNode.nodeValue that you think should match the id? Note: using the same value for a variable name and for an id (the string 'id' in this … | |
Re: [QUOTE] How can I get those elements to respond to an event without actually having to with [iCODE]onmouseover="this.style.background = '#687168';"[/iCODE] or something for every single tag.[/QUOTE] 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 … | |
Re: Your code mixes properties of 'main' with references to 'sub'. This [CODE] theTabs = document.getElementById('main') newRow = theTabs.insertRow(theTabs.rows.length) snonewCell = document.createElement('td'); snonewCell.innerHTML = theTabs.rows.length-1; newRow.appendChild(snonewCell); enonewCell = document.createElement('td'); enonewCell.innerHTML = "<input type='text'>"; newRow.appendChild(enonewCell); enamenewCell = document.createElement('td'); enamenewCell.innerHTML = "<input type='text'>"; newRow.appendChild(enamenewCell);[/CODE] fixes the first part. Make the code for the … | |
Re: [QUOTE]onclick the page goes blank[/QUOTE] You have used 'open' [a reserved word in javascript] as a function name. | |
Re: [QUOTE]You need to assign the regex pattern object to a variable and then use the test method of the regex object to check the input you pass to it.[/QUOTE] Actually, no. [CODE]alert(/^[^$%@!]+$/.test(text))[/CODE] works just as well. | |
Re: [QUOTE]printing the whole form with currently filled values.[/QUOTE] This message [url]http://www.daniweb.com/forums/post1242269.html#post1242269[/url] tells you where to find exactly what you need. [Sorry, but I still haven't posted it here as a snipper :(] The page mentioned in that message also serves as a demo, of course. Parts #2, #3 and #4 … | |
Re: [QUOTE]how to save information as a txt or js file and retrieve it later using only html or javascript .[/QUOTE] If 1. the user has IE (or another browser that supports ActiveX plugins) and 2. the user responds 'OK' to the security warning(s) then something like this [CODE]function WriteToFile() { … | |
Re: The exact code depends on the type of the element you want the message to appear in and on whether the action statement requires global variables, but the general idea is something like this [CODE]var oMsg = document.getElementById('yourId') var bar2= createBar(320,15,'white',1,'black','green',85,7,3,"oMsg.innerHTML='hello world'");[/CODE] | |
Re: [QUOTE] appears when it is loading and disappears when it is loaded? [/QUOTE] Have you tried your code without it? At first glance it appears that [even with a 'busy' server] the data requested by this code may load so quickly that such a message would never be in place … | |
Re: [QUOTE] function fullwin(targeturl){ window.open(targeturl,"","fullscreen,scrollbars=no") } [/QUOTE] That option list should be [ICODE]"fullscreen=yes,scrollbars=no"[/ICODE] but you need to be aware that most non-IE browsers will [by default, mirabile dictu] prevent such a window from opening (and the indication that it has done so may be subtle enough that the user never reoognizes … | |
Re: Assuming that you have already checked the cases, another possibility is whitespace. Try an additional alert [CODE]alert('length' + stateval.length);[/CODE] | |
Re: [QUOTE]There are various ways to fix this...[/QUOTE] ...all of which no doubt come too late for the OP. The problem was raised nine months ago. | |
Re: [QUOTE] find the problem[/QUOTE] For your code to work as intended, the call to [ICODE]ResizeThem();[/ICODE] must be at the end of the body, like so [CODE] <script type='text/javascript'> ResizeThem(); </script> </body>[/CODE] If that line were moved to the <head> section with the rest of the javascript, it would be triggered … | |
Re: This thread was over three years old before you resurrected it. You may get more attention to your question if you start a new thread. | |
Re: You will have to post the code. BTW: document.all['x'] is deprecated at best and unsupported at worst; use document.getElementById('x') instead. | |
Re: Tha basic problem is that for the image to be movable the style [ICODE]position:relative; [/ICODE] must be present. This little toy[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> <body> <img style="position:relative; left:0px" onclick="this.style.left=60+parseInt(this.style.left)+'px'" src="btn16.gif"> … | |
Re: Menus can be created with 100% CSS, 0% javascript. Here [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <style type="text/css"> .menu { color: white; font-family: Tahoma; font-size: 8pt; font-weight: bold; border-right: 1px solid white; text-decoration: none; background-color: … | |
Re: [QUOTE]Ive accidently deleted something [/QUOTE] I can't begin to guess what. Be that as it may, this [CODE]descReq.open("http://inny.ipbfree.com/GET",url);[/CODE] is obviously wrong. It should probably be this [CODE]descReq.open("GET",url)[/CODE];or possibly something like this[CODE]descReq.open("GET","http://inny.ipbfree.com/");[/CODE] | |
Re: [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> <body> <div> <iframe scrolling="no" frameborder="0" height="800px" width="100%" src="http://www.bing.com"></iframe> <iframe scrolling="no" frameborder="0" height="400px" width="100%" src="http://www.ask.com"></iframe> <iframe scrolling="no" frameborder="0" height="4000px" width="100%" src="http://www.yahoo.com"></iframe> </div> </body> </html> [/CODE] | |
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"> var ctr=0 function addmsg(){ var oLst = document.getElementById('scrl') oLst.insertBefore(document.createTextNode(++ctr),oLst.firstChild) oLst.insertBefore(document.createElement('br'),oLst.firstChild) } </script> <title></title> </head> <body> <input type=button onclick="addmsg()" value='msg'> <div id='scrl'></div></button> </body> </html> [/CODE]is one approach. | |
Re: Works fine here. [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 newWindow ; function FNUMBER(SOP) { newWindow = window.open(SOP,'','left=0px,top=0px,width=800,height=670'); setTimeout('newWindow.close();',5000); } </script> <title></title> </head> <body> <form> <input onclick="FNUMBER('http://www.google.com')" type="button" value='test'> </form> </body> </html> [/CODE] … | |
Re: [QUOTE]HOW CAN I a word document in new window in IE6.[/QUOTE] [ICODE]window.open()[/ICODE]works in IE6. In fact, you say elsewhere in this thread that the window does open. The actual problem appears to be that the associated application is not launching. You need to test on the target system to see … | |
Re: [QUOTE]You need to escape the . and -[/QUOTE] That is not correct. Those characters are used as themselves in that character class. | |
Re: You need something like this [CODE]<form name="inp" onsubmit="send();return false;"> <input type="text" name="inp1" /> <input type="submit" value="send" /> </form>[/CODE] so there will be no further action after the send() function has finished communicating with the server and updating the <div>. | |
Re: You have already started a new thread on your issue. Was it really necessary to resurrect this two-year old thread as well? | |
Re: See [url]http://www.daniweb.com/forums/post1204933.html#post1204933[/url] Start the indices at your choice of lower bound (instead of 0) and limit them to less than the corresponding .length (if necessary). IIRC your table has more than one body; if so, you will have to further modify that code accordingly. | |
| |
Re: When the links appear, what underlined values do you see? Is other javascript on the page working? | |
Re: [QUOTE]chrome.tabs.getSelected(null, function(tab){ sendUrl(tab.url); } )[/QUOTE] You might try replacing [ICODE]sendUrl(tab.url);[/ICODE] with [ICODE]var tmp = tab.url;sendUrl(tmp);[/ICODE]. It that doesn't work, at least it will give you a checkpoint to test the return. | |
Re: [QUOTE] redirect based on the selection[/QUOTE] [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 goSearch(opt) { switch (opt) { case "1": window.location = 'http://www.google.com'; break case "2": window.location = 'http://www.bing.com'; break } } … | |
Re: The back arrow navigates the history object which AFAIK can't be changed. However, you may be able to manage it as follows: after login create a history entry for the logout page [by loading it without displaying anything and then loading page1 using location.replace] navigate within the site using nothing … | |
Re: [QUOTE]IE I get an error at "document.getElementById('ipb_table_reload').innerHTML = response;" which says "Unknown runtime error"[/QUOTE] See [url]http://support.microsoft.com/kb/239832[/url] | |
Re: Don't hold your breath waiting for mexabet to answer - this thread is two years old. You might find the solution to your problem by reading the answers already given above. | |
Re: The code you posted returns the file you want [CODE]<AFPChain name1="2X4N.a" name2="3GYS.a" method="jFatCat_rigid" version="1.0" alnLength="187" blockNum="1" ... etc. [/CODE] but Firefox reports [CODE]XML Parsing Error: no element found Location: moz-nullprincipal:{7ecb1187-1a21-4b63-bbc6-5b638a8a46d7} Line Number 1, Column 1: ^[/CODE] The error [ICODE]'null' is null or not an object[/ICODE] may be the result of … | |
Re: If you have only that one event, this [CODE]<td onclick='if (document.readyState != "complete") return false; ChgText()'> [/CODE]should solve the problem. If you have many onclick= calls to ChgText(), leave them all as they are and put a .readyState test at the beginning of that function instead. If you have many … | |
Re: [QUOTE]The following code works fine in IE8 and Firefox 3.5. Any idea why it does not work in Chrome? [/QUOTE] I haven't tested the javascript part of the code in Chrome yet, but the first place I would look would be the Cookies tab at Tools | Options | Under … | |
Re: 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"> <script type="text/javascript"> function showIt(that) { var sLink="http://www.habbo.com/habbo-imaging/avatarimage?user=" var sParm="&direction=2&head_direction=2&gesture=sml&size=l&img_format=gif" var sText=that.value // [[[[TEXTBOX.DATA]]]] var oImg = document.getElementById('avatar') oImg.setAttribute('src',sLink+sText+sParm) } </script> <title></title> </head> <body> <form> <input type='text' onblur="showIt(this)"> … | |
Re: Use onclick= instead of onchange=. | |
Re: The problem is almost certainly the absence of the 'text/xml' header required by IE. An easy work-around is to add a cross-browser intermediate step [CODE]function rssReturned(xmlHTTP2) { if (window.ActiveXObject) { // sniff for IE Windows var XMLdoc = new ActiveXObject("Microsoft.XMLDOM"); XMLdoc.loadXML(xmlHTTP2.responseText); } else { var XMLdoc = xmlHTTP2.responseXML; } var … |
The End.