270 Posted Topics

Member Avatar for tootytoot

[CODE]window.onload = function () { window.moveTo(0, 0); window.resizeTo(screen.availWidth, screen.availHeight); }[/CODE] works in IE, Firefox, Safari. Workaround(s) may be available for Opera and/or Chrome.

Member Avatar for sbonder
0
196
Member Avatar for ms_sws

[QUOTE]validation Javascript loads after the form actually displays?[/QUOTE] Placing the <script> just before the </body> tag will do what you want but it is not likely that doing so will, by itself, significantly improve the perceived load time. Something else is almost certainly going on.

Member Avatar for almostbob
0
96
Member Avatar for dd501

I can't help with the AJAX syntax - sorry - but this post [url]http://www.daniweb.com/forums/post1213631.html#post1213631[/url] shows how to unhide/hide related elements as the <option> in a <select> list changes using only javascript with CSS.

Member Avatar for fxm
0
102
Member Avatar for scottholmes

When the URL is in another domain the underlying XMLHttpRequest will never succeed in some browsers and in others it may be blocked by security settings.

Member Avatar for scottholmes
0
100
Member Avatar for jephthah

[QUOTE=blud;1216951]this happens every time she changes it, a few people say it sucks, then everyone gets used to it[/QUOTE] Not "everyone". Some will silently leave and others will never join (or at least stay) in the first place.

Member Avatar for Dani
8
2K
Member Avatar for Emiliya

[QUOTE]pass the value from the textbox to the parent page[/QUOTE] Here is a non-IE solution. Cross-browser version to follow. This is demo.html (a toy page with a div to be changed) [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), …

Member Avatar for Emiliya
0
2K
Member Avatar for daedalus

If the theme is done properly in css, use a browser with the ability to override style sheets. The IE setting (in Appearance [Accessibility]) and the Safari(PC) setting (Prefences [Advanced]) seem to be all-or-none. ISTR some browser having per-site customization but I don't see it at the moment.

Member Avatar for scrappedcola
0
140
Member Avatar for egoche

Yes. To assign a class [CODE]obj.className = 'myclass'[/CODE] To add a class [CODE]obj.className += ' myclass' // NOTE the leading blank[/CODE] Existing class(es) can also be removed. To refer to the row in question use something like [CODE]var obj = document.getElementById('myspecialrow')[/CODE] or in the more general case [CODE]var obj = …

Member Avatar for egoche
0
215
Member Avatar for sahildw
Member Avatar for fxm

I'm hoping that I may be able to persuade the PTB that 'mark as solved' should be a button ("this post solved my problem") associated with a message [just like "post reply" and - I'm hoping - just below it). My short run goal is to increase the utilization rate. …

Member Avatar for WaltP
1
162
Member Avatar for cloud09

