1,330 Posted Topics

Member Avatar for AboJaD

AbsJaD, Try this: [CODE=javascript] function reportsendipp() { var ippsEl = document.getElementById('ipps'); var memberEl = document.getElementById('track'); var ippsVal = (!ippsEl) ? null : Number(ippsEl[ippsEl.selectedIndex].value); var memberVal = (!memberEl) ? null : Number(memberEl.value); if(!ippsVal || ippsVal===-1) { alert('First, choose a type'); return false; } if(!memberVal || isNaN(memberVal) ) { alert('Member/track value must …

Member Avatar for Airshow
0
375
Member Avatar for chintan@dani

Chintan, Your code should work providing [ICODE]value[/ICODE], [ICODE]hd1[/ICODE] and [ICODE]chkin[/ICODE] exist. Otherwise javascript will generate an error. I generally build search strings like this in an array, then use Array.join() to put the pieces together. [CODE] var searchString = []; searchString.push("t=" + value); searchString.push("hid=" + hd1); searchString.push("chkin=" + chkin); var …

Member Avatar for Taywin
0
215
Member Avatar for julianmoors

Julian, Without sight of your php, we have to make some assumptions here. Let's assume: [LIST=1] [*]search.php accepts its pagination instruction of the form [ICODE]search.php?key=kkkk&search=sssss&page=N[/ICODE], where N is the page number, starting at 1. [*]The php generates page links of the form [ICODE]<a href="">N</a>[/ICODE], where N is the page number, …

Member Avatar for Airshow
0
449
Member Avatar for Ankur_tces

Ankur, You will have to do some background reading. I would start here: [url]http://docs.jquery.com/Tutorials:Using_AjaxPro[/url] [B]Airshow[/B]

Member Avatar for Ankur_tces
0
253
Member Avatar for artvor

Artvor, You DOUBLE POSTED this problem!!!!!!! I just spent time providing you with a solution in the [URL="http://www.daniweb.com/forums/thread314647.html"]other topic[/URL] then found this one already well underway. You are in good hands with Hielo but please don't double post. [B]Airshow[/B]

Member Avatar for Airshow
0
374
Member Avatar for drewpark88

Drew, I'm, not in a great position to help as I've not used either easeOutBounce or Cufon but I can offer a strategy. I think you need to explore easeOutBounce vs. Cufon as the cause of the problems in IE. Make copies of your page: [LIST] [*]easeOutBounce ON Cufon OFF …

Member Avatar for Airshow
0
212
Member Avatar for artvor

Artvor, It's much simpler to attach onclick handlers to the <LI> elements than the <UL> element. This way, you avoid cross-browser issues with deternining [ICODE]xcevt[/ICODE] and [ICODE]zxcobj[/ICODE]. All that part of the code disappears. [CODE=html] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Airshow :: Untitled</title> <style type="text/css"> …

Member Avatar for Airshow
0
313
Member Avatar for chineerat

Chin, In my experience it's much easier to perform all calculations on every occasion (a la spreadsheet) rather than selectively keeping up with the latest user input. Hence you only need one function, which can be attached as onblur handler to all user input elements. I guess there must be …

Member Avatar for chineerat
0
160
Member Avatar for techie929

Techie, First extend [ICODE]Date[/ICODE] to add a [ICODE]setDateTime[/ICODE] method, which accepts a string of the necessary format : [CODE=javascript] Date.prototype.setDateTime = function(dt, ignoreTime) { try { ignoreTime = (!ignoreTime) ? false : true; dt = dt.replace(/\s+/g, ' ').replace(/^\s/, '').replace(/\s$/, '');//reduce multiple spaces to single space, then purge any leading and …

Member Avatar for Airshow
0
328
Member Avatar for MackAttack30

MackAttack, What you really want is something called a "combo box" or "combobox" - Google it and you will get plenty of hits. If you want to do your own thing then you could do something like this : [CODE=html] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> …

Member Avatar for MackAttack30
0
325
Member Avatar for H_TSOPELAS

H, The code can be simplified and made more useful as follows: [CODE] function countup(yr, mon, d) { var montharray = [ "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" ]; var d = new Date(montharray[mon-1] + " " + d + ", " + yr); var today = new Date(); today.setHours(0); today.setMinutes(0); today.setSeconds(0); today.setMilliseconds(0); //today is …

Member Avatar for Airshow
0
166
Member Avatar for maxelcat

If that sort of thing was scriptable, it would be a hackers delight. They would do all sorts of nastiness to our computers. Short of writing something viral (and certainly not in javascript), I think it safe to say that it can't be done. [B]Airshow[/B]

Member Avatar for maxelcat
0
216
Member Avatar for kartiktiger
Member Avatar for Thirusha
0
72
Member Avatar for cmccully

cmcc, Status of 0 is normally associated with a local file (eg. c:\\mydocuments\....) as opposed to a properly delivered web page, complete with http response headers. Also, both [ICODE]onsubmit[/ICODE] functions should return [ICODE]false[/ICODE], to suppress normal HTML form submission, otherwise the submit buttons will initiate an ajax call then cause …

Member Avatar for cmccully
0
401
Member Avatar for steveadams617

Steve, In the old days, IE had a rather convoluted way to do this while Netscape (iirc) was incapable, but now there's a much friendlier way. After creating DOM element [ICODE]myTextbox[/ICODE] and populating it with your text : [CODE] myTextbox.focus(); myTextbox.select(); [/CODE] I'm not sure if this is 100% universal …

Member Avatar for Airshow
0
91
Member Avatar for ethhunt

EthHunt, The script is attempting to do some AJAX (Google it if you don't already know what AJAX is) to get a data file from somewhere (probably a remote server). Reading betweeen the lines (I'm guessing), the site is provided on a disk and the script was tested several years …

Member Avatar for Airshow
0
81
Member Avatar for ryy705

RYY, [CODE=javascript] //Standard onload = function(){ var el = document.getElementById('city'); if(el){ el.onblur = myfunction; } }; //jQuery $(document).ready(function() { $('#city').blur(myfunction); }); [/CODE] In both cases you could alternatively insert an anonymous function in place of the function name [ICODE]myfunction[/ICODE], like this : [CODE=javascript] //Standard onload = function(){ var el = …

Member Avatar for Troy III
0
155
Member Avatar for Hwestman

Hwestman, There are many ways to formulate this, eg. : [CODE=html] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Airshow :: Untitled</title> <style type="text/css"> button.headline { margin-right: 3px; } </style> <script> onload = function(){ var headlines = [];//new Array var headlineButtons = document.getElementById('headlineButtons'); var showHeadline = function(x){ for(var …

Member Avatar for Airshow
0
85
Member Avatar for MDGM

Max, Do exactly what qazplm said. [CODE] var whitelist; chrome.extension.sendRequest({greeting: "whitelist"}, function(response) { whitelist = response.whitelist; console.log(response.whitelist);//working }); alert(whitelist);//alerts "undefined" [/CODE] [B]Airshow[/B]

Member Avatar for Airshow
0
4K
Member Avatar for keltoid

K, After a MASSIVE tidy up and a with completely different approach to controlling random images (and captions), we end up with this : [CODE=html] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>random test</title> <meta http-equiv="X-UA-Compatible" content="IE=7"> <meta name="google-site-verification" content="nBLAHBLAH BLAH"> <meta name="google-site-verification" content="n6Lv0vE-0pHJ8t2nbZMJ1kxeE9cM-6AUegAVUUJ1CPA"> <link href="http://newpw.delphi-ts.net/test/newpw.css" rel="stylesheet" …

Member Avatar for Airshow
0
216
Member Avatar for andrewliu

Andrew, The only thing that jumps out at me is that the FORM has [ICODE]method="POST"[/ICODE] while the PHP expects "GET". If this doesn't fix it then you need a debug strategy. I suggest splitting the thing down the middle - test client-side and server-side independently. 1. TEST THE REQUESTING PAGE …

Member Avatar for andrewliu
0
352
Member Avatar for cjay175

cJay, You're half way there. Assuming both buttons are both of [ICODE]type="submit"[/ICODE], you can do something like this : [CODE] document.ready(function(){ $("#saveform_ns").click(function(){ $('form#form_main').attr({action:"http://path/to/save.php"}); return true; }); $("#processform_ns").click(function(){ if( validate(this.form) ){ $('form#form_main').attr({action:"http://path/to/process.php"}); return true; } else { alert('Sorry, form did not validate'); return false; } }); }); [/CODE] Just make sure …

Member Avatar for cjay175
0
637
Member Avatar for techie929

Techie, Try building your HTML string like this: [CODE=javascript] var strArray = [ "</br>", "Enter Name ", "<input type='text' id='myText' />", "<input type='button' id='theSubmitButton' value='Edit Name' onclick='edit_data(", hash_a, ")'/>" ]; $("#details_a").append(strArray.join('')); [/CODE] The line number in the error message will give you a better clue. There may be an apostrophe …

Member Avatar for Taywin
0
177
Member Avatar for dylank

On page load, you get a javascript error "console is undefined" at line 89 [ICODE]console.log("Lower than or at 1024 width. Setting display to 1024 width or lower");[/ICODE] You need to track down why that is happening. [B]Airshow[/B]

Member Avatar for Airshow
0
53
Member Avatar for AliHurworth

Alil, The main problem is the criterion for deciding whether the chosen bag is single or double. [ICODE]if (randomnumber>single)[/ICODE] will always equate to true, so only single bags can be chosen. In the absence of anything to prevent it, singles go negative! Here's a working version (with a few tweaks): …

Member Avatar for Airshow
0
91
Member Avatar for ryan-t

What you describe is the natural behaviour in a textarea. No scripting required. [B]Airshow[/B]

Member Avatar for Airshow
0
163
Member Avatar for RazorRamon

Razor, No amount of javascript or CSS can force a browser to display png images if it is not equipped to do so. The simplest solution is to use gif images instead. Gifs support animation and transparency but not partial transparency. If you want to give users of modern browsers …

Member Avatar for Airshow
0
106
Member Avatar for anandhikrishnan

Anandhikrishnan, What Qazplm says or more conventially: [CODE] var el = document.getElementById("search"); var id = (el && el.options.length) ? el[el.selectedIndex].id : null; [/CODE] For the record (and if I recall correctly) obtaining value directly with [ICODE]selectElement.value[/ICODE] is problematic in that some browser(s)/version(s) return 'undefined'. A safer way to get value …

Member Avatar for Airshow
0
105
Member Avatar for anuran
Member Avatar for Airshow
0
206
Member Avatar for aizel

Aizel, Yes it's possible but the solution is highly depenedent on what you have already coded. Can you post the code are you using to animate the slide show please? [B]Airshow[/B]

Member Avatar for aizel
0
3K
Member Avatar for ebohatch

Ebo, Are you sure this is right? [CODE=javascript] function testChecked(form) { var formcount = document.forms.length; .... for ( var cntr = 0; cntr <= formcount; cntr++ ) { .... } [/CODE] Maybe my misunderstanding but the function appears to be checking a single form but then loops through all forms …

Member Avatar for ebohatch
0
124
Member Avatar for Siberian

Siberian, First, put your brain in gear. Then edit the following line to add the missing word: [CODE=javascript]alert("I want a car with " + work_car.seats + " yeah");[/CODE] [B]Airshow[/B]

Member Avatar for Airshow
0
228
Member Avatar for bsewell

B, You are 90% there. Just a few tweeks necessary. The main problenm is that the menuContainers have [ICODE]position:absolute[/ICODE], which (if I understand correctly) is giving the wrong visual effect. The CSS can be simplified by using classes to avoid unnecessary repetition. There's an extra [ICODE]</div>[/ICODE] in the HTML, which …

Member Avatar for Airshow
0
122
Member Avatar for dev.vini

I have seen the same question a dozen times recently, on Daniweb and elsewhere. Is it by any chance a school/college exercise? [B]Airshow[/B]

Member Avatar for Airshow
0
60
Member Avatar for nikita.chandra

Nikita, If you want to build/manipulate Locations then you might like to try my LOCATION constructor: [url]http://www.daniweb.com/code/snippet217388.html[/url] It is quite well documented and probably overkill for what you want but maybe useful to remember for the future. [B]Airshow[/B]

Member Avatar for Airshow
0
107
Member Avatar for lifeworks

LifeWorks, Trouble is that although [ICODE]main_image[/ICODE] remains available to the anonymous function, [ICODE]i[/ICODE] will be one greater than the index of the last element in [ICODE]all_items[/ICODE] by the time the anonymous function executes. However, judicious use if [ICODE]this[/ICODE] (and some tidying) will overcome the problem. Try: [CODE=javascript] var i, all_items …

Member Avatar for lifeworks
0
324
Member Avatar for baseballfury

bbFury, It's much simpler intercept form submission with an onsubmit handler that tests to see if submission has already been attempted and returns true (allow submission) or false (suppress further submissions) accordingly. You will need a "submitted" boolean flag, initialisd to false. With a little ingenuity, you can avoid using …

Member Avatar for Airshow
0
265
Member Avatar for amazed

[QUOTE]It is not possible to apply Tipmage to more than one image in a single page [/QUOTE] It's not clear why this should be so, but I guess it's something they will fix some time. Meanwhile, I guess you could try serving each image into its own IFRAME, which is …

Member Avatar for Airshow
0
125
Member Avatar for techie929

Techie, There's a couple of ways to do this. Here's one, not involving the Date() constructor: [CODE=javascript] function dateTime_split(time){ var d = time.split(' ')[0]; var t = time.split(' ')[1]; return { year : d.split('-')[0], month : d.split('-')[1], date : d.split('-')[2], hr : t.split(':')[0], min : t.split(':')[1], sec : t.split(':')[2] } …

Member Avatar for Airshow
0
70
Member Avatar for webdev2010

[QUOTE=webdev2010;1183774]So far most of my web development experience has been in HTML... I am looking to create a design form similar to one found at [url]www.alliancetag.com[/url]. Basically I will just produce 2 colors of paper, 2 sizes, with 2 lines of text but I want the end user to be …

Member Avatar for Airshow
1
281
Member Avatar for VartotojoVardas

VaVa, Suggest you try [URL=http://www.thesitewizard.com/css/excludecss.shtml]this[/URL] before proceeding any further with a javascript solution. [B]Airshow[/B]

Member Avatar for Airshow
0
183
Member Avatar for brown23

Or even simpler if the links are on the same page as the paragraphs: [CODE]<html> <head> <title>Test</title> </head> <body> <a href="#p1">Go to Paragraph 1</a> <a href="#p2">Go to Paragraph 2</a> <a href="#p3">Go to Paragraph 3</a> <a href="#p4">Go to Paragraph 4</a> <a href="#p5">Go to Paragraph 5</a> <a name="p1"></a><p>This is Paragraph 1</p> <a …

Member Avatar for Airshow
0
271
Member Avatar for aldm

Aldm, [CODE=Javascript]var sifra=$("input#password").val();[/CODE] [CODE=HTML]<input id="password" type="password" value="" />[/CODE] [B]Airshow[/B]

Member Avatar for aldm
0
102
Member Avatar for subhankar02dey

..hank.., Is that an ASP.net question? If so then you might do better here: [url]http://www.daniweb.com/forums/forum18.html[/url]

Member Avatar for Airshow
0
329
Member Avatar for Airshow

[B]INTRODUCTION[/B] Have you ever wanted to pass data from one web page to another when server-side scripting is unavailable, and without setting a cookie? Ever wanted an efficient way to build url query strings? Well now you can. [B]SOLUTION[/B] It is maybe little realised is that data can be successfully …

Member Avatar for jadhav vijay
2
1K
Member Avatar for sara10mor

SM, Stack overflow is unlikely to do with images, though it could be to do with code that handles images (eg a preloader). A stack overflow generally arises from a non-terminating recursive call. In other words, a function that calls itself but with no conditional test to prevent it calling …

Member Avatar for 99MichaelB99
0
238
Member Avatar for aripurwahyudi

Ari, The general form of a web page is as follows: [CODE=html]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>Airshow :: Untitled</title> <style type="text/css"> </style> <script> </script> </head> <body> </body> </html>[/CODE] The !DOCTYPE can vary but [ICODE]XHTML 1.0 Transitional[/ICODE] is a pretty good one to become familiar with. …

Member Avatar for aripurwahyudi
0
191
Member Avatar for george61

George, This works for me (IE, FF & Opera): [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <script type="text/javascript"> onload = function(){ var currentBG; var imgs = [ "url('http://www.daniweb.com/rxrimages/logo.gif')", "url('http://img1.cdn.adjuggler.com/banners/Client847175/1280785292729_728x90.gif')" ]; function cng(x) { if(document.body) { x = ++x%imgs.length; document.body.style.backgroundImage = imgs[x]; return x; } } var …

Member Avatar for Airshow
0
454
Member Avatar for Silvershaft

Silvershaft, Yes but you might do better by posting in the PHP forum. [B]Airshow[/B]

Member Avatar for Silvershaft
0
93
Member Avatar for ashu2401

Ash, The reason you only ever see [ICODE]-1[/ICODE] is that in all cases, by the time the alert() statement executes, [ICODE]i[/ICODE] has incremented to 6 (the exit condition for the for loop), thus [ICODE]num - i[/ICODE] is [ICODE]-1[/ICODE]. When each delayed function executes, it uses the [I]extant[/I] (then existing) value …

Member Avatar for ashu2401
0
127

The End.