From spindrift at oceanfree.net Thu Jul 1 02:25:51 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Thu, 1 Jul 2004 08:25:51 +0100 Subject: [Javascript] Offline Database ? References: Message-ID: <009b01c45f3c$a5c76080$47ac02d4@ic7g> Thanks Dave for the ideas. I will look into the new possibilities you raise. Tim in Ireland. ----- Original Message ----- From: To: Sent: Wednesday, June 30, 2004 10:34 PM Subject: RE: [Javascript] Offline Database ? > hsqldb and java. > Would be fully contained and could be run direct from the cd or from an installation on a harddrive. > > You could even put the entire jdk on the cd and any java app could use it rather than any jdk on the users system. > > OR > > you could put all of your data into an XML file and load it into your browser from the CD via XMLHTTP in both IE and Mozilla. Use JavaScript to access your data then. > > OR > > you could create an entire javascript hierarchy that represented your data and then use javascript to access it directly. I.e. > > > > > > > > > > > -- > Dave Cline > davecline at gmail.com > www.bangeye.com/ > 801-636-5603 > > > > > -----Original Message----- > From: Tim Makins > Sent: Wed, 30 Jun 2004 19:10:12 +0100 > To: "[JavaScript List]" > Subject: [Javascript] Offline Database ? > > I am in the middle of a big mapping project, that is viewed as a series of > web pages either direct off a CD, or copied as a package to the hard drive > and viewed there. > > A new requirement has come up - I wonder if there is some kind of > easy-to-use database software that could be run in the same manner ? I > wouldn't expect people to do a full installation of PHP, Apache, and MySQL, > but that kind of functionality would be pretty neat. > > I would need to access the database from the web pages, and get the results > so that I could use the data in various ways. > > The key issue would be ease-of-install for the recipient. > > Any ideas ? > > Tim in Ireland. > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From riegel at clearimageonline.com Fri Jul 2 06:04:42 2004 From: riegel at clearimageonline.com (Terry Riegel) Date: Fri, 2 Jul 2004 07:04:42 -0400 Subject: [JavaScript] Upload Progress Indicator In-Reply-To: <572B967E-C510-11D8-A5BC-0030656F661E@clearimageonline.com> References: <572B967E-C510-11D8-A5BC-0030656F661E@clearimageonline.com> Message-ID: <9EBF31B2-CC17-11D8-92B7-0030656F661E@clearimageonline.com> Does anyone know that you can't do this? Terry Riegel On Jun 23, 2004, at 8:24 AM, Terry Riegel wrote: > Is there a way using Javascript to monitor the progress of an HTTP > upload? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 300 bytes Desc: not available URL: From shawn_milochik at godivachoc.com Fri Jul 2 07:02:40 2004 From: shawn_milochik at godivachoc.com (shawn_milochik at godivachoc.com) Date: Fri, 2 Jul 2004 08:02:40 -0400 Subject: [Javascript] attach actions to all objects in a form? In-Reply-To: <041301c44350$809c0610$df0110ac@saweb.lcl> Message-ID: Hi everybody. I just tried to implement something suggested by Chris in response to one of my old questions, and I'm having a bit of a problem. I keep getting the error "Not Implemented" when the script executes. The line causing the error is : if (objEl.type == 'submit'){ Thanks, Shawn -------------------------------- Here is the function: -------------------------------- -------------------------------- End of code. -------------------------------- christ at saeweb.com Sent by: javascript-bounce To s at LaTech.edu javascript at LaTech.edu cc 05/26/2004 02:37 Subject PM Re: [Javascript] attach actions to all objects in a form? Please respond to javascript at LaTech .edu I've never personally used addEventListener, but would something like this work? ====================== var objForm = document.forms["formName"] var objEl = null for(var x = 0; x < objForm.elements.length; x++){ objEl = objForm.elements[x] objEl.onclick = captureAllClicks // which should also be able to be written as: // objEl.onclick = function(){ // Some code in here //} } function captureAllClicks(){ // I'm confused on why you're passing in textbox in // your original code so I don't know how you would // write this function so that it works properly } ====================== I really should test this code before sending, but... :) Chris Tifer ----- Original Message ----- From: "Roger Roelofs" To: "[JavaScript List]" Sent: Wednesday, May 26, 2004 2:12 PM Subject: Re: [Javascript] attach actions to all objects in a form? > Shawn, > > On May 26, 2004, at 1:52 PM, Shawn Milo wrote: > > > Is there a way to write an onclick function, or something > > similar, so that it applies to all objects on a form? > > > Yes, > > /// setup > var el = document.getElementById("theContainer"); > if (el) { > if( el.addEventListener ) { > el.addEventListener("click", clickableTableRowClick, false); > } else { > if(el.attachEvent) { > el.attachEvent("onclick", clickableTableRowClick); > } else { > el.onclick = clickableTableRowClick; > } > } > } > > // callback routine > function clickableTableRowClick(evt) { > var targ, oldRow; > if (!evt) evt = window.event; > if (evt.target) targ = evt.target; > else if (evt.srcElement) targ = evt.srcElement; > ... > do what you want with the target element _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript ********************************************************************** This e-mail and any files transmitted with it may contain confidential information and is intended solely for use by the individual to whom it is addressed. If you received this e-mail in error, please notify the sender, do not disclose its contents to others and delete it from your system. ********************************************************************** From shawn_milochik at godivachoc.com Fri Jul 2 07:16:21 2004 From: shawn_milochik at godivachoc.com (shawn_milochik at godivachoc.com) Date: Fri, 2 Jul 2004 08:16:21 -0400 Subject: [Javascript] attach actions to all objects in a form? In-Reply-To: Message-ID: Follow up: I have it working, but now it is always disabling the same button, no matter which was pressed. Any ideas? Thanks, Shawn --------------------------- code --------------------------- -------------------------------- End of code. -------------------------------- christ at saeweb.com Sent by: javascript-bounce To s at LaTech.edu javascript at LaTech.edu cc 05/26/2004 02:37 Subject PM Re: [Javascript] attach actions to all objects in a form? Please respond to javascript at LaTech .edu I've never personally used addEventListener, but would something like this work? ====================== var objForm = document.forms["formName"] var objEl = null for(var x = 0; x < objForm.elements.length; x++){ objEl = objForm.elements[x] objEl.onclick = captureAllClicks // which should also be able to be written as: // objEl.onclick = function(){ // Some code in here //} } function captureAllClicks(){ // I'm confused on why you're passing in textbox in // your original code so I don't know how you would // write this function so that it works properly } ====================== I really should test this code before sending, but... :) Chris Tifer ----- Original Message ----- From: "Roger Roelofs" To: "[JavaScript List]" Sent: Wednesday, May 26, 2004 2:12 PM Subject: Re: [Javascript] attach actions to all objects in a form? > Shawn, > > On May 26, 2004, at 1:52 PM, Shawn Milo wrote: > > > Is there a way to write an onclick function, or something > > similar, so that it applies to all objects on a form? > > > Yes, > > /// setup > var el = document.getElementById("theContainer"); > if (el) { > if( el.addEventListener ) { > el.addEventListener("click", clickableTableRowClick, false); > } else { > if(el.attachEvent) { > el.attachEvent("onclick", clickableTableRowClick); > } else { > el.onclick = clickableTableRowClick; > } > } > } > > // callback routine > function clickableTableRowClick(evt) { > var targ, oldRow; > if (!evt) evt = window.event; > if (evt.target) targ = evt.target; > else if (evt.srcElement) targ = evt.srcElement; > ... > do what you want with the target element _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript ********************************************************************** This e-mail and any files transmitted with it may contain confidential information and is intended solely for use by the individual to whom it is addressed. If you received this e-mail in error, please notify the sender, do not disclose its contents to others and delete it from your system. ********************************************************************** _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From rer at datacompusa.com Fri Jul 2 07:29:07 2004 From: rer at datacompusa.com (Roger Roelofs) Date: Fri, 2 Jul 2004 08:29:07 -0400 Subject: [JavaScript] Upload Progress Indicator In-Reply-To: <9EBF31B2-CC17-11D8-92B7-0030656F661E@clearimageonline.com> References: <572B967E-C510-11D8-A5BC-0030656F661E@clearimageonline.com> <9EBF31B2-CC17-11D8-92B7-0030656F661E@clearimageonline.com> Message-ID: <69504BF2-CC23-11D8-9601-00306572FCC8@datacompusa.com> Terry, On Jul 2, 2004, at 7:04 AM, Terry Riegel wrote: > Does anyone know that you can't do this? Yes, I know that you can't do this. (without using server side software (pick your poison). There is a php module called MegaUpload, that will do this, but it is a bit convoluted because php doesn't natively give you access to the incoming data stream until it has processed it. That module used a perl cgi to accept the upload and then passes the data to a php script for processing. Roger ------------------------------------------------------- Roger Roelofs web www.datacompusa.com Datacomp Appraisal Services web www.mhvillage.com 3215 Eaglecrest Drive, NE Email rer at datacompusa.com Grand Rapids, MI 49525-4593 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 799 bytes Desc: not available URL: From shawn_milochik at godivachoc.com Fri Jul 2 07:30:20 2004 From: shawn_milochik at godivachoc.com (shawn_milochik at godivachoc.com) Date: Fri, 2 Jul 2004 08:30:20 -0400 Subject: [Javascript] attach actions to all objects in a form? In-Reply-To: Message-ID: Sorry, it looks like I have everything figured out. I guess my browser was caching the JavaScript or something, but I finally got the behavior I expected. Shawn Shawn Milochik/US/GODIV A/CSC at CSC To Sent by: javascript at LaTech.edu javascript-bounce cc s at LaTech.edu Subject Re: [Javascript] attach actions to 07/02/2004 08:16 all objects in a form? AM Please respond to javascript at LaTech .edu Follow up: I have it working, but now it is always disabling the same button, no matter which was pressed. Any ideas? Thanks, Shawn --------------------------- code --------------------------- -------------------------------- End of code. -------------------------------- christ at saeweb.com Sent by: javascript-bounce To s at LaTech.edu javascript at LaTech.edu cc 05/26/2004 02:37 Subject PM Re: [Javascript] attach actions to all objects in a form? Please respond to javascript at LaTech .edu I've never personally used addEventListener, but would something like this work? ====================== var objForm = document.forms["formName"] var objEl = null for(var x = 0; x < objForm.elements.length; x++){ objEl = objForm.elements[x] objEl.onclick = captureAllClicks // which should also be able to be written as: // objEl.onclick = function(){ // Some code in here //} } function captureAllClicks(){ // I'm confused on why you're passing in textbox in // your original code so I don't know how you would // write this function so that it works properly } ====================== I really should test this code before sending, but... :) Chris Tifer ----- Original Message ----- From: "Roger Roelofs" To: "[JavaScript List]" Sent: Wednesday, May 26, 2004 2:12 PM Subject: Re: [Javascript] attach actions to all objects in a form? > Shawn, > > On May 26, 2004, at 1:52 PM, Shawn Milo wrote: > > > Is there a way to write an onclick function, or something > > similar, so that it applies to all objects on a form? > > > Yes, > > /// setup > var el = document.getElementById("theContainer"); > if (el) { > if( el.addEventListener ) { > el.addEventListener("click", clickableTableRowClick, false); > } else { > if(el.attachEvent) { > el.attachEvent("onclick", clickableTableRowClick); > } else { > el.onclick = clickableTableRowClick; > } > } > } > > // callback routine > function clickableTableRowClick(evt) { > var targ, oldRow; > if (!evt) evt = window.event; > if (evt.target) targ = evt.target; > else if (evt.srcElement) targ = evt.srcElement; > ... > do what you want with the target element _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript ********************************************************************** This e-mail and any files transmitted with it may contain confidential information and is intended solely for use by the individual to whom it is addressed. If you received this e-mail in error, please notify the sender, do not disclose its contents to others and delete it from your system. ********************************************************************** _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From trojani2000 at hotmail.com Fri Jul 2 10:51:26 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Fri, 02 Jul 2004 17:51:26 +0200 Subject: [Javascript] attach actions to all objects in a form? Message-ID: Try this: ------------------------------------------------------------- var objForm = document.forms['thisForm']; // var objEl = null; // var x = 0; ------------------------------------------------------------ regards Bekim >From: shawn_milochik at godivachoc.com >Reply-To: "[JavaScript List]" >To: javascript at LaTech.edu >Subject: Re: [Javascript] attach actions to all objects in a form? >Date: Fri, 2 Jul 2004 08:16:21 -0400 > > > > > >Follow up: > >I have it working, but now it is always disabling the same button, >no matter which was pressed. Any ideas? > >Thanks, >Shawn > >--------------------------- >code >--------------------------- > > > >-------------------------------- >End of code. >-------------------------------- > > > > > > christ at saeweb.com > Sent by: > javascript-bounce To > s at LaTech.edu javascript at LaTech.edu > cc > > 05/26/2004 02:37 Subject > PM Re: [Javascript] attach actions to > all objects in a form? > > Please respond to > javascript at LaTech > .edu > > > > > > >I've never personally used addEventListener, but would something like this >work? > >====================== > >var objForm = document.forms["formName"] >var objEl = null >for(var x = 0; x < objForm.elements.length; x++){ > objEl = objForm.elements[x] > objEl.onclick = captureAllClicks > // which should also be able to be written as: > // objEl.onclick = function(){ > // Some code in here > //} >} > >function captureAllClicks(){ > // I'm confused on why you're passing in textbox in > // your original code so I don't know how you would > // write this function so that it works properly >} > >====================== > > >I really should test this code before sending, but... > >:) > >Chris Tifer > > >----- Original Message ----- >From: "Roger Roelofs" >To: "[JavaScript List]" >Sent: Wednesday, May 26, 2004 2:12 PM >Subject: Re: [Javascript] attach actions to all objects in a form? > > > > Shawn, > > > > On May 26, 2004, at 1:52 PM, Shawn Milo wrote: > > > > > Is there a way to write an onclick function, or something > > > similar, so that it applies to all objects on a form? > > > > > > > Yes, > > > > /// setup > > var el = document.getElementById("theContainer"); > > if (el) { > > if( el.addEventListener ) { > > el.addEventListener("click", clickableTableRowClick, false); > > } else { > > if(el.attachEvent) { > > el.attachEvent("onclick", clickableTableRowClick); > > } else { > > el.onclick = clickableTableRowClick; > > } > > } > > } > > > > // callback routine > > function clickableTableRowClick(evt) { > > var targ, oldRow; > > if (!evt) evt = window.event; > > if (evt.target) targ = evt.target; > > else if (evt.srcElement) targ = evt.srcElement; > > ... > > do what you want with the target element > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > > > >********************************************************************** >This e-mail and any files transmitted with it may contain >confidential information and is intended solely for use by >the individual to whom it is addressed. If you received >this e-mail in error, please notify the sender, do not >disclose its contents to others and delete it from your >system. > >********************************************************************** > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From flavio at economisa.com.br Fri Jul 2 11:16:01 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Fri, 02 Jul 2004 13:16:01 -0300 Subject: [Javascript] attach actions to all objects in a form? In-Reply-To: References: Message-ID: <40E58A41.8080600@economisa.com.br> Shawn, I know why. ^^ The onclick of the submit is receiving this: function(){objEl.disabled = true;} And when the event (onclick) occurs /objEl/ points to the last submit in the form, and that's the one that is going to be disabled, I changed to _this_: function(){this.disabled = true;} And it worked fine here. Ps.: I found no reason to comment these lines.. // var objEl = null; // var x = 0; Hope to Help, --- Flavio Gomes flavio at economisa.com.br Troy III Ajnej wrote: > > Try this: > ------------------------------------------------------------- > var objForm = document.forms['thisForm']; > // var objEl = null; > // var x = 0; > ------------------------------------------------------------ > regards Bekim > >> From: shawn_milochik at godivachoc.com >> Reply-To: "[JavaScript List]" >> To: javascript at LaTech.edu >> Subject: Re: [Javascript] attach actions to all objects in a form? >> Date: Fri, 2 Jul 2004 08:16:21 -0400 >> >> >> >> >> >> Follow up: >> >> I have it working, but now it is always disabling the same button, >> no matter which was pressed. Any ideas? >> >> Thanks, >> Shawn >> >> --------------------------- >> code >> --------------------------- >> >> >> >> -------------------------------- >> End of code. >> -------------------------------- >> >> >> >> >> >> christ at saeweb.com >> Sent by: >> >> javascript-bounce To >> s at LaTech.edu javascript at LaTech.edu >> >> cc >> >> 05/26/2004 02:37 >> Subject >> PM Re: [Javascript] attach >> actions to >> all objects in a form? >> >> Please respond to >> javascript at LaTech >> .edu >> >> >> >> >> >> >> I've never personally used addEventListener, but would something like >> this >> work? >> >> ====================== >> >> var objForm = document.forms["formName"] >> var objEl = null >> for(var x = 0; x < objForm.elements.length; x++){ >> objEl = objForm.elements[x] >> objEl.onclick = captureAllClicks >> // which should also be able to be written as: >> // objEl.onclick = function(){ >> // Some code in here >> //} >> } >> >> function captureAllClicks(){ >> // I'm confused on why you're passing in textbox in >> // your original code so I don't know how you would >> // write this function so that it works properly >> } >> >> ====================== >> >> >> I really should test this code before sending, but... >> >> :) >> >> Chris Tifer >> >> >> ----- Original Message ----- >> From: "Roger Roelofs" >> To: "[JavaScript List]" >> Sent: Wednesday, May 26, 2004 2:12 PM >> Subject: Re: [Javascript] attach actions to all objects in a form? >> >> >> > Shawn, >> > >> > On May 26, 2004, at 1:52 PM, Shawn Milo wrote: >> > >> > > Is there a way to write an onclick function, or something >> > > similar, so that it applies to all objects on a form? >> >> > > >> >> > Yes, >> > >> > /// setup >> > var el = document.getElementById("theContainer"); >> > if (el) { >> > if( el.addEventListener ) { >> > el.addEventListener("click", clickableTableRowClick, false); >> > } else { >> > if(el.attachEvent) { >> > el.attachEvent("onclick", clickableTableRowClick); >> > } else { >> > el.onclick = clickableTableRowClick; >> > } >> > } >> > } >> > >> > // callback routine >> > function clickableTableRowClick(evt) { >> > var targ, oldRow; >> > if (!evt) evt = window.event; >> > if (evt.target) targ = evt.target; >> > else if (evt.srcElement) targ = evt.srcElement; >> > ... >> > do what you want with the target element > From shawn_milochik at godivachoc.com Fri Jul 2 11:59:00 2004 From: shawn_milochik at godivachoc.com (shawn_milochik at godivachoc.com) Date: Fri, 2 Jul 2004 12:59:00 -0400 Subject: [Javascript] attach actions to all objects in a form? In-Reply-To: <40E58A41.8080600@economisa.com.br> Message-ID: Thanks very much. Actually, I ended up having the function loop through the form and disable any object of type "submit". That's what I wanted to do in the first place, but I thought I'd do it incrementally (just one button, at first,) because I had never used this kind of Javascript functionality before ( objEl.onclick = ). Shawn flavio at economisa. com.br Sent by: To javascript-bounce javascript at LaTech.edu s at LaTech.edu cc Subject 07/02/2004 01:16 Re: [Javascript] attach actions to PM all objects in a form? Please respond to javascript at LaTech .edu Shawn, I know why. ^^ The onclick of the submit is receiving this: function(){objEl.disabled = true;} And when the event (onclick) occurs /objEl/ points to the last submit in the form, and that's the one that is going to be disabled, I changed to _this_: function(){this.disabled = true;} And it worked fine here. Ps.: I found no reason to comment these lines.. // var objEl = null; // var x = 0; Hope to Help, --- Flavio Gomes flavio at economisa.com.br Troy III Ajnej wrote: > > Try this: > ------------------------------------------------------------- > var objForm = document.forms['thisForm']; > // var objEl = null; > // var x = 0; > ------------------------------------------------------------ > regards Bekim > >> From: shawn_milochik at godivachoc.com >> Reply-To: "[JavaScript List]" >> To: javascript at LaTech.edu >> Subject: Re: [Javascript] attach actions to all objects in a form? >> Date: Fri, 2 Jul 2004 08:16:21 -0400 >> >> >> >> >> >> Follow up: >> >> I have it working, but now it is always disabling the same button, >> no matter which was pressed. Any ideas? >> >> Thanks, >> Shawn >> >> --------------------------- >> code >> --------------------------- >> >> >> >> -------------------------------- >> End of code. >> -------------------------------- >> >> >> >> >> >> christ at saeweb.com >> Sent by: >> >> javascript-bounce To >> s at LaTech.edu javascript at LaTech.edu >> >> cc >> >> 05/26/2004 02:37 >> Subject >> PM Re: [Javascript] attach >> actions to >> all objects in a form? >> >> Please respond to >> javascript at LaTech >> .edu >> >> >> >> >> >> >> I've never personally used addEventListener, but would something like >> this >> work? >> >> ====================== >> >> var objForm = document.forms["formName"] >> var objEl = null >> for(var x = 0; x < objForm.elements.length; x++){ >> objEl = objForm.elements[x] >> objEl.onclick = captureAllClicks >> // which should also be able to be written as: >> // objEl.onclick = function(){ >> // Some code in here >> //} >> } >> >> function captureAllClicks(){ >> // I'm confused on why you're passing in textbox in >> // your original code so I don't know how you would >> // write this function so that it works properly >> } >> >> ====================== >> >> >> I really should test this code before sending, but... >> >> :) >> >> Chris Tifer >> >> >> ----- Original Message ----- >> From: "Roger Roelofs" >> To: "[JavaScript List]" >> Sent: Wednesday, May 26, 2004 2:12 PM >> Subject: Re: [Javascript] attach actions to all objects in a form? >> >> >> > Shawn, >> > >> > On May 26, 2004, at 1:52 PM, Shawn Milo wrote: >> > >> > > Is there a way to write an onclick function, or something >> > > similar, so that it applies to all objects on a form? >> >> > > >> >> > Yes, >> > >> > /// setup >> > var el = document.getElementById("theContainer"); >> > if (el) { >> > if( el.addEventListener ) { >> > el.addEventListener("click", clickableTableRowClick, false); >> > } else { >> > if(el.attachEvent) { >> > el.attachEvent("onclick", clickableTableRowClick); >> > } else { >> > el.onclick = clickableTableRowClick; >> > } >> > } >> > } >> > >> > // callback routine >> > function clickableTableRowClick(evt) { >> > var targ, oldRow; >> > if (!evt) evt = window.event; >> > if (evt.target) targ = evt.target; >> > else if (evt.srcElement) targ = evt.srcElement; >> > ... >> > do what you want with the target element > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript ********************************************************************** This e-mail and any files transmitted with it may contain confidential information and is intended solely for use by the individual to whom it is addressed. If you received this e-mail in error, please notify the sender, do not disclose its contents to others and delete it from your system. ********************************************************************** From flavio at economisa.com.br Fri Jul 2 12:21:52 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Fri, 02 Jul 2004 14:21:52 -0300 Subject: [Javascript] attach actions to all objects in a form? In-Reply-To: References: Message-ID: <40E599B0.3050305@economisa.com.br> Shawn, By your reply, I didnt understood if you made it or not, but I think that now I did what you wanted: ===========//=========== function setEvents(){ //check to see if the form has //loaded yet if (document.forms['thisForm']){ var objForm = document.forms['thisForm']; var objEl = null; var x = 0; var LittoSubmitses = new Array(); var a = 0; //for each element on the form for (x=0; objForm[x]; x++){ objEl = objForm[x]; //if it is a submit button, //set it to be disabled onclick if (objEl.type == 'submit'){ LittoSubmitses[a++] = objEl; objEl.onclick = function(){for(jj=0;LittoSubmitses[jj];jj++) LittoSubmitses[jj].disabled = true} } } //if the form didn't load yet, re-schedule //this function call }else{ setTimeout('setEvents()', 5000); } } setEvents(); ===========//=========== Changes: LittoSubmitses is an array that contais all submits from the form; a is only a count to iterate over LittoSubmitses; Ps.: I love my variable names... u.u --- Flavio Gomes flavio at economisa.com.br shawn_milochik at godivachoc.com wrote: > > >Thanks very much. Actually, I ended up having the function loop through >the >form and disable any object of type "submit". That's what I wanted to do >in the >first place, but I thought I'd do it incrementally (just one button, at >first,) because >I had never used this kind of Javascript functionality before ( >objEl.onclick = ). > >Shawn > > > > > > flavio at economisa. > com.br > Sent by: To > javascript-bounce javascript at LaTech.edu > s at LaTech.edu cc > > Subject > 07/02/2004 01:16 Re: [Javascript] attach actions to > PM all objects in a form? > > > Please respond to > javascript at LaTech > .edu > > > > > > > >Shawn, > I know why. ^^ > >The onclick of the submit is receiving this: > function(){objEl.disabled = true;} > > And when the event (onclick) occurs /objEl/ points to the last submit >in the form, and that's the one that is going to be disabled, I changed >to _this_: > function(){this.disabled = true;} > >And it worked fine here. > >Ps.: I found no reason to comment these lines.. > // var objEl = null; > // var x = 0; > >Hope to Help, > >--- >Flavio Gomes >flavio at economisa.com.br > > > >Troy III Ajnej wrote: > > > >>Try this: >>------------------------------------------------------------- >> var objForm = document.forms['thisForm']; >> // var objEl = null; >> // var x = 0; >>------------------------------------------------------------ >>regards Bekim >> >> >> >>>From: shawn_milochik at godivachoc.com >>>Reply-To: "[JavaScript List]" >>>To: javascript at LaTech.edu >>>Subject: Re: [Javascript] attach actions to all objects in a form? >>>Date: Fri, 2 Jul 2004 08:16:21 -0400 >>> >>> >>> >>> >>> >>>Follow up: >>> >>>I have it working, but now it is always disabling the same button, >>>no matter which was pressed. Any ideas? >>> >>>Thanks, >>>Shawn >>> >>>--------------------------- >>>code >>>--------------------------- >>> >>> >>> >>>-------------------------------- >>>End of code. >>>-------------------------------- >>> >>> >>> >>> >>> >>> christ at saeweb.com >>> Sent by: >>> >>>javascript-bounce To >>> s at LaTech.edu javascript at LaTech.edu >>> >>>cc >>> >>> 05/26/2004 02:37 >>>Subject >>> PM Re: [Javascript] attach >>>actions to >>> all objects in a form? >>> >>> Please respond to >>> javascript at LaTech >>> .edu >>> >>> >>> >>> >>> >>> >>>I've never personally used addEventListener, but would something like >>>this >>>work? >>> >>>====================== >>> >>>var objForm = document.forms["formName"] >>>var objEl = null >>>for(var x = 0; x < objForm.elements.length; x++){ >>> objEl = objForm.elements[x] >>> objEl.onclick = captureAllClicks >>> // which should also be able to be written as: >>> // objEl.onclick = function(){ >>> // Some code in here >>> //} >>>} >>> >>>function captureAllClicks(){ >>> // I'm confused on why you're passing in textbox in >>> // your original code so I don't know how you would >>> // write this function so that it works properly >>>} >>> >>>====================== >>> >>> >>>I really should test this code before sending, but... >>> >>>:) >>> >>>Chris Tifer >>> >>> >>>----- Original Message ----- >>>From: "Roger Roelofs" >>>To: "[JavaScript List]" >>>Sent: Wednesday, May 26, 2004 2:12 PM >>>Subject: Re: [Javascript] attach actions to all objects in a form? >>> >>> >>> >>> >>>>Shawn, >>>> >>>>On May 26, 2004, at 1:52 PM, Shawn Milo wrote: >>>> >>>> >>>> >>>>>Is there a way to write an onclick function, or something >>>>>similar, so that it applies to all objects on a form? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>Yes, >>>> >>>>/// setup >>>>var el = document.getElementById("theContainer"); >>>>if (el) { >>>>if( el.addEventListener ) { >>>>el.addEventListener("click", clickableTableRowClick, false); >>>>} else { >>>>if(el.attachEvent) { >>>>el.attachEvent("onclick", clickableTableRowClick); >>>>} else { >>>>el.onclick = clickableTableRowClick; >>>>} >>>>} >>>>} >>>> >>>>// callback routine >>>>function clickableTableRowClick(evt) { >>>>var targ, oldRow; >>>> if (!evt) evt = window.event; >>>> if (evt.target) targ = evt.target; >>>> else if (evt.srcElement) targ = evt.srcElement; >>>>... >>>>do what you want with the target element >>>> >>>> From shawn_milochik at godivachoc.com Fri Jul 2 12:40:37 2004 From: shawn_milochik at godivachoc.com (shawn_milochik at godivachoc.com) Date: Fri, 2 Jul 2004 13:40:37 -0400 Subject: [Javascript] attach actions to all objects in a form? In-Reply-To: <40E599B0.3050305@economisa.com.br> Message-ID: Yeah, I did get it to do what I wanted. Thanks again for spending the time on it. I guess I had a hard time getting this to work because I couldn't figure out how to work a regex into the function... ;o) Shawn flavio at economisa. com.br Sent by: To javascript-bounce javascript at LaTech.edu s at LaTech.edu cc Subject 07/02/2004 02:21 Re: [Javascript] attach actions to PM all objects in a form? Please respond to javascript at LaTech .edu Shawn, By your reply, I didnt understood if you made it or not, but I think that now I did what you wanted: ===========//=========== function setEvents(){ //check to see if the form has //loaded yet if (document.forms['thisForm']){ var objForm = document.forms['thisForm']; var objEl = null; var x = 0; var LittoSubmitses = new Array(); var a = 0; //for each element on the form for (x=0; objForm[x]; x++){ objEl = objForm[x]; //if it is a submit button, //set it to be disabled onclick if (objEl.type == 'submit'){ LittoSubmitses[a++] = objEl; objEl.onclick = function(){for(jj=0;LittoSubmitses[jj];jj++) LittoSubmitses[jj].disabled = true} } } //if the form didn't load yet, re-schedule //this function call }else{ setTimeout('setEvents()', 5000); } } setEvents(); ===========//=========== Changes: LittoSubmitses is an array that contais all submits from the form; a is only a count to iterate over LittoSubmitses; Ps.: I love my variable names... u.u --- Flavio Gomes flavio at economisa.com.br shawn_milochik at godivachoc.com wrote: > > >Thanks very much. Actually, I ended up having the function loop through >the >form and disable any object of type "submit". That's what I wanted to do >in the >first place, but I thought I'd do it incrementally (just one button, at >first,) because >I had never used this kind of Javascript functionality before ( >objEl.onclick = ). > >Shawn > > > > > > flavio at economisa. > com.br > Sent by: To > javascript-bounce javascript at LaTech.edu > s at LaTech.edu cc > > Subject > 07/02/2004 01:16 Re: [Javascript] attach actions to > PM all objects in a form? > > > Please respond to > javascript at LaTech > .edu > > > > > > > >Shawn, > I know why. ^^ > >The onclick of the submit is receiving this: > function(){objEl.disabled = true;} > > And when the event (onclick) occurs /objEl/ points to the last submit >in the form, and that's the one that is going to be disabled, I changed >to _this_: > function(){this.disabled = true;} > >And it worked fine here. > >Ps.: I found no reason to comment these lines.. > // var objEl = null; > // var x = 0; > >Hope to Help, > >--- >Flavio Gomes >flavio at economisa.com.br > > > >Troy III Ajnej wrote: > > > >>Try this: >>------------------------------------------------------------- >> var objForm = document.forms['thisForm']; >> // var objEl = null; >> // var x = 0; >>------------------------------------------------------------ >>regards Bekim >> >> >> >>>From: shawn_milochik at godivachoc.com >>>Reply-To: "[JavaScript List]" >>>To: javascript at LaTech.edu >>>Subject: Re: [Javascript] attach actions to all objects in a form? >>>Date: Fri, 2 Jul 2004 08:16:21 -0400 >>> >>> >>> >>> >>> >>>Follow up: >>> >>>I have it working, but now it is always disabling the same button, >>>no matter which was pressed. Any ideas? >>> >>>Thanks, >>>Shawn >>> >>>--------------------------- >>>code >>>--------------------------- >>> >>> >>> >>>-------------------------------- >>>End of code. >>>-------------------------------- >>> >>> >>> >>> >>> >>> christ at saeweb.com >>> Sent by: >>> >>>javascript-bounce To >>> s at LaTech.edu javascript at LaTech.edu >>> >>>cc >>> >>> 05/26/2004 02:37 >>>Subject >>> PM Re: [Javascript] attach >>>actions to >>> all objects in a form? >>> >>> Please respond to >>> javascript at LaTech >>> .edu >>> >>> >>> >>> >>> >>> >>>I've never personally used addEventListener, but would something like >>>this >>>work? >>> >>>====================== >>> >>>var objForm = document.forms["formName"] >>>var objEl = null >>>for(var x = 0; x < objForm.elements.length; x++){ >>> objEl = objForm.elements[x] >>> objEl.onclick = captureAllClicks >>> // which should also be able to be written as: >>> // objEl.onclick = function(){ >>> // Some code in here >>> //} >>>} >>> >>>function captureAllClicks(){ >>> // I'm confused on why you're passing in textbox in >>> // your original code so I don't know how you would >>> // write this function so that it works properly >>>} >>> >>>====================== >>> >>> >>>I really should test this code before sending, but... >>> >>>:) >>> >>>Chris Tifer >>> >>> >>>----- Original Message ----- >>>From: "Roger Roelofs" >>>To: "[JavaScript List]" >>>Sent: Wednesday, May 26, 2004 2:12 PM >>>Subject: Re: [Javascript] attach actions to all objects in a form? >>> >>> >>> >>> >>>>Shawn, >>>> >>>>On May 26, 2004, at 1:52 PM, Shawn Milo wrote: >>>> >>>> >>>> >>>>>Is there a way to write an onclick function, or something >>>>>similar, so that it applies to all objects on a form? >>>>> >>>>> >>>>> >>>>> >>>>> >>>>Yes, >>>> >>>>/// setup >>>>var el = document.getElementById("theContainer"); >>>>if (el) { >>>>if( el.addEventListener ) { >>>>el.addEventListener("click", clickableTableRowClick, false); >>>>} else { >>>>if(el.attachEvent) { >>>>el.attachEvent("onclick", clickableTableRowClick); >>>>} else { >>>>el.onclick = clickableTableRowClick; >>>>} >>>>} >>>>} >>>> >>>>// callback routine >>>>function clickableTableRowClick(evt) { >>>>var targ, oldRow; >>>> if (!evt) evt = window.event; >>>> if (evt.target) targ = evt.target; >>>> else if (evt.srcElement) targ = evt.srcElement; >>>>... >>>>do what you want with the target element >>>> >>>> _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript ********************************************************************** This e-mail and any files transmitted with it may contain confidential information and is intended solely for use by the individual to whom it is addressed. If you received this e-mail in error, please notify the sender, do not disclose its contents to others and delete it from your system. ********************************************************************** From dev at qroute.net Fri Jul 2 18:31:25 2004 From: dev at qroute.net (dev at qroute.net) Date: Fri, 2 Jul 2004 16:31:25 -0700 Subject: [Javascript] How do you return more than one values from a function ? References: <40E599B0.3050305@economisa.com.br> Message-ID: <021b01c4608c$b1420b80$0e859bcf@mustafa> Is byref allowed in JS ? function isValidEmail(emailStr, byref reason) { reason='abc' return false // is something like this possible } From paul at novitskisoftware.com Fri Jul 2 20:36:44 2004 From: paul at novitskisoftware.com (Paul Novitski) Date: Fri, 02 Jul 2004 18:36:44 -0700 Subject: [Javascript] How do you return more than one values from a function ? In-Reply-To: <021b01c4608c$b1420b80$0e859bcf@mustafa> References: <40E599B0.3050305@economisa.com.br> <021b01c4608c$b1420b80$0e859bcf@mustafa> Message-ID: <6.0.1.1.2.20040702174556.02049ec0@spamarrest.com> At 04:31 PM 7/2/2004, dev at qroute.net wrote: >Is byref allowed in JS ? > >function isValidEmail(emailStr, byref reason) >{ > reason='abc' > return false > // is something like this possible >} Not the way you've shown, but your goal of modifying multiple variables with a single function call is possible using other methods. All arguments to JavaScript functions are passed by value; if a function attempts to modify an argument, the variable passed by the calling script is unchanged: function CallingFunction() { var i = 5; DoIt(i); alert("i = " + i); } function DoIt(argI) { argI = 10; } Result: i = 5 (unchanged) However, here are three ways you can get a function to modify multiple values, perceivable by the calling script: 1) Declare global variables and pass them to a function that receives the values but modifies the global variables: // we're not inside a function, so these variables are global: var globalI = 5; var globalJ = 7; ModifyGlobals(globalI, globalJ); alert("globalI = " + globalI); alert("globalJ = " + globalJ); function ModifyGlobals(argI, argJ) { globalI = argI * 1234567; globalJ = argJ - 2.3; } This has the appearance of modifying arguments passed by reference but really doesn't. 2) Return an array of values. (I'm using named array members here, but numerically indexed elements work the same.) function CallingFunction() { var a = new Array(); a.flies = 3; a.frogs = 5; a = ChangeValues(a); alert("flies = " + a.flies); alert("frogs = " + a.frogs); } function ChangeValues(argArray) { argArray.flies = 23; argArray.frogs = 11; return argArray; } 3) Similar to example 2 but using object constructor syntax, so that the properties of the new object are globally visible: function CallingFunction() { var oResult = new Venusian(3, 7); alert("eyes = " + oResult.eyes); alert("tentacles = " + oResult.tentacles); } function Venusian(argEyes, argTentacles) { this.eyes = argEyes * 3; this.tentacles = argTentacles * 7; } Since a JavaScript array really is an object and can have named properties (elements), there's probably no need to go beyond example 2) unless you do need a new object with custom functions built in. Regards, Paul From dagda1 at hotmail.com Mon Jul 5 03:58:45 2004 From: dagda1 at hotmail.com (Paul Cowan) Date: Mon, 05 Jul 2004 08:58:45 +0000 Subject: [Javascript] HTML DOM+ XPath + JavaScript Message-ID: Hi, Does anyone know if it is possible to use the XPath expressions through JavaScript in order to navigate the HTML DOM or is it only possible to use the DOM API? Thanks Paul From clanmesa at earthlink.net Mon Jul 5 14:36:12 2004 From: clanmesa at earthlink.net (Theresa Mesa) Date: Mon, 5 Jul 2004 12:36:12 -0700 Subject: [Javascript] OT: Intro Message-ID: <927128F8-CEBA-11D8-A5F0-000A957B06DC@earthlink.net> Just a quick hello-I'm new to javascript and web design, but I have 25 years of experience in graphic design, etc. My background is also in fine art (I used to be a portraitist, until the arthritis in my hands made me keep dropping the brush). I start an Intro to Java class next week, so I look forward to learning from all of you. Theresa Mesa Mesa Design House www.mesadesignhouse.com webmaster at mesadesignhouse.com From flavio at economisa.com.br Mon Jul 5 14:50:13 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Mon, 05 Jul 2004 16:50:13 -0300 Subject: [Javascript] OT: Intro In-Reply-To: <927128F8-CEBA-11D8-A5F0-000A957B06DC@earthlink.net> References: <927128F8-CEBA-11D8-A5F0-000A957B06DC@earthlink.net> Message-ID: <40E9B0F5.3050209@economisa.com.br> Welcome to our List, Theresa! ^^ Hope you enjoy working and studying with us. --- Flavio Gomes flavio at economisa.com.br Theresa Mesa wrote: > Just a quick hello-I'm new to javascript and web design, but I have 25 > years of experience in graphic design, etc. My background is also in > fine art (I used to be a portraitist, until the arthritis in my hands > made me keep dropping the brush). I start an Intro to Java class next > week, so I look forward to learning from all of you. > > Theresa Mesa > Mesa Design House > www.mesadesignhouse.com > webmaster at mesadesignhouse.com From java.script at seacrets.com Mon Jul 5 14:58:31 2004 From: java.script at seacrets.com (Cutter (JavaScript List)) Date: Mon, 05 Jul 2004 15:58:31 -0400 Subject: [Javascript] OT: Intro In-Reply-To: <927128F8-CEBA-11D8-A5F0-000A957B06DC@earthlink.net> References: <927128F8-CEBA-11D8-A5F0-000A957B06DC@earthlink.net> Message-ID: <40E9B2E7.5010307@seacrets.com> Theresa, Hi, thanks for the intro. Sounds like you fall into the "seniors learning to program" classification ("seniors" seems to be 25+ in geek speak;) We welcome you to the list, it is a great resource with many fine contributors and very little BS. Just one note to make to your original message: If you are looking for info on Java programming you may want to search for another list to subscribe to as well. Java is a higher level compiled programming language, whereas JavaScript is a lower level scripting language. Both have their merits in differing situations, but they are distinctly different. Thought you might want a heads up. Cheers;) Cutter Theresa Mesa wrote: > Just a quick hello-I'm new to javascript and web design, but I have 25 > years of experience in graphic design, etc. My background is also in > fine art (I used to be a portraitist, until the arthritis in my hands > made me keep dropping the brush). I start an Intro to Java class next > week, so I look forward to learning from all of you. > > Theresa Mesa > Mesa Design House > www.mesadesignhouse.com > webmaster at mesadesignhouse.com > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From clanmesa at earthlink.net Mon Jul 5 16:09:39 2004 From: clanmesa at earthlink.net (Theresa Mesa) Date: Mon, 5 Jul 2004 14:09:39 -0700 Subject: [Javascript] OT: Intro In-Reply-To: <40E9B0F5.3050209@economisa.com.br> References: <927128F8-CEBA-11D8-A5F0-000A957B06DC@earthlink.net> <40E9B0F5.3050209@economisa.com.br> Message-ID: Thank you to all who greeted me! Glad to be here! Theresa Mesa Mesa Design House www.mesadesignhouse.com webmaster at mesadesignhouse.com On Jul 5, 2004, at 12:50 PM, Flavio Gomes wrote: > Welcome to our List, Theresa! ^^ > > Hope you enjoy working and studying with us. > From clanmesa at earthlink.net Mon Jul 5 16:21:32 2004 From: clanmesa at earthlink.net (Theresa Mesa) Date: Mon, 5 Jul 2004 14:21:32 -0700 Subject: [Javascript] OT: Intro In-Reply-To: <40E9B2E7.5010307@seacrets.com> References: <927128F8-CEBA-11D8-A5F0-000A957B06DC@earthlink.net> <40E9B2E7.5010307@seacrets.com> Message-ID: <49D5971C-CEC9-11D8-A5F0-000A957B06DC@earthlink.net> Dang. You know what? I know the difference. The class is Intro to Javascripting, not Java. My bad. ;-) For an old fart (I'm 46 AND female--much in the minority), I'm pretty techie. Know my way around InDesign and now Photoshop, and I'm taking a class in Illustrator right now (a lot easier than I thought it'd be). Next week I start Intro to PHP, Intro to CSS (my web design class's section on CSS was pathetic)--yes, I know about the css-d list, Intro to Javascripting, and SEO (Search Engine Optimization)-The Write Way. Of course, I was hand-coding text on a Compugraphic typesetting station in 1979-80--probably before SGML was a glimmer in someone's eye. I'm picking up on stuff real fast, and enjoy coding. I'm working on a Mac--Panther 1-.3.4--and I know enough to stay out of and get out of trouble abut 98% of the time. Used to have a PC, but went back to the Mac, which I've been using since 1984. This'll probably be the last you hear of me for a while. I'll be reading and learning and running my graphic and web design biz. My husband is a Webmaster who is also taking a Javascripting course at the local college in the fall (as will I, for the credits)--assuming it doesn't get cancelled for the 4th year in a row. I know enough about Javascript to be really, really dangerous, that's how little I know (my web design class's section on Javascript was equally pathetic). Once I start actually compiling code, you'll hear from me and my husband. Theresa Mesa Mesa Design House www.mesadesignhouse.com webmaster at mesadesignhouse.com On Jul 5, 2004, at 12:58 PM, Cutter (JavaScript List) wrote: > Theresa, > > Hi, thanks for the intro. Sounds like you fall into the "seniors > learning to program" classification ("seniors" seems to be 25+ in geek > speak;) We welcome you to the list, it is a great resource with many > fine contributors and very little BS. Just one note to make to your > original message: If you are looking for info on Java programming you > may want to search for another list to subscribe to as well. Java is a > higher level compiled programming language, whereas JavaScript is a > lower level scripting language. Both have their merits in differing > situations, but they are distinctly different. Thought you might want > a heads up. Cheers;) > > Cutter > > Theresa Mesa wrote: > >> Just a quick hello-I'm new to javascript and web design, but I have >> 25 years of experience in graphic design, etc. My background is also >> in fine art (I used to be a portraitist, until the arthritis in my >> hands made me keep dropping the brush). I start an Intro to Java >> class next week, so I look forward to learning from all of you. >> >> Theresa Mesa >> Mesa Design House >> www.mesadesignhouse.com >> webmaster at mesadesignhouse.com >> >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From spindrift at oceanfree.net Tue Jul 6 09:12:59 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Tue, 6 Jul 2004 15:12:59 +0100 Subject: [Javascript] Click on scrollbar ? References: Message-ID: <008301c46363$7254f8e0$4eae02d4@ic7g> document.onmousedown = butPress function butPress() { var temp = event.srcElement.name } How can I trap/identify when someone has clicked on a scrollbar? temp just returns undefined. Tim in Ireland. From shawn_milochik at godivachoc.com Tue Jul 6 09:33:19 2004 From: shawn_milochik at godivachoc.com (shawn_milochik at godivachoc.com) Date: Tue, 6 Jul 2004 10:33:19 -0400 Subject: [Javascript] Click on scrollbar ? In-Reply-To: <008301c46363$7254f8e0$4eae02d4@ic7g> Message-ID: Instead of 'name', maybe try 'id' or 'type'. Or, maybe loop through the elements in the document and compare with '=='. (Untested. I'm sure that someone else will reply if there is a better way to do it.) Shawn spindrift at oceanfr ee.net Sent by: To javascript-bounce javascript at LaTech.edu s at LaTech.edu cc Subject 07/06/2004 10:12 [Javascript] Click on scrollbar ? AM Please respond to javascript at LaTech .edu document.onmousedown = butPress function butPress() { var temp = event.srcElement.name } How can I trap/identify when someone has clicked on a scrollbar? temp just returns undefined. Tim in Ireland. _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript ********************************************************************** This e-mail and any files transmitted with it may contain confidential information and is intended solely for use by the individual to whom it is addressed. If you received this e-mail in error, please notify the sender, do not disclose its contents to others and delete it from your system. ********************************************************************** From LaurentM at london.virgin.net Tue Jul 6 09:49:38 2004 From: LaurentM at london.virgin.net (Laurent Muchacho) Date: Tue, 6 Jul 2004 15:49:38 +0100 Subject: [Javascript] Click on scrollbar ? Message-ID: <1A847600F409D711B52C0001FAFFF337046F6229@VNETXU01> Hi Tim, if you just alert event.srcElement it return alert then I thought I could loop the object then I built this into your function I put a few link at the bottom who might help function launch_debug_window(htmlStr){ var str = ""; str += 'Virgin.net Webmail Help' + ''+ htmlStr +'' + ''; var newWin = window.open('','debugWindow','width=350,height=410,resizable=yes,status=no,l ocation=no,menubar=no,scrollbars=yes'); newWin.document.open(); newWin.document.write(str); newWin.document.close(); newWin.focus(); } document.onmousedown = butPress function butPress() { var str=""; for(var prop in event.srcElement){ str += " " + prop + " is " + event.srcElement[prop] + ";
\n" } launch_debug_window(str); } this might help sorry it's only IE http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/doscroll.a sp http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollWidth.htm http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollTop.htm -----Original Message----- From: Tim Makins [mailto:spindrift at oceanfree.net] Sent: 06 July 2004 15:13 To: [JavaScript List] Subject: [Javascript] Click on scrollbar ? document.onmousedown = butPress function butPress() { var temp = event.srcElement.name } How can I trap/identify when someone has clicked on a scrollbar? temp just returns undefined. Tim in Ireland. _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript This E-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this E-mail. From ScottHam at clientlogic.com Tue Jul 6 10:18:51 2004 From: ScottHam at clientlogic.com (Scott Hamm) Date: Tue, 6 Jul 2004 11:18:51 -0400 Subject: [Javascript] MouseOver changes Background Message-ID: <48A8BDD0DC72F3458A713242E3848AAD07B84761@L001N14> I got a list of colors and would like to write JavaScript that changes background when mouse hoovers over anchored link: My existing code is as follows: From peter at brunone.com Tue Jul 6 10:30:55 2004 From: peter at brunone.com (Peter Brunone) Date: Tue, 6 Jul 2004 08:30:55 -0700 Subject: [Javascript] MouseOver changes Background Message-ID: The background of the body, or the link, or something else? Original Message: >From: Scott Hamm >I got a list of colors and would like to write JavaScript that changes >background when mouse hoovers over anchored link: > >My existing code is as follows: > From peter at brunone.com Tue Jul 6 10:35:28 2004 From: peter at brunone.com (Peter Brunone) Date: Tue, 6 Jul 2004 08:35:28 -0700 Subject: [Javascript] How do you return more than one values from a function ? Message-ID: <190ef94b0e4348f1865f64c93352f85a@brunone.com> I would suggest either (a) altering a form field or global variable, or (b) returning an array of values. Cheers, Peter Brunone _______________ EasyListBox.com Original Message: >From: >Is byref allowed in JS ? > >function isValidEmail(emailStr, byref reason) >{ > reason='abc' > return false > // is something like this possible >} From ScottHam at clientlogic.com Tue Jul 6 10:45:56 2004 From: ScottHam at clientlogic.com (Scott Hamm) Date: Tue, 6 Jul 2004 11:45:56 -0400 Subject: [Javascript] MouseOver changes Background Message-ID: <48A8BDD0DC72F3458A713242E3848AAD07B84764@L001N14> to the body. > -----Original Message----- > From: javascript-bounces at LaTech.edu [SMTP:javascript-bounces at LaTech.edu] > On Behalf Of Peter Brunone > Sent: Tuesday, July 06, 2004 11:31 AM > To: javascript at LaTech.edu > Subject: re: [Javascript] MouseOver changes Background > > > The background of the body, or the link, or something else? > > Original Message: > >From: Scott Hamm > > >I got a list of colors and would like to write JavaScript that changes > >background when mouse hoovers over anchored link: > > > >My existing code is as follows: > > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Tue Jul 6 11:08:36 2004 From: peter at brunone.com (Peter Brunone) Date: Tue, 6 Jul 2004 09:08:36 -0700 Subject: [Javascript] MouseOver changes Background Message-ID: <93c993609cdf4a9ab88e765e394ec169@brunone.com> Add the following attributes to your link (I know this works in IE, but there may be a subtle change for the Mozilla DOM): onMouseOver="document.body.style.backgroundColor='lightgreen';" To set the color back, use the onMouseOut event handler. Of course you'll probably want to call a function from the event handlers and let the function do the color switching, but you get the idea. Cheers, Peter Original Message: >From: Scott Hamm >to the body. > >> -----Original Message----- >> From: javascript-bounces at LaTech.edu [SMTP:javascript-bounces at LaTech.edu] >> The background of the body, or the link, or something else? >> >> Original Message: >> >From: Scott Hamm >> >> >I got a list of colors and would like to write JavaScript that changes >> >background when mouse hoovers over anchored link: >> > >> >My existing code is as follows: >> > From flavio at economisa.com.br Tue Jul 6 11:24:02 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Tue, 06 Jul 2004 13:24:02 -0300 Subject: [Javascript] MouseOver changes Background In-Reply-To: <93c993609cdf4a9ab88e765e394ec169@brunone.com> References: <93c993609cdf4a9ab88e765e394ec169@brunone.com> Message-ID: <40EAD222.2000302@economisa.com.br> From his list I think he wants to treat each paragraph according to it's classname, so the problem I'm having is to find out the .className of the paragraph that the mouse just passed over, this code "works" but sometimes it brings an error of "oTarget has no properties", someone has an suggestion to improve it? =========//========= function checkClass(e) { document.title = y++; oTarget = e.relatedTarget; if (oTarget.tagName=='P') alert(oTarget.className); } onmouseover = checkClass; =========//========= .relatedTarget is according to mozilla DOM, for IE would it be .srcElement? --- Flavio Gomes flavio at economisa.com.br Peter Brunone wrote: >Add the following attributes to your link (I know this works in IE, but there may be a subtle change for the Mozilla DOM): > >onMouseOver="document.body.style.backgroundColor='lightgreen';" > > To set the color back, use the onMouseOut event handler. Of course you'll probably want to call a function from the event handlers and let the function do the color switching, but you get the idea. > >Cheers, > >Peter > >Original Message: > > >>From: Scott Hamm >> >> > > > >>to the body. >> >> >> >>>-----Original Message----- >>>From: javascript-bounces at LaTech.edu [SMTP:javascript-bounces at LaTech.edu] >>> >>> > > > >>> The background of the body, or the link, or something else? >>> >>>Original Message: >>> >>> >>>>From: Scott Hamm >>>> >>>> >>>>I got a list of colors and would like to write JavaScript that changes >>>>background when mouse hoovers over anchored link: >>>> >>>>My existing code is as follows: >>>> >>>> >>>> > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > From davecline at onebox.com Tue Jul 6 11:39:34 2004 From: davecline at onebox.com (davecline at onebox.com) Date: Tue, 06 Jul 2004 12:39:34 -0400 Subject: [Javascript] How do you return more than one values from afunction ? Message-ID: <html> <head> <script> //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function test(s){ var result = isValidEmail(s); alert('Here is the result of your email test\n' + result + '\n' + 'Now we\'ll pluck only the reason from the result object:\n' + 'Reason:' + result.reason ); } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function isValidEmail(emailStr){ if (emailStr == 'good at email.com') return {result:true,reason:''} else return {result:false,reason:'Your email is malformed.'} } //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Object.prototype.toString = function(){ var s = ''; for(var x in this){ if (x != 'undefined') s += x + ":" + this[x] + "\n"; } return s; } </script> </head> <body> <button onclick="test('good at email.com')">Good email</button><br/> <button onclick="test('bad at email.com')">Bad email</button><br/> </body> </html> -- Dave Cline davecline at gmail.com www.bangeye.com/ 801-636-5603 -----Original Message----- From: Peter Brunone Sent: Tue, 6 Jul 2004 08:35:28 -0700 To: Subject: re: [Javascript] How do you return more than one values from afunction ? I would suggest either (a) altering a form field or global variable, or (b) returning an array of values. Cheers, Peter Brunone _______________ EasyListBox.com Original Message: >From: >Is byref allowed in JS ? > >function isValidEmail(emailStr, byref reason) >{ > reason='abc' > return false > // is something like this possible >} _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From paul at novitskisoftware.com Tue Jul 6 12:04:18 2004 From: paul at novitskisoftware.com (Paul Novitski) Date: Tue, 06 Jul 2004 10:04:18 -0700 Subject: [Javascript] MouseOver changes Background In-Reply-To: <48A8BDD0DC72F3458A713242E3848AAD07B84761@L001N14> References: <48A8BDD0DC72F3458A713242E3848AAD07B84761@L001N14> Message-ID: <6.0.1.1.2.20040706094713.021dab20@spamarrest.com> At 08:18 AM 7/6/2004, Scott Hamm wrote: >I got a list of colors and would like to write JavaScript that changes >background when mouse hoovers over anchored link: > >My existing code is as follows: > Scott, I would change each anchor's "background" to "background-color" and I'd give your UL tag an id such as "ColorList" to make it easy to find. On page load, I'd walk the DOM assigning hover events to those links: function PageLoad() { // locate the list var oList = document.getElementById("ColorList"); // collection of links in the list var aAnchors = oList.getElementsByTagName("A"); // for each link, assign event for (var iA = 0; iA < aAnchors.length; iA++) { aAnchors[iA].onmouseover = SetPageColor; } } The onmouseover() function could look like this: function SetPageColor() { document.body.style.backgroundColor = this.style.backgroundColor; } Paul From dgee at freemarkets.com Tue Jul 6 12:54:40 2004 From: dgee at freemarkets.com (Gee, David) Date: Tue, 6 Jul 2004 13:54:40 -0400 Subject: [Javascript] HTML DOM+ XPath + JavaScript Message-ID: <3130867F4ED7FD48840C64C0448A77DB02E90E4E@USAPGHEVS01.fmkt.freemarkets.com> It's definitely possible with MSXML4 (Microsoft's latest XML parser), but I'm not so sure about earlier versions of MSXML, and I haven't seen any way to do it in other XML-enabled browsers like Safari or Mozilla. Download the MSXML4.0 SDK and the help file that comes bundled with it lists the methods which utilize Xpath expressions (ie. selectSingleNode). David -----Original Message----- From: Paul Cowan [mailto:dagda1 at hotmail.com] Sent: Monday, July 05, 2004 4:59 AM To: javascript at LaTech.edu Subject: [Javascript] HTML DOM+ XPath + JavaScript Hi, Does anyone know if it is possible to use the XPath expressions through JavaScript in order to navigate the HTML DOM or is it only possible to use the DOM API? Thanks Paul _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From davecline at onebox.com Tue Jul 6 14:09:09 2004 From: davecline at onebox.com (davecline at onebox.com) Date: Tue, 06 Jul 2004 15:09:09 -0400 Subject: [Javascript] HTML DOM+ XPath + JavaScript Message-ID: XPath (XSLTransformations) is built into the latest Mozilla. It's crippled but operational. Safari has XML but to my knowledge no XSLT capability. URL[http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=netscape.public.mozilla.layout.xslt] -- Dave Cline davecline at gmail.com www.bangeye.com/ 801-636-5603 -----Original Message----- From: Gee, David Sent: Tue, 6 Jul 2004 13:54:40 -0400 To: "[JavaScript List]" Subject: RE: [Javascript] HTML DOM+ XPath + JavaScript It's definitely possible with MSXML4 (Microsoft's latest XML parser), but I'm not so sure about earlier versions of MSXML, and I haven't seen any way to do it in other XML-enabled browsers like Safari or Mozilla. Download the MSXML4.0 SDK and the help file that comes bundled with it lists the methods which utilize Xpath expressions (ie. selectSingleNode). David -----Original Message----- From: Paul Cowan [mailto:dagda1 at hotmail.com] Sent: Monday, July 05, 2004 4:59 AM To: javascript at LaTech.edu Subject: [Javascript] HTML DOM+ XPath + JavaScript Hi, Does anyone know if it is possible to use the XPath expressions through JavaScript in order to navigate the HTML DOM or is it only possible to use the DOM API? Thanks Paul _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From dev at qroute.net Wed Jul 7 13:43:41 2004 From: dev at qroute.net (dev at qroute.net) Date: Wed, 7 Jul 2004 11:43:41 -0700 Subject: [Javascript] Disabling javascript prgrammatically for a single page References: Message-ID: <045d01c46452$531e5850$0e859bcf@mustafa> Is it possible to disable the javascript temporarily and programmatically using some browser directive ? I am using the xmlhttp to read html source of the external sites and doing some processing on their html structire for my own study sake. But they got some js code injected in their htmll so when I di response.write of thier code, that js code kicks their home page instead of staying on my asp page. So I have to do a response.write something to an effect that currently showing page will not run any js code. From dev at qroute.net Wed Jul 7 13:58:48 2004 From: dev at qroute.net (dev at qroute.net) Date: Wed, 7 Jul 2004 11:58:48 -0700 Subject: [Javascript] Setting the focus to form elements References: <045d01c46452$531e5850$0e859bcf@mustafa> Message-ID: <047801c46454$6fe86c30$0e859bcf@mustafa> Not all form elements can receive a focus, checkbox foir example. Do you have a trick to overcome that when you need to scroll to that element as a result of a form validation ? From trojani2000 at hotmail.com Wed Jul 7 14:13:38 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Wed, 07 Jul 2004 21:13:38 +0200 Subject: [Javascript] Setting the focus to form elements Message-ID: You don't scroll, you progressively TAB to it. or have you tried: somechckbox.focus() command through js, it will work 100% sure, but I never try-ed it. >From: >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: [Javascript] Setting the focus to form elements >Date: Wed, 7 Jul 2004 11:58:48 -0700 > >Not all form elements can receive a focus, checkbox foir example. Do you >have a trick to overcome that when you need to scroll to that element as a >result of a form validation ? > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From dev at qroute.net Wed Jul 7 14:22:47 2004 From: dev at qroute.net (dev at qroute.net) Date: Wed, 7 Jul 2004 12:22:47 -0700 Subject: [Javascript] Setting the focus to form elements References: Message-ID: <048901c46457$c97b2640$0e859bcf@mustafa> I think radio and select and checkboxes fail, their object set does not msupport the setfocus property. Tabbing will not halp. Imagine you fill out a form, you click submit, validation test reports country field left blank, if would be nice to set the focus to country by scrolling there autmatically. It's more user-friendly than telling user to find where the country is. ----- Original Message ----- From: "Troy III Ajnej" To: Sent: Wednesday, July 07, 2004 12:13 PM Subject: RE: [Javascript] Setting the focus to form elements > > You don't scroll, you progressively TAB to it. > or have you tried: somechckbox.focus() command through js, it will work 100% > sure, but I never try-ed it. > > >From: > >Reply-To: "[JavaScript List]" > >To: "[JavaScript List]" > >Subject: [Javascript] Setting the focus to form elements > >Date: Wed, 7 Jul 2004 11:58:48 -0700 > > > >Not all form elements can receive a focus, checkbox foir example. Do you > >have a trick to overcome that when you need to scroll to that element as a > >result of a form validation ? > > > >_______________________________________________ > >Javascript mailing list > >Javascript at LaTech.edu > >https://lists.LaTech.edu/mailman/listinfo/javascript > > _________________________________________________________________ > The new MSN 8: smart spam protection and 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From mdougherty at pbp.com Wed Jul 7 14:36:14 2004 From: mdougherty at pbp.com (Mike Dougherty) Date: Wed, 07 Jul 2004 15:36:14 -0400 Subject: [Javascript] Disabling javascript prgrammatically for a single page In-Reply-To: <045d01c46452$531e5850$0e859bcf@mustafa> Message-ID: before you response.write their code, replace "" with "-->" to basically turn all their script into HTML comments. Even slicker would be to use a regexp match on "" to kill everything in between - but i'm not that slick... On Wed, 7 Jul 2004 11:43:41 -0700 wrote: >Is it possible to disable the javascript temporarily and programmatically >using some browser directive ? > >I am using the xmlhttp to read html source of the external sites and doing >some processing on their html structire for my own study sake. > >But they got some js code injected in their htmll so when I di >response.write of thier code, that js code kicks their home page instead >of staying on my asp page. So I have to do a response.write something to >an effect that currently showing page will not run any js code. >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From allard-schripsema at procergs.rs.gov.br Wed Jul 7 15:06:57 2004 From: allard-schripsema at procergs.rs.gov.br (allard schripsema) Date: Wed, 7 Jul 2004 17:06:57 -0300 Subject: [Javascript] autoComplete in IE References: Message-ID: <002c01c4645d$f4ee2380$2c041cac@PROCERGS.REDERS> Hi All, In our project (big intranet aplication) we use IE, which has autocomplete. This causes some problems with validation of fieldformats etc as the normal events are not fired when using autocomplete (only onPropertyChange is fired as far as i know, and then you don?t know what object it came from...). Anybody knows how to solve the problem without disabling autocomplete? Thanks Allard From dev at qroute.net Wed Jul 7 16:42:18 2004 From: dev at qroute.net (dev at qroute.net) Date: Wed, 7 Jul 2004 14:42:18 -0700 Subject: [Javascript] Disabling javascript prgrammatically for asingle page References: Message-ID: <04b701c4646b$46bbd650$0e859bcf@mustafa> Smart suggestion. Same thing should apply to all onUnload, onLoad, onClick etc. That does it. ----- Original Message ----- From: "Mike Dougherty" To: "[JavaScript List]" Sent: Wednesday, July 07, 2004 12:36 PM Subject: Re: [Javascript] Disabling javascript prgrammatically for asingle page before you response.write their code, replace "" with "-->" to basically turn all their script into HTML comments. Even slicker would be to use a regexp match on "" to kill everything in between - but i'm not that slick... On Wed, 7 Jul 2004 11:43:41 -0700 wrote: >Is it possible to disable the javascript temporarily and programmatically >using some browser directive ? > >I am using the xmlhttp to read html source of the external sites and doing >some processing on their html structire for my own study sake. > >But they got some js code injected in their htmll so when I di >response.write of thier code, that js code kicks their home page instead >of staying on my asp page. So I have to do a response.write something to >an effect that currently showing page will not run any js code. >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From dev at qroute.net Wed Jul 7 18:29:23 2004 From: dev at qroute.net (dev at qroute.net) Date: Wed, 7 Jul 2004 16:29:23 -0700 Subject: [Javascript] Window.scroll References: <045d01c46452$531e5850$0e859bcf@mustafa> <047801c46454$6fe86c30$0e859bcf@mustafa> Message-ID: <04cd01c4647a$3c705900$0e859bcf@mustafa> When setting the focus to a form object, window automatically moves to that location. But, I would like the browser window to go about 75Px higher so The caption of that object can be visible too. How do I do that ? window.scrollto = window.scroll - 75 ?? From dev at qroute.net Wed Jul 7 20:20:12 2004 From: dev at qroute.net (dev at qroute.net) Date: Wed, 7 Jul 2004 18:20:12 -0700 Subject: [Javascript] How many seelct items have been selected References: <04b701c4646b$46bbd650$0e859bcf@mustafa> Message-ID: <04db01c46489$b7703da0$0e859bcf@mustafa> I wrote this function to cycle thro the options to find out how many selected or checked. function GetOptionCount(obj,objType) var numchecked=0; var returnVal = "" for(var x = 0; x < obj.length; x++){ if (objType=="select") { if(obj[x].selected) { //alert(obj[x].selected + '\n\n' + obj[x] + '\n\n' + x + 'value=' + obj[x].value) numchecked++; } } else { if(obj[x].checked) { numchecked++; } } } return numchecked; } But it reports count 1 as the selected count in the following select !... It reports the as the selected item. Any clue what could be happening ? Validation code is as follows; Height_Feet = GetOptionCount(window.document.aboutme.Height_Feet,"select") if (Height_Feet==0) { message = message + '\n' + 'Height [Feet] field is left blank.' ;donotsubmit = true; if (firstculprit == "" ) {firstculprit = 'Height_Feet' ;firstculpritobject = "s"}} Unfortunately, Height_Feet comes as 1 so although nothing is selected, my function still reports one is already selected. From dagda1 at hotmail.com Thu Jul 8 02:48:02 2004 From: dagda1 at hotmail.com (Paul Cowan) Date: Thu, 08 Jul 2004 07:48:02 +0000 Subject: [Javascript] Key selection Message-ID: Hi all, Is it possible for me be able to know when a combination of when the alt key and the down arrow key are pressed at the same time? Thanks Paul From LaurentM at london.virgin.net Thu Jul 8 03:43:22 2004 From: LaurentM at london.virgin.net (Laurent Muchacho) Date: Thu, 8 Jul 2004 09:43:22 +0100 Subject: [Javascript] Window.scroll Message-ID: <1A847600F409D711B52C0001FAFFF337046F6230@VNETXU01> Hi In this page you will find what you looking for NS http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/wi ndow.html#1203546 And if you interested about IE follow the link below http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/doscroll.a sp http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollWidth.htm http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/scrollTop.htm document.body.scrollLeft document.body.scrollTop Laurent -----Original Message----- From: dev at qroute.net [mailto:dev at qroute.net] Sent: 08 July 2004 00:29 To: [JavaScript List] Subject: [Javascript] Window.scroll When setting the focus to a form object, window automatically moves to that location. But, I would like the browser window to go about 75Px higher so The caption of that object can be visible too. How do I do that ? window.scrollto = window.scroll - 75 ?? _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript This E-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this E-mail in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this E-mail. From flavio at economisa.com.br Thu Jul 8 08:15:34 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Thu, 08 Jul 2004 10:15:34 -0300 Subject: [Javascript] How many seelct items have been selected In-Reply-To: <04db01c46489$b7703da0$0e859bcf@mustafa> References: <04b701c4646b$46bbd650$0e859bcf@mustafa> <04db01c46489$b7703da0$0e859bcf@mustafa> Message-ID: <40ED48F6.6080701@economisa.com.br> if (objType=="select") { for(y=0;obj[x][y];y++) if(obj[x][y].selected) { numchecked++; } } Syntax not tested, but that's the idea. Because each line on the select is a new object --- Flavio Gomes flavio at economisa.com.br dev at qroute.net wrote: >I wrote this function to cycle thro the options to find out how many >selected or checked. > >function GetOptionCount(obj,objType) > > > var numchecked=0; > var returnVal = "" > for(var x = 0; x < obj.length; x++){ > if (objType=="select") > { > if(obj[x].selected) > { > //alert(obj[x].selected + '\n\n' + obj[x] + '\n\n' + x + 'value=' + >obj[x].value) > numchecked++; > } > } > else > { > if(obj[x].checked) > { > numchecked++; > } > } > } > return numchecked; >} > > >But it reports count 1 as the selected count in the following select !... > > > > > >It reports the as the >selected item. >Any clue what could be happening ? > > >Validation code is as follows; > >Height_Feet = GetOptionCount(window.document.aboutme.Height_Feet,"select") >if (Height_Feet==0) { message = message + '\n' + 'Height [Feet] field is >left blank.' ;donotsubmit = true; if (firstculprit == "" ) {firstculprit = >'Height_Feet' ;firstculpritobject = "s"}} > >Unfortunately, Height_Feet comes as 1 so although nothing is selected, my >function still reports one is already selected. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > From wonsil at 4m-ent.com Thu Jul 8 08:20:38 2004 From: wonsil at 4m-ent.com (Mark Wonsil) Date: Thu, 8 Jul 2004 09:20:38 -0400 Subject: [Javascript] Key selection In-Reply-To: Message-ID: <20040708132256.A663F30ADA0@LaTech.edu> > Is it possible for me be able to know when a combination of > when the alt key > and the down arrow key are pressed at the same time? A Google search of JavaScript keypress yields many hits, including: http://www.devguru.com/Technologies/ecmascript/quickref/evhan_onKeyPress.htm l From flavio at economisa.com.br Thu Jul 8 08:21:00 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Thu, 08 Jul 2004 10:21:00 -0300 Subject: [Javascript] Key selection In-Reply-To: References: Message-ID: <40ED4A3C.1070805@economisa.com.br> something.onkeydown="document.title = event.shiftKey && event.altKey;" IE / Mozilla compatible (tested on FireFox 0.8) --- Flavio Gomes flavio at economisa.com.br Paul Cowan wrote: > Hi all, > > Is it possible for me be able to know when a combination of when the > alt key and the down arrow key are pressed at the same time? > > Thanks > > Paul > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From flavio at economisa.com.br Thu Jul 8 08:22:52 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Thu, 08 Jul 2004 10:22:52 -0300 Subject: [Javascript] Window.scroll In-Reply-To: <04cd01c4647a$3c705900$0e859bcf@mustafa> References: <045d01c46452$531e5850$0e859bcf@mustafa> <047801c46454$6fe86c30$0e859bcf@mustafa> <04cd01c4647a$3c705900$0e859bcf@mustafa> Message-ID: <40ED4AAC.2020204@economisa.com.br> Try setting the margin or padding(internal margin) (CSS) of the object to some different values.. negative values would to the trick. --- Flavio Gomes flavio at economisa.com.br dev at qroute.net wrote: >When setting the focus to a form object, window automatically moves to that >location. But, I would like the browser window to go about 75Px higher so >The caption of that object can be visible too. > >How do I do that ? >window.scrollto = window.scroll - 75 ?? > > From flavio at economisa.com.br Thu Jul 8 08:36:46 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Thu, 08 Jul 2004 10:36:46 -0300 Subject: [Javascript] Key selection In-Reply-To: <20040708132256.A663F30ADA0@LaTech.edu> References: <20040708132256.A663F30ADA0@LaTech.edu> Message-ID: <40ED4DEE.8090500@economisa.com.br> I dont' know about you guys, but here the mail came with a line break, check that in the url the extension is .html --- Flavio Gomes flavio at economisa.com.br Mark Wonsil wrote: > > > >>Is it possible for me be able to know when a combination of >>when the alt key >>and the down arrow key are pressed at the same time? >> >> > >A Google search of JavaScript keypress yields many hits, including: > >http://www.devguru.com/Technologies/ecmascript/quickref/evhan_onKeyPress.htm >l > > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > From wonsil at 4m-ent.com Thu Jul 8 09:03:48 2004 From: wonsil at 4m-ent.com (Mark Wonsil) Date: Thu, 8 Jul 2004 10:03:48 -0400 Subject: [Javascript] Key selection In-Reply-To: <40ED4DEE.8090500@economisa.com.br> Message-ID: <20040708140605.65DD130AC17@LaTech.edu> > I dont' know about you guys, but here the mail came with a > line break, check that in the url the extension is .html Sorry about that: http://tinyurl.com/2kyfp or http://www.devguru.com/Technologies/ecmascript/quickref/evhan_onKeyPress.htm l (ends in .html) From paul at novitskisoftware.com Thu Jul 8 11:14:51 2004 From: paul at novitskisoftware.com (Paul Novitski) Date: Thu, 08 Jul 2004 09:14:51 -0700 Subject: [Javascript] Window.scroll In-Reply-To: <04cd01c4647a$3c705900$0e859bcf@mustafa> References: <045d01c46452$531e5850$0e859bcf@mustafa> <047801c46454$6fe86c30$0e859bcf@mustafa> <04cd01c4647a$3c705900$0e859bcf@mustafa> Message-ID: <6.0.1.1.2.20040708090422.021d6cd8@spamarrest.com> At 04:29 PM 7/7/2004, dev at qroute.net wrote: >When setting the focus to a form object, window automatically moves to that >location. But, I would like the browser window to go about 75Px higher so >The caption of that object can be visible too. > >How do I do that ? >window.scrollto = window.scroll - 75 ?? Here's a funky solution that might work cross-browser because it's so low-tech:

caption

function FocusOnInput() { document.getElementById("SendFocusHereFirst").focus(); document.getElementById("WhereYouWantFocus").focus(); } One advantage would be that you wouldn't need to know how many pixels south of your input field you need to scroll the screen; the browser rendering will manage that automatically, regardless of how the user sizes text. Paul From hassan at webtuitive.com Thu Jul 8 11:52:15 2004 From: hassan at webtuitive.com (Hassan Schroeder) Date: Thu, 08 Jul 2004 09:52:15 -0700 Subject: [Javascript] Window.scroll In-Reply-To: <04cd01c4647a$3c705900$0e859bcf@mustafa> References: <045d01c46452$531e5850$0e859bcf@mustafa> <047801c46454$6fe86c30$0e859bcf@mustafa> <04cd01c4647a$3c705900$0e859bcf@mustafa> Message-ID: <40ED7BBF.70206@webtuitive.com> dev at qroute.net wrote: > When setting the focus to a form object, window automatically moves to that > location. But, I would like the browser window to go about 75Px higher so > The caption of that object can be visible too. > > How do I do that ? Make the object's caption a named anchor, like this object caption then set window.location = "#thisObject"; document.getElementById("thisInput").focus(); One possibility among many :-) -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From tsterlin at email.arizona.edu Thu Jul 8 18:38:13 2004 From: tsterlin at email.arizona.edu (tsterlin at email.arizona.edu) Date: Thu, 8 Jul 2004 16:38:13 -0700 Subject: [Javascript] Null Parent Message-ID: <1089329893.b2e1950b0f568@www.email.arizona.edu> I am dynamically building a page into a frame called browserFrame which is built when another page called Group.html loads. I am attempting to add a pop up box link to this dynamically built page. It's nearly impossible to follow this description so here is the code for Group.html:
Some verbage for the group page.
So essentially what I want is this newPage to open up in browserFrame each time Group.html loads. Then I want the 'Alerts' on newPage to link to a pop-up box. All works well except I'm getting a Runtime error every time I click on the Alerts link and the pop-up box appears; it says this: "Error: 'parent.browserFrame.document' is null or not an object". Strangely enough, before I added the pop-up box functionality and had the newPage appearing in a normal frame everything worked fine with no Runtime errors. Any insight would be greatly appreciated, Tracy:-) From flavio at economisa.com.br Fri Jul 9 08:37:42 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Fri, 09 Jul 2004 10:37:42 -0300 Subject: [Javascript] Null Parent In-Reply-To: <1089329893.b2e1950b0f568@www.email.arizona.edu> References: <1089329893.b2e1950b0f568@www.email.arizona.edu> Message-ID: <40EE9FA6.3080309@economisa.com.br> From the just created window I think that "opener" would be the right name for it's /parent/. opener.parent.browserFrame.document | | | | | =----> the Frame | =---------> the Frameset =--------> the window.open Caller --- Flavio Gomes flavio at economisa.com.br tsterlin at email.arizona.edu wrote: >I am dynamically building a page into a frame called browserFrame which is >built when another page called Group.html loads. I am attempting to add a pop >up box link to this dynamically built page. It's nearly impossible to follow >this description so here is the code for Group.html: > > > > >
> Some verbage for the group page. >
> > > > So essentially what I want is this newPage to open up in browserFrame each >time Group.html loads. Then I want the 'Alerts' on newPage to link to a pop-up >box. All works well except I'm getting a Runtime error every time I click on >the Alerts link and the pop-up box appears; it says this: "Error: >'parent.browserFrame.document' is null or not an object". > >Strangely enough, before I added the pop-up box functionality and had the >newPage appearing in a normal frame everything worked fine with no Runtime >errors. > >Any insight would be greatly appreciated, >Tracy:-) > > From dev at qroute.net Fri Jul 9 12:28:44 2004 From: dev at qroute.net (dev at qroute.net) Date: Fri, 9 Jul 2004 10:28:44 -0700 Subject: [Javascript] Passing an object and/or a form reference to a function References: <1089329893.b2e1950b0f568@www.email.arizona.edu> <40EE9FA6.3080309@economisa.com.br> Message-ID: <00f601c465da$2f333ee0$0e859bcf@mustafa> How do you pass a form reference to a form validation function so that in that function body I don't have to spell the whole thing as function Validate() { aValue = window.document.formNameHere.ObjectNameHere.value } It'd better If I could do sometihng like function Val(frmObject) { aValue = frmObject.value } and/or function Validate(frm) { aValue = frm.frmObject.value } On the onSubmit event of a form , or on the onClick event of an object, How do you call the Validate function so the above idea can be realized ? From flavio at economisa.com.br Fri Jul 9 13:03:08 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Fri, 09 Jul 2004 15:03:08 -0300 Subject: [Javascript] Passing an object and/or a form reference to a function In-Reply-To: <00f601c465da$2f333ee0$0e859bcf@mustafa> References: <1089329893.b2e1950b0f568@www.email.arizona.edu> <40EE9FA6.3080309@economisa.com.br> <00f601c465da$2f333ee0$0e859bcf@mustafa> Message-ID: <40EEDDDC.6090506@economisa.com.br> Both? The form submit will be triggered when any of the submits on the form be pressed. But, if you have only one submit, in the end it'd be the same. and you *can* do something like this: function Val(frmObject) { alert(frmObject.value) } function Validate(frm) { alert(frm.frmObject.value) } then =========//=========
=========//========= Will both work. --- Flavio Gomes flavio at economisa.com.br dev at qroute.net wrote: >How do you pass a form reference to a form validation function so that in >that function body I don't have to spell the whole thing as > >function Validate() >{ >aValue = window.document.formNameHere.ObjectNameHere.value >} > >It'd better If I could do sometihng like > >function Val(frmObject) >{ >aValue = frmObject.value >} > >and/or > >function Validate(frm) >{ >aValue = frm.frmObject.value >} > >On the onSubmit event of a form , or on the onClick event of an object, How >do you call the Validate function so the above idea can be realized ? > > From dev at qroute.net Fri Jul 9 13:14:12 2004 From: dev at qroute.net (dev at qroute.net) Date: Fri, 9 Jul 2004 11:14:12 -0700 Subject: [Javascript] Passing an object and/or a form reference to afunction References: <1089329893.b2e1950b0f568@www.email.arizona.edu> <40EE9FA6.3080309@economisa.com.br><00f601c465da$2f333ee0$0e859bcf@mustafa> <40EEDDDC.6090506@economisa.com.br> Message-ID: <010b01c465e0$8935f170$0e859bcf@mustafa> ----- Original Message ----- From: "Flavio Gomes" To: "[JavaScript List]" Sent: Friday, July 09, 2004 11:03 AM Subject: Re: [Javascript] Passing an object and/or a form reference to afunction > Both? > > The form submit will be triggered when any of the submits on the form > be pressed. > But, if you have only one submit, in the end it'd be the same. > and you *can* do something like this: > > function Val(frmObject) > { > alert(frmObject.value) > } > > function Validate(frm) > { > alert(frm.frmObject.value) > } > > then > =========//========= >
> > >
> =========//========= > > Will both work. > > > > > --- > Flavio Gomes > flavio at economisa.com.br > > > > dev at qroute.net wrote: > > >How do you pass a form reference to a form validation function so that in > >that function body I don't have to spell the whole thing as > > > >function Validate() > >{ > >aValue = window.document.formNameHere.ObjectNameHere.value > >} > > > >It'd better If I could do sometihng like > > > >function Val(frmObject) > >{ > >aValue = frmObject.value > >} > > > >and/or > > > >function Validate(frm) > >{ > >aValue = frm.frmObject.value > >} > > > >On the onSubmit event of a form , or on the onClick event of an object, How > >do you call the Validate function so the above idea can be realized ? > > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From paul at novitskisoftware.com Fri Jul 9 13:15:09 2004 From: paul at novitskisoftware.com (Paul Novitski) Date: Fri, 09 Jul 2004 11:15:09 -0700 Subject: [Javascript] Passing an object and/or a form reference to a function In-Reply-To: <00f601c465da$2f333ee0$0e859bcf@mustafa> References: <1089329893.b2e1950b0f568@www.email.arizona.edu> <40EE9FA6.3080309@economisa.com.br> <00f601c465da$2f333ee0$0e859bcf@mustafa> Message-ID: <6.0.1.1.2.20040709111050.021faf90@spamarrest.com> At 10:28 AM 7/9/2004, dev at qroute.net wrote: >How do you pass a form reference to a form validation function so that in >that function body I don't have to spell the whole thing as > >function Validate() >{ >aValue = window.document.formNameHere.ObjectNameHere.value >} The form property of an object is its parental form, therefore: function DoSomething(argControl) { // get the control's containing form var oForm = argControl.form; } or: function DoSomething(argForm) { // argForm is the containing form } Paul From aniyansmail at yahoo.co.in Fri Jul 9 22:33:30 2004 From: aniyansmail at yahoo.co.in (=?iso-8859-1?q?aniyansmail?=) Date: Sat, 10 Jul 2004 04:33:30 +0100 (BST) Subject: [Javascript] Closing IE window Message-ID: <20040710033330.79098.qmail@web8308.mail.in.yahoo.com> Hi All will you tell me how to close a IE window without a confirmation message? thanks krishnan ________________________________________________________________________ Yahoo! India Careers: Over 50,000 jobs online Go to: http://yahoo.naukri.com/ From peter at brunone.com Fri Jul 9 22:46:15 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 9 Jul 2004 22:46:15 -0500 Subject: [Javascript] Closing IE window In-Reply-To: <20040710033330.79098.qmail@web8308.mail.in.yahoo.com> Message-ID: <00ec01c46630$73a541d0$0502a8c0@monkeyhouse> Some browsers will let you do this... http://aspalliance.com/peterbrunone/impossible.asp -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of aniyansmail Sent: Friday, July 09, 2004 10:34 PM To: [JavaScript List] Subject: [Javascript] Closing IE window Hi All will you tell me how to close a IE window without a confirmation message? thanks krishnan From flavio at economisa.com.br Sun Jul 11 18:32:42 2004 From: flavio at economisa.com.br (flavio) Date: Sun, 11 Jul 2004 20:32:42 -0300 Subject: [Javascript] Closing IE window In-Reply-To: <00ec01c46630$73a541d0$0502a8c0@monkeyhouse> References: <00ec01c46630$73a541d0$0502a8c0@monkeyhouse> Message-ID: <1089588762.40f1ce1a334af@webmail.economisa.com.br> Wow.. Nice research work! Congrats Peter!! -- Flavio Gomes flavio at economisa.com.br Citando Peter Brunone : > > Some browsers will let you do this... > > http://aspalliance.com/peterbrunone/impossible.asp > > > > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu] On Behalf Of aniyansmail > Sent: Friday, July 09, 2004 10:34 PM > To: [JavaScript List] > Subject: [Javascript] Closing IE window > > > Hi All > will you tell me how to close a IE window without a confirmation > message? > > thanks > krishnan --------------------------------------------------------------------- Mensagem enviada atrav?s do WebMail NetSol (http://www.netsol.psi.br) From peter at brunone.com Mon Jul 12 08:43:21 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 12 Jul 2004 06:43:21 -0700 Subject: [Javascript] Closing IE window Message-ID: <979d7a71b51d48c397509ee094af08ef@brunone.com> Gotta give props to Dan Costea for sharing that little tip here in the first place... Peter Original Message: >From: flavio >Wow.. > Nice research work! > >Congrats Peter!! > > >-- >Flavio Gomes >flavio at economisa.com.br > >Citando Peter Brunone : > >> >> Some browsers will let you do this... >> >> http://aspalliance.com/peterbrunone/impossible.asp >> >> -----Original Message----- >> From: javascript-bounces at LaTech.edu >> >> Hi All >> will you tell me how to close a IE window without a confirmation >> message? >> >> thanks >> krishnan From dev at qroute.net Tue Jul 13 12:15:06 2004 From: dev at qroute.net (dev at qroute.net) Date: Tue, 13 Jul 2004 10:15:06 -0700 Subject: [Javascript] Div targeting References: <1089329893.b2e1950b0f568@www.email.arizona.edu> <40EE9FA6.3080309@economisa.com.br> Message-ID: <02b801c468fc$f310fa80$0e859bcf@mustafa> Can "DIV"s be an alternative frames ? Instead of creating a traditional frame say with 2 rows I want to create two divisions. Since I can create a position for each division and set the ability to scroll content in divisions, the end result would appear the same as a 2 row frame. My question is how do you upload the contents of one division from another ? How does the targeting work ? From dev at qroute.net Tue Jul 13 19:40:18 2004 From: dev at qroute.net (dev at qroute.net) Date: Tue, 13 Jul 2004 17:40:18 -0700 Subject: [Javascript] checkbox, radio, select functions References: <1089329893.b2e1950b0f568@www.email.arizona.edu> <40EE9FA6.3080309@economisa.com.br> Message-ID: <02fc01c4693b$23123800$0e859bcf@mustafa> Do you know of a resource which provides javascript functions for setting the multiple values of a checkbox or select etc ? From trojani2000 at hotmail.com Thu Jul 15 10:51:22 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Thu, 15 Jul 2004 17:51:22 +0200 Subject: [Javascript] Div targeting Message-ID: >From: >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: [Javascript] Div targeting >Date: Tue, 13 Jul 2004 10:15:06 -0700 > >Can "DIV"s be an alternative frames ? alternative yes, replacement no! >Instead of creating a traditional frame say with 2 rows I want to create >two >divisions. >Since I can create a position for each division and set the ability to >scroll content in divisions, the end result would appear the same as a 2 >row >frame. Yes. > >My question is how do you upload the contents of one division from another >? from another what? Another division? Use innerText, or innerHTML. >How does the targeting work ? simply use the division ID for targeting and manipulate whatever you need. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From dev at qroute.net Fri Jul 16 13:47:31 2004 From: dev at qroute.net (dev at qroute.net) Date: Fri, 16 Jul 2004 11:47:31 -0700 Subject: [Javascript] Loading a URL into a DIVISION References: Message-ID: <00e601c46b65$59a17940$0e859bcf@mustafa> Is it possible to load a web page into a division by pointing the division src to a url ? From flavio at economisa.com.br Fri Jul 16 14:12:12 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Fri, 16 Jul 2004 16:12:12 -0300 Subject: [Javascript] Loading a URL into a DIVISION In-Reply-To: <00e601c46b65$59a17940$0e859bcf@mustafa> References: <00e601c46b65$59a17940$0e859bcf@mustafa> Message-ID: <40F8288C.8070003@economisa.com.br> Well, no. But that is possible by changing the div's innerHTML. You may use load an IFRAME and put it's innerHTML on the div's Flavio Gomes flavio at economisa.com.br dev at qroute.net wrote: >Is it possible to load a web page into a division by pointing the division >src to a url ? > From dev at qroute.net Fri Jul 16 17:13:55 2004 From: dev at qroute.net (dev at qroute.net) Date: Fri, 16 Jul 2004 15:13:55 -0700 Subject: [Javascript] Loading a URL into a DIVISION References: <00e601c46b65$59a17940$0e859bcf@mustafa> <40F8288C.8070003@economisa.com.br> Message-ID: <011901c46b82$2f965b80$0e859bcf@mustafa> Flavio, Let me tell you you are a smart man. ----- Original Message ----- From: "Flavio Gomes" To: "[JavaScript List]" Sent: Friday, July 16, 2004 12:12 PM Subject: Re: [Javascript] Loading a URL into a DIVISION > > Well, no. > > > But that is possible by changing the div's innerHTML. > You may use load an IFRAME and put it's innerHTML on the div's > > Flavio Gomes > flavio at economisa.com.br > > > > dev at qroute.net wrote: > > >Is it possible to load a web page into a division by pointing the division > >src to a url ? > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From dev at qroute.net Fri Jul 16 17:18:54 2004 From: dev at qroute.net (dev at qroute.net) Date: Fri, 16 Jul 2004 15:18:54 -0700 Subject: [Javascript] moving a gif pointer in accordance with the timer position References: <00e601c46b65$59a17940$0e859bcf@mustafa> <40F8288C.8070003@economisa.com.br> Message-ID: <012001c46b82$e15d11b0$0e859bcf@mustafa> Say I have an table with 10 horiziontal cells each having a number from 1 to 10 like following; 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 Plan a timer for one minute. If the timer currently is in between 1 and 10'th seconds, the gif pointer in the above table ( *) will appear in the corresponding cell that is 1. If the timer currently is in between 10th and 20th seconds, the gif pointer in the above table ( *) will then appear in the second cell. What elements and tricks do I need to make this happen ? I am thinking setting divisions in the table cell. and when the right time comes set the to the corresponding division. Any suggestions ? From a1_uchat at yahoo.com Fri Jul 16 18:45:15 2004 From: a1_uchat at yahoo.com (AMIT UCHAT) Date: Fri, 16 Jul 2004 16:45:15 -0700 (PDT) Subject: [Javascript] print.window() functionality Message-ID: <20040716234515.72968.qmail@web52804.mail.yahoo.com> Hi Guys, I ran into rather unusuall problem. I have a page and want to print it from javascript. It prints with 0.5" border on left and right side. On print click I get printer window but no options to reset border size. Is there any way I can pass parameters to print.Window() function to specify border size, page orientation etc... or any other pointer or help in that direction. Have a great weekend. Thanks, Amit __________________________________ Do you Yahoo!? Vote for the stars of Yahoo!'s next ad campaign! http://advision.webevents.yahoo.com/yahoo/votelifeengine/ From dev at qroute.net Fri Jul 16 19:51:29 2004 From: dev at qroute.net (dev at qroute.net) Date: Fri, 16 Jul 2004 17:51:29 -0700 Subject: [Javascript] getting the textarea current line content References: <20040716234515.72968.qmail@web52804.mail.yahoo.com> Message-ID: <014901c46b98$3259bf40$0e859bcf@mustafa> Say you have a 10 liner textarea. User clicks on line 8, is it possible to get the line 8'th contents in a javascirpt variable ? From iztok.polanic at amis.net Mon Jul 19 11:01:17 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Mon, 19 Jul 2004 18:01:17 +0200 Subject: [Javascript] positioning an element Message-ID: <20040719160122.566885BC94@smtp1.volja.net> Hi! I know that this is the time for a vacation, but I hope there are still some people out there that have to work ;) I'm using javascript to position an element on the right x, y coordinates. Because x,y coordinates are gathered from an another object on the page, I was wondering, if it is possible to position this object when the page is fully loaded. Can this be accomplished? Bye, Iztok From peter at brunone.com Mon Jul 19 11:28:15 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 19 Jul 2004 11:28:15 -0500 Subject: [Javascript] positioning an element In-Reply-To: <20040719160122.566885BC94@smtp1.volja.net> Message-ID: <004901c46dad$65085070$0502a8c0@monkeyhouse> Hi Iztok, No vacation here; I'm still slaving away. You could add an onLoad function to the body, or you could put a positioning script at the bottom of the page (which might or might not work). For example... Cheers, Peter Brunone _______________ EasyListBox.com -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic Hi! I know that this is the time for a vacation, but I hope there are still some people out there that have to work ;) I'm using javascript to position an element on the right x, y coordinates. Because x,y coordinates are gathered from an another object on the page, I was wondering, if it is possible to position this object when the page is fully loaded. Can this be accomplished? Bye, Iztok _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From iztok.polanic at amis.net Mon Jul 19 13:12:35 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Mon, 19 Jul 2004 20:12:35 +0200 Subject: [Javascript] positioning an element In-Reply-To: <004901c46dad$65085070$0502a8c0@monkeyhouse> Message-ID: <20040719181241.A51A9750AE@smtp1.volja.net> Hi! I already tried both but without luck. Sometime it works sometimes it doesn't :( It depends if the page is in browser cache. Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Sent: 19. julij 2004 18:28 To: '[JavaScript List]' Subject: RE: [Javascript] positioning an element Hi Iztok, No vacation here; I'm still slaving away. You could add an onLoad function to the body, or you could put a positioning script at the bottom of the page (which might or might not work). For example... Cheers, Peter Brunone _______________ EasyListBox.com -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic Hi! I know that this is the time for a vacation, but I hope there are still some people out there that have to work ;) I'm using javascript to position an element on the right x, y coordinates. Because x,y coordinates are gathered from an another object on the page, I was wondering, if it is possible to position this object when the page is fully loaded. Can this be accomplished? Bye, Iztok _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Mon Jul 19 13:31:40 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 19 Jul 2004 13:31:40 -0500 Subject: [Javascript] positioning an element In-Reply-To: <20040719181241.A51A9750AE@smtp1.volja.net> Message-ID: <005401c46dbe$a47f8190$0502a8c0@monkeyhouse> You mean if the page is in the browser cache, it won't do normal startup tasks? That doesn't seem right... -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Iztok Polanic Hi! I already tried both but without luck. Sometime it works sometimes it doesn't :( It depends if the page is in browser cache. Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Hi Iztok, No vacation here; I'm still slaving away. You could add an onLoad function to the body, or you could put a positioning script at the bottom of the page (which might or might not work). For example... Cheers, Peter Brunone _______________ EasyListBox.com -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic Hi! I know that this is the time for a vacation, but I hope there are still some people out there that have to work ;) I'm using javascript to position an element on the right x, y coordinates. Because x,y coordinates are gathered from an another object on the page, I was wondering, if it is possible to position this object when the page is fully loaded. Can this be accomplished? Bye, Iztok From trojani2000 at hotmail.com Mon Jul 19 13:42:05 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Mon, 19 Jul 2004 20:42:05 +0200 Subject: [Javascript] positioning an element Message-ID: If you try being more specific. It is the aim that defines the way of the solution Why are you positioning the object after the page is loaded? Is it positioned relatively or absolutely or perhaps neither? If Peter's solution isn't working in your case, than you should set a timer to delay the ecxecution of the script with onload event. But there are scripts that can work inside the object also that can make items hight&with XY position calculated and set on the fly. >From: "Iztok Polanic" >Reply-To: "[JavaScript List]" >To: "'[JavaScript List]'" >Subject: RE: [Javascript] positioning an element >Date: Mon, 19 Jul 2004 20:12:35 +0200 > >Hi! > >I already tried both but without luck. Sometime it works sometimes it >doesn't :( It depends if the page is in browser cache. > >Bye, > >Iztok >-----Original Message----- >From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] >On Behalf Of Peter Brunone >Sent: 19. julij 2004 18:28 >To: '[JavaScript List]' >Subject: RE: [Javascript] positioning an element > >Hi Iztok, > > No vacation here; I'm still slaving away. > > You could add an onLoad function to the body, or you could put a >positioning script at the bottom of the page (which might or might not >work). For example... > > > > > >Cheers, > >Peter Brunone >_______________ >EasyListBox.com > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic > >Hi! > >I know that this is the time for a vacation, but I hope there are still >some people out there that have to work ;) >I'm using javascript to position an element on the right x, y >coordinates. Because x,y coordinates are gathered from an another object >on the page, I was wondering, if it is possible to position this object >when the page is fully loaded. Can this be accomplished? > >Bye, > >Iztok >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From peter at brunone.com Mon Jul 19 14:34:56 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 19 Jul 2004 14:34:56 -0500 Subject: [Javascript] getting the textarea current line content In-Reply-To: <014901c46b98$3259bf40$0e859bcf@mustafa> Message-ID: <006e01c46dc7$7975a890$0502a8c0@monkeyhouse> I imagine that would depend on whether the line breaks were hard or soft. If you have hard line breaks, you can split the whole thing based on the \n character, but otherwise no. In order to get the place where the user clicks, you might look into the CreateTextRange function. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of dev at qroute.net Sent: Friday, July 16, 2004 7:51 PM To: [JavaScript List] Subject: [Javascript] getting the textarea current line content Say you have a 10 liner textarea. User clicks on line 8, is it possible to get the line 8'th contents in a javascirpt variable ? _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From iztok.polanic at amis.net Mon Jul 19 15:27:33 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Mon, 19 Jul 2004 22:27:33 +0200 Subject: [Javascript] positioning an element In-Reply-To: <005401c46dbe$a47f8190$0502a8c0@monkeyhouse> Message-ID: <20040719202736.782AE1A4E5@smtp2.volja.net> Hi! No no. If the page is in the cache then it works like a charm. Here are some more details. First, the script gets the height of an object. This object is a table which height depends from page to page. If the table is loaded before the positioning of another object then it works, but sometimes, the other object (not the table) is loaded befor the table and the object isn't positioned on the right place. For a more detail view you can check at www.intering-holding.si What you should look for are the two images (kg rakican and sgp pomgrad). The site iz in Slovenian language so don't be scared ;) Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Sent: 19. julij 2004 20:32 To: '[JavaScript List]' Subject: RE: [Javascript] positioning an element You mean if the page is in the browser cache, it won't do normal startup tasks? That doesn't seem right... -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Iztok Polanic Hi! I already tried both but without luck. Sometime it works sometimes it doesn't :( It depends if the page is in browser cache. Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Hi Iztok, No vacation here; I'm still slaving away. You could add an onLoad function to the body, or you could put a positioning script at the bottom of the page (which might or might not work). For example... Cheers, Peter Brunone _______________ EasyListBox.com -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic Hi! I know that this is the time for a vacation, but I hope there are still some people out there that have to work ;) I'm using javascript to position an element on the right x, y coordinates. Because x,y coordinates are gathered from an another object on the page, I was wondering, if it is possible to position this object when the page is fully loaded. Can this be accomplished? Bye, Iztok _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From dev at qroute.net Wed Jul 21 06:32:33 2004 From: dev at qroute.net (dev at qroute.net) Date: Wed, 21 Jul 2004 04:32:33 -0700 Subject: [Javascript] Style Division Question References: <004901c46dad$65085070$0502a8c0@monkeyhouse> Message-ID: <00b701c46f16$6a859700$0e859bcf@mustafa> If the page has a background image, would a division placed on that page show that the main page background ? If so, can that division's style properties be set so that the main page background shows at a given opacity ? From peter at brunone.com Wed Jul 21 19:37:06 2004 From: peter at brunone.com (Peter Brunone) Date: Wed, 21 Jul 2004 19:37:06 -0500 Subject: [Javascript] Style Division Question In-Reply-To: <00b701c46f16$6a859700$0e859bcf@mustafa> Message-ID: <00e201c46f84$040ca400$0502a8c0@monkeyhouse> I know this can be done with the Alpha filter in IE, but I'm not sure about other browsers. http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml /reference/objects/div.asp -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of dev at qroute.net If the page has a background image, would a division placed on that page show that the main page background ? If so, can that division's style properties be set so that the main page background shows at a given opacity ? From hakan at backbase.com Thu Jul 22 02:17:42 2004 From: hakan at backbase.com (Hakan Magnusson (Backbase)) Date: Thu, 22 Jul 2004 09:17:42 +0200 Subject: [Javascript] Style Division Question In-Reply-To: <00e201c46f84$040ca400$0502a8c0@monkeyhouse> References: <00e201c46f84$040ca400$0502a8c0@monkeyhouse> Message-ID: <40FF6A16.9070907@backbase.com> Mozilla <1.7 has the mozilla-proprietary "-moz-opacity" css-property, and versions of Mozilla from 1.7 supports the CSS3 "opacity"-property. It takes a value between 0.0 [0.1 .. 0.2] to 1.0. Peter Brunone wrote: > I know this can be done with the Alpha filter in IE, but I'm not > sure about other browsers. > > http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml > /reference/objects/div.asp > > > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu] On Behalf Of dev at qroute.net > > If the page has a background image, would a division placed on that page > show that the main page background ? If so, can that division's style > properties be set so that the main page background shows at a given > opacity ? > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From dev at qroute.net Thu Jul 22 14:03:50 2004 From: dev at qroute.net (dev at qroute.net) Date: Thu, 22 Jul 2004 12:03:50 -0700 Subject: [Javascript] Best style sheet authoring tool References: <00e201c46f84$040ca400$0502a8c0@monkeyhouse> <40FF6A16.9070907@backbase.com> Message-ID: <011801c4701e$9fdf2e30$0e859bcf@mustafa> What's the best style sheet authoring tool do you know of ? Looking for something with which you can drop boxes on the screens and move them around assign them as divisions etc. From dev at qroute.net Thu Jul 22 19:26:11 2004 From: dev at qroute.net (dev at qroute.net) Date: Thu, 22 Jul 2004 17:26:11 -0700 Subject: [Javascript] Best style sheet authoring tool References: Message-ID: <015101c4704b$a7dcf3b0$0e859bcf@mustafa> It's an aggreeable point. But at times, CSS tech. intermingles with JS tech. since both are happening on the client side and they are closely intermingled. I thought about prefixing my subject as OT as I do it all the time in the 15seconds ASP list, but then I thought my tool search for the css authoring would also benefit the readers of this list. ----- Original Message ----- From: "Mike Dougherty" To: "[JavaScript List]" Sent: Friday, July 23, 2004 4:05 PM Subject: Re: [Javascript] Best style sheet authoring tool I would suggest you check out css-d for styling questions, but I subscribed to that list and have been deleting the large volume of (over my head) traffic that it generates every day since. In defense of asking css questions on the javascript list, i propose that "best practices" using javascript to affect styles should include css methodology. I've coded too many dhtml applets that rely heavily on javascript to change multiple style properties for an object, that would have been much cleaner to execute (and maintain) using appropriate class names. So i think the context should be considered before a css/style question is ruled "off-topic" for this javascript list. ...Or am I expressing an opinion not necessarily that of the majority? On Thu, 22 Jul 2004 12:03:50 -0700 wrote: >What's the best style sheet authoring tool do you know of ? > >Looking for something with which you can drop boxes on the screens and move >them around assign them as divisions etc. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From dev at qroute.net Thu Jul 22 19:37:26 2004 From: dev at qroute.net (dev at qroute.net) Date: Thu, 22 Jul 2004 17:37:26 -0700 Subject: [Javascript] Focus trick References: Message-ID: <015801c4704d$3a1b0ae0$0e859bcf@mustafa> I got a real player as an embedded object in a web page. And real player does not allow me to disable the right click on its object. And right click pops the REAL PLAYER menu which allows one to stream the content outside my web page and that yields itself whole bunch of problems. The method ( SetEnableContextMenu ) of the Real Player Object ( which is used to counter effect the menu ) is buggy and it does not do what the docs say. It was so in version 8 and it still is in 9. So I am trying to find a creative way. I check the onmousemove event, but what can I do to suppress that menu ? One idea is to set the focus or to emulate the click event at a particular point on the browser and constantly doing it thru a timer amnd when the mouse coordinates fall into that of the division where the real object is running, I apply the focus trick which would hopefully cancel the pop up menu. But where would you set the focus ? From iztok.polanic at amis.net Fri Jul 23 08:28:16 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Fri, 23 Jul 2004 15:28:16 +0200 Subject: [Javascript] Positioning in IE Message-ID: <20040723132819.65AF0740F6@smtp1.volja.net> Hi! I hope this is my last question on positioning on this list :) I'm using document.getElementById('').style.left to position an element to another coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. Any clues? Bye, Iztok From peter at brunone.com Fri Jul 23 09:16:03 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 23 Jul 2004 09:16:03 -0500 Subject: [Javascript] Positioning in IE In-Reply-To: <20040723132819.65AF0740F6@smtp1.volja.net> Message-ID: <004c01c470bf$96b9f410$0502a8c0@monkeyhouse> What's the element, and is it positioned relatively or absolutely? Try style.pixelLeft if you're specifying an integer without units. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic Hi! I hope this is my last question on positioning on this list :) I'm using document.getElementById('').style.left to position an element to another coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. Any clues? Bye, Iztok From iztok.polanic at amis.net Fri Jul 23 09:53:32 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Fri, 23 Jul 2004 16:53:32 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: <004c01c470bf$96b9f410$0502a8c0@monkeyhouse> Message-ID: <20040723145335.090B114512@smtp2.volja.net> Hi! Element is
tag and it's positioned absolutely. Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Sent: 23. julij 2004 16:16 To: '[JavaScript List]' Subject: RE: [Javascript] Positioning in IE What's the element, and is it positioned relatively or absolutely? Try style.pixelLeft if you're specifying an integer without units. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic Hi! I hope this is my last question on positioning on this list :) I'm using document.getElementById('').style.left to position an element to another coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. Any clues? Bye, Iztok _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From flavio at economisa.com.br Fri Jul 23 09:59:59 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Fri, 23 Jul 2004 11:59:59 -0300 Subject: [Javascript] Positioning in IE In-Reply-To: <20040723145335.090B114512@smtp2.volja.net> References: <20040723145335.090B114512@smtp2.volja.net> Message-ID: <410127EF.2070807@economisa.com.br> Well, then you shouldn't have any problems.. Post your code, please Flavio Gomes flavio at economisa.com.br Iztok Polanic wrote: >Hi! > >Element is
tag and it's positioned absolutely. > >Bye, > >Iztok >-----Original Message----- >From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] >On Behalf Of Peter Brunone >Sent: 23. julij 2004 16:16 >To: '[JavaScript List]' >Subject: RE: [Javascript] Positioning in IE > > > What's the element, and is it positioned relatively or >absolutely? > > Try style.pixelLeft if you're specifying an integer without >units. > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic > >Hi! > >I hope this is my last question on positioning on this list :) I'm using >document.getElementById('').style.left to position an element to another >coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. >Any clues? > >Bye, > >Iztok > > From iztok.polanic at amis.net Fri Jul 23 10:05:24 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Fri, 23 Jul 2004 17:05:24 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: <410127EF.2070807@economisa.com.br> Message-ID: <20040723150527.728041404C@smtp2.volja.net> Hi! Here's the
element:
and here Javascript which tries to move the object: document.getElementById('glava').style.left = '500'; This works fine in Mozilla (Firerfox) but not in IE 6. Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Flavio Gomes Sent: 23. julij 2004 17:00 To: [JavaScript List] Subject: Re: [Javascript] Positioning in IE Well, then you shouldn't have any problems.. Post your code, please Flavio Gomes flavio at economisa.com.br Iztok Polanic wrote: >Hi! > >Element is
tag and it's positioned absolutely. > >Bye, > >Iztok >-----Original Message----- >From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] >On Behalf Of Peter Brunone >Sent: 23. julij 2004 16:16 >To: '[JavaScript List]' >Subject: RE: [Javascript] Positioning in IE > > > What's the element, and is it positioned relatively or >absolutely? > > Try style.pixelLeft if you're specifying an integer without >units. > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic > >Hi! > >I hope this is my last question on positioning on this list :) I'm using >document.getElementById('').style.left to position an element to another >coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. >Any clues? > >Bye, > >Iztok > > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From flavio at economisa.com.br Fri Jul 23 10:38:44 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Fri, 23 Jul 2004 12:38:44 -0300 Subject: [Javascript] Positioning in IE In-Reply-To: <20040723150527.728041404C@smtp2.volja.net> References: <20040723150527.728041404C@smtp2.volja.net> Message-ID: <41013104.4000200@economisa.com.br> It makes me conclude that your problem is somewhere else. Maybe you got two "glava" in your document, because the code moved the div here for me.
and here Javascript which tries to move the object:
Flavio Gomes flavio at economisa.com.br Iztok Polanic wrote: >Hi! > >Here's the
element: > >
id="glava"> > > >and here Javascript which tries to move the object: > >document.getElementById('glava').style.left = '500'; > >This works fine in Mozilla (Firerfox) but not in IE 6. > >Bye, > >Iztok >-----Original Message----- >From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] >On Behalf Of Flavio Gomes >Sent: 23. julij 2004 17:00 >To: [JavaScript List] >Subject: Re: [Javascript] Positioning in IE > > >Well, then you shouldn't have any problems.. > Post your code, please > >Flavio Gomes >flavio at economisa.com.br > > > >Iztok Polanic wrote: > > > >>Hi! >> >>Element is
tag and it's positioned absolutely. >> >>Bye, >> >>Iztok >>-----Original Message----- >>From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] >>On Behalf Of Peter Brunone >>Sent: 23. julij 2004 16:16 >>To: '[JavaScript List]' >>Subject: RE: [Javascript] Positioning in IE >> >> >> What's the element, and is it positioned relatively or >>absolutely? >> >> Try style.pixelLeft if you're specifying an integer without >>units. >> >>-----Original Message----- >>From: javascript-bounces at LaTech.edu >>[mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >> >>Hi! >> >>I hope this is my last question on positioning on this list :) I'm using >>document.getElementById('').style.left to position an element to another >>coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. >>Any clues? >> >>Bye, >> >>Iztok >> >> >> >> >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > From mdougherty at pbp.com Fri Jul 23 18:05:50 2004 From: mdougherty at pbp.com (Mike Dougherty) Date: Fri, 23 Jul 2004 19:05:50 -0400 Subject: [Javascript] Best style sheet authoring tool In-Reply-To: <011801c4701e$9fdf2e30$0e859bcf@mustafa> Message-ID: I would suggest you check out css-d for styling questions, but I subscribed to that list and have been deleting the large volume of (over my head) traffic that it generates every day since. In defense of asking css questions on the javascript list, i propose that "best practices" using javascript to affect styles should include css methodology. I've coded too many dhtml applets that rely heavily on javascript to change multiple style properties for an object, that would have been much cleaner to execute (and maintain) using appropriate class names. So i think the context should be considered before a css/style question is ruled "off-topic" for this javascript list. ...Or am I expressing an opinion not necessarily that of the majority? On Thu, 22 Jul 2004 12:03:50 -0700 wrote: >What's the best style sheet authoring tool do you know of ? > >Looking for something with which you can drop boxes on the screens and move >them around assign them as divisions etc. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From spindrift at oceanfree.net Sat Jul 24 02:12:53 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Sat, 24 Jul 2004 08:12:53 +0100 Subject: [Javascript] Best style sheet authoring tool References: <00e201c46f84$040ca400$0502a8c0@monkeyhouse><40FF6A16.9070907@backbase.com> <011801c4701e$9fdf2e30$0e859bcf@mustafa> Message-ID: <008201c4714d$b12aa900$52aa02d4@ic7g> Big list of tools here http://www.w3.org/Style/CSS/ I like to keep a full copy of the specs handy. http://www.w3.org/TR/CSS21/css2.zip Tim in Ireland. ----- Original Message ----- From: To: "[JavaScript List]" Sent: Thursday, July 22, 2004 8:03 PM Subject: [Javascript] Best style sheet authoring tool > What's the best style sheet authoring tool do you know of ? > > Looking for something with which you can drop boxes on the screens and move > them around assign them as divisions etc. > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From iztok.polanic at amis.net Sat Jul 24 11:34:08 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Sat, 24 Jul 2004 18:34:08 +0200 Subject: [Javascript] FW: whats wrong Message-ID: <20040724163416.493C674C93@smtp1.volja.net> Hi! Can someone please tell me what's wrong with this tag: If I move my mouse over the image,the image disappears. But If I move my mouse on the image, the image is displaying and disappearing. I'm going nuts. Bye, Iztok From spindrift at oceanfree.net Sat Jul 24 12:19:59 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Sat, 24 Jul 2004 18:19:59 +0100 Subject: [Javascript] FW: whats wrong References: <20040724163416.493C674C93@smtp1.volja.net> Message-ID: <000f01c471a2$7740e9c0$b8a802d4@ic7g> ----- Original Message ----- From: "Iztok Polanic" To: Sent: Saturday, July 24, 2004 5:34 PM Subject: [Javascript] FW: whats wrong > > Hi! > > Can someone please tell me what's wrong with this tag: > > onMouseOver="document.getElementById('podjetje').style.visibility = > 'hidden';" > onMouseOut="document.getElementById('podjetje').style.visibility = > 'visible';"> > > If I move my mouse over the image,the image disappears. But If I move my > mouse on the image, the image is displaying and disappearing. I'm going > nuts. That is bound to happen. Once the image is hidden, you can't move the mouse > 1 pixel before it comes on again, then once its on, 1 more pixel and its off. I suggest you stick to standard mouseover techniques. Tim in Ireland. From iztok.polanic at amis.net Sat Jul 24 12:59:41 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Sat, 24 Jul 2004 19:59:41 +0200 Subject: [Javascript] FW: whats wrong In-Reply-To: <000f01c471a2$7740e9c0$b8a802d4@ic7g> Message-ID: <20040724175949.9AD2168050@smtp1.volja.net> Hi! What are the standard mouverover techniques? :) I also tried putting into
tag. Same problem :( Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Tim Makins Sent: 24. julij 2004 19:20 To: [JavaScript List] Subject: Re: [Javascript] FW: whats wrong ----- Original Message ----- From: "Iztok Polanic" To: Sent: Saturday, July 24, 2004 5:34 PM Subject: [Javascript] FW: whats wrong > > Hi! > > Can someone please tell me what's wrong with this tag: > > onMouseOver="document.getElementById('podjetje').style.visibility = > 'hidden';" > onMouseOut="document.getElementById('podjetje').style.visibility = > 'visible';"> > > If I move my mouse over the image,the image disappears. But If I move my > mouse on the image, the image is displaying and disappearing. I'm going > nuts. That is bound to happen. Once the image is hidden, you can't move the mouse > 1 pixel before it comes on again, then once its on, 1 more pixel and its off. I suggest you stick to standard mouseover techniques. Tim in Ireland. _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From spindrift at oceanfree.net Sun Jul 25 01:19:29 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Sun, 25 Jul 2004 07:19:29 +0100 Subject: [Javascript] FW: whats wrong References: <20040724175949.9AD2168050@smtp1.volja.net> Message-ID: <008601c4720f$59d936e0$98a0a5c2@ic7g> ----- Original Message ----- From: "Iztok Polanic" To: "'[JavaScript List]'" Sent: Saturday, July 24, 2004 6:59 PM Subject: RE: [Javascript] FW: whats wrong > Hi! > > What are the standard mouverover techniques? :) Something like this, from 'Using JavaScript', by Paul McFedries: Listing 24.9. Preloading Mouseover Images


From iztok.polanic at amis.net Sun Jul 25 03:57:52 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Sun, 25 Jul 2004 10:57:52 +0200 Subject: [Javascript] FW: whats wrong In-Reply-To: <008601c4720f$59d936e0$98a0a5c2@ic7g> Message-ID: <20040725085755.6F51817295@smtp2.volja.net> Hi! But that's not really what I want. Here's the situation. There an image, placed like an layer. Below it there some tekst with links. When the user goes over that image, image dissapears and the text is displayed. When user goes to another image, image reappiers. Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Tim Makins Sent: 25. julij 2004 8:19 To: [JavaScript List] Subject: Re: [Javascript] FW: whats wrong ----- Original Message ----- From: "Iztok Polanic" To: "'[JavaScript List]'" Sent: Saturday, July 24, 2004 6:59 PM Subject: RE: [Javascript] FW: whats wrong > Hi! > > What are the standard mouverover techniques? :) Something like this, from 'Using JavaScript', by Paul McFedries: Listing 24.9. Preloading Mouseover Images


