270 Posted Topics
Re: [QUOTE]var regex=RegExp.escape("[Munees]waran");[/QUOTE] To generate a RegExp you need to change that to [CODE]var regex= new RegExp(RegExp.escape("[Munees]waran"));[/CODE] Whether the resulting RegExp will do what you are trying to do isn't clear (to me, anyway). | |
Re: [QUOTE] click on the top left image, changing Home to Business, the text ... should change.[/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 type="text/javascript"> var img = 0 function swapImg(img1) { if (img … | |
Re: This the line that is giving me an error [code]eval(select1) = newHours('000');[/code] Are you trying to assign whatever is returned by [ICODE]newHours()[/ICODE] to a bunch of variables with names like Mon5, Tue10, Mon8, ... and so on? And is your problem that the names are [in effect] typed by the … | |
Re: [QUOTE] use a one button for hiding and showing div..[/QUOTE] One javascript solution looks like 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"> <title></title> <script type="text/javascript"> function toggle() { var oDiv = document.getElementById('fxm') var oBtn = … | |
Re: [QUOTE]IE fails[/QUOTE] The pageXOffset and pageYOffset properties are supported in all major browsers, except Internet Explorer. IE equivalents are "document.body.scrollLeft" and "document.body.scrollTop". | |
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 evalcheck(e) { e = e || event; var that = e.srcElement || e.target; if (that.name == 'adTick' || that.name == 'chTick') { var cInps = … | |
Re: [QUOTE]What am I missing?[/QUOTE] I don't know what you are missing, but we are missing the HTML input element(s) needed to test the code. | |
![]() | Re: [QUOTE]Basically I do something like this: [code] #i1 {position:absolute; left:193; top:47; height: 20; width: 20; background-color: #369e1c;} function move(where){ var ids = "i" + where; var newtop = document.getElementById(ids).style.left; } <div id="i1" onclick="move(1)"></div> [/code] [/QUOTE] Here is a toy program that shows how the [ICODE].style.xxx [/ICODE]properties work [CODE]<!DOCTYPE html PUBLIC … ![]() |
Re: I don't know what else may be wrong, but the event you appear to want is [ICODE]NativeWindowBoundsEvent.RESIZING[/ICODE] | |
Re: [QUOTE]Can we find out the MAC Address for a clients computer [/QUOTE] From IE (or another browser with an ActiveX plugin) - provided that the user is oblivious to even the most basic security concerns - yes. [QUOTE] cross browser compatible?[/QUOTE] In the general case, no. | |
Re: I didn't bother to read this thread until now because it already already had 3 replies when I first saw it. You shot yourself in the foot. | |
Re: This page [url]http://www.webdeveloper.com/forum/showthread.php?t=179318[/url] has a discussion of the issues and links to tools. | |
Re: [QUOTE=ms_sws;1204722] syntax for getting at those table cells [/QUOTE] Here is a simple example that doesn't assume that all rows are of equal length. It does, however, make the simplifying assumption that the text is always in the firstChild node. [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta … | |
Re: Assuming that you haven't made an error in copying, the most likely cause is a conflict (or duplication) in variable or function names. | |
Re: [QUOTE]print one div[/QUOTE] Well, there's good news and mediocre news. The good news is that this page [url]http://home.comcast.net/~judysgames/directory.htm[/url] shows code I wrote for this very purpose in action. It works in Firefox/Chrome/Safari(pc)/Opera and IE8/7/6. The mediocre news is that I haven't finished making a context-free version that can be posted … | |
Re: Set up three styles [CODE] tr.tr1 td {color:} tr.tr2 td {color:} tr.tr3 td {color:}[/CODE] to be applied to the winning rows. Assuming that you don't want to sort the table (which makes the task almost trivial) use getElementsByTagName('tr') to create a collection of pointers to the rows. Extract the key … | |
Re: Before your contribution this thread was 2 1/2 years dead. In the meantime tight code for this function has been posted several times. | |
Re: See [url]http://www.daniweb.com/forums/post1229450.html#post1229450[/url] for a recent discussion. | |
Re: This remarkable page [url]http://www.uselesspickles.com/triangles/demo.html[/url] describes and illustrates a truly brilliant way to draw triangles with javascript, CSS and HTML. In the course of doing so it briefly mentions the tedious no-brain alternative. | |
Re: [ICODE] var oRow = src.parentElement.parentElement; [/ICODE] is not supported by Firefox. Use [ICODE] var oRow = src.parentNode.parentNode; [/ICODE] instead. BTW: noRows is undefined, but that is just as well; there is no need for such a variable. | |
Re: I don't know what else may be wrong (you have not provided enough to test) but in this statement [ICODE]onclick='OpenEducation(); return false; focus_on_lightbox '[/ICODE] nothing after [ICODE]"return false;"[/ICODE] will ever be executed. Start by moving that to the end of the onclick= string. You will then have to fix the … | |
Re: Server-side scripting can easily do what you want. On the client side, a FORM cannot have more than one ACTION=. One workaround (there are others) is to separate the steps. At the end of the validation routine this [CODE]var mailto_string = 'mailto:'+your_email+'?subject='+your_subject+'&body='+your_choice_of_fields; var eml = window.open(mailto_string,'emlWin'); if (eml && eml.open … | |
Re: The usual way of doing this is to change 'this' element onmouseover= and change it back onmouseout= (letting the browser shift and unshift "nearby" elements as needed). If that is not enough (that is, if you need to change [not just shift] other elements - possibly a lot of them), … ![]() | |
Re: I'm fairly sure that line 191 should be [CODE] <input type="submit" value="Apply" onClick="setAlarmgroup();return false"><br> [/CODE] | |
Re: If it weren't for the word "smooth", the easy choices would be obvious: either make links on the original page to #fragements on the other pages or use onload="scrollTo() on the other pages. | |
Re: Could you share your onmouse... event(s) with us? | |
Re: This [CODE]function modifyRow() { var tab = document.getElementById('showTable'); var lastRow = tab.rows.length; alert(enoArray.length) for (i = 0; i < enoArray.length; i++) { var row = tab.insertRow(-1); row.insertCell(-1); row.insertCell(-1); row.insertCell(-1); row.insertCell(-1); tab.rows[i].cells[0].innerHTML = "<input type='button' value='-' onClick='removeRow(this);'>"; tab.rows[i].cells[1].innerHTML = "<input type='text' name='empno' value='" + enoArray[i] + "'>"; tab.rows[i].cells[2].innerHTML = "<input type='text' … | |
Re: The small problem is a typo: [ICODE]<div id="login_box>[/ICODE] should read [ICODE]<div id="login_box"> [/ICODE] The big problem is that IE treats id= fields like reserved words; they can't be used as variable names. Something like this [CODE] var logBtn = document.getElementById('loginBtn'); var logfader = document.getElementById('login_fader'); var logbox = document.getElementById('login_box'); logBtn.onclick=function(){ logfader.style.display … | |
Re: IE and FF see the parents differently [CODE]ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle" alert("parent"+ultags[t].parentNode.tagName) alert("parentparent"+ultags[t].parentNode.parentNode.id) if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu[/CODE]. You might start by fixing the errors in the <ul>/<li> structures. | |
Re: This is one guess at what you are trying to do [CODE]<html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title> Dynamically add Text Box and Button </title> <script language="javascript" type="text/javascript"> _ctr=0; function addEl(typ) { if (_ctr < 15) { var el = document.createElement("input"); … | |
Re: [QUOTE]Is there a way, in Javascript, to get a list of files in a folder (on a server)[/QUOTE] If your server is configured to block directory access (most are), then no: you need to use server-side scripting. In the unlikely event that it isn't so configured, then a qualified yes. … | |
Re: I don't know what else is wrong, but do you realize that by calling [ICODE]document.getElementsByTagName("input")[/ICODE] repeatedly, at best your code will be unnecessarily slow and at worst it will fail (when the collection returned is smaller than the one you used to set the limit on i at the beginning?. … | |
Re: [QUOTE]print the body or one part of the page that we really need - a form[/QUOTE] Is 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 printbyid(sId) { var oPrn = document.getElementById(sId); var … | |
Re: I'm guessing the first part is basically the same problem $("input[name='HalfDay']" and the second part should probably be if this | |
Re: Use the 'name' property. [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> <select name='SelName'> <option value="1"> value=1 </option> <option value="2"> value=2 </option> <option value="3"> value=3 </option> </select> <form> <input type='checkbox' name='CBName'> </form> <script … | |
Re: Rich (styled) text widgets do exist, but an HTML <textarea> displays only plain text. However, something like 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"> <title></title> <style type="text/css"> div { width=600; font-family:monospace } </style> <script … | |
Re: You might find 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"> <title></title> </head> <body> <form name='frm1' id="frm1"> <input type="text" name="box1"> <select id='sel1' onchange='document.frm1.box1.value=this[selectedIndex].text'> <option value='1'> one </option> <option value='2'> two </option> <option value='3'> three </option> … | |
Re: I don't know what else may be wrong, but "super" is a reserved word in IE; using it as a variable name causes an error. | |
Re: [QUOTE]The main problem is this. Every time the page loads I get a pop-up [B]"to help protect your security, IE has restricted this webpage from running scripts or ActiveX controls that could access your computer"[/B][/QUOTE] There are three primary issues. 1. If you use ActiveX some visitors won't see the … ![]() | |
Re: [QUOTE]when you click the calculate button it says "NaN" for the result for everything [/QUOTE] [CODE]var result =useableValue * 1; //convert innerHTML to int? - not working because its an array [/CODE] When first loaded, if you click "C" without clicking anything else useableValue contains the 8 character string "3+ … ![]() | |
Re: [QUOTE] download a pdf link [/QUOTE] This will open a .pdf in the same window (unless your browser or viewer is configured not to do so). [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> … | |
Re: I think it is necessary to have <base target="_self" /> in the <HEAD> of quantify.php. Whether that is sufficient to resolve your problem, I don't know. | |
Re: [QUOTE]i can't do getElementByName[/QUOTE] Don't confuse getElement[COLOR="red"]s[/COLOR]ByName with getElementByName. [QUOTE]two id's that are the same [/QUOTE] At risk of pointing out the obvious, making the id's different would solve the problem. :) You could have one loop generate 'A'+### and the other generate 'B'+###. Of course that is a complete … | |
Re: One answer to your question is given in the post immediately above yours in this thread from two years ago. If you need more information you will probably have better luck in the Databases forum. | |
Re: javascript != java You will probably have better luck in the JSP forum. | |
Re: Let me see if I understand the problem. Are you saying that this [CODE] jQuery(id).caret(/fox/g); [/CODE]works as you expect but this[CODE] var searchText='fox'; var re = new RegExp(searchText,"g"); jQuery(id).caret(re); [/CODE] does not? | |
Re: [QUOTE]Is it possible to show the details of each record from the recordset in a show hide way?[/QUOTE] Once the records have been downloaded, that kind of display can be done entirely on the client side with css and javascript. In situations where the data is available one query/record at … | |
Re: [QUOTE]Is there a command to draw a circle in javascript or I have to use only a circle picture?[/QUOTE] There are a number of good - and free - javascript plot/graph packages. [QUOTE] Also is there a way to arrange many circles randomly in a browser page ,using html/javascript?[/QUOTE] Once … ![]() | |
Re: What happens in the span stays in the span. The onmouseout= doesn't do what you think it is doing, and should be removed. To see what I mean, try this [ICODE]<span onmouseout="this.style.cursor='wait'">hi</span>[/ICODE] |
The End.