Here is a little toy [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"> <title></title> <style type="text/css"> div {float:left; height:100px; width:100px} </style> <script type="text/javascript"> </script> </head> <body> <div onmouseover="this.style.width='200px'" onmouseout="this.style.width='100px'" style="background-color:red"></div> <div onmouseover="this.style.width='200px'" onmouseout="this.style.width='100px'" style="background-color:green"></div> <div onmouseover="this.style.width='200px'" onmouseout="this.style.width='100px'" …

Member Avatar for cloud09
0
109
Member Avatar for BestJewSinceJC

My preference would be a button instead of a link, in a somewhat distinctive but not jarring color, preferable near the 'flag' and 'post' buttons.

Member Avatar for happygeek
3
224
Member Avatar for nlvp

[ICODE] elements=data.getElementsByTagName('element'); for (i = 0; i < elements.length ; i++) [/ICODE] The comparison in the for statement was miscoded.

Member Avatar for fxm
0
178
Member Avatar for fxm

Since the makeover, when entering a thread with "Go to last post" the browser 'back' button is not available. This does not happen in Firefox.

Member Avatar for fxm
0
126
Member Avatar for ErlendHL

All you need is 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> jeje </title> <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii"> <script type="text/javascript"> function popup(uri,height, width){ newwindow = window.open(uri,'333','height='+height+',width='+width); newwindow.focus(); } </script> </head> <body> …

Member Avatar for fxm
0
112
Member Avatar for nonshatter
Member Avatar for fxm
0
4K
Member Avatar for gskoli

[B]cant i pass variable clear[/B] To be passed in this way, the variable must be global (declared without var) [CODE]function interval_setting() { _clear = 0; _clear = setInterval("xmlhttpPost11('index.cgi','tracker_shower','Latest_frame','Tracker_loader',_clear,'','','')", 20000); }[/CODE]

Member Avatar for fxm
0
108
Member Avatar for canadave

[CODE] var now = new Date(); [/CODE] [B]display the timestamp[/B] This [CODE]document.getElementById('show').appendChild(document.createTextNode(now))[/CODE] is all you need to display the timestamp in this [ICODE]<div id='show'></div>[/ICODE] Beyond that, everything [the format, the style, the placement, etc., etc.] is negotiable.

Member Avatar for fxm
0
2K
Member Avatar for xylude

The problem is that document.write cannot be used with setInterval(). Use 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"> <script type="text/javascript"> function timewaster() { document.getElementById("out").appendChild(document.createTextNode("x")); } </script> <title></title> </head> <body> <div id="out"></div> <script …

Member Avatar for rajarajan2017
0
166
Member Avatar for fiaolle

Get the element in any convenient way [CODE]var oEL = document.getElementById('id');[/CODE] and remove it [CODE]oEL.parentNode.removeChild(oEL);[/CODE]

Member Avatar for fxm
0
70
Member Avatar for SKANK!!!!!

prompt var userinput validate [do nothing if null; error/reprompt if invalid] [CODE] var oTD = document.getElementById('targetdiv') var eNA = oTD.appendChild(document.createElement("a")); eNA.setAttribute("href", userinput); eNA.appendChild(document.createTextNode(userinput));[/CODE] Step4 could insert text of your choosing instead of repeating the uri.

Member Avatar for SKANK!!!!!
0
255
Member Avatar for dsumner25

[CODE] <input type="button" name="Add_OpStds_Step" id="Add_OpStds_Step" value="Add Step" onclick="Add_OpStds_Step();" /> [/CODE] The problem is that the button [ICODE]name="Add_OpStds_Step" [/ICODE] string is the same as the name of the onclick= function. Remove it or change it to anything else.

Member Avatar for dsumner25
0
1K
Member Avatar for KPooja

[QUOTE=KPooja;1216627] box must overlap adjecent combo, not expand the window [/QUOTE] [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"> #box1 { width:400px; height:300px; background:#F00; position: absolute; left: 0in; } #box2 { width:400px; height:300px; background:#0F0; position: …

Member Avatar for KPooja
0
95
Member Avatar for jellybeannn

[QUOTE=jellybeannn;1216411]Thanks I get a value now, but it is the wrong value.[/QUOTE] The second for loop in this demo [CODE]<html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> </head> <body> <table> <tr> <td> <input name="rate"> </td> <td> <input name="area"> </td> <td> <label></label> </td> …

Member Avatar for fxm
0
112
Member Avatar for urbancalli
Member Avatar for mohanvamsi_18

[QUOTE=mohanvamsi_18;1213558] First I corrected this [B] // Here not working e3s1.onselect = function() { checkother(); };[/B] to [CODE]e3s1.onchange = checkother; // function() { checkother(); };[/CODE] Then in order to test I had to fix several typos in what you posted and add my own 'checkother' function. I would have helped …

Member Avatar for fxm
0
169
Member Avatar for phoenix_dwarf

[QUOTE=phoenix_dwarf;1215161] loop through a listbox [/QUOTE] [CODE] var oLB = getElementById("boxname") for (var i = 0; i < oLB.options.length; i++) { ... process oLB.options[i].value ... }[/CODE]

Member Avatar for phoenix_dwarf
0
128
Member Avatar for loveisblind

[QUOTE=loveisblind;1214667] add a Candidate text field just relevant to that Office/Position [/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"> <title></title> </head> <body> <form> <input id="IT"> </form> <script type="text/javascript"> var oITnew = document.createElement("input"); oITnew.setAttribute("value","added"); var …

Member Avatar for fxm
0
164
Member Avatar for gskoli

[QUOTE=gskoli;1212693] [CODE] for(var m = 10;m<no_of_rows;m++){ document.getElementById(table_id).deleteRow(m);// HERE MIGHT B THE ERROR [/CODE][/QUOTE] Deleting row m and then incrementing m skips rows (and causes m to exceed the number of rows in the [reduced] table). One fix is to delete row 10 n times (n=no_of_rows-max); another is to start m …

Member Avatar for gskoli
0
146
Member Avatar for Nickg140143

[QUOTE=Nickg140143;1208684] [CODE] if (validate_fullname()==false|validate_email()==false|validate_zipcode()==false|validate_phonenumber()==false) {return false;} else {return true;} } [/CODE] [/QUOTE] You want the .test method (not an == comparison). Individual tests should look something like these [CODE] var emailRE=/^[a-zA-Z0-9._+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/ if (!emailRE.test(theForm.FieldData1.value)) { //1=Email alert("The 'Email' is not valid."); theForm.FieldData1.focus(); return (false); } var phoneRE=/^(\d{3}-){1,2}\d{4}$/ if (!phoneRE.test(theForm.FieldData2.value)) { //2=Phone …

Member Avatar for Nickg140143
0
204
Member Avatar for samarudge

[QUOTE=samarudge;1213815] Why is it only doing this in IE [/QUOTE] This might help [url]http://www.permadi.com/tutorial/flashGetObject/[/url] although given the apparent age of that page it might now be a better strategy to start with getElementById() [instead of ending up with that].

Member Avatar for samarudge
0
111
Member Avatar for MDanz

[QUOTE=MDanz;1213178] [ICODE] onClick='return changeAction1(this);' [/ICODE] [/QUOTE] I think that should be [ICODE] onclick="changeAction1(this);return true" [/ICODE] but that still isn't quite right: 'this' refers to the <input> element (for which no action= is defined).

Member Avatar for rajarajan2017
0
2K
Member Avatar for Erco21

[QUOTE=Erco21;1212031] how to make a button to do something when clicked. [/QUOTE] Either include the onclick="" event attribute in the button definition or assign something to the .onclick property of the button. [QUOTE] my button is awfully small [/QUOTE] Buttons can be styled (plus the value can be made longer …

Member Avatar for Erco21
0
372
Member Avatar for ghost_from_sa

[QUOTE=ghost_from_sa;1212009] [CODE] var alphaTest = /^([A-Za-z+]\s)|([A-Za-z+]\s-\s[A-Za-z+]\s)$/; var emailTest = /(^[\w+]|[\w+.w+]@[\w+\.\w+]$)/; var numTest = /(^[00|0|+][\d+]$)/; [/CODE] [/QUOTE] 1. the + signs are misplaced and you are specifying \s which will almost certainly not be present 2. I already posted a better emailRE in another thread 3. misused [brackets] and another misplaced …

Member Avatar for ghost_from_sa
0
135
Member Avatar for k2k

[QUOTE=k2k;1212869] javascript has any package to do stuff like this. [/QUOTE] [url]http://www.ajaxline.com/10-best-free-javascript-charts-solutions[/url] There are many others (some of which are mentioned in the comments on that page).

Member Avatar for fxm
0
113
Member Avatar for phingko

[QUOTE=phingko;1212669] [CODE]<body onload="sendRequest(Display)">[/CODE] [/QUOTE] [ICODE]<body onload="sendRequest('Display')">[/ICODE]

Member Avatar for phingko
0
362
Member Avatar for Erco21

[QUOTE=Erco21;1211866] insert (textbox) [/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> <form> <input id="IT"> </form> <script type="text/javascript"> var oITnew = document.createElement("input"); oITnew.setAttribute("value","added"); var oIT = document.getElementById("IT"); var oPAR = oIT.parentNode; oPAR.insertBefore(oITnew,oIT); </script> …

Member Avatar for fxm
0
131
Member Avatar for wewehalim
Member Avatar for Reliable

[QUOTE=Reliable;1210360]I want it to go something like this [CODE]<image>http://www.somewhereontheinternet.com/image.jpg</image>[/CODE] Will that work or do image have to be in a folder of the same site where the XML file is?[/QUOTE] The syntax is correct but it is a Bad Thing. See [url]http://altlab.com/hotlinking.html[/url] And if something other than the expected image …

Member Avatar for fxm
0
84
Member Avatar for kaylors

[QUOTE=kaylors;1210656]I don't get what's wrong. [CODE] fucntion randy() if(num=>10){num=num%10;} <input type="button" value="Click me!" id="daButton" /> [/CODE] [/QUOTE] 1. Spelling. 2. Syntax. 3. I could suggest [ICODE]<input type="button" id="daButton" value="Click me!" onclick="randy();tB.value=funny(col)">[/ICODE] and other fixes but I stopped reading.

Member Avatar for rajarajan2017
0
92
Member Avatar for uberznoob

[QUOTE=uberznoob;1208780] age, number of years married and the days of the week that they were born on and married [/QUOTE] You will probably find it easiest to proceed step-by-step create three date objects birth(year,month,day) wedding(year,month,day) today You can now use their getDay() methods and easily do date arithmetic.

Member Avatar for rajarajan2017
0
117
Member Avatar for sainiweb

[QUOTE=sainiweb;1202938] this missing one last word "me " [/QUOTE] Many other words are also missing. I give you full marks for plugging away at this but - do you realize that [ICODE]wrd_pr_linr = 4[/ICODE] will never look good for sequences of short or very long "words" [ICODE]I a I a …

Member Avatar for fxm
0
165
Member Avatar for rs25

Browser incompatibility: textContent vs. innerText. Also, I think setting innerText obliterates all elements in innerHTML (not an issue here).

Member Avatar for rs25
0
196
Member Avatar for Dhanish

[QUOTE=Dhanish;1205712] all the validations seem to work [/QUOTE] Er, no. The function 'comparison()' is not defined.

Member Avatar for Dhanish
0
2K
Member Avatar for nonshatter

[QUOTE=nonshatter;1201452] scripting language [/QUOTE] Google for "javascript countdown".

Member Avatar for nonshatter
0
708
Member Avatar for filch

[QUOTE=filch;1205347]I had a working ticket purchase page and I have done something to break it[/QUOTE] I don't know what else may be wrong, but you have a variable and a function with the same name: price.

Member Avatar for fxm
0
134
Member Avatar for jazz_vill

[QUOTE=jazz_vill;1203572] get the values of the Quantity,Price,Total [/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 computeExtensions() { var oTBL = document.getElementById('myTable') for (var iTR = 0; iTR < oTBL.rows.length; iTR++) { …

Member Avatar for parry_kulk
0
122
Member Avatar for jino

[QUOTE=jino;1205676] I have a date time picker and i have to trigger an event when the text box for that date is filled with the date. [/QUOTE] Check the documentation of the datepicker. If you're lucky, it triggers an event for you; it you're not, you will almost certainly have …

Member Avatar for fxm
0
76
Member Avatar for katieJane

[QUOTE=vsmash;1205168]Generally you can't get a client browser to store more than 20 cookies from the same website.[/QUOTE] In RFC-compliant browsers you can make each of the [minimum of] 20 cookies per domain quite large (4096 bytes, including overhead).

Member Avatar for fxm
0
141
Member Avatar for xo_vicke93_xo

[QUOTE=xo_vicke93_xo;1204378] member of not, if they select no, nothing happens [/QUOTE] Why not just have a username box which may be left blank? Personally I find popups annoying, and clicking in one box solely for the purpose of causing another one to pop up would be doubly so. Besides, users …

Member Avatar for almostbob
0
146

The End.