_______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From hakan at backbase.com Sun Jul 25 09:07:47 2004 From: hakan at backbase.com (Hakan Magnusson (Backbase)) Date: Sun, 25 Jul 2004 16:07:47 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: <20040723150527.728041404C@smtp2.volja.net> References: <20040723150527.728041404C@smtp2.volja.net> Message-ID: <4103BEB3.4050202@backbase.com> > document.getElementById('glava').style.left = '500'; What unit do you want to use when specifying coordinates? 500 cows, 500 feet or, perhaps, 500 pixels? This could very well be the solution to your problem: document.getElementById('glava').style.left = '500px'; Best regards, H Iztok Polanic wrote: > Hi! > > Here's the
element: > >
id="glava"> > > > and here Javascript which tries to move the object: > > document.getElementById('glava').style.left = '500'; > > This works fine in Mozilla (Firerfox) but not in IE 6. > > Bye, > > Iztok > -----Original Message----- > From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] > On Behalf Of Flavio Gomes > Sent: 23. julij 2004 17:00 > To: [JavaScript List] > Subject: Re: [Javascript] Positioning in IE > > > Well, then you shouldn't have any problems.. > Post your code, please > > Flavio Gomes > flavio at economisa.com.br > > > > Iztok Polanic wrote: > > >>Hi! >> >>Element is
tag and it's positioned absolutely. >> >>Bye, >> >>Iztok >>-----Original Message----- >>From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] >>On Behalf Of Peter Brunone >>Sent: 23. julij 2004 16:16 >>To: '[JavaScript List]' >>Subject: RE: [Javascript] Positioning in IE >> >> >> What's the element, and is it positioned relatively or >>absolutely? >> >> Try style.pixelLeft if you're specifying an integer without >>units. >> >>-----Original Message----- >>From: javascript-bounces at LaTech.edu >>[mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >> >>Hi! >> >>I hope this is my last question on positioning on this list :) I'm using >>document.getElementById('').style.left to position an element to another >>coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. >>Any clues? >> >>Bye, >> >>Iztok >> >> > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From trojani2000 at hotmail.com Sun Jul 25 14:57:54 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sun, 25 Jul 2004 21:57:54 +0200 Subject: [Javascript] Positioning in IE Message-ID: Or, as Peter had allready repplyed document.getElementById('glava').style.pixelLeft = 500 or even clearer and also many times faster instruction : glava.style.pixelLeft=500px Ask why if U like Iztok >From: "Hakan Magnusson (Backbase)" >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] Positioning in IE >Date: Sun, 25 Jul 2004 16:07:47 +0200 > >>document.getElementById('glava').style.left = '500'; > >What unit do you want to use when specifying coordinates? 500 cows, 500 >feet or, perhaps, 500 pixels? > >This could very well be the solution to your problem: > >document.getElementById('glava').style.left = '500px'; > >Best regards, >H > > >Iztok Polanic wrote: >>Hi! >> >>Here's the
element: >> >>
>id="glava"> >> >> >>and here Javascript which tries to move the object: >> >>document.getElementById('glava').style.left = '500'; >> >>This works fine in Mozilla (Firerfox) but not in IE 6. >> >>Bye, >> >>Iztok -----Original Message----- >>From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] >>On Behalf Of Flavio Gomes >>Sent: 23. julij 2004 17:00 >>To: [JavaScript List] >>Subject: Re: [Javascript] Positioning in IE >> >> >>Well, then you shouldn't have any problems.. >> Post your code, please >> >>Flavio Gomes >>flavio at economisa.com.br >> >> >> >>Iztok Polanic wrote: >> >> >>>Hi! >>> >>>Element is
tag and it's positioned absolutely. >>> >>>Bye, >>> >>>Iztok -----Original Message----- >>>From: javascript-bounces at LaTech.edu >>>[mailto:javascript-bounces at LaTech.edu] >>>On Behalf Of Peter Brunone >>>Sent: 23. julij 2004 16:16 >>>To: '[JavaScript List]' >>>Subject: RE: [Javascript] Positioning in IE >>> >>> >>> What's the element, and is it positioned relatively or >>>absolutely? >>> >>> Try style.pixelLeft if you're specifying an integer without >>>units. >>> >>>-----Original Message----- >>>From: javascript-bounces at LaTech.edu >>>[mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >>> >>>Hi! >>> >>>I hope this is my last question on positioning on this list :) I'm using >>>document.getElementById('').style.left to position an element to another >>>coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. >>>Any clues? >>> >>>Bye, >>> >>>Iztok >>> >>> >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >> >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From trojani2000 at hotmail.com Sun Jul 25 15:14:56 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sun, 25 Jul 2004 22:14:56 +0200 Subject: [Javascript] Focus trick Message-ID: Try vrapping the object inside a div element and set the onContext eevent of that div to false, -not sure but it might solve the problem. >From: >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: [Javascript] Focus trick >Date: Thu, 22 Jul 2004 17:37:26 -0700 > >I got a real player as an embedded object in a web page. And real player >does not allow me to disable the right click on its object. And right click >pops the REAL PLAYER menu which allows one to stream the content outside my >web page and that yields itself whole bunch of problems. > >The method ( SetEnableContextMenu ) of the Real Player Object ( which is >used to counter effect the menu ) is buggy and it does not do what the docs >say. It was so in version 8 and it still is in 9. > >So I am trying to find a creative way. I check the onmousemove event, but >what can I do to suppress that menu ? >One idea is to set the focus or to emulate the click event at a particular >point on the browser and constantly doing it thru a timer amnd when the >mouse coordinates fall into that of the division where the real object is >running, I apply the focus trick which would hopefully cancel the pop up >menu. > >But where would you set the focus ? > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From hakan at backbase.com Mon Jul 26 03:50:43 2004 From: hakan at backbase.com (Hakan Magnusson (Backbase)) Date: Mon, 26 Jul 2004 10:50:43 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: References: Message-ID: <4104C5E3.9040206@backbase.com> None of the previous replies, including the ones in your, are conformant to the DOM standard. In fact, it's not going to work on any browser except Internet Explorer, and I have a hard time seeing how "glava.style.pixelLeft=500px" could ever work. I just added my $0.02 in case somebody wanted to do it the RIGHT way, and don't want to split their code up more than necessary. Regards, H Troy III Ajnej wrote: > Or, as Peter had allready repplyed > > document.getElementById('glava').style.pixelLeft = 500 > > or even clearer and also many times faster instruction : > > glava.style.pixelLeft=500px > > Ask why if U like Iztok > > >> From: "Hakan Magnusson (Backbase)" >> Reply-To: "[JavaScript List]" >> To: "[JavaScript List]" >> Subject: Re: [Javascript] Positioning in IE >> Date: Sun, 25 Jul 2004 16:07:47 +0200 >> >>> document.getElementById('glava').style.left = '500'; >> >> >> What unit do you want to use when specifying coordinates? 500 cows, >> 500 feet or, perhaps, 500 pixels? >> >> This could very well be the solution to your problem: >> >> document.getElementById('glava').style.left = '500px'; >> >> Best regards, >> H >> >> >> Iztok Polanic wrote: >> >>> Hi! >>> >>> Here's the
element: >>> >>>
>> id="glava"> >>> >>> >>> and here Javascript which tries to move the object: >>> >>> document.getElementById('glava').style.left = '500'; >>> >>> This works fine in Mozilla (Firerfox) but not in IE 6. >>> >>> Bye, >>> >>> Iztok -----Original Message----- >>> From: javascript-bounces at LaTech.edu >>> [mailto:javascript-bounces at LaTech.edu] >>> On Behalf Of Flavio Gomes >>> Sent: 23. julij 2004 17:00 >>> To: [JavaScript List] >>> Subject: Re: [Javascript] Positioning in IE >>> >>> >>> Well, then you shouldn't have any problems.. >>> Post your code, please >>> >>> Flavio Gomes >>> flavio at economisa.com.br >>> >>> >>> >>> Iztok Polanic wrote: >>> >>> >>>> Hi! >>>> >>>> Element is
tag and it's positioned absolutely. >>>> >>>> Bye, >>>> >>>> Iztok -----Original Message----- >>>> From: javascript-bounces at LaTech.edu >>>> [mailto:javascript-bounces at LaTech.edu] >>>> On Behalf Of Peter Brunone >>>> Sent: 23. julij 2004 16:16 >>>> To: '[JavaScript List]' >>>> Subject: RE: [Javascript] Positioning in IE >>>> >>>> >>>> What's the element, and is it positioned relatively or >>>> absolutely? >>>> >>>> Try style.pixelLeft if you're specifying an integer without >>>> units. >>>> >>>> -----Original Message----- >>>> From: javascript-bounces at LaTech.edu >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >>>> >>>> Hi! >>>> >>>> I hope this is my last question on positioning on this list :) I'm >>>> using >>>> document.getElementById('').style.left to position an element to >>>> another >>>> coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. >>>> Any clues? >>>> >>>> Bye, >>>> >>>> Iztok >>>> >>>> >>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at LaTech.edu >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at LaTech.edu >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From peter at brunone.com Mon Jul 26 09:27:44 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 26 Jul 2004 09:27:44 -0500 Subject: [Javascript] Positioning in IE In-Reply-To: <4104C5E3.9040206@backbase.com> Message-ID: <005001c4731c$b7837220$0502a8c0@monkeyhouse> Just for the record, Hakan's is the most correct answer, according to the DOM. Also, you would never assign units to the pixelLeft property since it takes an integer and assumes pixels... And if you assign a property with units to the style.left property, you'd need to feed it in as a string. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan Magnusson (Backbase) None of the previous replies, including the ones in your, are conformant to the DOM standard. In fact, it's not going to work on any browser except Internet Explorer, and I have a hard time seeing how "glava.style.pixelLeft=500px" could ever work. I just added my $0.02 in case somebody wanted to do it the RIGHT way, and don't want to split their code up more than necessary. Regards, H Troy III Ajnej wrote: > Or, as Peter had allready repplyed > > document.getElementById('glava').style.pixelLeft = 500 > > or even clearer and also many times faster instruction : > > glava.style.pixelLeft=500px > > Ask why if U like Iztok > > >> From: "Hakan Magnusson (Backbase)" >> >>> document.getElementById('glava').style.left = '500'; >> >> >> What unit do you want to use when specifying coordinates? 500 cows, >> 500 feet or, perhaps, 500 pixels? >> >> This could very well be the solution to your problem: >> >> document.getElementById('glava').style.left = '500px'; >> >> Best regards, >> H >> >> >> Iztok Polanic wrote: >> >>> Hi! >>> >>> Here's the
element: >>> >>>
>> id="glava"> >>> >>> >>> and here Javascript which tries to move the object: >>> >>> document.getElementById('glava').style.left = '500'; >>> >>> This works fine in Mozilla (Firerfox) but not in IE 6. >>> >>> Bye, >>> >>> Iztok -----Original Message----- >>> From: javascript-bounces at LaTech.edu >>> [mailto:javascript-bounces at LaTech.edu] >>> On Behalf Of Flavio Gomes >>> Sent: 23. julij 2004 17:00 >>> To: [JavaScript List] >>> Subject: Re: [Javascript] Positioning in IE >>> >>> >>> Well, then you shouldn't have any problems.. >>> Post your code, please >>> >>> Flavio Gomes >>> flavio at economisa.com.br >>> >>> >>> >>> Iztok Polanic wrote: >>> >>> >>>> Hi! >>>> >>>> Element is
tag and it's positioned absolutely. >>>> >>>> Bye, >>>> >>>> Iztok -----Original Message----- >>>> From: javascript-bounces at LaTech.edu >>>> [mailto:javascript-bounces at LaTech.edu] >>>> On Behalf Of Peter Brunone >>>> Sent: 23. julij 2004 16:16 >>>> To: '[JavaScript List]' >>>> Subject: RE: [Javascript] Positioning in IE >>>> >>>> >>>> What's the element, and is it positioned relatively or >>>> absolutely? >>>> >>>> Try style.pixelLeft if you're specifying an integer without >>>> units. >>>> >>>> -----Original Message----- >>>> From: javascript-bounces at LaTech.edu >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >>>> >>>> Hi! >>>> >>>> I hope this is my last question on positioning on this list :) I'm >>>> using >>>> document.getElementById('').style.left to position an element to >>>> another >>>> coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE 6.0. >>>> Any clues? >>>> >>>> Bye, >>>> >>>> Iztok >>>> >>>> >>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at LaTech.edu >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at LaTech.edu >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From dagda1 at hotmail.com Mon Jul 26 09:33:02 2004 From: dagda1 at hotmail.com (Paul Cowan) Date: Mon, 26 Jul 2004 14:33:02 +0000 Subject: [Javascript] Positioning in IE Message-ID: What about: document.getElementById('glava').style.posLeft = '500px'; dagda1 at hotmail.com >From: "Peter Brunone" >Reply-To: "[JavaScript List]" >To: "'[JavaScript List]'" >Subject: RE: [Javascript] Positioning in IE >Date: Mon, 26 Jul 2004 09:27:44 -0500 > > > Just for the record, Hakan's is the most correct answer, >according to the DOM. Also, you would never assign units to the >pixelLeft property since it takes an integer and assumes pixels... And >if you assign a property with units to the style.left property, you'd >need to feed it in as a string. > >Cheers, > >Peter > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan Magnusson >(Backbase) > >None of the previous replies, including the ones in your, are conformant > >to the DOM standard. In fact, it's not going to work on any browser >except Internet Explorer, and I have a hard time seeing how >"glava.style.pixelLeft=500px" could ever work. > >I just added my $0.02 in case somebody wanted to do it the RIGHT way, >and don't want to split their code up more than necessary. > >Regards, >H > >Troy III Ajnej wrote: > > Or, as Peter had allready repplyed > > > > document.getElementById('glava').style.pixelLeft = 500 > > > > or even clearer and also many times faster instruction : > > > > glava.style.pixelLeft=500px > > > > Ask why if U like Iztok > > > > > >> From: "Hakan Magnusson (Backbase)" > >> > >>> document.getElementById('glava').style.left = '500'; > >> > >> > >> What unit do you want to use when specifying coordinates? 500 cows, > >> 500 feet or, perhaps, 500 pixels? > >> > >> This could very well be the solution to your problem: > >> > >> document.getElementById('glava').style.left = '500px'; > >> > >> Best regards, > >> H > >> > >> > >> Iztok Polanic wrote: > >> > >>> Hi! > >>> > >>> Here's the
element: > >>> > >>>
> >>> id="glava"> > >>> > >>> > >>> and here Javascript which tries to move the object: > >>> > >>> document.getElementById('glava').style.left = '500'; > >>> > >>> This works fine in Mozilla (Firerfox) but not in IE 6. > >>> > >>> Bye, > >>> > >>> Iztok -----Original Message----- > >>> From: javascript-bounces at LaTech.edu > >>> [mailto:javascript-bounces at LaTech.edu] > >>> On Behalf Of Flavio Gomes > >>> Sent: 23. julij 2004 17:00 > >>> To: [JavaScript List] > >>> Subject: Re: [Javascript] Positioning in IE > >>> > >>> > >>> Well, then you shouldn't have any problems.. > >>> Post your code, please > >>> > >>> Flavio Gomes > >>> flavio at economisa.com.br > >>> > >>> > >>> > >>> Iztok Polanic wrote: > >>> > >>> > >>>> Hi! > >>>> > >>>> Element is
tag and it's positioned absolutely. > >>>> > >>>> Bye, > >>>> > >>>> Iztok -----Original Message----- > >>>> From: javascript-bounces at LaTech.edu > >>>> [mailto:javascript-bounces at LaTech.edu] > >>>> On Behalf Of Peter Brunone > >>>> Sent: 23. julij 2004 16:16 > >>>> To: '[JavaScript List]' > >>>> Subject: RE: [Javascript] Positioning in IE > >>>> > >>>> > >>>> What's the element, and is it positioned relatively or > >>>> absolutely? > >>>> > >>>> Try style.pixelLeft if you're specifying an integer without > >>>> units. > >>>> > >>>> -----Original Message----- > >>>> From: javascript-bounces at LaTech.edu > >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic > >>>> > >>>> Hi! > >>>> > >>>> I hope this is my last question on positioning on this list :) I'm > >>>> using > >>>> document.getElementById('').style.left to position an element to > >>>> another > >>>> coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE >6.0. > >>>> Any clues? > >>>> > >>>> Bye, > >>>> > >>>> Iztok > >>>> > >>>> > >>> > >>> _______________________________________________ > >>> Javascript mailing list > >>> Javascript at LaTech.edu > >>> https://lists.LaTech.edu/mailman/listinfo/javascript > >>> > >>> _______________________________________________ > >>> Javascript mailing list > >>> Javascript at LaTech.edu > >>> https://lists.LaTech.edu/mailman/listinfo/javascript > >>> > >>> > >> _______________________________________________ > >> Javascript mailing list > >> Javascript at LaTech.edu > >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > > > > _________________________________________________________________ > > Protect your PC - get McAfee.com VirusScan Online > > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > _______________________________________________ > > Javascript mailing list > > Javascript at LaTech.edu > > https://lists.LaTech.edu/mailman/listinfo/javascript > > > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From hakan at backbase.com Mon Jul 26 09:36:38 2004 From: hakan at backbase.com (Hakan Magnusson (Backbase)) Date: Mon, 26 Jul 2004 16:36:38 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: References: Message-ID: <410516F6.3090203@backbase.com> You are still humping IE-specific, non-standard properties. > I just added my $0.02 in case somebody wanted to do it the RIGHT way, and don't want to split their code up more than necessary. Feel free to use proprietary code with no future compatibility. Regards, H Paul Cowan wrote: > What about: > > document.getElementById('glava').style.posLeft = '500px'; > > > > > dagda1 at hotmail.com > > > > >> From: "Peter Brunone" >> Reply-To: "[JavaScript List]" >> To: "'[JavaScript List]'" >> Subject: RE: [Javascript] Positioning in IE >> Date: Mon, 26 Jul 2004 09:27:44 -0500 >> >> >> Just for the record, Hakan's is the most correct answer, >> according to the DOM. Also, you would never assign units to the >> pixelLeft property since it takes an integer and assumes pixels... And >> if you assign a property with units to the style.left property, you'd >> need to feed it in as a string. >> >> Cheers, >> >> Peter >> >> -----Original Message----- >> From: javascript-bounces at LaTech.edu >> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan Magnusson >> (Backbase) >> >> None of the previous replies, including the ones in your, are conformant >> >> to the DOM standard. In fact, it's not going to work on any browser >> except Internet Explorer, and I have a hard time seeing how >> "glava.style.pixelLeft=500px" could ever work. >> >> I just added my $0.02 in case somebody wanted to do it the RIGHT way, >> and don't want to split their code up more than necessary. >> >> Regards, >> H >> >> Troy III Ajnej wrote: >> > Or, as Peter had allready repplyed >> > >> > document.getElementById('glava').style.pixelLeft = 500 >> > >> > or even clearer and also many times faster instruction : >> > >> > glava.style.pixelLeft=500px >> > >> > Ask why if U like Iztok >> > >> > >> >> From: "Hakan Magnusson (Backbase)" >> >> >> >>> document.getElementById('glava').style.left = '500'; >> >> >> >> >> >> What unit do you want to use when specifying coordinates? 500 cows, >> >> 500 feet or, perhaps, 500 pixels? >> >> >> >> This could very well be the solution to your problem: >> >> >> >> document.getElementById('glava').style.left = '500px'; >> >> >> >> Best regards, >> >> H >> >> >> >> >> >> Iztok Polanic wrote: >> >> >> >>> Hi! >> >>> >> >>> Here's the
element: >> >>> >> >>>
> >> >>> id="glava"> >> >>> >> >>> >> >>> and here Javascript which tries to move the object: >> >>> >> >>> document.getElementById('glava').style.left = '500'; >> >>> >> >>> This works fine in Mozilla (Firerfox) but not in IE 6. >> >>> >> >>> Bye, >> >>> >> >>> Iztok -----Original Message----- >> >>> From: javascript-bounces at LaTech.edu >> >>> [mailto:javascript-bounces at LaTech.edu] >> >>> On Behalf Of Flavio Gomes >> >>> Sent: 23. julij 2004 17:00 >> >>> To: [JavaScript List] >> >>> Subject: Re: [Javascript] Positioning in IE >> >>> >> >>> >> >>> Well, then you shouldn't have any problems.. >> >>> Post your code, please >> >>> >> >>> Flavio Gomes >> >>> flavio at economisa.com.br >> >>> >> >>> >> >>> >> >>> Iztok Polanic wrote: >> >>> >> >>> >> >>>> Hi! >> >>>> >> >>>> Element is
tag and it's positioned absolutely. >> >>>> >> >>>> Bye, >> >>>> >> >>>> Iztok -----Original Message----- >> >>>> From: javascript-bounces at LaTech.edu >> >>>> [mailto:javascript-bounces at LaTech.edu] >> >>>> On Behalf Of Peter Brunone >> >>>> Sent: 23. julij 2004 16:16 >> >>>> To: '[JavaScript List]' >> >>>> Subject: RE: [Javascript] Positioning in IE >> >>>> >> >>>> >> >>>> What's the element, and is it positioned relatively or >> >>>> absolutely? >> >>>> >> >>>> Try style.pixelLeft if you're specifying an integer without >> >>>> units. >> >>>> >> >>>> -----Original Message----- >> >>>> From: javascript-bounces at LaTech.edu >> >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >> >>>> >> >>>> Hi! >> >>>> >> >>>> I hope this is my last question on positioning on this list :) I'm >> >>>> using >> >>>> document.getElementById('').style.left to position an element to >> >>>> another >> >>>> coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE >> 6.0. >> >>>> Any clues? >> >>>> >> >>>> Bye, >> >>>> >> >>>> Iztok >> >>>> >> >>>> >> >>> >> >>> _______________________________________________ >> >>> Javascript mailing list >> >>> Javascript at LaTech.edu >> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >> >>> >> >>> _______________________________________________ >> >>> Javascript mailing list >> >>> Javascript at LaTech.edu >> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >> >>> >> >>> >> >> _______________________________________________ >> >> Javascript mailing list >> >> Javascript at LaTech.edu >> >> https://lists.LaTech.edu/mailman/listinfo/javascript >> > >> > >> > _________________________________________________________________ >> > Protect your PC - get McAfee.com VirusScan Online >> > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 >> > >> > _______________________________________________ >> > Javascript mailing list >> > Javascript at LaTech.edu >> > https://lists.LaTech.edu/mailman/listinfo/javascript >> > >> > >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript >> >> >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From peter at brunone.com Mon Jul 26 09:47:22 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 26 Jul 2004 09:47:22 -0500 Subject: [Javascript] Positioning in IE In-Reply-To: <410516F6.3090203@backbase.com> Message-ID: <005501c4731f$75bdf420$0502a8c0@monkeyhouse> This isn't exactly on topic, but what constitutes "humping" non-standard properties? Do you have to put your browser in promiscuous mode? -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Hakan Magnusson (Backbase) You are still humping IE-specific, non-standard properties. > I just added my $0.02 in case somebody wanted to do it the RIGHT way, > and don't want to split their code up more than necessary. Feel free to use proprietary code with no future compatibility. Regards, H Paul Cowan wrote: > What about: > > document.getElementById('glava').style.posLeft = '500px'; > > dagda1 at hotmail.com > >> From: "Peter Brunone" >> >> Just for the record, Hakan's is the most correct answer, >> according to the DOM. Also, you would never assign units to the >> pixelLeft property since it takes an integer and assumes pixels... >> And if you assign a property with units to the style.left property, >> you'd need to feed it in as a string. >> >> Cheers, >> >> Peter >> From hakan at backbase.com Mon Jul 26 09:50:38 2004 From: hakan at backbase.com (Hakan Magnusson (Backbase)) Date: Mon, 26 Jul 2004 16:50:38 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: <005501c4731f$75bdf420$0502a8c0@monkeyhouse> References: <005501c4731f$75bdf420$0502a8c0@monkeyhouse> Message-ID: <41051A3E.7030002@backbase.com> Peter Brunone wrote: > This isn't exactly on topic, but what constitutes "humping" > non-standard properties? Do you have to put your browser in promiscuous > mode? > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Hakan Magnusson > (Backbase) > > You are still humping IE-specific, non-standard properties. > > >>I just added my $0.02 in case somebody wanted to do it the RIGHT way, >>and don't want to split their code up more than necessary. > > > Feel free to use proprietary code with no future compatibility. > > Regards, > H > > Paul Cowan wrote: > > >>What about: >> >>document.getElementById('glava').style.posLeft = '500px'; >> >>dagda1 at hotmail.com >> >> >>>From: "Peter Brunone" >>> >>> Just for the record, Hakan's is the most correct answer, >>>according to the DOM. Also, you would never assign units to the >>>pixelLeft property since it takes an integer and assumes pixels... >>>And if you assign a property with units to the style.left property, >>>you'd need to feed it in as a string. >>> >>>Cheers, >>> >>>Peter >>> > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From dagda1 at hotmail.com Mon Jul 26 09:52:59 2004 From: dagda1 at hotmail.com (Paul Cowan) Date: Mon, 26 Jul 2004 14:52:59 +0000 Subject: [Javascript] Positioning in IE Message-ID: Well seeing as the subject of the thread is 'Positioning in IE', that sounds like a Microsoft specific question to me. So unless I have missed the 'hump', I gave an Microsoft IE answer. dagda1 at hotmail.com >From: "Hakan Magnusson (Backbase)" >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] Positioning in IE >Date: Mon, 26 Jul 2004 16:36:38 +0200 > >You are still humping IE-specific, non-standard properties. > >>I just added my $0.02 in case somebody wanted to do it the RIGHT way, and >>don't want to split their code up more than necessary. > >Feel free to use proprietary code with no future compatibility. > >Regards, >H > >Paul Cowan wrote: > >>What about: >> >>document.getElementById('glava').style.posLeft = '500px'; >> >> >> >> >>dagda1 at hotmail.com >> >> >> >> >>>From: "Peter Brunone" >>>Reply-To: "[JavaScript List]" >>>To: "'[JavaScript List]'" >>>Subject: RE: [Javascript] Positioning in IE >>>Date: Mon, 26 Jul 2004 09:27:44 -0500 >>> >>> >>> Just for the record, Hakan's is the most correct answer, >>>according to the DOM. Also, you would never assign units to the >>>pixelLeft property since it takes an integer and assumes pixels... And >>>if you assign a property with units to the style.left property, you'd >>>need to feed it in as a string. >>> >>>Cheers, >>> >>>Peter >>> >>>-----Original Message----- >>>From: javascript-bounces at LaTech.edu >>>[mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan Magnusson >>>(Backbase) >>> >>>None of the previous replies, including the ones in your, are conformant >>> >>>to the DOM standard. In fact, it's not going to work on any browser >>>except Internet Explorer, and I have a hard time seeing how >>>"glava.style.pixelLeft=500px" could ever work. >>> >>>I just added my $0.02 in case somebody wanted to do it the RIGHT way, >>>and don't want to split their code up more than necessary. >>> >>>Regards, >>>H >>> >>>Troy III Ajnej wrote: >>> > Or, as Peter had allready repplyed >>> > >>> > document.getElementById('glava').style.pixelLeft = 500 >>> > >>> > or even clearer and also many times faster instruction : >>> > >>> > glava.style.pixelLeft=500px >>> > >>> > Ask why if U like Iztok >>> > >>> > >>> >> From: "Hakan Magnusson (Backbase)" >>> >> >>> >>> document.getElementById('glava').style.left = '500'; >>> >> >>> >> >>> >> What unit do you want to use when specifying coordinates? 500 cows, >>> >> 500 feet or, perhaps, 500 pixels? >>> >> >>> >> This could very well be the solution to your problem: >>> >> >>> >> document.getElementById('glava').style.left = '500px'; >>> >> >>> >> Best regards, >>> >> H >>> >> >>> >> >>> >> Iztok Polanic wrote: >>> >> >>> >>> Hi! >>> >>> >>> >>> Here's the
element: >>> >>> >>> >>>
>> >>> >>> id="glava"> >>> >>> >>> >>> >>> >>> and here Javascript which tries to move the object: >>> >>> >>> >>> document.getElementById('glava').style.left = '500'; >>> >>> >>> >>> This works fine in Mozilla (Firerfox) but not in IE 6. >>> >>> >>> >>> Bye, >>> >>> >>> >>> Iztok -----Original Message----- >>> >>> From: javascript-bounces at LaTech.edu >>> >>> [mailto:javascript-bounces at LaTech.edu] >>> >>> On Behalf Of Flavio Gomes >>> >>> Sent: 23. julij 2004 17:00 >>> >>> To: [JavaScript List] >>> >>> Subject: Re: [Javascript] Positioning in IE >>> >>> >>> >>> >>> >>> Well, then you shouldn't have any problems.. >>> >>> Post your code, please >>> >>> >>> >>> Flavio Gomes >>> >>> flavio at economisa.com.br >>> >>> >>> >>> >>> >>> >>> >>> Iztok Polanic wrote: >>> >>> >>> >>> >>> >>>> Hi! >>> >>>> >>> >>>> Element is
tag and it's positioned absolutely. >>> >>>> >>> >>>> Bye, >>> >>>> >>> >>>> Iztok -----Original Message----- >>> >>>> From: javascript-bounces at LaTech.edu >>> >>>> [mailto:javascript-bounces at LaTech.edu] >>> >>>> On Behalf Of Peter Brunone >>> >>>> Sent: 23. julij 2004 16:16 >>> >>>> To: '[JavaScript List]' >>> >>>> Subject: RE: [Javascript] Positioning in IE >>> >>>> >>> >>>> >>> >>>> What's the element, and is it positioned relatively or >>> >>>> absolutely? >>> >>>> >>> >>>> Try style.pixelLeft if you're specifying an integer without >>> >>>> units. >>> >>>> >>> >>>> -----Original Message----- >>> >>>> From: javascript-bounces at LaTech.edu >>> >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >>> >>>> >>> >>>> Hi! >>> >>>> >>> >>>> I hope this is my last question on positioning on this list :) I'm >>> >>>> using >>> >>>> document.getElementById('').style.left to position an element to >>> >>>> another >>> >>>> coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE >>>6.0. >>> >>>> Any clues? >>> >>>> >>> >>>> Bye, >>> >>>> >>> >>>> Iztok >>> >>>> >>> >>>> >>> >>> >>> >>> _______________________________________________ >>> >>> Javascript mailing list >>> >>> Javascript at LaTech.edu >>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>> >>> _______________________________________________ >>> >>> Javascript mailing list >>> >>> Javascript at LaTech.edu >>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>> >>> >>> >> _______________________________________________ >>> >> Javascript mailing list >>> >> Javascript at LaTech.edu >>> >> https://lists.LaTech.edu/mailman/listinfo/javascript >>> > >>> > >>> > _________________________________________________________________ >>> > Protect your PC - get McAfee.com VirusScan Online >>> > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 >>> > >>> > _______________________________________________ >>> > Javascript mailing list >>> > Javascript at LaTech.edu >>> > https://lists.LaTech.edu/mailman/listinfo/javascript >>> > >>> > >>>_______________________________________________ >>>Javascript mailing list >>>Javascript at LaTech.edu >>>https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>>_______________________________________________ >>>Javascript mailing list >>>Javascript at LaTech.edu >>>https://lists.LaTech.edu/mailman/listinfo/javascript >> >> >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >> >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From iztok.polanic at amis.net Mon Jul 26 10:13:00 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Mon, 26 Jul 2004 17:13:00 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: Message-ID: <20040726151306.59175780F2@smtp1.volja.net> Hi! This was fun but it has to stop :) As I already mentioned someone on this list, I don't know who, already helped me. This subject was named ' Positioning in IE' because it worked in Mozilla but not in IE. Bye, Iztok -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Paul Cowan Sent: 26. julij 2004 16:53 To: javascript at LaTech.edu Subject: Re: [Javascript] Positioning in IE Well seeing as the subject of the thread is 'Positioning in IE', that sounds like a Microsoft specific question to me. So unless I have missed the 'hump', I gave an Microsoft IE answer. dagda1 at hotmail.com >From: "Hakan Magnusson (Backbase)" >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] Positioning in IE >Date: Mon, 26 Jul 2004 16:36:38 +0200 > >You are still humping IE-specific, non-standard properties. > >>I just added my $0.02 in case somebody wanted to do it the RIGHT way, and >>don't want to split their code up more than necessary. > >Feel free to use proprietary code with no future compatibility. > >Regards, >H > >Paul Cowan wrote: > >>What about: >> >>document.getElementById('glava').style.posLeft = '500px'; >> >> >> >> >>dagda1 at hotmail.com >> >> >> >> >>>From: "Peter Brunone" >>>Reply-To: "[JavaScript List]" >>>To: "'[JavaScript List]'" >>>Subject: RE: [Javascript] Positioning in IE >>>Date: Mon, 26 Jul 2004 09:27:44 -0500 >>> >>> >>> Just for the record, Hakan's is the most correct answer, >>>according to the DOM. Also, you would never assign units to the >>>pixelLeft property since it takes an integer and assumes pixels... And >>>if you assign a property with units to the style.left property, you'd >>>need to feed it in as a string. >>> >>>Cheers, >>> >>>Peter >>> >>>-----Original Message----- >>>From: javascript-bounces at LaTech.edu >>>[mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan Magnusson >>>(Backbase) >>> >>>None of the previous replies, including the ones in your, are conformant >>> >>>to the DOM standard. In fact, it's not going to work on any browser >>>except Internet Explorer, and I have a hard time seeing how >>>"glava.style.pixelLeft=500px" could ever work. >>> >>>I just added my $0.02 in case somebody wanted to do it the RIGHT way, >>>and don't want to split their code up more than necessary. >>> >>>Regards, >>>H >>> >>>Troy III Ajnej wrote: >>> > Or, as Peter had allready repplyed >>> > >>> > document.getElementById('glava').style.pixelLeft = 500 >>> > >>> > or even clearer and also many times faster instruction : >>> > >>> > glava.style.pixelLeft=500px >>> > >>> > Ask why if U like Iztok >>> > >>> > >>> >> From: "Hakan Magnusson (Backbase)" >>> >> >>> >>> document.getElementById('glava').style.left = '500'; >>> >> >>> >> >>> >> What unit do you want to use when specifying coordinates? 500 cows, >>> >> 500 feet or, perhaps, 500 pixels? >>> >> >>> >> This could very well be the solution to your problem: >>> >> >>> >> document.getElementById('glava').style.left = '500px'; >>> >> >>> >> Best regards, >>> >> H >>> >> >>> >> >>> >> Iztok Polanic wrote: >>> >> >>> >>> Hi! >>> >>> >>> >>> Here's the
element: >>> >>> >>> >>>
>> >>> >>> id="glava"> >>> >>> >>> >>> >>> >>> and here Javascript which tries to move the object: >>> >>> >>> >>> document.getElementById('glava').style.left = '500'; >>> >>> >>> >>> This works fine in Mozilla (Firerfox) but not in IE 6. >>> >>> >>> >>> Bye, >>> >>> >>> >>> Iztok -----Original Message----- >>> >>> From: javascript-bounces at LaTech.edu >>> >>> [mailto:javascript-bounces at LaTech.edu] >>> >>> On Behalf Of Flavio Gomes >>> >>> Sent: 23. julij 2004 17:00 >>> >>> To: [JavaScript List] >>> >>> Subject: Re: [Javascript] Positioning in IE >>> >>> >>> >>> >>> >>> Well, then you shouldn't have any problems.. >>> >>> Post your code, please >>> >>> >>> >>> Flavio Gomes >>> >>> flavio at economisa.com.br >>> >>> >>> >>> >>> >>> >>> >>> Iztok Polanic wrote: >>> >>> >>> >>> >>> >>>> Hi! >>> >>>> >>> >>>> Element is
tag and it's positioned absolutely. >>> >>>> >>> >>>> Bye, >>> >>>> >>> >>>> Iztok -----Original Message----- >>> >>>> From: javascript-bounces at LaTech.edu >>> >>>> [mailto:javascript-bounces at LaTech.edu] >>> >>>> On Behalf Of Peter Brunone >>> >>>> Sent: 23. julij 2004 16:16 >>> >>>> To: '[JavaScript List]' >>> >>>> Subject: RE: [Javascript] Positioning in IE >>> >>>> >>> >>>> >>> >>>> What's the element, and is it positioned relatively or >>> >>>> absolutely? >>> >>>> >>> >>>> Try style.pixelLeft if you're specifying an integer without >>> >>>> units. >>> >>>> >>> >>>> -----Original Message----- >>> >>>> From: javascript-bounces at LaTech.edu >>> >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >>> >>>> >>> >>>> Hi! >>> >>>> >>> >>>> I hope this is my last question on positioning on this list :) I'm >>> >>>> using >>> >>>> document.getElementById('').style.left to position an element to >>> >>>> another >>> >>>> coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE >>>6.0. >>> >>>> Any clues? >>> >>>> >>> >>>> Bye, >>> >>>> >>> >>>> Iztok >>> >>>> >>> >>>> >>> >>> >>> >>> _______________________________________________ >>> >>> Javascript mailing list >>> >>> Javascript at LaTech.edu >>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>> >>> _______________________________________________ >>> >>> Javascript mailing list >>> >>> Javascript at LaTech.edu >>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>> >>> >>> >> _______________________________________________ >>> >> Javascript mailing list >>> >> Javascript at LaTech.edu >>> >> https://lists.LaTech.edu/mailman/listinfo/javascript >>> > >>> > >>> > _________________________________________________________________ >>> > Protect your PC - get McAfee.com VirusScan Online >>> > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 >>> > >>> > _______________________________________________ >>> > Javascript mailing list >>> > Javascript at LaTech.edu >>> > https://lists.LaTech.edu/mailman/listinfo/javascript >>> > >>> > >>>_______________________________________________ >>>Javascript mailing list >>>Javascript at LaTech.edu >>>https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>>_______________________________________________ >>>Javascript mailing list >>>Javascript at LaTech.edu >>>https://lists.LaTech.edu/mailman/listinfo/javascript >> >> >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >> >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From hakan at backbase.com Mon Jul 26 10:30:56 2004 From: hakan at backbase.com (Hakan Magnusson (Backbase)) Date: Mon, 26 Jul 2004 17:30:56 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: References: Message-ID: <410523B0.6020508@backbase.com> Well seeing that the original query was regarding positioning that worked in Mozilla but didn't work in Internet Explorer, I just thought that the best solution would be a future-compatible, browser-independent standardised way. The question was not Microsoft specific. It addressed an issue that only occured in Internet Explorer, due to poor conformance to the standards by the programmer in question. Rather than repairing this lack of knowledge with another proprietary hack, I thought that pointing this out, and thus preventing future code soup and avoidable errors, seemed to be the best approach. But again: > Feel free to use proprietary code with no future compatibility. Paul Cowan wrote: > Well seeing as the subject of the thread is 'Positioning in IE', that > sounds like a Microsoft specific question to me. > > So unless I have missed the 'hump', I gave an Microsoft IE answer. > > > > dagda1 at hotmail.com > > > > > >> From: "Hakan Magnusson (Backbase)" >> Reply-To: "[JavaScript List]" >> To: "[JavaScript List]" >> Subject: Re: [Javascript] Positioning in IE >> Date: Mon, 26 Jul 2004 16:36:38 +0200 >> >> You are still humping IE-specific, non-standard properties. >> >>> I just added my $0.02 in case somebody wanted to do it the RIGHT way, >>> and don't want to split their code up more than necessary. >> >> >> Feel free to use proprietary code with no future compatibility. >> >> Regards, >> H >> >> Paul Cowan wrote: >> >>> What about: >>> >>> document.getElementById('glava').style.posLeft = '500px'; >>> >>> >>> >>> >>> dagda1 at hotmail.com >>> >>> >>> >>> >>>> From: "Peter Brunone" >>>> Reply-To: "[JavaScript List]" >>>> To: "'[JavaScript List]'" >>>> Subject: RE: [Javascript] Positioning in IE >>>> Date: Mon, 26 Jul 2004 09:27:44 -0500 >>>> >>>> >>>> Just for the record, Hakan's is the most correct answer, >>>> according to the DOM. Also, you would never assign units to the >>>> pixelLeft property since it takes an integer and assumes pixels... And >>>> if you assign a property with units to the style.left property, you'd >>>> need to feed it in as a string. >>>> >>>> Cheers, >>>> >>>> Peter >>>> >>>> -----Original Message----- >>>> From: javascript-bounces at LaTech.edu >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan Magnusson >>>> (Backbase) >>>> >>>> None of the previous replies, including the ones in your, are >>>> conformant >>>> >>>> to the DOM standard. In fact, it's not going to work on any browser >>>> except Internet Explorer, and I have a hard time seeing how >>>> "glava.style.pixelLeft=500px" could ever work. >>>> >>>> I just added my $0.02 in case somebody wanted to do it the RIGHT way, >>>> and don't want to split their code up more than necessary. >>>> >>>> Regards, >>>> H >>>> >>>> Troy III Ajnej wrote: >>>> > Or, as Peter had allready repplyed >>>> > >>>> > document.getElementById('glava').style.pixelLeft = 500 >>>> > >>>> > or even clearer and also many times faster instruction : >>>> > >>>> > glava.style.pixelLeft=500px >>>> > >>>> > Ask why if U like Iztok >>>> > >>>> > >>>> >> From: "Hakan Magnusson (Backbase)" >>>> >> >>>> >>> document.getElementById('glava').style.left = '500'; >>>> >> >>>> >> >>>> >> What unit do you want to use when specifying coordinates? 500 cows, >>>> >> 500 feet or, perhaps, 500 pixels? >>>> >> >>>> >> This could very well be the solution to your problem: >>>> >> >>>> >> document.getElementById('glava').style.left = '500px'; >>>> >> >>>> >> Best regards, >>>> >> H >>>> >> >>>> >> >>>> >> Iztok Polanic wrote: >>>> >> >>>> >>> Hi! >>>> >>> >>>> >>> Here's the
element: >>>> >>> >>>> >>>
>>> align="center" >>>> >>>> >>> id="glava"> >>>> >>> >>>> >>> >>>> >>> and here Javascript which tries to move the object: >>>> >>> >>>> >>> document.getElementById('glava').style.left = '500'; >>>> >>> >>>> >>> This works fine in Mozilla (Firerfox) but not in IE 6. >>>> >>> >>>> >>> Bye, >>>> >>> >>>> >>> Iztok -----Original Message----- >>>> >>> From: javascript-bounces at LaTech.edu >>>> >>> [mailto:javascript-bounces at LaTech.edu] >>>> >>> On Behalf Of Flavio Gomes >>>> >>> Sent: 23. julij 2004 17:00 >>>> >>> To: [JavaScript List] >>>> >>> Subject: Re: [Javascript] Positioning in IE >>>> >>> >>>> >>> >>>> >>> Well, then you shouldn't have any problems.. >>>> >>> Post your code, please >>>> >>> >>>> >>> Flavio Gomes >>>> >>> flavio at economisa.com.br >>>> >>> >>>> >>> >>>> >>> >>>> >>> Iztok Polanic wrote: >>>> >>> >>>> >>> >>>> >>>> Hi! >>>> >>>> >>>> >>>> Element is
tag and it's positioned absolutely. >>>> >>>> >>>> >>>> Bye, >>>> >>>> >>>> >>>> Iztok -----Original Message----- >>>> >>>> From: javascript-bounces at LaTech.edu >>>> >>>> [mailto:javascript-bounces at LaTech.edu] >>>> >>>> On Behalf Of Peter Brunone >>>> >>>> Sent: 23. julij 2004 16:16 >>>> >>>> To: '[JavaScript List]' >>>> >>>> Subject: RE: [Javascript] Positioning in IE >>>> >>>> >>>> >>>> >>>> >>>> What's the element, and is it positioned relatively or >>>> >>>> absolutely? >>>> >>>> >>>> >>>> Try style.pixelLeft if you're specifying an integer without >>>> >>>> units. >>>> >>>> >>>> >>>> -----Original Message----- >>>> >>>> From: javascript-bounces at LaTech.edu >>>> >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok Polanic >>>> >>>> >>>> >>>> Hi! >>>> >>>> >>>> >>>> I hope this is my last question on positioning on this list :) I'm >>>> >>>> using >>>> >>>> document.getElementById('').style.left to position an element to >>>> >>>> another >>>> >>>> coordinates. It works fine in firerfox (Mozilla) 0.9 but not in IE >>>> 6.0. >>>> >>>> Any clues? >>>> >>>> >>>> >>>> Bye, >>>> >>>> >>>> >>>> Iztok >>>> >>>> >>>> >>>> >>>> >>> >>>> >>> _______________________________________________ >>>> >>> Javascript mailing list >>>> >>> Javascript at LaTech.edu >>>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>>> >>> >>>> >>> _______________________________________________ >>>> >>> Javascript mailing list >>>> >>> Javascript at LaTech.edu >>>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>>> >>> >>>> >>> >>>> >> _______________________________________________ >>>> >> Javascript mailing list >>>> >> Javascript at LaTech.edu >>>> >> https://lists.LaTech.edu/mailman/listinfo/javascript >>>> > >>>> > >>>> > _________________________________________________________________ >>>> > Protect your PC - get McAfee.com VirusScan Online >>>> > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 >>>> > >>>> > _______________________________________________ >>>> > Javascript mailing list >>>> > Javascript at LaTech.edu >>>> > https://lists.LaTech.edu/mailman/listinfo/javascript >>>> > >>>> > >>>> _______________________________________________ >>>> Javascript mailing list >>>> Javascript at LaTech.edu >>>> https://lists.LaTech.edu/mailman/listinfo/javascript >>>> >>>> >>>> _______________________________________________ >>>> Javascript mailing list >>>> Javascript at LaTech.edu >>>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>> >>> >>> _______________________________________________ >>> Javascript mailing list >>> Javascript at LaTech.edu >>> https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From john at jwarner.com Mon Jul 26 10:58:33 2004 From: john at jwarner.com (John Warner) Date: Mon, 26 Jul 2004 11:58:33 -0400 Subject: [Javascript] Positioning in IE In-Reply-To: <410523B0.6020508@backbase.com> Message-ID: <00bd01c47329$6784b420$6601a8c0@WinXP> Is the remainder of the afternoon going to be wasted fighting over NOTHING? Get a grip folks, you have spent the morning fighting about trivia. Not trying to be the list police here, but come on. John Warner mailto:john at jwarner.com > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan > Magnusson (Backbase) > Sent: Monday, July 26, 2004 11:31 AM > To: [JavaScript List] > Subject: Re: [Javascript] Positioning in IE > > > Well seeing that the original query was regarding positioning that > worked in Mozilla but didn't work in Internet Explorer, I > just thought > that the best solution would be a future-compatible, > browser-independent > standardised way. > > The question was not Microsoft specific. It addressed an > issue that only > occured in Internet Explorer, due to poor conformance to the > standards > by the programmer in question. Rather than repairing this lack of > knowledge with another proprietary hack, I thought that pointing this > out, and thus preventing future code soup and avoidable > errors, seemed > to be the best approach. > > But again: > > Feel free to use proprietary code with no future compatibility. > > > > Paul Cowan wrote: > > Well seeing as the subject of the thread is 'Positioning in > IE', that > > sounds like a Microsoft specific question to me. > > > > So unless I have missed the 'hump', I gave an Microsoft IE answer. > > > > > > > > dagda1 at hotmail.com > > > > > > > > > > > >> From: "Hakan Magnusson (Backbase)" > >> Reply-To: "[JavaScript List]" > >> To: "[JavaScript List]" > >> Subject: Re: [Javascript] Positioning in IE > >> Date: Mon, 26 Jul 2004 16:36:38 +0200 > >> > >> You are still humping IE-specific, non-standard properties. > >> > >>> I just added my $0.02 in case somebody wanted to do it the RIGHT > >>> way, > >>> and don't want to split their code up more than necessary. > >> > >> > >> Feel free to use proprietary code with no future compatibility. > >> > >> Regards, > >> H > >> > >> Paul Cowan wrote: > >> > >>> What about: > >>> > >>> document.getElementById('glava').style.posLeft = '500px'; > >>> > >>> > >>> > >>> > >>> dagda1 at hotmail.com > >>> > >>> > >>> > >>> > >>>> From: "Peter Brunone" > >>>> Reply-To: "[JavaScript List]" > >>>> To: "'[JavaScript List]'" > >>>> Subject: RE: [Javascript] Positioning in IE > >>>> Date: Mon, 26 Jul 2004 09:27:44 -0500 > >>>> > >>>> > >>>> Just for the record, Hakan's is the most correct answer, > >>>> according to the DOM. Also, you would never assign units to the > >>>> pixelLeft property since it takes an integer and assumes > pixels... > >>>> And if you assign a property with units to the > style.left property, > >>>> you'd need to feed it in as a string. > >>>> > >>>> Cheers, > >>>> > >>>> Peter > >>>> > >>>> -----Original Message----- > >>>> From: javascript-bounces at LaTech.edu > >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of > Hakan Magnusson > >>>> (Backbase) > >>>> > >>>> None of the previous replies, including the ones in your, are > >>>> conformant > >>>> > >>>> to the DOM standard. In fact, it's not going to work on > any browser > >>>> except Internet Explorer, and I have a hard time seeing how > >>>> "glava.style.pixelLeft=500px" could ever work. > >>>> > >>>> I just added my $0.02 in case somebody wanted to do it the RIGHT > >>>> way, and don't want to split their code up more than necessary. > >>>> > >>>> Regards, > >>>> H > >>>> > >>>> Troy III Ajnej wrote: > >>>> > Or, as Peter had allready repplyed > >>>> > > >>>> > document.getElementById('glava').style.pixelLeft = 500 > >>>> > > >>>> > or even clearer and also many times faster instruction : > >>>> > > >>>> > glava.style.pixelLeft=500px > >>>> > > >>>> > Ask why if U like Iztok > >>>> > > >>>> > > >>>> >> From: "Hakan Magnusson (Backbase)" > >>>> >> > >>>> >>> document.getElementById('glava').style.left = '500'; > >>>> >> > >>>> >> > >>>> >> What unit do you want to use when specifying coordinates? 500 > >>>> >> cows, 500 feet or, perhaps, 500 pixels? > >>>> >> > >>>> >> This could very well be the solution to your problem: > >>>> >> > >>>> >> document.getElementById('glava').style.left = '500px'; > >>>> >> > >>>> >> Best regards, > >>>> >> H > >>>> >> > >>>> >> > >>>> >> Iztok Polanic wrote: > >>>> >> > >>>> >>> Hi! > >>>> >>> > >>>> >>> Here's the
element: > >>>> >>> > >>>> >>>
>>>> align="center" > >>>> > >>>> >>> id="glava"> > >>>> >>> > >>>> >>> > >>>> >>> and here Javascript which tries to move the object: > >>>> >>> > >>>> >>> document.getElementById('glava').style.left = '500'; > >>>> >>> > >>>> >>> This works fine in Mozilla (Firerfox) but not in IE 6. > >>>> >>> > >>>> >>> Bye, > >>>> >>> > >>>> >>> Iztok -----Original Message----- > >>>> >>> From: javascript-bounces at LaTech.edu > >>>> >>> [mailto:javascript-bounces at LaTech.edu] > >>>> >>> On Behalf Of Flavio Gomes > >>>> >>> Sent: 23. julij 2004 17:00 > >>>> >>> To: [JavaScript List] > >>>> >>> Subject: Re: [Javascript] Positioning in IE > >>>> >>> > >>>> >>> > >>>> >>> Well, then you shouldn't have any problems.. > >>>> >>> Post your code, please > >>>> >>> > >>>> >>> Flavio Gomes > >>>> >>> flavio at economisa.com.br > >>>> >>> > >>>> >>> > >>>> >>> > >>>> >>> Iztok Polanic wrote: > >>>> >>> > >>>> >>> > >>>> >>>> Hi! > >>>> >>>> > >>>> >>>> Element is
tag and it's positioned absolutely. > >>>> >>>> > >>>> >>>> Bye, > >>>> >>>> > >>>> >>>> Iztok -----Original Message----- > >>>> >>>> From: javascript-bounces at LaTech.edu > >>>> >>>> [mailto:javascript-bounces at LaTech.edu] > >>>> >>>> On Behalf Of Peter Brunone > >>>> >>>> Sent: 23. julij 2004 16:16 > >>>> >>>> To: '[JavaScript List]' > >>>> >>>> Subject: RE: [Javascript] Positioning in IE > >>>> >>>> > >>>> >>>> > >>>> >>>> What's the element, and is it positioned relatively or > >>>> >>>> absolutely? > >>>> >>>> > >>>> >>>> Try style.pixelLeft if you're specifying an integer > >>>> >>>> without units. > >>>> >>>> > >>>> >>>> -----Original Message----- > >>>> >>>> From: javascript-bounces at LaTech.edu > >>>> >>>> [mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok > >>>> >>>> Polanic > >>>> >>>> > >>>> >>>> Hi! > >>>> >>>> > >>>> >>>> I hope this is my last question on positioning on > this list :) > >>>> >>>> I'm using document.getElementById('').style.left to > position > >>>> >>>> an element to another > >>>> >>>> coordinates. It works fine in firerfox (Mozilla) > 0.9 but not in IE > >>>> 6.0. > >>>> >>>> Any clues? > >>>> >>>> > >>>> >>>> Bye, > >>>> >>>> > >>>> >>>> Iztok > >>>> >>>> > >>>> >>>> > >>>> >>> > >>>> >>> _______________________________________________ > >>>> >>> Javascript mailing list > >>>> >>> Javascript at LaTech.edu > >>>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript > >>>> >>> > >>>> >>> _______________________________________________ > >>>> >>> Javascript mailing list > >>>> >>> Javascript at LaTech.edu > >>>> >>> https://lists.LaTech.edu/mailman/listinfo/javascript > >>>> >>> > >>>> >>> > >>>> >> _______________________________________________ > >>>> >> Javascript mailing list > >>>> >> Javascript at LaTech.edu > >>>> >> https://lists.LaTech.edu/mailman/listinfo/javascript > >>>> > > >>>> > > >>>> > > _________________________________________________________________ > >>>> > Protect your PC - get McAfee.com VirusScan Online > >>>> > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > >>>> > > >>>> > _______________________________________________ > >>>> > Javascript mailing list > >>>> > Javascript at LaTech.edu > >>>> > https://lists.LaTech.edu/mailman/listinfo/javascript > >>>> > > >>>> > > >>>> _______________________________________________ > >>>> Javascript mailing list > >>>> Javascript at LaTech.edu > >>>> https://lists.LaTech.edu/mailman/listinfo/javascript > >>>> > >>>> > >>>> _______________________________________________ > >>>> Javascript mailing list > >>>> Javascript at LaTech.edu > >>>> https://lists.LaTech.edu/mailman/listinfo/javascript > >>> > >>> > >>> > >>> > >>> _______________________________________________ > >>> Javascript mailing list > >>> Javascript at LaTech.edu > >>> https://lists.LaTech.edu/mailman/listinfo/javascript > >>> > >>> > >> _______________________________________________ > >> Javascript mailing list > >> Javascript at LaTech.edu > >> https://lists.LaTech.edu/mailman/listinfo/javascript > > > > > > > > _______________________________________________ > > Javascript mailing list > > Javascript at LaTech.edu > > https://lists.LaTech.edu/mailman/listinfo/javascript > > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From hakan at backbase.com Mon Jul 26 11:54:26 2004 From: hakan at backbase.com (Hakan Magnusson (Backbase)) Date: Mon, 26 Jul 2004 18:54:26 +0200 Subject: [Javascript] Positioning in IE In-Reply-To: <00bd01c47329$6784b420$6601a8c0@WinXP> References: <00bd01c47329$6784b420$6601a8c0@WinXP> Message-ID: <41053742.70800@backbase.com> I'm not fighting over nothing. I'm just trying to provide the correct answer to the original question, since nobody else did. After doing so, I noted that other people persistantly tried to prove other (IE-proprietary) solutions to be correct, and I think it would be quite sad if mr Iztok Polanic whould end up knowing even less than he did before asking the question in the first place. I, for one, like to keep my code standardised, structured, easily maintainable and free from unneccesary clutter, browsers hacks and workarounds. By doing so my code will stay cleaner, easier to modify and it won't break down for people who use web browsers other than Internet Explorer. This will also contribute to me improving as a coder, since I will gain a larger scope of the field I've chosen to play on rather than stubbornly staying with what I've got and what I know worked a couple of years ago. Furthermore, I have yet to find a situation where I need IE-proprietary functionality to provide the required results (other than those found in IE/MS-proprietary [web]applications, made with/for ActiveX, for example). This makes me wonder why one would ever venture into the proprietary domains of any browser, and thereby actively removing the possible support on other/future platforms. Oh, and yeah, I'm an asshole. Regards, H John Warner wrote: > Is the remainder of the afternoon going to be wasted fighting over > NOTHING? Get a grip folks, you have spent the morning fighting about > trivia. Not trying to be the list police here, but come on. > > John Warner > mailto:john at jwarner.com > > >>-----Original Message----- >>From: javascript-bounces at LaTech.edu >>[mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan >>Magnusson (Backbase) >>Sent: Monday, July 26, 2004 11:31 AM >>To: [JavaScript List] >>Subject: Re: [Javascript] Positioning in IE >> >> >>Well seeing that the original query was regarding positioning that >>worked in Mozilla but didn't work in Internet Explorer, I >>just thought >>that the best solution would be a future-compatible, >>browser-independent >>standardised way. >> >>The question was not Microsoft specific. It addressed an >>issue that only >>occured in Internet Explorer, due to poor conformance to the >>standards >>by the programmer in question. Rather than repairing this lack of >>knowledge with another proprietary hack, I thought that pointing this >>out, and thus preventing future code soup and avoidable >>errors, seemed >>to be the best approach. >> >>But again: >> >>>Feel free to use proprietary code with no future compatibility. >> >> >> >>Paul Cowan wrote: >> >>>Well seeing as the subject of the thread is 'Positioning in >> >>IE', that >> >>>sounds like a Microsoft specific question to me. >>> >>>So unless I have missed the 'hump', I gave an Microsoft IE answer. >>> >>> >>> >>>dagda1 at hotmail.com >>> >>> >>> >>> >>> >>> >>>>From: "Hakan Magnusson (Backbase)" >>>>Reply-To: "[JavaScript List]" >>>>To: "[JavaScript List]" >>>>Subject: Re: [Javascript] Positioning in IE >>>>Date: Mon, 26 Jul 2004 16:36:38 +0200 >>>> >>>>You are still humping IE-specific, non-standard properties. >>>> >>>> >>>>>I just added my $0.02 in case somebody wanted to do it the RIGHT >>>>>way, >>>>>and don't want to split their code up more than necessary. >>>> >>>> >>>>Feel free to use proprietary code with no future compatibility. >>>> >>>>Regards, >>>>H >>>> >>>>Paul Cowan wrote: >>>> >>>> >>>>>What about: >>>>> >>>>>document.getElementById('glava').style.posLeft = '500px'; >>>>> >>>>> >>>>> >>>>> >>>>>dagda1 at hotmail.com >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>From: "Peter Brunone" >>>>>>Reply-To: "[JavaScript List]" >>>>>>To: "'[JavaScript List]'" >>>>>>Subject: RE: [Javascript] Positioning in IE >>>>>>Date: Mon, 26 Jul 2004 09:27:44 -0500 >>>>>> >>>>>> >>>>>> Just for the record, Hakan's is the most correct answer, >>>>>>according to the DOM. Also, you would never assign units to the >>>>>>pixelLeft property since it takes an integer and assumes >> >>pixels... >> >>>>>>And if you assign a property with units to the >> >>style.left property, >> >>>>>>you'd need to feed it in as a string. >>>>>> >>>>>>Cheers, >>>>>> >>>>>>Peter >>>>>> >>>>>>-----Original Message----- >>>>>>From: javascript-bounces at LaTech.edu >>>>>>[mailto:javascript-bounces at LaTech.edu] On Behalf Of >> >>Hakan Magnusson >> >>>>>>(Backbase) >>>>>> >>>>>>None of the previous replies, including the ones in your, are >>>>>>conformant >>>>>> >>>>>>to the DOM standard. In fact, it's not going to work on >> >>any browser >> >>>>>>except Internet Explorer, and I have a hard time seeing how >>>>>>"glava.style.pixelLeft=500px" could ever work. >>>>>> >>>>>>I just added my $0.02 in case somebody wanted to do it the RIGHT >>>>>>way, and don't want to split their code up more than necessary. >>>>>> >>>>>>Regards, >>>>>>H >>>>>> >>>>>>Troy III Ajnej wrote: >>>>>> >>>>>>>Or, as Peter had allready repplyed >>>>>>> >>>>>>>document.getElementById('glava').style.pixelLeft = 500 >>>>>>> >>>>>>>or even clearer and also many times faster instruction : >>>>>>> >>>>>>>glava.style.pixelLeft=500px >>>>>>> >>>>>>>Ask why if U like Iztok >>>>>>> >>>>>>> >>>>>>> >>>>>>>>From: "Hakan Magnusson (Backbase)" >>>>>>>> >>>>>>>>>document.getElementById('glava').style.left = '500'; >>>>>>>> >>>>>>>> >>>>>>>>What unit do you want to use when specifying coordinates? 500 >>>>>>>>cows, 500 feet or, perhaps, 500 pixels? >>>>>>>> >>>>>>>>This could very well be the solution to your problem: >>>>>>>> >>>>>>>>document.getElementById('glava').style.left = '500px'; >>>>>>>> >>>>>>>>Best regards, >>>>>>>>H >>>>>>>> >>>>>>>> >>>>>>>>Iztok Polanic wrote: >>>>>>>> >>>>>>>> >>>>>>>>>Hi! >>>>>>>>> >>>>>>>>>Here's the
element: >>>>>>>>> >>>>>>>>>
>>>>> >>>>>>align="center" >>>>>> >>>>>> >>>>>>>>>id="glava"> >>>>>>>>> >>>>>>>>> >>>>>>>>>and here Javascript which tries to move the object: >>>>>>>>> >>>>>>>>>document.getElementById('glava').style.left = '500'; >>>>>>>>> >>>>>>>>>This works fine in Mozilla (Firerfox) but not in IE 6. >>>>>>>>> >>>>>>>>>Bye, >>>>>>>>> >>>>>>>>>Iztok -----Original Message----- >>>>>>>>>From: javascript-bounces at LaTech.edu >>>>>>>>>[mailto:javascript-bounces at LaTech.edu] >>>>>>>>>On Behalf Of Flavio Gomes >>>>>>>>>Sent: 23. julij 2004 17:00 >>>>>>>>>To: [JavaScript List] >>>>>>>>>Subject: Re: [Javascript] Positioning in IE >>>>>>>>> >>>>>>>>> >>>>>>>>>Well, then you shouldn't have any problems.. >>>>>>>>> Post your code, please >>>>>>>>> >>>>>>>>>Flavio Gomes >>>>>>>>>flavio at economisa.com.br >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>Iztok Polanic wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>>Hi! >>>>>>>>>> >>>>>>>>>>Element is
tag and it's positioned absolutely. >>>>>>>>>> >>>>>>>>>>Bye, >>>>>>>>>> >>>>>>>>>>Iztok -----Original Message----- >>>>>>>>>>From: javascript-bounces at LaTech.edu >>>>>>>>>>[mailto:javascript-bounces at LaTech.edu] >>>>>>>>>>On Behalf Of Peter Brunone >>>>>>>>>>Sent: 23. julij 2004 16:16 >>>>>>>>>>To: '[JavaScript List]' >>>>>>>>>>Subject: RE: [Javascript] Positioning in IE >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> What's the element, and is it positioned relatively or >>>>>>>>>>absolutely? >>>>>>>>>> >>>>>>>>>> Try style.pixelLeft if you're specifying an integer >>>>>>>>>>without units. >>>>>>>>>> >>>>>>>>>>-----Original Message----- >>>>>>>>>>From: javascript-bounces at LaTech.edu >>>>>>>>>>[mailto:javascript-bounces at LaTech.edu] On Behalf Of Iztok >>>>>>>>>>Polanic >>>>>>>>>> >>>>>>>>>>Hi! >>>>>>>>>> >>>>>>>>>>I hope this is my last question on positioning on >> >>this list :) >> >>>>>>>>>>I'm using document.getElementById('').style.left to >> >>position >> >>>>>>>>>>an element to another >>>>>>>>>>coordinates. It works fine in firerfox (Mozilla) >> >>0.9 but not in IE >> >>>>>>6.0. >>>>>> >>>>>>>>>>Any clues? >>>>>>>>>> >>>>>>>>>>Bye, >>>>>>>>>> >>>>>>>>>>Iztok >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>>_______________________________________________ >>>>>>>>>Javascript mailing list >>>>>>>>>Javascript at LaTech.edu >>>>>>>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>>>>>>>> >>>>>>>>>_______________________________________________ >>>>>>>>>Javascript mailing list >>>>>>>>>Javascript at LaTech.edu >>>>>>>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>>_______________________________________________ >>>>>>>>Javascript mailing list >>>>>>>>Javascript at LaTech.edu >>>>>>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>>>>>> >>>>>>> >>>>>>> >>_________________________________________________________________ >> >>>>>>>Protect your PC - get McAfee.com VirusScan Online >>>>>>>http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 >>>>>>> >>>>>>>_______________________________________________ >>>>>>>Javascript mailing list >>>>>>>Javascript at LaTech.edu >>>>>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>>>>>> >>>>>>> >>>>>> >>>>>>_______________________________________________ >>>>>>Javascript mailing list >>>>>>Javascript at LaTech.edu >>>>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>>>>> >>>>>> >>>>>>_______________________________________________ >>>>>>Javascript mailing list >>>>>>Javascript at LaTech.edu >>>>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>>>> >>>>> >>>>> >>>>> >>>>>_______________________________________________ >>>>>Javascript mailing list >>>>>Javascript at LaTech.edu >>>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>>>> >>>>> >>>> >>>>_______________________________________________ >>>>Javascript mailing list >>>>Javascript at LaTech.edu >>>>https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >>> >>>_______________________________________________ >>>Javascript mailing list >>>Javascript at LaTech.edu >>>https://lists.LaTech.edu/mailman/listinfo/javascript >>> >>> >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From trojani2000 at hotmail.com Mon Jul 26 17:04:03 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Tue, 27 Jul 2004 00:04:03 +0200 Subject: [Javascript] Positioning in IE Message-ID: >From: "Hakan Magnusson (Backbase)" >I'm not fighting over nothing. Sorry. But you are. > >I'm just trying to provide the correct answer to the original question, >since nobody else did. But you never did. ... >Oh, and yeah, I'm an asshole. ... We never said that. I gues,this is all my fault. For never turning back to what I write when I hurry. "glava.style.pixelLeft=500px" Is a typing machinal mistake. There are two mistakes in the value, it was stated as an integer but written as a string. Even a newbye shulld know that added 'px' is to be removed from the value. Cowan mentioned posLeft, that's even better, because it is even faster than my proposal glava.style.posLeft="500px" Is the fastest coding syntax for dynamical positioning. Specially when moving objects pixel by pixel. Feel free to ask Why, Hakan. As about compatibility, it is the coders perpetual mistake for writing scripts that attempt to be recognised by every browser. Supporting more browsers in your scripts opens the gate for more incompatibilities in future releases, more browsers mean more browser specific variants of code. So I wish you all happy codding. _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From flavio at economisa.com.br Mon Jul 26 21:30:51 2004 From: flavio at economisa.com.br (flavio) Date: Mon, 26 Jul 2004 23:30:51 -0300 Subject: [Javascript] Positioning in IE In-Reply-To: References: Message-ID: <1090895451.4105be5b66920@webmail.economisa.com.br> My God. How many times is the word "standard" (and it's variations) appearing on Hakan's saying? If anyone has something interesting or that may add anything of useful to us, join the conversation.. but if not, please let this thread die and thank you. Quoting Troy III Ajnej : > >From: "Hakan Magnusson (Backbase)" > > >I'm not fighting over nothing. > Sorry. But you are. > > > >I'm just trying to provide the correct answer to the original question, > >since nobody else did. > > But you never did. > ... > >Oh, and yeah, I'm an asshole. > ... > We never said that. > > I gues,this is all my fault. > For never turning back to what I write when I hurry. > "glava.style.pixelLeft=500px" > Is a typing machinal mistake. There are two mistakes in the value, it was > stated as an integer but written as a string. Even a newbye shulld know that > > added 'px' is to be removed from the value. > > Cowan mentioned posLeft, that's even better, because it is even faster than > > my proposal > > glava.style.posLeft="500px" > > Is the fastest coding syntax for dynamical positioning. Specially when > moving objects pixel by pixel. > Feel free to ask Why, Hakan. > > As about compatibility, it is the coders perpetual mistake for writing > scripts that attempt to be recognised by every browser. Supporting more > browsers in your scripts opens the gate for more incompatibilities in future > > releases, more browsers mean more browser specific variants of code. > So I wish you all happy codding. --------------------------------------------------------------------- Mensagem enviada atrav?s do WebMail NetSol (http://www.netsol.psi.br) From javascript at mattbarton.org Tue Jul 27 03:15:21 2004 From: javascript at mattbarton.org (Matt Barton) Date: Tue, 27 Jul 2004 09:15:21 +0100 Subject: [Javascript] Positioning in IE References: Message-ID: <000a01c473b1$dc97d480$2399a8c0@selima.co.uk> ----- Original Message ----- From: "Troy III Ajnej" > > glava.style.posLeft="500px" > > Is the fastest coding syntax for dynamical positioning. Specially when > moving objects pixel by pixel. > Feel free to ask Why, Hakan. Morning, Just wondering what the explanation behind this is: I've a few pieces of code in my intranet app which use dynamic positioning, moving objects pixel by pixel, so anything that could help me understand how to do this more efficiently would be more than welcome. In anticipation, Matt. From trojani2000 at hotmail.com Tue Jul 27 09:34:31 2004 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Tue, 27 Jul 2004 16:34:31 +0200 Subject: [Javascript] Positioning in IE Message-ID: The call: document.all is never to be used inside a loop, it will sllow the script from few to hundred and thousand times, depending on how complex the page is (the number of doc objects contained) every time you call document.all it iterates all the objects. Than if you state get element by ID it scrolls again through all the elements containing id, than, it has to compare if one of them yelds true to give the permission to ecxecute, if after this you have given f.i. pixelLeft than it has to do some math to decide where to put the element, but if you instruct posLeft, there is no math it assumes zero at left and simply adds the new value. Try some of variants you know that will move the object from left to right pixel by pixel in some old computer and see for your self. I use integer +px string with posLeft or Right/\ Top when increasingly possitioning the object. If I recall correctly, when stating pixelLeft, the browser looks up previous state than adds positive or negative value to the existing one. And this means more processing. (but of course, with the P4 2.66 or 3.2 GHz you will hardly notice the difference.) >From: "Matt Barton" >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] Positioning in IE >Date: Tue, 27 Jul 2004 09:15:21 +0100 > >----- Original Message ----- >From: "Troy III Ajnej" > > > > glava.style.posLeft="500px" > > > > Is the fastest coding syntax for dynamical positioning. Specially when > > moving objects pixel by pixel. > > Feel free to ask Why, Hakan. > >Morning, > >Just wondering what the explanation behind this is: I've a few pieces of >code in my intranet app which use dynamic positioning, moving objects pixel >by pixel, so anything that could help me understand how to do this more >efficiently would be more than welcome. > >In anticipation, >Matt. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From flavio at economisa.com.br Tue Jul 27 10:07:19 2004 From: flavio at economisa.com.br (Flavio Gomes) Date: Tue, 27 Jul 2004 12:07:19 -0300 Subject: [Javascript] Positioning in IE In-Reply-To: References: Message-ID: <41066FA7.6030301@economisa.com.br> Correction: Never use document.all inside a