From alaneaston666 at hotmail.com Thu May 1 03:19:57 2008 From: alaneaston666 at hotmail.com (Alan Easton) Date: Thu, 1 May 2008 09:19:57 +0100 Subject: [Javascript] IE/FF, getElementById and checkboxes In-Reply-To: <4ff9decf882b49e4aa0767ebef09b06c@maila15.webcontrolcenter.com> References: <4ff9decf882b49e4aa0767ebef09b06c@maila15.webcontrolcenter.com> Message-ID: Sorry guys, I should have included errors...DOH. I have firebug on my FF, and like you have said, the first error is for: if(actform.deluser(i).checked) <----- actform.deluser is not a function And there is a note for: Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead - undefined So I guess those are for the 2 lines I highlighted. This has always confused me, but in using getElementById, how do you write out the for loop instance differently: for(i = 0; i < actform.deluser.length; i++) I tried document.getElementById('deluser').length, but that did not seem to work. I will try your ideas. Thanks again for your help. Alan... Date: Wed, 30 Apr 2008 20:28:02 -0700From: peter at brunone.comTo: javascript at lists.evolt.orgCC: Subject: Re: [Javascript] IE/FF, getElementById and checkboxesHi Alan, The second line is choking because you're treating delusers like a function instead of an array. Remember, collection elements use brackets in C-syntax languages (this still trips me up sometimes):if(actform.delusers[i].checked) The first line's trouble is a bit more difficult to track down. The actual error message would be helpful, so we don't have to guess at what the complaint was; if I had to guess, I'd say you need to include more of the tree hierarchy, i.e.document.actform.delusersor evendocument.forms.actform.delusers...but it's hard to say what the actual problem is without knowing what error was thrown. You did open the Javascript console (by typing javascript: in the address bar and hitting Enter), right? If not, do that and run the page again; report the error message here and we'll take a more informed shot at the problem.Cheers,Peter From: Alan Easton alaneaston666 at hotmail.com Hi All, I have some validation that works in IE, for when I need to check if any checkboxes are checked in my form. If there are, then I submit the form. Code is below: ------------------------------------------------ Example checkbox field: All are called "delusers", and have different values. Now I know I need to ad "id"'s to all of these, but I am still having trouble. ------------------------------------------------ However this is not working in FF. I know I need to change to use getElementById, but the two lines highlighted above are causing me problems. Any help would be appreciated in order so the validation works in IE and Ff. Thanks, Alan... _________________________________________________________________ Bag extra points with the Walkers Brit Trip Game http://www.walkersbrittrips.co.uk/game -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mark.Rees at astrazeneca.com Thu May 1 03:54:48 2008 From: Mark.Rees at astrazeneca.com (Rees, Mark) Date: Thu, 1 May 2008 09:54:48 +0100 Subject: [Javascript] IE/FF, getElementById and checkboxes In-Reply-To: Message-ID: This has always confused me, but in using getElementById, how do you write out the for loop instance differently: for(i = 0; i < actform.deluser.length; i++) Hassan Schroeder already provided one way to do this - put the following code before the loop, then the above syntax will work (if you change 'deluser' to 'delusers'), as it makes sure delusers is an array var inputs = document.getElementsByTagName("input"); var delusers = Array(); for ( var j = 0; j < inputs.length; j++ ) { if ( inputs[j].name == "delusers" ) { delusers.push(inputs[j]); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Thu May 1 07:23:39 2008 From: peter at brunone.com (Peter Brunone) Date: Thu, 1 May 2008 05:23:39 -0700 Subject: [Javascript] IE/FF, getElementById and checkboxes Message-ID: <2fc0e3f354bd43d4855eb67bb71a70e8@maila15.webcontrolcenter.com> I'm pretty sure* that if you refer to a form element by name *within the form structure* with a fully qualified name, you should be fine. It would be an unfortunate loss if we no longer had the ability to work with form elements in that way. * (I'm not a standards expert so feel free to DOM-slap me if I'm wrong) ---------------------------------------- From: "Rees, Mark" This has always confused me, but in using getElementById, how do you write out the for loop instance differently: for(i = 0; i < actform.deluser.length; i++) Hassan Schroeder already provided one way to do this - put the following code before the loop, then the above syntax will work (if you change 'deluser' to 'delusers'), as it makes sure delusers is an array var inputs = document.getElementsByTagName("input"); var delusers = Array(); for ( var j = 0; j < inputs.length; j++ ) { if ( inputs[j].name == "delusers" ) { delusers.push(inputs[j]); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedd at sperling.com Thu May 1 08:05:26 2008 From: tedd at sperling.com (tedd) Date: Thu, 1 May 2008 09:05:26 -0400 Subject: [Javascript] A better way to do this In-Reply-To: <48176ECD.5040309@internetique.com> References: <48176ECD.5040309@internetique.com> Message-ID: At 2:54 PM -0400 4/29/08, Claude Schneegans wrote: > >>There has to be a better way to do this: > >Try this (not checked): >function checkAll( form ) > { > for (var i = 1; i<= 5; i++)form['a'+i].checked = form.checkall.checked > } > Claude: That was spot-on and worked. What I found interesting was how you went from this: form.a1.checked to this: form['a'+i].checked which basically meant that: form.a1.checked = form['a1'].checked That's neat to know/realize -- thanks! tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From trojani2000 at hotmail.com Sat May 3 13:26:36 2008 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sat, 3 May 2008 18:26:36 +0000 Subject: [Javascript] weird FX event model In-Reply-To: <2fc0e3f354bd43d4855eb67bb71a70e8@maila15.webcontrolcenter.com> References: <2fc0e3f354bd43d4855eb67bb71a70e8@maila15.webcontrolcenter.com> Message-ID: I have e function like this: function onmouseover(e){ if(!e) {e=event.srcElement} else {e=e.target} var type = e.getAttribute('type') var monitor=document.getElementById("monitor") if(type){ monitor.innerHTML+= '
this element type is: '+ type} } document.onmouseover = onmouseoverWhat this function does is that it identifies the element that fired the onmouseover event than it checks if the element has a defined "type" attribute, if it does than it writes the value of the type attribute into the element named monitor. The problem with this function is that FX is triggering the event twice, causing two calls per event to the function. Odly enough, I was forced to assign the id of the element to the var: var monitor=document.getElementById("monitor") Otherwise I get error: "monitor is not defined"! Not the usual:"element referenced by name/id, you should use standard bla bla bla...". This error should not relate to the problem causing the double call of the function. But there it is! As it turns out I understand that it is not the statement: document.onmouseover = onmouseover that causes the problem, but the name of the function itself. This means that you can use a never seen before syntax: function onclick(){alert ("I must have clicked somewhere")} And it will work!!! After discovering this weird hybrid (event-function) object, I've managed to eliminate the double function call by changing the name of the function, naturally, but what do you call it? Is it some sort of a proprietary shorthand scripting routine I never seen before, or what? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _________________________________________________________________ Stay in touch when you're away with Windows Live Messenger. http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_messenger_052008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rer at datacompusa.com Sat May 3 22:22:40 2008 From: rer at datacompusa.com (Roger Roelofs) Date: Sat, 03 May 2008 23:22:40 -0400 Subject: [Javascript] weird FX event model In-Reply-To: References: <2fc0e3f354bd43d4855eb67bb71a70e8@maila15.webcontrolcenter.com> Message-ID: <481D2C00.6030504@datacompusa.com> Troy, Troy III Ajnej wrote: > I have e function like this: > > function onmouseover(e){ > -------------8<---------------- > As it turns out I understand that it is not the statement: > document.onmouseover = onmouseover > that causes the problem, but the name of the function itself. > > This means that you can use a never seen before syntax: > > function onclick(){alert ("I must have clicked somewhere")} > > And it will work!!! > > After discovering this weird hybrid (event-function) object, I've managed > to eliminate the double function call by changing the name of the > function, > naturally, but what do you call it? Is it some sort of a proprietary > shorthand > scripting routine I never seen before, or what? I could be wrong, but my understanding is that everything in Javascript is associated with an object. In a browser environment, window is the top-level object, so all functions and variables that appear to be top-level items actually are properties and methods of the window object. If that is true, then function onmouseover(e) {} is the same as window.onmouseover = function(e) {} So, the behavior you are seeing is the behavior I would have expected. hth Roger -- Roger Roelofs Datacomp Appraisal Services 3215 Eaglecrest, NE E: rer at datacompusa.com Grand Rapids, MI 49525 W: http://www.datacompusa.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From trojani2000 at hotmail.com Sat May 3 22:50:11 2008 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sun, 4 May 2008 03:50:11 +0000 Subject: [Javascript] weird FX event model In-Reply-To: <481D2C00.6030504@datacompusa.com> References: <2fc0e3f354bd43d4855eb67bb71a70e8@maila15.webcontrolcenter.com> <481D2C00.6030504@datacompusa.com> Message-ID: I don't think so!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Date: Sat, 3 May 2008 23:22:40 -0400From: rer at datacompusa.comTo: javascript at lists.evolt.orgSubject: Re: [Javascript] weird FX event model Troy,Troy III Ajnej wrote: I have e function like this: function onmouseover(e){-------------8<---------------- As it turns out I understand that it is not the statement:document.onmouseover = onmouseoverthat causes the problem, but the name of the function itself. This means that you can use a never seen before syntax: function onclick(){alert ("I must have clicked somewhere")} And it will work!!! After discovering this weird hybrid (event-function) object, I've managed to eliminate the double function call by changing the name of the function, naturally, but what do you call it? Is it some sort of a proprietary shorthand scripting routine I never seen before, or what?I could be wrong, but my understanding is that everything in Javascript is associated with an object. In a browser environment, window is the top-level object, so all functions and variables that appear to be top-level items actually are properties and methods of the window object. If that is true, thenfunction onmouseover(e) {} is the same aswindow.onmouseover = function(e) {} So, the behavior you are seeing is the behavior I would have expected.hthRoger-- Roger Roelofs Datacomp Appraisal Services 3215 Eaglecrest, NE E: rer at datacompusa.com Grand Rapids, MI 49525 W: http://www.datacompusa.com _________________________________________________________________ Make Windows Vista more reliable and secure with Windows Vista Service Pack 1. http://www.windowsvista.com/SP1?WT.mc_id=hotmailvistasp1banner -------------- next part -------------- An HTML attachment was scrubbed... URL: From javascript at wastedtimes.net Sun May 4 17:02:56 2008 From: javascript at wastedtimes.net (Mark Kelly) Date: Sun, 4 May 2008 23:02:56 +0100 Subject: [Javascript] POST a single value from a prompt Message-ID: <200805042302.56663.javascript@wastedtimes.net> Hi. Beginners question: How do I accept a text string through a javascript 'prompt' dialog then immediately POST it to a php file? I realise this must be pretty basic, but I don't know the right phrase to google for, apparently :/ Thanks, Mark From dshaw256 at earthlink.net Mon May 5 17:20:21 2008 From: dshaw256 at earthlink.net (Dave Shaw) Date: Mon, 05 May 2008 18:20:21 -0400 Subject: [Javascript] POST a single value from a prompt In-Reply-To: References: Message-ID: <1210026021.3898.7.camel@localhost.localdomain> I'm replying to the digest; I hope this doesn't duplicate another response. If you specifically want to use POST rather than GET, I'm not sure how to do that directly. I did an end-around once via a hidden form but I thought it was ugly. If you want to use GET, the basics are fairly simple: function myFunction() { var myString="This is the data value I want to send to PHP"; document.location="myprogram.php?value="+myString; } myprogram.php would retrieve the value using "$value=$_GET['value']"; Hope this helps. Dave Shaw > > From: Mark Kelly > > Reply-To: JavaScript List > > To: javascript at lists.evolt.org > > Subject: [Javascript] POST a single value from a prompt > > Date: Sun, 4 May 2008 23:02:56 +0100 > > > > > > Hi. > > > > Beginners question: How do I accept a text string through a > > javascript 'prompt' dialog then immediately POST it to a php file? > > > > I realise this must be pretty basic, but I don't know the right phrase to > > google for, apparently :/ > > > > Thanks, > > > > Mark > > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From skip at bigskypenguin.com Mon May 5 21:00:00 2008 From: skip at bigskypenguin.com (Skip Evans) Date: Mon, 05 May 2008 21:00:00 -0500 Subject: [Javascript] echo value padded with spaces? Message-ID: <481FBBA0.8080906@bigskypenguin.com> Hey all, I have a login function that has been working fine for a very long time. All of a sudden (or at least for a reason I could not nail down) it began to fail to validate properly. I had this on the PHP side when a user name password combination failed: echo 'false'; And in the JS I simply did this: if (ret=='false') alert('Invalid login') But when I did an alert on the return I got this: ' false' The echoed value 'false' is now coming through with space padded on the left side. Can anyone explain this to me??? Thanks globules! -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ From peter at brunone.com Mon May 5 21:05:32 2008 From: peter at brunone.com (Peter Brunone) Date: Mon, 5 May 2008 19:05:32 -0700 Subject: [Javascript] echo value padded with spaces? Message-ID: <4c119ceea3da4b93b3030a615bb7dc09@maila15.webcontrolcenter.com> Just shooting in the dark here... were there any changes to the server, PHP upgrades, etc? If you want to be sure that's a real, honest-to-goodness space (i.e. character 13), you can use my string analyzer: http://authors.aspalliance.com/peterbrunone/analyzethis/analyzethis.asp Paste your value and see what you get. Cheers, Peter ---------------------------------------- From: Skip Evans skip at bigskypenguin.com Hey all, I have a login function that has been working fine for a very long time. All of a sudden (or at least for a reason I could not nail down) it began to fail to validate properly. I had this on the PHP side when a user name password combination failed: echo 'false'; And in the JS I simply did this: if (ret=='false') alert('Invalid login') But when I did an alert on the return I got this: ' false' The echoed value 'false' is now coming through with space padded on the left side. Can anyone explain this to me??? Thanks globules! -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From skip at bigskypenguin.com Mon May 5 21:12:02 2008 From: skip at bigskypenguin.com (Skip Evans) Date: Mon, 05 May 2008 21:12:02 -0500 Subject: [Javascript] echo value padded with spaces? In-Reply-To: <4c119ceea3da4b93b3030a615bb7dc09@maila15.webcontrolcenter.com> References: <4c119ceea3da4b93b3030a615bb7dc09@maila15.webcontrolcenter.com> Message-ID: <481FBE72.8090400@bigskypenguin.com> Hey Peter & all, No changes to the server, and it's right here 15 feet from me, so I can be sure of that. What I ended up doing to solve it is echo back 'false' or 'true' and then use ret.indexOf('true') to look for the whole word anywhere in the returned value. While this fix works, I am still very curious as to why it is returning this value. I'll check out the analyzer. Thanks, Skip Peter Brunone wrote: > Just shooting in the dark here... were there any changes to the server, PHP upgrades, etc? > > If you want to be sure that's a real, honest-to-goodness space (i.e. character 13), you can use my string analyzer: > > http://authors.aspalliance.com/peterbrunone/analyzethis/analyzethis.asp > > Paste your value and see what you get. > > Cheers, > > Peter > > ---------------------------------------- > > From: Skip Evans skip at bigskypenguin.com > > Hey all, > > I have a login function that has been working fine > for a very long time. All of a sudden (or at least > for a reason I could not nail down) it began to > fail to validate properly. > > I had this on the PHP side when a user name > password combination failed: > > echo 'false'; > > And in the JS I simply did this: > > if (ret=='false') > alert('Invalid login') > > But when I did an alert on the return I got this: > > ' false' > > The echoed value 'false' is now coming through > with space padded on the left side. > > Can anyone explain this to me??? > > Thanks globules! > > > ------------------------------------------------------------------------ > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ From mdougherty at pbp.com Mon May 5 22:12:35 2008 From: mdougherty at pbp.com (Mike Dougherty) Date: Mon, 5 May 2008 23:12:35 -0400 Subject: [Javascript] echo value padded with spaces? In-Reply-To: <4c119ceea3da4b93b3030a615bb7dc09@maila15.webcontrolcenter.com> References: <4c119ceea3da4b93b3030a615bb7dc09@maila15.webcontrolcenter.com> Message-ID: <59bedf280805052012s486402cdpad41374b1715814d@mail.gmail.com> On Mon, May 5, 2008 at 10:05 PM, Peter Brunone wrote: > Just shooting in the dark here... were there any changes to the server, PHP > upgrades, etc? > > If you want to be sure that's a real, honest-to-goodness space (i.e. > character 13), you can use my string analyzer: Is that an ironic joke? character 13 aka "\r" is a carriage return as in "\r\n" (CRLF) the code you were thinking when your fingers got in the way was 32 (space) good one though... :) From peter at brunone.com Mon May 5 22:31:58 2008 From: peter at brunone.com (Peter Brunone) Date: Mon, 5 May 2008 20:31:58 -0700 Subject: [Javascript] echo value padded with spaces? Message-ID: Um *ahem* yes, that's exactly what I meant. You see, if I'd used my own utility, I would have caught that mistake before I posted :) I plead sleep deprivation. America is far enough down that road that we probably need a Constitutional amendment for that... ---------------------------------------- From: "Mike Dougherty" mdougherty at pbp.com On Mon, May 5, 2008 at 10:05 PM, Peter Brunone wrote: > Just shooting in the dark here... were there any changes to the server, PHP > upgrades, etc? > > If you want to be sure that's a real, honest-to-goodness space (i.e. > character 13), you can use my string analyzer: Is that an ironic joke? character 13 aka "\r" is a carriage return as in "\r\n" (CRLF) the code you were thinking when your fingers got in the way was 32 (space) good one though... :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From dnunes at gmail.com Tue May 6 06:12:16 2008 From: dnunes at gmail.com (diego nunes) Date: Tue, 6 May 2008 08:12:16 -0300 Subject: [Javascript] echo value padded with spaces? In-Reply-To: <481FBBA0.8080906@bigskypenguin.com> References: <481FBBA0.8080906@bigskypenguin.com> Message-ID: <14f57d420805060412n6fb40e2eu369204e24bd6dcf5@mail.gmail.com> On 5/5/08, Skip Evans wrote: > (...) > The echoed value 'false' is now coming through > with space padded on the left side. > > Can anyone explain this to me??? Although this question is not abot JavaScript (off-topic?), I can suggest you to debug it in steps: first of all, check if there is no spaces before you start your " Message-ID: AJAX is the term you're looking for -----Original Message----- From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org]On Behalf Of Mark Kelly Sent: 04 May 2008 23:03 To: javascript at lists.evolt.org Subject: [Javascript] POST a single value from a prompt Hi. Beginners question: How do I accept a text string through a javascript 'prompt' dialog then immediately POST it to a php file? I realise this must be pretty basic, but I don't know the right phrase to google for, apparently :/ Thanks, Mark _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript From paul at juniperwebcraft.com Wed May 7 01:15:57 2008 From: paul at juniperwebcraft.com (Paul Novitski) Date: Tue, 6 May 2008 23:15:57 -0700 Subject: [Javascript] POST a single value from a prompt Message-ID: <60316.1210140957@juniperwebcraft.com> An HTML attachment was scrubbed... URL: From list at tridemail.de Wed May 7 06:27:44 2008 From: list at tridemail.de (Michael Borchers) Date: Wed, 7 May 2008 13:27:44 +0200 Subject: [Javascript] Scriptaculous Auto.Completer and "current" parameters Message-ID: <003101c8b035$62785e30$1e00a8c0@MBPC> If you want to add parameters to be parsed you can do it by adding them to the 'parameters' option. http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter F.e. I have an input field customers_id = 1, I simply add: { customersID: $F('customers_id') } But since my Autocompleter is loaded at the beginning by new Ajax.Autocompleter(id_of_text_field, id_of_div_to_populate, url, options);the class always parses the same customers_id, the one from the beginning, which always is '1'.Even if I change the input field (f.e. '2') '1' is parsed as a value.The idea behind this is logical since '1' was the value when the class was initiated.I could initiate a new class every time the autocompleter is supposed to be fired, f.e. by an onfocus event.But in this case the old class continues to fire and the HTTPRequest will multiply themselves.Is there a way to destruct the old class or to pass parameters "correctely", always parsing the true "current" value? -- MfG Michael Borchers Tridem GmbH http://www.tridem.de mailto: borchers at tridem.de Tel.: 0491 / 96 06 71 63 ICQ: 322766923 -------------- next part -------------- An HTML attachment was scrubbed... URL: From netmusk2008 at gmail.com Wed May 7 07:10:17 2008 From: netmusk2008 at gmail.com (Nixson harsha) Date: Wed, 7 May 2008 17:40:17 +0530 Subject: [Javascript] POST a single value from a prompt In-Reply-To: <1210026021.3898.7.camel@localhost.localdomain> References: <1210026021.3898.7.camel@localhost.localdomain> Message-ID: <33291940805070510t6103fd9lb79c388dcc6aa22d@mail.gmail.com> Hi all, I have a doubt with connecting the database using javascript. I tried to connect MYSQL database with my application through javascript with the help of ado connection. I have succeded in that but the problem is i could not access the connection with the other system which are in LAN connection with my system. So i installed the odbc drive in all the system and verified it , its working fine. But i dont want to install in all the machine, I want to make my machine as the server and to run from the other machine without installing the odbc drive the other machine. please give me some idea . Regards, Nixson. -------------- next part -------------- An HTML attachment was scrubbed... URL: From java.script at cutterscrossing.com Wed May 7 08:29:13 2008 From: java.script at cutterscrossing.com (Cutter (JSRelated)) Date: Wed, 07 May 2008 08:29:13 -0500 Subject: [Javascript] POST a single value from a prompt In-Reply-To: <33291940805070510t6103fd9lb79c388dcc6aa22d@mail.gmail.com> References: <1210026021.3898.7.camel@localhost.localdomain> <33291940805070510t6103fd9lb79c388dcc6aa22d@mail.gmail.com> Message-ID: <4821AEA9.70202@cutterscrossing.com> Sounds like you need an application server, to run on top of your web server, for server side processing. A pure JavaScript solution? Maybe Aptana's Jaxer. Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _____________________________ http://blog.cutterscrossing.com Nixson harsha wrote: > > > Hi all, > > I have a doubt with connecting the database using javascript. > > I tried to connect MYSQL database with my application through javascript > with the help of ado connection. > > I have succeded in that but the problem is i could not access the > connection with the other system which are in LAN connection with my system. > > So i installed the odbc drive in all the system and verified it , its > working fine. > > But i dont want to install in all the machine, I want to make my machine > as the server and to run from the other machine without installing the > odbc drive the other machine. > > please give me some idea . > > Regards, > > Nixson. > > > ------------------------------------------------------------------------ > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From javascript at wastedtimes.net Wed May 7 15:46:20 2008 From: javascript at wastedtimes.net (Mark Kelly) Date: Wed, 7 May 2008 21:46:20 +0100 Subject: [Javascript] POST a single value from a prompt In-Reply-To: References: Message-ID: <200805072146.20892.javascript@wastedtimes.net> Hi. Thanks for to everyone for taking the time to reply. In the end Mark pointed me in the right direction and I made a (very simple) ajax thingy to do the job. Cheers, all of you. Mark On Tuesday 06 May 2008, Rees, Mark wrote: > AJAX is the term you're looking for From wobbly at optonline.net Fri May 9 21:35:38 2008 From: wobbly at optonline.net (brian mahoney) Date: Fri, 09 May 2008 22:35:38 -0400 Subject: [Javascript] help with test program. In-Reply-To: <1210026021.3898.7.camel@localhost.localdomain> References: <1210026021.3898.7.camel@localhost.localdomain> Message-ID: Hi, I'm pretty new to JavaScript and just purchased "JavaScript: The Good Parts". Here is the code from the book. I also tried copying it from the online source and have the same problem: // Create myObject. It has a value and an increment // method. The increment method takes an optional // parameter. If the argument is not a number, then 1 // is used as the default. var myObject = { value: 0; increment: function (inc) { this.value += typeof inc === 'number' ? inc : 1; } }; myObject.increment( ); document.writeln(myObject.value); // 1 myObject.increment(2); document.writeln(myObject.value); // 3 The problem is that firebug reports: missing } after property list value : 0;\n Can anyone see the problem? Thanks, Brian From mwarden at gmail.com Fri May 9 22:12:20 2008 From: mwarden at gmail.com (Matt Warden) Date: Fri, 9 May 2008 23:12:20 -0400 Subject: [Javascript] help with test program. In-Reply-To: References: <1210026021.3898.7.camel@localhost.localdomain> Message-ID: On Fri, May 9, 2008 at 10:35 PM, brian mahoney wrote: > Hi, > > I'm pretty new to JavaScript and just purchased "JavaScript: The Good > Parts". > > Here is the code from the book. I also tried copying it from the > online source and have the same problem: > > // Create myObject. It has a value and an increment > // method. The increment method takes an optional > // parameter. If the argument is not a number, then 1 > // is used as the default. > > var myObject = { > value: 0; With this notation, you need to use a comma, not a semi-colon. -- Matt Warden Cincinnati, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From wobbly at optonline.net Fri May 9 22:45:20 2008 From: wobbly at optonline.net (brian mahoney) Date: Fri, 09 May 2008 23:45:20 -0400 Subject: [Javascript] help with test program. In-Reply-To: References: <1210026021.3898.7.camel@localhost.localdomain> Message-ID: <69096D90-0B2D-4262-B97A-3B1EC5649624@optonline.net> Thank you for your help. On May 9, 2008, at 11:12 PM, Matt Warden wrote: > On Fri, May 9, 2008 at 10:35 PM, brian mahoney > wrote: >> >> >> var myObject = { >> value: 0; > > With this notation, you need to use a comma, not a semi-colon. > > -- > Matt Warden > Cincinnati, OH, USA > http://mattwarden.com > > > This email proudly and graciously contributes to entropy. > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From skip at bigskypenguin.com Sat May 10 07:48:06 2008 From: skip at bigskypenguin.com (Skip Evans) Date: Sat, 10 May 2008 07:48:06 -0500 Subject: [Javascript] Mouse cursor for AJAX projects? Message-ID: <48259986.9030909@bigskypenguin.com> Hey all, I've been developing sites running 100% AJAX communication between client and server, and one issue I have yet to solve is that when a link is selected in the browser we don't see anything indicating the browser is waiting for the server to respond, like the spinning graphics and stuff in the top right corner of IE and FF. I have seen some implementation that make the cursor spin to clue the user that the system is working, but can't find a code snippet or documentation explaining how to implement this. Anyone have any suggestions? -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ From skip at bigskypenguin.com Sun May 11 11:19:42 2008 From: skip at bigskypenguin.com (Skip Evans) Date: Sun, 11 May 2008 11:19:42 -0500 Subject: [Javascript] Setting title of web page Message-ID: <48271C9E.4010907@bigskypenguin.com> Hey all, I'm trying to change the actual title tag value in the section using the DOM. But with Google finding the attributes to set for title is tough, because the word title searches all kinds of other stuff but not .... So anyway, I can get the title by tag name: var title=document.getElementsByTagName('title'); But I can't find the right arguments to pass to setAttribute('?????','New Page Title'); Any help would be greatly appreciated. Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ From hassan at webtuitive.com Sun May 11 11:37:19 2008 From: hassan at webtuitive.com (Hassan Schroeder) Date: Sun, 11 May 2008 09:37:19 -0700 Subject: [Javascript] Setting title of web page In-Reply-To: <48271C9E.4010907@bigskypenguin.com> References: <48271C9E.4010907@bigskypenguin.com> Message-ID: <482720BF.1010408@webtuitive.com> Skip Evans wrote: > > I'm trying to change the actual title tag value in > the section using the DOM. > So anyway, I can get the title by tag name: > > var title=document.getElementsByTagName('title'); > > But I can't find the right arguments to pass to > > setAttribute('?????','New Page Title'); That's because the title text is not an attribute of the title tag; it's a text node child of the title element, e.g. $content HTH, -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-621-3445 === http://webtuitive.com dream. code. From kamaleshwar.morjal at gmail.com Sun May 11 12:12:43 2008 From: kamaleshwar.morjal at gmail.com (Kamaleshwar Morjal) Date: Sun, 11 May 2008 17:12:43 +0000 Subject: [Javascript] Setting title of web page In-Reply-To: <48271C9E.4010907@bigskypenguin.com> References: <48271C9E.4010907@bigskypenguin.com> Message-ID: On Sun, May 11, 2008 at 4:19 PM, Skip Evans wrote: > Hey all, > > I'm trying to change the actual title tag value in > the section using the DOM. But with Google > finding the attributes to set for title is tough, > because the word title searches all kinds of other > stuff but not .... > > So anyway, I can get the title by tag name: > > var title=document.getElementsByTagName('title'); > > But I can't find the right arguments to pass to > > setAttribute('?????','New Page Title'); > just setting document.title = [your title string]; works for me.. :) cheers! -- "Best things in the world are free; FREEDOM is priceless!" kamaleshwar morjal (???????? ??????) Cell Ph: +91-992-019-3637 From mailme at myobligatory.com Sun May 11 17:50:01 2008 From: mailme at myobligatory.com (Adam Fahy) Date: Sun, 11 May 2008 18:50:01 -0400 Subject: [Javascript] Setting title of web page In-Reply-To: <48271C9E.4010907@bigskypenguin.com> References: <48271C9E.4010907@bigskypenguin.com> Message-ID: <48277819.90207@myobligatory.com> Skip Evans wrote: > So anyway, I can get the title by tag name: > > var title=document.getElementsByTagName('title'); > > But I can't find the right arguments to pass to > > setAttribute('?????','New Page Title'); Try: document.getElementsByTagName('title')[0].text = "New Title" From skip at bigskypenguin.com Sun May 11 19:04:37 2008 From: skip at bigskypenguin.com (Skip Evans) Date: Sun, 11 May 2008 19:04:37 -0500 Subject: [Javascript] Setting title of web page In-Reply-To: <48277819.90207@myobligatory.com> References: <48271C9E.4010907@bigskypenguin.com> <48277819.90207@myobligatory.com> Message-ID: <48278995.2090308@bigskypenguin.com> Hey all, At the suggestion of another list member this was the simplest solution: document.title="new title"; Adam Fahy wrote: > Skip Evans wrote: >> So anyway, I can get the title by tag name: >> >> var title=document.getElementsByTagName('title'); >> >> But I can't find the right arguments to pass to >> >> setAttribute('?????','New Page Title'); > > Try: > > document.getElementsByTagName('title')[0].text = "New Title" > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ From kalechi at gmail.com Mon May 12 12:56:33 2008 From: kalechi at gmail.com (Bruce Lill) Date: Mon, 12 May 2008 12:56:33 -0500 Subject: [Javascript] Mouse cursor for AJAX projects? In-Reply-To: <48259986.9030909@bigskypenguin.com> References: <48259986.9030909@bigskypenguin.com> Message-ID: <5c30eca60805121056x22fc4a51pce6c615dc5e2b559@mail.gmail.com> I use an animated image usually from http://www.ajaxload.info/ , and display it in the same div that the content will end up in, or you can get fancy with css, grey the page and show just the image. Bruce On Sat, May 10, 2008 at 7:48 AM, Skip Evans wrote: > Hey all, > > I've been developing sites running 100% AJAX > communication between client and server, and one > issue I have yet to solve is that when a link is > selected in the browser we don't see anything > indicating the browser is waiting for the server > to respond, like the spinning graphics and stuff > in the top right corner of IE and FF. > > I have seen some implementation that make the > cursor spin to clue the user that the system is > working, but can't find a code snippet or > documentation explaining how to implement this. > > From davidh126 at writeme.com Mon May 12 22:46:40 2008 From: davidh126 at writeme.com (David Hucklesby) Date: Mon, 12 May 2008 20:46:40 -0700 Subject: [Javascript] Setting title of web page In-Reply-To: <48278995.2090308@bigskypenguin.com> Message-ID: <2008512204640.802407@DAVIDS> On Sun, 11 May 2008 19:04:37 -0500, Skip Evans wrote: > Hey all, > > At the suggestion of another list member this was the simplest solution: > > document.title="new title"; > > Adam Fahy wrote: >> Skip Evans wrote: >>> So anyway, I can get the title by tag name: >>> >>> var title=document.getElementsByTagName('title'); >>> >>> But I can't find the right arguments to pass to >>> >>> setAttribute('?????','New Page Title'); >>> That's very odd. The title attribute is usually used for displaying a "tooltip" in compliant browsers, and for distinguishing style sheets. It seems counter-intuitive to me for this to alter the actual content of the page title. I would have thought something like this : document.getElementsByTagName('title')[0].firstChild = 'New Title'; (Assuming you really can access the TITLE element in all browsers.) Cordially, David -- From davidh126 at writeme.com Mon May 12 23:08:36 2008 From: davidh126 at writeme.com (David Hucklesby) Date: Mon, 12 May 2008 21:08:36 -0700 Subject: [Javascript] Mouse cursor for AJAX projects? In-Reply-To: <48259986.9030909@bigskypenguin.com> Message-ID: <200851221836.995901@DAVIDS> On Sat, 10 May 2008 07:48:06 -0500, Skip Evans wrote: > Hey all, > > I've been developing sites running 100% AJAX communication between client and server, > and one issue I have yet to solve is that when a link is selected in the browser we > don't see anything indicating the browser is waiting for the server to respond, like > the spinning graphics and stuff in the top right corner of IE and FF. > > I have seen some implementation that make the cursor spin to clue the user that the > system is working, but can't find a code snippet or documentation explaining how to > implement this. > > Anyone have any suggestions? I don't know how to make the cursor spin, but showing an animated GIF on submitting the request, then hiding it again when the request returns might work for you. HTML   CSS .waiting { display:block; width: 32px; /* whatever */ height: 32px: /* " " */ background: url(images/rotating.gif) no-repeat center; visibility: hidden; } Toggle the visibility to "visible" and back via your script. The extra span is to keep the box "inline" and may not be needed. Cordially, David -- From david at dorward.me.uk Tue May 13 01:12:40 2008 From: david at dorward.me.uk (David Dorward) Date: Tue, 13 May 2008 07:12:40 +0100 Subject: [Javascript] Setting title of web page In-Reply-To: <2008512204640.802407@DAVIDS> References: <2008512204640.802407@DAVIDS> Message-ID: On 13 May 2008, at 04:46, David Hucklesby wrote: > On Sun, 11 May 2008 19:04:37 -0500, Skip Evans wrote: >> Hey all, >> >> At the suggestion of another list member this was the simplest >> solution: >> >> document.title="new title"; >> >> Adam Fahy wrote: >>> Skip Evans wrote: >>>> So anyway, I can get the title by tag name: >>>> >>>> var title=document.getElementsByTagName('title'); >>>> >>>> But I can't find the right arguments to pass to >>>> >>>> setAttribute('?????','New Page Title'); >>>> > > That's very odd. The title attribute is ... Thanks to a combination of some top posting, and your choice of place to put your response, I'm not sure if you are responding to the message your mail client claims you are, or to a much earlier message in the thread that was quoted in it, but... If the former: The title property of the document object doesn't map on to any attribute, it maps directly onto the title of the document. If the latter: The OP was saying that the approach he was taking was not working. -- David Dorward http://dorward.me.uk/ http://blog.dorward.me.uk/ From davidh126 at writeme.com Tue May 13 23:38:00 2008 From: davidh126 at writeme.com (David Hucklesby) Date: Tue, 13 May 2008 21:38:00 -0700 Subject: [Javascript] Setting title of web page In-Reply-To: Message-ID: <200851321380.015350@DAVIDS> On Tue, 13 May 2008 07:12:40 +0100, David Dorward wrote: > > On 13 May 2008, at 04:46, David Hucklesby wrote: > >> On Sun, 11 May 2008 19:04:37 -0500, Skip Evans wrote: >> >>> Hey all, >>> >>> At the suggestion of another list member this was the simplest solution: >>> >>> document.title="new title"; >>> [...] >> >> That's very odd. The title attribute is ... >> [...] > > The title property of the document object doesn't map on to any > attribute, it maps directly onto the title of the document. > Thank you for the correction. I am forever getting confused by JavaScript's dot notation. Perhaps I should stick to COBOL. ;) Cordially, David -- From tuofamerikazmostwanted at gmail.com Tue May 27 06:09:28 2008 From: tuofamerikazmostwanted at gmail.com (JS Student) Date: Tue, 27 May 2008 16:09:28 +0500 Subject: [Javascript] Adding scriptlet to favourites menu via javascript (IE 6+) In-Reply-To: <3764dbaf0805270406u69d2ef5dh4636867b98e7cbd@mail.gmail.com> References: <3764dbaf0805270406u69d2ef5dh4636867b98e7cbd@mail.gmail.com> Message-ID: <3764dbaf0805270409s51277779i742cdcff3cdf6eb1@mail.gmail.com> Hi, I am sorry if this has been asked already. I have a scriptlet on my website that I want to add to the user's favorites menu (Internet Explorer 6+). I am using: window.external.AddFavorite(url,title); This works fine when the url is "http:" protocol based but it wont let me add a "javascript:" url. The error I get is permission denied. This is my code: /*BEGIN CODE*/ // JavaScript OnClick handler: function addScriptletToFavs() { var url = "JavaScript:myfucn();void();"; var title = "My Scriptlet"; window.external.AddFavorite(url,title); } // HTML code for button: /*END CODE*/ Can anybody please help me in this regard? Thanks in advance. Aaron. From john at jwarner.com Tue May 27 09:14:53 2008 From: john at jwarner.com (John Warner) Date: Tue, 27 May 2008 10:14:53 -0400 Subject: [Javascript] Adding scriptlet to favourites menu via javascript (IE6+) In-Reply-To: <3764dbaf0805270409s51277779i742cdcff3cdf6eb1@mail.gmail.com> Message-ID: <002301c8c004$094e2ea0$3d02a8c0@Pluto> I've never tried what you are doing, but I suspect you are denied for security reasons. To protect a user from clicking on a script that might do harm. John Warner > -----Original Message----- > From: javascript-bounces at lists.evolt.org > [mailto:javascript-bounces at lists.evolt.org] On Behalf Of JS Student > Sent: Tuesday, May 27, 2008 7:09 AM > To: javascript at lists.evolt.org > Subject: [Javascript] Adding scriptlet to favourites menu via > javascript (IE6+) > > > Hi, > > I am sorry if this has been asked already. > > I have a scriptlet on my website that I want to add to the > user's favorites menu (Internet Explorer 6+). I am using: > > window.external.AddFavorite(url,title); > > This works fine when the url is "http:" protocol based but it > wont let me add a "javascript:" url. The error I get is > permission denied. > > This is my code: > > /*BEGIN CODE*/ > // JavaScript OnClick handler: > function addScriptletToFavs() { > var url = "JavaScript:myfucn();void();"; > var title = "My Scriptlet"; > > window.external.AddFavorite(url,title); > } > > // HTML code for button: > onclick="JavaScript:addScriptletToFavs();" /> > > /*END CODE*/ > > Can anybody please help me in this regard? > > Thanks in advance. > > Aaron. > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From john at jwarner.com Tue May 27 09:14:53 2008 From: john at jwarner.com (John Warner) Date: Tue, 27 May 2008 10:14:53 -0400 Subject: [Javascript] Adding scriptlet to favourites menu via javascript (IE6+) In-Reply-To: <3764dbaf0805270409s51277779i742cdcff3cdf6eb1@mail.gmail.com> Message-ID: <002301c8c004$094e2ea0$3d02a8c0@Pluto> I've never tried what you are doing, but I suspect you are denied for security reasons. To protect a user from clicking on a script that might do harm. John Warner > -----Original Message----- > From: javascript-bounces at lists.evolt.org > [mailto:javascript-bounces at lists.evolt.org] On Behalf Of JS Student > Sent: Tuesday, May 27, 2008 7:09 AM > To: javascript at lists.evolt.org > Subject: [Javascript] Adding scriptlet to favourites menu via > javascript (IE6+) > > > Hi, > > I am sorry if this has been asked already. > > I have a scriptlet on my website that I want to add to the > user's favorites menu (Internet Explorer 6+). I am using: > > window.external.AddFavorite(url,title); > > This works fine when the url is "http:" protocol based but it > wont let me add a "javascript:" url. The error I get is > permission denied. > > This is my code: > > /*BEGIN CODE*/ > // JavaScript OnClick handler: > function addScriptletToFavs() { > var url = "JavaScript:myfucn();void();"; > var title = "My Scriptlet"; > > window.external.AddFavorite(url,title); > } > > // HTML code for button: > onclick="JavaScript:addScriptletToFavs();" /> > > /*END CODE*/ > > Can anybody please help me in this regard? > > Thanks in advance. > > Aaron. > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From david_chance at yahoo.com.au Tue May 27 10:56:27 2008 From: david_chance at yahoo.com.au (david_chance at yahoo.com.au) Date: Wed, 28 May 2008 01:56:27 +1000 (EST) Subject: [Javascript] Adding scriptlet to favourites menu via javascript (IE6+) In-Reply-To: <002301c8c004$094e2ea0$3d02a8c0@Pluto> Message-ID: <855065.69824.qm@web34504.mail.mud.yahoo.com> Since "Javascript" is a defined word, perhaps you need to double up the ""? Just a thought. --- John Warner wrote: > I've never tried what you are doing, but I suspect you are > denied for > security reasons. To protect a user from clicking on a script > that might do > harm. > > John Warner > > > > > > -----Original Message----- > > From: javascript-bounces at lists.evolt.org > > [mailto:javascript-bounces at lists.evolt.org] On Behalf Of JS > Student > > Sent: Tuesday, May 27, 2008 7:09 AM > > To: javascript at lists.evolt.org > > Subject: [Javascript] Adding scriptlet to favourites menu > via > > javascript (IE6+) > > > > > > Hi, > > > > I am sorry if this has been asked already. > > > > I have a scriptlet on my website that I want to add to the > > user's favorites menu (Internet Explorer 6+). I am using: > > > > window.external.AddFavorite(url,title); > > > > This works fine when the url is "http:" protocol based but > it > > wont let me add a "javascript:" url. The error I get is > > permission denied. > > > > This is my code: > > > > /*BEGIN CODE*/ > > // JavaScript OnClick handler: > > function addScriptletToFavs() { > > var url = "JavaScript:myfucn();void();"; > > var title = "My Scriptlet"; > > > > window.external.AddFavorite(url,title); > > } > > > > // HTML code for button: > > > onclick="JavaScript:addScriptletToFavs();" /> > > > > /*END CODE*/ > > > > Can anybody please help me in this regard? > > > > Thanks in advance. > > > > Aaron. > > _______________________________________________ > > Javascript mailing list > > Javascript at lists.evolt.org > > http://lists.evolt.org/mailman/listinfo/javascript > > > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > Get the name you always wanted with the new y7mail email address. www.yahoo7.com.au/mail From trojani2000 at hotmail.com Wed May 28 19:35:21 2008 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Thu, 29 May 2008 00:35:21 +0000 Subject: [Javascript] Adding scriptlet to favourites menu via javascript (IE 6+) In-Reply-To: <3764dbaf0805270409s51277779i742cdcff3cdf6eb1@mail.gmail.com> References: <3764dbaf0805270406u69d2ef5dh4636867b98e7cbd@mail.gmail.com> <3764dbaf0805270409s51277779i742cdcff3cdf6eb1@mail.gmail.com> Message-ID: Your script is fine, but a command such as window.external.AddFavorite(url,title);will expose the browser to a malicious code of an uncivilized coder that will put into your favs every evil he can think of right under your mouseclick. Therefore, its a security restriction. You will probably get a similar error/warning even if you manually try to change some link addres protocol into javascript command. Regards~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Date: Tue, 27 May 2008 16:09:28 +0500> From: tuofamerikazmostwanted at gmail.com> To: javascript at lists.evolt.org> Subject: [Javascript] Adding scriptlet to favourites menu via javascript (IE 6+)> > Hi,> > I am sorry if this has been asked already.> > I have a scriptlet on my website that I want to add to the user's> favorites menu (Internet Explorer 6+). I am using:> > window.external.AddFavorite(url,title);> > This works fine when the url is "http:" protocol based but it wont let> me add a "javascript:" url. The error I get is permission denied.> > This is my code:> > /*BEGIN CODE*/> // JavaScript OnClick handler:> function addScriptletToFavs() {> var url = "JavaScript:myfucn();void();";> var title = "My Scriptlet";> > window.external.AddFavorite(url,title);> }> > // HTML code for button:> onclick="JavaScript:addScriptletToFavs();" />> > /*END CODE*/> > Can anybody please help me in this regard?> > Thanks in advance.> > Aaron.> _______________________________________________> Javascript mailing list> Javascript at lists.evolt.org> http://lists.evolt.org/mailman/listinfo/javascript _________________________________________________________________ Keep your kids safer online with Windows Live Family Safety. http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_Refresh_family_safety_052008 From skip at bigskypenguin.com Wed May 28 19:39:22 2008 From: skip at bigskypenguin.com (Skip Evans) Date: Wed, 28 May 2008 19:39:22 -0500 Subject: [Javascript] Auto reloading JS files on change? Message-ID: <483DFB3A.5000808@bigskypenguin.com> Hey all, I have the following in an HTML file that is echo'd to the browser via PHP code. But whenever this, and other, .js files are modified the user must know to hit the refresh button on his browser. I've been looking for a way to reload the JS files on changes, and I've come across the last-modified header element, but not sure how to implement this. Of special note here is that the HTML file is read via PHP and then sent to the browser with a echo $html ...call. Can someone point me in the right direction here? Thanks! -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ From skip at bigskypenguin.com Thu May 29 18:39:51 2008 From: skip at bigskypenguin.com (Skip Evans) Date: Thu, 29 May 2008 18:39:51 -0500 Subject: [Javascript] innerHTML assignment overflows TD cell in FF Message-ID: <483F3EC7.6050604@bigskypenguin.com> Hey all, I have a table set up with a main content cell in the center column of three, basically like this:
header
stuff the most stuff stuff
footer
On the server side I build a content page and user innerHMTL=content; ..in JS code to insert the content into the column labeled "the most stuff". The problem is when that column has less content, and then shifts to more content the latter part of the content runs over the footer below the main content row. This is ONLY happening in Firefox, IE on windows works fine. Firefox has the problem on both Linux and Windows. Any help would greatly, greatly appreciated. -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/ From lester at denhaag.org Fri May 30 10:25:20 2008 From: lester at denhaag.org (J. Lester Novros II) Date: Fri, 30 May 2008 17:25:20 +0200 Subject: [Javascript] innerHTML assignment overflows TD cell in FF In-Reply-To: <483F3EC7.6050604@bigskypenguin.com> References: <483F3EC7.6050604@bigskypenguin.com> Message-ID: <48401C60.10009@denhaag.org> Skip Evans wrote: > This is ONLY happening in Firefox, IE on windows > works fine. Firefox has the problem on both Linux > and Windows. > > Any help would greatly, greatly appreciated. Not much help, I'm afraid but both Firefox 2x and 3x on Linux have no trouble with a quick testcase I hacked up: This is strictly a JavaScript implementation, however. Maybe the anomaly is triggered by your use of PHP..? Some more detail on the code you use would be helpful. l8R lES -- "I think a lot more of Apple than I do of MSFT, but then I'd rather catch rabies than AIDS..." /. comment http://www.supermarionation.tv From paul at juniperwebcraft.com Fri May 30 11:13:09 2008 From: paul at juniperwebcraft.com (Paul Novitski) Date: Fri, 30 May 2008 09:13:09 -0700 Subject: [Javascript] innerHTML assignment overflows TD cell in FF Message-ID: <1514.1212163989@juniperwebcraft.com> At 5/29/2008 04:39 PM, Skip Evans wrote: ..in JS code to insert the content into the column labeled "the most stuff". The problem is when that column has less content, and then shifts to more content the latter part of the content runs over the footer below the main content row. I would not expect Firefox to misbehave in these circumstances. What styling are you applying to the table? Also, have you tried using 'proper' table markup? i.e., table thead ... /thead tfoot ... /tfoot tbody ... /tbody /table It would be interesting to see if browsers played more nicely with this. Regards, Paul __________________________ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com [1] Links: ------ [1] http://juniperwebcraft.com/../../../ From johnzabroski at yahoo.com Fri May 30 12:04:20 2008 From: johnzabroski at yahoo.com (John Zabroski) Date: Fri, 30 May 2008 10:04:20 -0700 (PDT) Subject: [Javascript] capturing changes to the fragment identifier Message-ID: <983424.31886.qm@web65709.mail.ac4.yahoo.com> For those who don't know, the fragment identifier is everything after the pound symbol (#) aka the hash symbol. It is intended to be used as a way to navigate within a document and bookmark that section of a document. Gmail uses it to determine what to load into iframes, using iframes as a model for recording 'hard state' and 'soft state' for the application. My use case is similar to Gmail. The caveat to the fragment identifier is that the DOM must know about it *a priori* in order to get the browser's baked in navigation and bookmark state-process schemes. For rich internet applications that function as Active Documents, there is no way for the browser to perform deductive reasoning about the document's navigation structure or what constitutes a bookmark (a plug-in instantiated through the object element is by default opaque). Everything is determined on-the-fly, in response to client-side requests. These determinations can be persisted, either through isolated storage on the client or through a commit executed by sending the state to the server for storage in the network. However, a better model is to make use of HTTP and record state in the URI. Gmail is a pretty tame case, since its navigation structure is discrete ('#inbox', '#starred', etc.). Currently, there does not appear to be a cross-browser compatible method for handling changes to the fragment identifier as an event. IE8 is planning to support onHashChange as an event handler, but it does not appear to be a w3c standard. Such an event handler would be ideal, since it would push all updates to hard and soft state into a single point: a resource. How can I do this cross-browser? FF1.5+, IE7+, and Safari is pretty much the bare minimum support required version-wise, but I'd prefer to support it feature-wise and deterministically figure out what browsers can even do this. From paul at juniperwebcraft.com Fri May 30 12:29:48 2008 From: paul at juniperwebcraft.com (Paul Novitski) Date: Fri, 30 May 2008 10:29:48 -0700 Subject: [Javascript] capturing changes to the fragment identifier In-Reply-To: <23360120.1212167893574.JavaMail.root@m04> References: <23360120.1212167893574.JavaMail.root@m04> Message-ID: At 5/30/2008 10:04 AM, John Zabroski wrote: >For those who don't know, the fragment identifier is everything >after the pound symbol (#) aka the hash symbol. It is intended to >be used as a way to navigate within a document and bookmark that >section of a document. Gmail uses it to determine what to load into >iframes, using iframes as a model for recording 'hard state' and >'soft state' for the application. My use case is similar to Gmail. ... >Currently, there does not appear to be a cross-browser compatible >method for handling changes to the fragment identifier as an >event. IE8 is planning to support onHashChange as an event handler, >but it does not appear to be a w3c standard. > >Such an event handler would be ideal, since it would push all >updates to hard and soft state into a single point: a resource. > >How can I do this cross-browser? FF1.5+, IE7+, and Safari is pretty >much the bare minimum support required version-wise, but I'd prefer >to support it feature-wise and deterministically figure out what >browsers can even do this. One approach might be to apply onclick and onkeypress events to all anchors with hrefs containing fragment identifiers, and then process the changes to the hash with one central function when any of the links is activated. Regards, Paul __________________________ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com From johnzabroski at yahoo.com Fri May 30 13:08:24 2008 From: johnzabroski at yahoo.com (John Zabroski) Date: Fri, 30 May 2008 11:08:24 -0700 (PDT) Subject: [Javascript] capturing changes to the fragment identifier Message-ID: <835664.65465.qm@web65713.mail.ac4.yahoo.com> Paul Novitski wrote:One approach might be to apply onclick and onkeypress events to all anchors with hrefs containing fragment identifiers, and then process the changes to the hash with one central function when any of the links is activated. This approach doesn't preserve the browser's navigation and bookmark state-process scheme, though. Rule 1 for me is Don't Break The Browser. If you go to http://www.example.com/mail#inbox, load the page and then edit the url in the location bar to http://www.example.com/mail#starred and hit enter, nothing will happen. onclick and onkeypress is the wrong granularity for this.