From ed at homes2see.com Thu Sep 1 04:22:49 2005 From: ed at homes2see.com (Ed Curtis) Date: Thu, 1 Sep 2005 04:22:49 -0500 (EST) Subject: [Javascript] multiple onSubmit events not working Message-ID: I'm attempting to clear three functions with a single onSubmit form event.
The check_upload_required function works as expected but the script never executes the openpopup() or submitonce(this) functions. If I remove the check_upload_required() from the onSubmit event the other functions work as expected. Can anyone shed some light on why this is happening. I really need for all three functions to work together. Thanks, Ed The code for each function follows: From nick at nickfitz.co.uk Thu Sep 1 06:26:00 2005 From: nick at nickfitz.co.uk (Nick Fitzsimons) Date: Thu, 1 Sep 2005 12:26:00 +0100 (BST) Subject: [Javascript] multiple onSubmit events not working In-Reply-To: References: Message-ID: <19873.193.195.164.58.1125573960.squirrel@www.easilymail.co.uk> > > I'm attempting to clear three functions with a single onSubmit form event. > > > > The check_upload_required function works as expected but the script never > executes the openpopup() or submitonce(this) functions. If I remove the > check_upload_required() from the onSubmit event the other functions work > as expected. Can anyone shed some light on why this is happening. I really > need for all three functions to work together. > When you use "return check_upload_required;" it does exactly that - returns with the value that came back from the function, and therefore stops processing any code after that point. Try defining a single function: function submitHandler(theForm) { var result = check_upload_required; if (result) { openpopup(); submitonce(theForm); } return result; } and change the handler to onsubmit="return submitHandler(this);" HTH, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/ From ed at homes2see.com Thu Sep 1 07:17:53 2005 From: ed at homes2see.com (Ed Curtis) Date: Thu, 1 Sep 2005 07:17:53 -0500 (EST) Subject: [Javascript] multiple onSubmit events not working In-Reply-To: <19873.193.195.164.58.1125573960.squirrel@www.easilymail.co.uk> Message-ID: Thanks, that's exactly what I was thinking about trying but I didn't remove the return false from the event handlers in the check_upload_required() function. On Thu, 1 Sep 2005, Nick Fitzsimons wrote: > > > > I'm attempting to clear three functions with a single onSubmit form event. > > > > > > > > The check_upload_required function works as expected but the script never > > executes the openpopup() or submitonce(this) functions. If I remove the > > check_upload_required() from the onSubmit event the other functions work > > as expected. Can anyone shed some light on why this is happening. I really > > need for all three functions to work together. > > > > > When you use "return check_upload_required;" it does exactly that - > returns with the value that came back from the function, and therefore > stops processing any code after that point. > > Try defining a single function: > > function submitHandler(theForm) { > var result = check_upload_required; > if (result) { > openpopup(); > submitonce(theForm); > } > return result; > } > > and change the handler to > > onsubmit="return submitHandler(this);" > > HTH, > > Nick. > -- > Nick Fitzsimons > http://www.nickfitz.co.uk/ > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From ed at homes2see.com Thu Sep 1 07:40:23 2005 From: ed at homes2see.com (Ed Curtis) Date: Thu, 1 Sep 2005 07:40:23 -0500 (EST) Subject: [Javascript] multiple onSubmit events not working In-Reply-To: <19873.193.195.164.58.1125573960.squirrel@www.easilymail.co.uk> Message-ID: I tried the mentioned process but the submit button on the form does not disable. Any suggestions? On Thu, 1 Sep 2005, Nick Fitzsimons wrote: > > > > I'm attempting to clear three functions with a single onSubmit form event. > > > > > > > > The check_upload_required function works as expected but the script never > > executes the openpopup() or submitonce(this) functions. If I remove the > > check_upload_required() from the onSubmit event the other functions work > > as expected. Can anyone shed some light on why this is happening. I really > > need for all three functions to work together. > > > > > When you use "return check_upload_required;" it does exactly that - > returns with the value that came back from the function, and therefore > stops processing any code after that point. > > Try defining a single function: > > function submitHandler(theForm) { > var result = check_upload_required; > if (result) { > openpopup(); > submitonce(theForm); > } > return result; > } > > and change the handler to > > onsubmit="return submitHandler(this);" > > HTH, > > Nick. > -- > Nick Fitzsimons > http://www.nickfitz.co.uk/ > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From amol.forums at gmail.com Thu Sep 1 09:50:32 2005 From: amol.forums at gmail.com (Amol Katdare) Date: Thu, 1 Sep 2005 10:50:32 -0400 Subject: [Javascript] multiple onSubmit events not working In-Reply-To: References: <19873.193.195.164.58.1125573960.squirrel@www.easilymail.co.uk> Message-ID: <4e4c97280509010750343a9361@mail.gmail.com> To invoke all the 3 methods, just remove the keyword "return". i.e. On 9/1/05, Ed Curtis wrote: > > > I tried the mentioned process but the submit button on the form does not > disable. Any suggestions? > > On Thu, 1 Sep 2005, Nick Fitzsimons wrote: > > > > > > > I'm attempting to clear three functions with a single onSubmit form > event. > > > > > > > > > > > > The check_upload_required function works as expected but the script > never > > > executes the openpopup() or submitonce(this) functions. If I remove > the > > > check_upload_required() from the onSubmit event the other functions > work > > > as expected. Can anyone shed some light on why this is happening. I > really > > > need for all three functions to work together. > > > > > > > > > When you use "return check_upload_required;" it does exactly that - > > returns with the value that came back from the function, and therefore > > stops processing any code after that point. > > > > Try defining a single function: > > > > function submitHandler(theForm) { > > var result = check_upload_required; > > if (result) { > > openpopup(); > > submitonce(theForm); > > } > > return result; > > } > > > > and change the handler to > > > > onsubmit="return submitHandler(this);" > > > > HTH, > > > > Nick. > > -- > > Nick Fitzsimons > > http://www.nickfitz.co.uk/ > > > > > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdougherty at pbp.com Thu Sep 1 11:49:54 2005 From: mdougherty at pbp.com (Mike Dougherty) Date: Thu, 01 Sep 2005 12:49:54 -0400 Subject: [Javascript] multiple onSubmit events not working In-Reply-To: <4e4c97280509010750343a9361@mail.gmail.com> References: <19873.193.195.164.58.1125573960.squirrel@www.easilymail.co.uk> <4e4c97280509010750343a9361@mail.gmail.com> Message-ID: what happens if you do: onsubmit=" return ( function1() && function2() & function3() ); " If any of the functions return false, the form will not submit - it wouldn't be very friendly if each function reported problems... It would probably be much nicer to have a handler function that called each subroutine and reacted appropriately for the return; so if function1() returns false, to not call function2() or function3() On Thu, 1 Sep 2005 10:50:32 -0400 Amol Katdare wrote: > > To invoke all the 3 methods, just remove the keyword "return". > i.e. > onSubmit="check_upload_required(); openpopup(); submitonce(this);"> > > > On 9/1/05, Ed Curtis wrote: >> >> >> I tried the mentioned process but the submit button on the form does not >> disable. Any suggestions? >> >> On Thu, 1 Sep 2005, Nick Fitzsimons wrote: >> >> > > >> > > I'm attempting to clear three functions with a single onSubmit form >> event. >> > > >> > > >> > > >> > > The check_upload_required function works as expected but the script >> never >> > > executes the openpopup() or submitonce(this) functions. If I remove >> the >> > > check_upload_required() from the onSubmit event the other functions >> work >> > > as expected. Can anyone shed some light on why this is happening. I >> really >> > > need for all three functions to work together. >> > > >> > >> > >> > When you use "return check_upload_required;" it does exactly that - >> > returns with the value that came back from the function, and therefore >> > stops processing any code after that point. >> > >> > Try defining a single function: >> > >> > function submitHandler(theForm) { >> > var result = check_upload_required; >> > if (result) { >> > openpopup(); >> > submitonce(theForm); >> > } >> > return result; >> > } >> > >> > and change the handler to >> > >> > onsubmit="return submitHandler(this);" >> > >> > HTH, >> > >> > Nick. >> > -- >> > Nick Fitzsimons >> > http://www.nickfitz.co.uk/ >> > >> > >> > _______________________________________________ >> > 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 >> > > > > __________________________________________________________ > This message was scanned by ATX > 10:55:23 AM ET - 9/1/2005 From ed at homes2see.com Thu Sep 1 13:34:35 2005 From: ed at homes2see.com (Ed Curtis) Date: Thu, 1 Sep 2005 13:34:35 -0500 (EST) Subject: [Javascript] multiple onSubmit events not working In-Reply-To: Message-ID: I got it working now. I did the return (function1() && function2() && function3()) as outlined but it still didn't work correctly. What I had to do was make sure every function returned true just by adding it to the end of each function. Thanks again. Ed On Thu, 1 Sep 2005, Mike Dougherty wrote > what happens if you do: onsubmit=" return ( function1() && function2() & function3() ); " > > If any of the functions return false, the form will not submit - it wouldn't be very friendly if > each function reported problems... > > It would probably be much nicer to have a handler function that called each subroutine and reacted > appropriately for the return; so if function1() returns false, to not call function2() or > function3() > > On Thu, 1 Sep 2005 10:50:32 -0400 > Amol Katdare wrote: > > > > To invoke all the 3 methods, just remove the keyword "return". > > i.e. > > > onSubmit="check_upload_required(); openpopup(); submitonce(this);"> > > > > > > On 9/1/05, Ed Curtis wrote: > >> > >> > >> I tried the mentioned process but the submit button on the form does not > >> disable. Any suggestions? > >> > >> On Thu, 1 Sep 2005, Nick Fitzsimons wrote: > >> > >> > > > >> > > I'm attempting to clear three functions with a single onSubmit form > >> event. > >> > > > >> > > > >> > > > >> > > The check_upload_required function works as expected but the script > >> never > >> > > executes the openpopup() or submitonce(this) functions. If I remove > >> the > >> > > check_upload_required() from the onSubmit event the other functions > >> work > >> > > as expected. Can anyone shed some light on why this is happening. I > >> really > >> > > need for all three functions to work together. > >> > > > >> > > >> > > >> > When you use "return check_upload_required;" it does exactly that - > >> > returns with the value that came back from the function, and therefore > >> > stops processing any code after that point. > >> > > >> > Try defining a single function: > >> > > >> > function submitHandler(theForm) { > >> > var result = check_upload_required; > >> > if (result) { > >> > openpopup(); > >> > submitonce(theForm); > >> > } > >> > return result; > >> > } > >> > > >> > and change the handler to > >> > > >> > onsubmit="return submitHandler(this);" > >> > > >> > HTH, > >> > > >> > Nick. > >> > -- > >> > Nick Fitzsimons > >> > http://www.nickfitz.co.uk/ > >> > > >> > > >> > _______________________________________________ > >> > 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 > >> > > > > > > > > __________________________________________________________ > > This message was scanned by ATX > > 10:55:23 AM ET - 9/1/2005 > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From rdong at advance.net Thu Sep 1 14:26:30 2005 From: rdong at advance.net (Roland Dong) Date: Thu, 1 Sep 2005 15:26:30 -0400 Subject: [Javascript] IE problem: form elements overlaps submenu In-Reply-To: Message-ID: <000001c5af2b$0e5875a0$d1620245@RoDong> Downloaded IE7 beta and they did not fix this bug. > -----Original Message----- > From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] > On Behalf Of Ian Skinner > Sent: Thursday, August 11, 2005 4:30 PM > To: [JavaScript List] > Subject: RE: [Javascript] IE problem: form elements overlaps submenu > > Can anyone suggest a workaround? > > Thanks > > Hope they fix this long known and very ugly bug in IE7 and that all users > of the world quickly adopt the new browser. > > Until then, move something. > > I've seen some faily hard core hacks involving object layers and some > such, but nothing I trusted. So I just make sure dhtml layers never > overlap form select elements. Hard sometimes. > > > > -------------- > Ian Skinner > Web Programmer > BloodSource > www.BloodSource.org > Sacramento, CA > > "C code. C code run. Run code run. Please!" > - Cynthia Dunning > > Confidentiality Notice: This message including any > attachments is for the sole use of the intended > recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the > intended recipient, please contact the sender and > delete any copies of this message. > From keith.bolton at gmail.com Fri Sep 2 12:31:49 2005 From: keith.bolton at gmail.com (Keith Bolton) Date: Fri, 2 Sep 2005 10:31:49 -0700 Subject: [Javascript] popup which stays visible until it's moused out of. Message-ID: <750909b005090210314c346969@mail.gmail.com> Hello, I just joined the list, so I'm not sure if this question has been asked before. I currently have a popup that is a div tag containing nested tags. The popup will timeout and disappear after a few seconds. But, what I'd like is to have happen instead is for the popup to appear right at the mouse location and disappear when you mouseout of the popup. for example

some bogus text

Popup Title
The problem is that it will hide the popup when the mouse leaves the first div tag and enters the div title tag. I want the popup to disappear only after the containing div tag's boundaries have been left, not when moving inside the popup onto the tag for example. I know someone is onto what I'm trying to do. Thank you, Keith -------------- next part -------------- An HTML attachment was scrubbed... URL: From dwayne.conyers at hp.com Fri Sep 2 16:57:21 2005 From: dwayne.conyers at hp.com (Conyers, Dwayne) Date: Fri, 2 Sep 2005 16:57:21 -0500 Subject: [Javascript] popup which stays visible until it's moused out of. Message-ID: Keith Bolton ink wired: > I want the popup to disappear only after the containing div tag's boundaries > have been left, not when moving inside the popup onto the tag for example. Sounds like the same functionality built into the Overlib (http://www.bosrup.com/web/overlib/) JavaScript library. You might save a little effort using that JS -- or perhaps that implementation can help point you in the right direction if you need to reinvent the wheel. Good luck! -- dwacon www.dwacon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From keith.bolton at gmail.com Fri Sep 2 17:01:36 2005 From: keith.bolton at gmail.com (Keith Bolton) Date: Fri, 2 Sep 2005 15:01:36 -0700 Subject: [Javascript] popup which stays visible until it's moused out of. In-Reply-To: References: Message-ID: <750909b005090215017598cd1b@mail.gmail.com> Thanks Dwayne, The overlib stuff is great, but the script is a little over-wieldy. I'll probably try to decifer it again. : ) thanks alot, On 9/2/05, Conyers, Dwayne wrote: > > Keith Bolton ink wired: > > > I want the popup to disappear only after the containing div tag's > boundaries > > have been left, not when moving inside the popup onto the tag for > example. > > Sounds like the same functionality built into the Overlib ( > http://www.bosrup.com/web/overlib/) JavaScript library. You might save a > little effort using that JS -- or perhaps that implementation can help point > you in the right direction if you need to reinvent the wheel. > Good luck! > -- > dwacon > www.dwacon.com > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From trojani2000 at hotmail.com Fri Sep 2 21:05:10 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sat, 03 Sep 2005 04:05:10 +0200 Subject: [Javascript] popup which stays visible until it's moused out of. In-Reply-To: <750909b005090210314c346969@mail.gmail.com> Message-ID: I see tha the ilustration of the script will not work anyway but I think that the solvation of this problem is on the fact that you will have to check if the mouse is leaving from parent to child element, than if child, do nothing but if not, hide the mf poup. You also might need the from element and to element events to handle some step of your code, but not sure if these events are IE only. Anyway, children and parent elements should be suppoted by other browsers as well. Try with if condition and see if mouseout is entering the child element instead of leaving your popup container so you can callout or not call the hide function if the mouse have enetered the child instead of leaving the container. >From: Keith Bolton >Reply-To: "\[JavaScript List\]" >To: Javascript at LaTech.edu >Subject: [Javascript] popup which stays visible until it's moused out of. >Date: Fri, 2 Sep 2005 10:31:49 -0700 > >Hello, > >I just joined the list, so I'm not sure if this question has been asked >before. > >I currently have a popup that is a div tag containing nested tags. The >popup >will timeout and disappear after a few seconds. But, what I'd like is to >have happen instead is for the popup to appear right at the mouse location >and disappear when you mouseout of the popup. > >for example > > > > >

some bogus text

> >
> > > >The problem is that it will hide the popup when the mouse leaves the first >div tag and enters the div title tag. I want the popup to disappear only >after the containing div tag's boundaries have been left, not when moving >inside the popup onto the tag for example. > >I know someone is onto what I'm trying to do. > >Thank you, > >Keith >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From skyscanner at eircom.net Sat Sep 3 04:49:18 2005 From: skyscanner at eircom.net (SkyScanner) Date: Sat, 3 Sep 2005 10:49:18 +0100 Subject: [Javascript] Image follows mouse References: Message-ID: <001101c5b06c$cc1964e0$836bdac3@ic7g> Hi there - in your goody-bag of scripts, has anyone got a script that moves an image around next to the current cursor ? I need one that works in Internet Explorer *AND* Mozilla. Tim in Ireland. From trojani2000 at hotmail.com Sat Sep 3 06:34:07 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sat, 03 Sep 2005 13:34:07 +0200 Subject: [Javascript] Image follows mouse In-Reply-To: <001101c5b06c$cc1964e0$836bdac3@ic7g> Message-ID: Not sure if I got you right but try: 1. position your mouse follower image absolutely 2.give it exact height and width. 3. give it some ID (mouseImage) Than do the script It's being written just now... getting center height and width of the image but if you don't like the image to show in center but in right and lower corner of the mouse you might wanna remove the vars and the maths so the script can get even shorter and simplier than this: ... var cH=mouseImage.style.height/2, cW=mouseImage.style.width/2 function mousefollower(){ x = event.screenX y = event.screenY myImage.style.posTop = y + cH myImage.style.posLeft = x + cW } document.onmousemove=mousefollower I'm being this nice because you're from Ireland and I'm waiting for some important download to finish 2. P.S. (Use it at your own risk. I never tested it!) Regards Troy III progressive art enterprise >From: "SkyScanner" >Reply-To: "\[JavaScript List\]" >To: "[JavaScript List]" >Subject: [Javascript] Image follows mouse >Date: Sat, 3 Sep 2005 10:49:18 +0100 > >Hi there - in your goody-bag of scripts, has anyone got a script that moves >an image around next to the current cursor ? I need one that works in >Internet Explorer *AND* Mozilla. > >Tim in Ireland. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From trojani2000 at hotmail.com Sat Sep 3 06:46:39 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sat, 03 Sep 2005 13:46:39 +0200 Subject: [Javascript] Image follows mouse In-Reply-To: Message-ID: One more thing. I've done one elementary mistake! the '+' sign is to be corrected to '-' sign, -nothing else (I sure, hope so) >From: "Troy III Ajnej" >Reply-To: "\[JavaScript List\]" >To: javascript at LaTech.edu >Subject: RE: [Javascript] Image follows mouse >Date: Sat, 03 Sep 2005 13:34:07 +0200 > >Not sure if I got you right but try: > 1. position your mouse follower image absolutely > 2.give it exact height and width. > 3. give it some ID (mouseImage) > >Than do the script >It's being written just now... > >getting center height and width of the image >but if you don't like the image to show in center but in right and lower >corner of the mouse >you might wanna remove the vars and the maths so the script can get even >shorter >and simplier than this: >... >var cH=mouseImage.style.height/2, cW=mouseImage.style.width/2 > >function mousefollower(){ > x = event.screenX > y = event.screenY > myImage.style.posTop = y + cH > myImage.style.posLeft = x + cW } > > document.onmousemove=mousefollower > >I'm being this nice because you're from Ireland and I'm waiting for some >important download to finish 2. > >P.S. (Use it at your own risk. I never tested it!) > >Regards > Troy III >progressive art enterprise > > >>From: "SkyScanner" >>Reply-To: "\[JavaScript List\]" >>To: "[JavaScript List]" >>Subject: [Javascript] Image follows mouse >>Date: Sat, 3 Sep 2005 10:49:18 +0100 >> >>Hi there - in your goody-bag of scripts, has anyone got a script that >>moves >>an image around next to the current cursor ? I need one that works in >>Internet Explorer *AND* Mozilla. >> >>Tim in Ireland. >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript > >_________________________________________________________________ >Express yourself instantly with MSN Messenger! Download today it's FREE! >http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From skyscanner at eircom.net Sat Sep 3 10:25:44 2005 From: skyscanner at eircom.net (SkyScanner) Date: Sat, 3 Sep 2005 16:25:44 +0100 Subject: [Javascript] Image follows mouse References: Message-ID: <007d01c5b09b$c3926d60$116bdac3@ic7g> Thanks very much for that, Troy - I'll work through it. Where are you from ? I often wonder where everyone on the list is from. Tim in Ireland. ----- Original Message ----- From: "Troy III Ajnej" To: Sent: Saturday, September 03, 2005 12:34 PM Subject: RE: [Javascript] Image follows mouse > Not sure if I got you right but try: > 1. position your mouse follower image absolutely > 2.give it exact height and width. > 3. give it some ID (mouseImage) > > Than do the script > It's being written just now... > > getting center height and width of the image > but if you don't like the image to show in center but in right and lower > corner of the mouse > you might wanna remove the vars and the maths so the script can get even > shorter > and simplier than this: > ... > var cH=mouseImage.style.height/2, cW=mouseImage.style.width/2 > > function mousefollower(){ > x = event.screenX > y = event.screenY > myImage.style.posTop = y + cH > myImage.style.posLeft = x + cW } > > document.onmousemove=mousefollower > > I'm being this nice because you're from Ireland and I'm waiting for some > important download to finish 2. > > P.S. (Use it at your own risk. I never tested it!) > > Regards > Troy III > progressive art enterprise > > > >From: "SkyScanner" > >Reply-To: "\[JavaScript List\]" > >To: "[JavaScript List]" > >Subject: [Javascript] Image follows mouse > >Date: Sat, 3 Sep 2005 10:49:18 +0100 > > > >Hi there - in your goody-bag of scripts, has anyone got a script that moves > >an image around next to the current cursor ? I need one that works in > >Internet Explorer *AND* Mozilla. > > > >Tim in Ireland. > > > >_______________________________________________ > >Javascript mailing list > >Javascript at LaTech.edu > >https://lists.LaTech.edu/mailman/listinfo/javascript > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today it's FREE! > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From trojani2000 at hotmail.com Sat Sep 3 21:26:49 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sun, 04 Sep 2005 04:26:49 +0200 Subject: [Javascript] Image follows mouse In-Reply-To: <007d01c5b09b$c3926d60$116bdac3@ic7g> Message-ID: Thanks anyway, I believe that the script will surely work now, but you have to tell me, how did you manage to make the mouse pointer get invisible, because I'm almost sure that this is why you need this kind of script in the first place?! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (the corrected [!and tested!] version) >Thanks very much for that, Troy - I'll work through it. No need for it now. >Where are you from ? I often wonder where everyone on the list is from. I don't that much, but I like the fact that you do. I'm from Pristina, Ancient Dardania, today a small piece of it: Kosova. "we need independence for our survival" My best regards to you >Tim in Ireland. > >----- Original Message ----- >From: "Troy III Ajnej" >To: >Sent: Saturday, September 03, 2005 12:34 PM >Subject: RE: [Javascript] Image follows mouse > > > > Not sure if I got you right but try: > > 1. position your mouse follower image absolutely > > 2.give it exact height and width. > > 3. give it some ID (mouseImage) > > > > Than do the script > > It's being written just now... > > > > getting center height and width of the image > > but if you don't like the image to show in center but in right and lower > > corner of the mouse > > you might wanna remove the vars and the maths so the script can get even > > shorter > > and simplier than this: > > ... > > > > I'm being this nice because you're from Ireland and I'm waiting for some > > important download to finish 2. > > > > P.S. (Use it at your own risk. I never tested it!) > > > > Regards > > Troy III > > progressive art enterprise > > > > > > >From: "SkyScanner" > > >Reply-To: "\[JavaScript List\]" > > >To: "[JavaScript List]" > > >Subject: [Javascript] Image follows mouse > > >Date: Sat, 3 Sep 2005 10:49:18 +0100 > > > > > >Hi there - in your goody-bag of scripts, has anyone got a script that >moves > > >an image around next to the current cursor ? I need one that works in > > >Internet Explorer *AND* Mozilla. > > > > > >Tim in Ireland. > > > > > >_______________________________________________ > > >Javascript mailing list > > >Javascript at LaTech.edu > > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > > _________________________________________________________________ > > Express yourself instantly with MSN Messenger! Download today it's FREE! > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > _______________________________________________ > > 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 _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ From trojani2000 at hotmail.com Sat Sep 3 21:49:33 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sun, 04 Sep 2005 04:49:33 +0200 Subject: [Javascript] Image follows mouse In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From skyscanner at eircom.net Sun Sep 4 03:42:20 2005 From: skyscanner at eircom.net (SkyScanner) Date: Sun, 4 Sep 2005 09:42:20 +0100 Subject: [Javascript] Image follows mouse References: Message-ID: <00f301c5b12c$971154e0$f16bdac3@ic7g> Thanks for the ideas, Troy, but I couldn't get that to work in Mozilla/Firefox. In Internet Explorer it works fine, though. No, I didn't make the pointer invisible - I just needed it to follow nearby. Greetings to Pristina - its nice to meet you! Tim in Co.Sligo, in the North West of Ireland. ----- Original Message ----- From: Troy III Ajnej To: javascript at LaTech.edu Sent: Sunday, September 04, 2005 3:49 AM Subject: Re: [Javascript] Image follows mouse Reposting: (Correcting yet another mistake of mine) Thanks anyway, I believe that the script will surely work now, but you have to tell me, how did you manage to make the mouse pointer get invisible, because I'm almost sure that this is why you need this kind of script in the first place?! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (the corrected [!and tested!] version) [It can't get shorter than this!] >Thanks very much for that, Troy - I'll work through it. No need for it now. >Where are you from ? I often wonder where everyone on the list is >from. I don't that much, but I like the fact that you do. I'm from Pristina, Ancient Dardania, today a small piece of it: Kosova. My best regards to you >Tim in Ireland. ------------------------------------------------------------------------------ Find e-mail and documents on your PC instantly with the new MSN Search Toolbar-FREE! ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From trojani2000 at hotmail.com Sun Sep 4 17:43:25 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Mon, 05 Sep 2005 00:43:25 +0200 Subject: [Javascript] Image follows mouse In-Reply-To: <00f301c5b12c$971154e0$f16bdac3@ic7g> Message-ID: An HTML attachment was scrubbed... URL: From weirdit at gmail.com Sun Sep 4 18:41:25 2005 From: weirdit at gmail.com (Timothy White) Date: Mon, 5 Sep 2005 07:41:25 +0800 Subject: Firefox (Was Re: [Javascript] Image follows mouse) In-Reply-To: References: <00f301c5b12c$971154e0$f16bdac3@ic7g> Message-ID: <712824a905090416417da45b7c@mail.gmail.com> > > I never used firefox and I probably never will. But I wish you luck! I would love to know you basis for never even trying it. Firstly, If your implying the previous comments to Firefox about it implementing everything that other browsers had, then you really don't know what your talking about. If your releasing a browser, you should be releasing a standards compliant browser, and coding for that. Don't code for IE and then come back to Standards later, code for standards, and push for IE supporting standards (7 Is supposed to). Don't talk about something you know nothing about. Tim From trojani2000 at hotmail.com Sun Sep 4 19:53:34 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Mon, 05 Sep 2005 02:53:34 +0200 Subject: Firefox (Was Re: [Javascript] Image follows mouse) In-Reply-To: <712824a905090416417da45b7c@mail.gmail.com> Message-ID: An HTML attachment was scrubbed... URL: From weirdit at gmail.com Sun Sep 4 20:42:29 2005 From: weirdit at gmail.com (Timothy White) Date: Mon, 5 Sep 2005 09:42:29 +0800 Subject: Firefox (Was Re: [Javascript] Image follows mouse) In-Reply-To: References: <712824a905090416417da45b7c@mail.gmail.com> Message-ID: <712824a905090418425c66b074@mail.gmail.com> > >If your releasing a browser, you should be > >releasing a standards compliant browser, and coding for that. > > I think that you've neglected the fact that, 'implementing all that current > browsers support', meant exactly supporting the standards at its essence and > expanding far beyond. I don't see any reason to support broken features that IE has. Why not just code the standards, and new proposed standards (in a special dev version, for example all mozilla unofficial functions, that are in proposed standards have mozilla- at the start so that when the standard is official they don't possibly conflict and do funny stuff.) Supporting broken things from IE would encourage people to code they way they do now (for IE and not for standards) rather than encourage standards. > >Don't talk about something you know nothing about. > > > Sorry I've hurt your feelings about firefox. I still code using notepad and > that of course should mean that I don't have a slight clue about coding, > -but my first job & payment out of it came at March 1997. > > > But after all, I was only trying to be helpfull, I'm sorry for that to... Sorry about 'snapping' at you. It was to early in the morning for me to fire off a reply like that. Have you looked at using Vim (Gvim) for coding? It runs on linux and windows, and IIRC mac. Has some really nice features for coding, including CSS and HTML. For example it can complete names, and auto close tags and stuff. And I'm sure you do have a clue about coding, just cause you use notepad, doesn't mean you don't. It does mean you need to find a better editor ;) Try Firefox one day. It has a really nice javascript console as well as decent DOM inspector and javascript debug tools. Just don't open to many tabs at once when doing debug work... Once again, sorry about snapping, and you didn't really hurt my feelings, just Firefox's ;) Tim From elmuchacho at gmail.com Mon Sep 5 05:37:10 2005 From: elmuchacho at gmail.com (Laurent Muchacho) Date: Mon, 5 Sep 2005 11:37:10 +0100 Subject: [Javascript] Image follows mouse References: <00f301c5b12c$971154e0$f16bdac3@ic7g> Message-ID: <009801c5b205$c67d7ae0$5100680a@persistenzl1> Hi Tim, Just read you email found below the function sent by troy but working crowse browser function mousefollower(e){ x = (!document.all)? e.pageX : event.x+document.body.scrollLeft; y = (!document.all)? e.pageY : event.y+document.body.scrollTop; document.getElementById('myImage').style.left = x + 'px'; document.getElementById('myImage').style.top = y + 'px'; } Hope that help Laurent from London UK ----- Original Message ----- From: SkyScanner To: [JavaScript List] Sent: Sunday, September 04, 2005 9:42 AM Subject: Re: [Javascript] Image follows mouse Thanks for the ideas, Troy, but I couldn't get that to work in Mozilla/Firefox. In Internet Explorer it works fine, though. No, I didn't make the pointer invisible - I just needed it to follow nearby. Greetings to Pristina - its nice to meet you! Tim in Co.Sligo, in the North West of Ireland. ----- Original Message ----- From: Troy III Ajnej To: javascript at LaTech.edu Sent: Sunday, September 04, 2005 3:49 AM Subject: Re: [Javascript] Image follows mouse Reposting: (Correcting yet another mistake of mine) Thanks anyway, I believe that the script will surely work now, but you have to tell me, how did you manage to make the mouse pointer get invisible, because I'm almost sure that this is why you need this kind of script in the first place?! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (the corrected [!and tested!] version) [It can't get shorter than this!] >Thanks very much for that, Troy - I'll work through it. No need for it now. >Where are you from ? I often wonder where everyone on the list is >from. I don't that much, but I like the fact that you do. I'm from Pristina, Ancient Dardania, today a small piece of it: Kosova. My best regards to you >Tim in Ireland. ---------------------------------------------------------------------------- Find e-mail and documents on your PC instantly with the new MSN Search Toolbar-FREE! ---------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From javascript at webdesignofficina.com Mon Sep 5 09:02:28 2005 From: javascript at webdesignofficina.com (Guillaume) Date: Mon, 05 Sep 2005 16:02:28 +0200 Subject: [Javascript] Delay for onclick to occur from within this simple inline line... In-Reply-To: <009801c5b205$c67d7ae0$5100680a@persistenzl1> References: <00f301c5b12c$971154e0$f16bdac3@ic7g> <009801c5b205$c67d7ae0$5100680a@persistenzl1> Message-ID: <431C4FF4.8020805@webdesignofficina.com> Hi all, A simple question: Is it possible to specify a simple delay for onclick event to occur from within this simple inline line ? + Thanks. Guillaume. From wdlists at triche-osborne.com Mon Sep 5 09:52:40 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Mon, 05 Sep 2005 09:52:40 -0500 Subject: Firefox (Was Re: [Javascript] Image follows mouse) In-Reply-To: References: Message-ID: <431C5BB8.7090902@triche-osborne.com> Troy III Ajnej wrote: > Sorry I've hurt your feelings about firefox. I still code using notepad and that > of course should mean that I don't have a slight clue about coding, -but my > first job & payment out of it came at March 1997. > > But after all, I was only trying to be helpfull, I'm sorry for that to... What tool you code with (and whether or not you get paid for what you do) has little to do with valid coding. I'm a handcoder by choice who uses CNotePad, a no-frills plain text editor that handles larger files than Notepad will accomodate. I produce W3C valid XHTML and CSS that works in both Mozilla/Firefox and IE. If there is an argument to be made about Firefox, I would put it like this: Why wouldn't you want your sites to work in a browser that accounts for a little over 10% of the surfing public, especially when W3C standard code will accomodate it 99% of the time? If you're building only for a controlled environment like an intranet, that's one thing, but if you're building public sites, particularly commercial ones, why ignore potential customers? Triche (Baton Rouge, Louisiana for the curious ;-) From peter at brunone.com Mon Sep 5 10:14:45 2005 From: peter at brunone.com (Peter Brunone) Date: Mon, 5 Sep 2005 10:14:45 -0500 Subject: [Javascript] Delay for onclick to occur from within this simpleinline line... In-Reply-To: <431C4FF4.8020805@webdesignofficina.com> Message-ID: <007801c5b22c$8caadc00$0500a8c0@monkeyhouse> Sure. + That will give you a delay of 1 second (1000 milliseconds). Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Guillaume Hi all, A simple question: Is it possible to specify a simple delay for onclick event to occur from within this simple inline line ? + Thanks. Guillaume. From skyscanner at eircom.net Tue Sep 6 02:30:15 2005 From: skyscanner at eircom.net (SkyScanner) Date: Tue, 6 Sep 2005 08:30:15 +0100 Subject: [Javascript] Image follows mouse References: <00f301c5b12c$971154e0$f16bdac3@ic7g> <009801c5b205$c67d7ae0$5100680a@persistenzl1> Message-ID: <00fd01c5b2b5$e8577e80$e16bdac3@ic7g> Thanks for your function, Laurent - that works fine on Internet Explorer and Firefox. Just for the record, here is the complete page. Thanks to Troy for the inital help, too. Laurent - I am so surprised that you are from London. With a name like yours, I had always assumed you were from Mexico, or southern Europe, and imagined you sitting on some sun-baked veranda to do your coding! Tim in Ireland. From borchers at tridem.de Tue Sep 6 07:52:51 2005 From: borchers at tridem.de (Michael Borchers) Date: Tue, 6 Sep 2005 14:52:51 +0200 Subject: [Javascript] readout option and compare Message-ID: i need to readout the option (not the value) in a select menu and see if it contains a certrain string. f.e.: and then find out if the selected option f.e. contains the string "option" (which would be true for value 0,1 but false for 2) a little function, someone? thanks From peter at brunone.com Tue Sep 6 09:04:35 2005 From: peter at brunone.com (Peter Brunone) Date: Tue, 6 Sep 2005 09:04:35 -0500 Subject: [Javascript] readout option and compare In-Reply-To: Message-ID: <00fd01c5b2eb$ea21f5c0$0500a8c0@monkeyhouse> Hi Michael, FYI, it's called the text (not the option of the option) :) function getText() { var theSelect = document.forms[0].myselect; return theSelect.options[theSelect.selectedIndex].text; } You can of course parameterize this to make it a bit more flexible depending on how you call it... But that's the basic idea. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Michael Borchers i need to readout the option (not the value) in a select menu and see if it contains a certrain string. f.e.: and then find out if the selected option f.e. contains the string "option" (which would be true for value 0,1 but false for 2) a little function, someone? thanks From borchers at tridem.de Tue Sep 6 09:49:02 2005 From: borchers at tridem.de (Michael Borchers) Date: Tue, 6 Sep 2005 16:49:02 +0200 Subject: AW: [Javascript] readout option and compare Message-ID: >function getText() { var theSelect = document.forms[0].myselect; return theSelect.options[theSelect.selectedIndex].text; } < thanks peter, and how do i compare with javascript, with the IndexOf function? let's say the string is "option" and we search it within theSelect.options[theSelect.selectedIndex].text ?! From peter at brunone.com Tue Sep 6 10:52:15 2005 From: peter at brunone.com (Peter Brunone) Date: Tue, 6 Sep 2005 08:52:15 -0700 Subject: AW: [Javascript] readout option and compare Message-ID: You could do it like this (assuming you can pass the select object and the string to the function): function getText(theSelect, theString) { return theSelect.options[theSelect.selectedIndex].text.indexOf(theString); } ...or something more tailored to your needs, but this is the basic method. Cheers, Peter From: "Michael Borchers" >function getText() { var theSelect = document.forms[0].myselect; return theSelect.options[theSelect.selectedIndex].text; } < thanks peter, and how do i compare with javascript, with the IndexOf function? first optionnext optionanother one let's say the string is "option" and we search it within theSelect.options[theSelect.selectedIndex].text ?! ____________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at screenflicker.com Wed Sep 7 17:51:00 2005 From: mike at screenflicker.com (Mike Stickel) Date: Wed, 7 Sep 2005 16:51:00 -0600 Subject: [Javascript] Image replacement and rollovers Message-ID: <94DBA685-A94E-4F65-9DF1-771518E9B20D@screenflicker.com> Good day all. I've run into a bit of trouble trying to figure something out regarding image replacement and rollovers. I've the following JS on the test site: http://216.7.173.251/cellphone/mt-static/js/global.js The replacement works fantastically. The problem is that the rollover doesn't work now. I'm a bit of a novice in JS at this point in time so I'm not really sure how to modify the code from quirksmode.org so that the rollovers work with the image replacement. If anyone could shed some light on the subject for me I would be eternally grateful ? this is the final part that is needed to complete the project. Test site is here: http://216.7.173.251/cellphone/ Thanks, Mike Stickel Screenflicker Developments www.screenflicker.com p: 403-923-7667 e: mike at screenflicker.com From skyscanner at eircom.net Thu Sep 8 06:20:38 2005 From: skyscanner at eircom.net (SkyScanner) Date: Thu, 8 Sep 2005 12:20:38 +0100 Subject: [Javascript] Permissions-Help needed References: Message-ID: <001601c5b467$86091320$a26bdac3@ic7g> Is there anyone who can advise on permissions, or suggest a work-around ? This page is being run on a local machine with an Apache/PHP/MySQL installation, eventually to move on to the web. On the page is a frameset with upper frame 'a' and lower frame 'b'. Lower frame 'b' also contains a frameset, dividing it into upper frame 'c' and lower frame 'd'. In frame 'd', is an html page with a form who's action is to call a .php page into the same frame. The .php page queries a database and returns some data. All is OK so far. On the php page is a button whose action is to call a javascript function in frame 'a', at the top of the page. When I click it, I get permission denied. I have had problems with iFrame permissions before, but this is just a standard frame. There is no question of different hosts being used, so I don't understand why my .php page would be blocked from accessing other functions in the framset. Any ideas? Tim in Ireland. From borchers at tridem.de Thu Sep 8 08:05:29 2005 From: borchers at tridem.de (Michael Borchers) Date: Thu, 8 Sep 2005 15:05:29 +0200 Subject: [Javascript] addin via visibility or similar? Message-ID: i have form for several products. the products data is stored in arrays. normally i have about 5 rows. until products_id[4] of course. now i would like to have an extra input field for adding X rows and make them visible in the form without reloading the page. is this possible with visible layers or even without preloading rows and generating them on the fly? thanks! From judah-fc at t8design.com Fri Sep 9 15:49:05 2005 From: judah-fc at t8design.com (Judah Frangipane) Date: Fri, 09 Sep 2005 15:49:05 -0500 Subject: [Javascript] Alert user when leaving site Message-ID: <4321F541.2070608@t8design.com> Does anyone have a script to alert a user when they leave a domain? I know they are annoying but it's for a bank site. Best Regards, Judah Frangipane From andrew at shuttle.net.nz Fri Sep 9 15:53:53 2005 From: andrew at shuttle.net.nz (Andrew Gibson) Date: Sat, 10 Sep 2005 08:53:53 +1200 Subject: [Javascript] Permissions-Help needed References: <001601c5b467$86091320$a26bdac3@ic7g> Message-ID: <000c01c5b580$9747beb0$71e136d2@Polly> Dont see it as a permissions problem... Can you get your HTML pages to access scripts in other frames? If so, copy the exact function call to your PHP page and see if it works in that page...? Andrew from NZ Subject: [Javascript] Permissions-Help needed > Is there anyone who can advise on permissions, or suggest a work-around ? > > This page is being run on a local machine with an Apache/PHP/MySQL > installation, eventually to move on to the web. > > On the page is a frameset with upper frame 'a' and lower frame 'b'. > > Lower frame 'b' also contains a frameset, dividing it into upper frame 'c' > and lower frame 'd'. > > In frame 'd', is an html page with a form who's action is to call a .php > page into the same frame. The .php page queries a database and returns > some > data. All is OK so far. > > On the php page is a button whose action is to call a javascript function > in > frame 'a', at the top of the page. When I click it, I get permission > denied. > > I have had problems with iFrame permissions before, but this is just a > standard frame. > > There is no question of different hosts being used, so I don't understand > why my .php page would be blocked from accessing other functions in the > framset. > > Any ideas? > > Tim in Ireland. > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From mike at screenflicker.com Fri Sep 9 16:18:26 2005 From: mike at screenflicker.com (Mike Stickel) Date: Fri, 9 Sep 2005 15:18:26 -0600 Subject: [Javascript] Image replacement and rollovers [SOLVED] In-Reply-To: <94DBA685-A94E-4F65-9DF1-771518E9B20D@screenflicker.com> References: <94DBA685-A94E-4F65-9DF1-771518E9B20D@screenflicker.com> Message-ID: <3266B9A5-2085-4751-BDB6-706F4F256FA3@screenflicker.com> Never mind. Got everything working how I wanted it to. Kind of sucks that this email took 2 days to get to the list though. Mike Stickel Screenflicker Developments www.screenflicker.com p: 403-923-7667 e: mike at screenflicker.com On Sep 7, 2005, at 4:51 PM, Mike Stickel wrote: > I've run into a bit of trouble trying to figure something out > regarding image replacement and rollovers. I've the following JS on > the test site: > > The replacement works fantastically. The problem is that the > rollover doesn't work now. I'm a bit of a novice in JS at this > point in time so I'm not really sure how to modify the code from > quirksmode.org so that the rollovers work with the image > replacement. If anyone could shed some light on the subject for me > I would be eternally grateful ? this is the final part that is > needed to complete the project. From wdlists at triche-osborne.com Fri Sep 9 17:06:02 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Fri, 09 Sep 2005 17:06:02 -0500 Subject: [Javascript] Image replacement and rollovers [SOLVED] In-Reply-To: <3266B9A5-2085-4751-BDB6-706F4F256FA3@screenflicker.com> References: <94DBA685-A94E-4F65-9DF1-771518E9B20D@screenflicker.com> <3266B9A5-2085-4751-BDB6-706F4F256FA3@screenflicker.com> Message-ID: <4322074A.2050308@triche-osborne.com> Mike Stickel wrote: > Never mind. Got everything working how I wanted it to. Kind of sucks > that this email took 2 days to get to the list though. > True, but I expect even north Louisiana is feeling the effects of Katrina these days. It may be that normal operations were disrupted for a while and people were too busy dealing with the new normal to get right on it. Or maybe not. Cyberspace can be a mysterious place, full of treacher for unsuspecting emails. ;-) Triche From wdlists at triche-osborne.com Fri Sep 9 17:16:46 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Fri, 09 Sep 2005 17:16:46 -0500 Subject: [Javascript] addin via visibility or similar? In-Reply-To: References: Message-ID: <432209CE.20701@triche-osborne.com> Michael Borchers wrote: > i have form > for several products. > > the products data is stored in arrays. > > normally i have about 5 rows. > > > > > > until products_id[4] of course. > > now i would like to have an extra input field for adding X rows and make them visible > in the form without reloading the page. > is this possible with visible layers or even without preloading rows and generating > them on the fly? Given these restrictions, the only thing I can think of is fairly inelegant. In short: (1) Add the maximum number of input fields that you will allow someone to request. (2) Assign each INPUT an intelligent (sequential) ID attribute and a CLASS attribute styled to display: none. (3) Create a second class style for display: inline (or block, depending on how you're styling the rest). (4) When someone requests X number through the input field, use the ID fields to grab each INPUT in order and change its CLASS attribute value to the alternate style. I haven't tested this, but I have "added" single INPUTs for field dependencies, so I know the CSS part is sound. Revealing multiple ones is simply a matter of the JavaScript beginning with the initial ID and counting up to the value entered by the user. Triche From mdougherty at pbp.com Fri Sep 9 17:42:50 2005 From: mdougherty at pbp.com (Mike Dougherty) Date: Fri, 09 Sep 2005 18:42:50 -0400 Subject: [Javascript] Alert user when leaving site In-Reply-To: <4321F541.2070608@t8design.com> References: <4321F541.2070608@t8design.com> Message-ID: I'd like to be able to alert a user they're about to leave a page full of unsubmitted form data... if there is a script that does what Judah is asking for, i could probably make it work for me too. thanks. On Fri, 09 Sep 2005 15:49:05 -0500 Judah Frangipane wrote: > Does anyone have a script to alert a user when they leave a domain? I know they are annoying but >it's for a bank site. > > Best Regards, > Judah Frangipane > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > > __________________________________________________________ > This message was scanned by ATX > 5:50:43 PM ET - 9/9/2005 From mdougherty at pbp.com Fri Sep 9 17:49:09 2005 From: mdougherty at pbp.com (Mike Dougherty) Date: Fri, 09 Sep 2005 18:49:09 -0400 Subject: [Javascript] addin via visibility or similar? In-Reply-To: <432209CE.20701@triche-osborne.com> References: <432209CE.20701@triche-osborne.com> Message-ID: This should be doable on-the-fly with DOM insertions. If you had a hidden template, you could clone a whole row and insert it in only a few lines of code. It gets trickier if you want each object to have it's own id/name - but at that point, you could probably just write a wrapper function to which you pass an index. google: createElement() - and post again if you need more help. (directed back through the thread to Michael Borchers despite having replied to Triche) > Triche Osborne wrote: > Michael Borchers wrote: [snip] >> now i would like to have an extra input field for adding X rows and make them visible >> in the form without reloading the page. >> is this possible with visible layers or even without preloading rows and generating >> them on the fly? [snip] From junado at junado.com Fri Sep 9 18:06:49 2005 From: junado at junado.com (Julien Nadeau) Date: Fri, 09 Sep 2005 19:06:49 -0400 Subject: [Javascript] Alert user when leaving site In-Reply-To: References: <4321F541.2070608@t8design.com> Message-ID: <05EF652D-B4FB-4C31-A9B5-F460EA9C7CA1@junado.com> Here's at least part of the answer. Using the "unload" event (set to body), you can get the current URL using JavaScript: Leave Clicking the link will popup an alert with the domain in it. What has to be done is try to compare this string to the destination domain. I have no idea how to do this automatically, but you could modify my function to add it to every link in the page and add an destURL argument to compare (this could be done automatically by scanning the DOM for every element and adding events to each of theses). Julien Nadeau junado at junado.com Le 05-09-09 ? 18:42, Mike Dougherty a ?crit : > I'd like to be able to alert a user they're about to leave a page > full of unsubmitted form data... if there is a script that does > what Judah is asking for, i could probably make it work for me too. > > thanks. > > On Fri, 09 Sep 2005 15:49:05 -0500 > Judah Frangipane wrote: > >> Does anyone have a script to alert a user when they leave a >> domain? I know they are annoying but it's for a bank site. >> Best Regards, >> Judah Frangipane >> _______________________________________________ >> Javascript mailing list >> Javascript at LaTech.edu >> https://lists.LaTech.edu/mailman/listinfo/javascript >> __________________________________________________________ >> This message was scanned by ATX >> 5:50:43 PM ET - 9/9/2005 >> > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wdlists at triche-osborne.com Sat Sep 10 16:47:58 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Sat, 10 Sep 2005 16:47:58 -0500 Subject: [Javascript] Alert user when leaving site In-Reply-To: <05EF652D-B4FB-4C31-A9B5-F460EA9C7CA1@junado.com> References: <4321F541.2070608@t8design.com> <05EF652D-B4FB-4C31-A9B5-F460EA9C7CA1@junado.com> Message-ID: <4323548E.1020700@triche-osborne.com> Julien Nadeau wrote: > What has > to be done is try to compare this string to the destination domain. I > have no idea how to do this automatically, but you could modify my > function to add it to every link in the page and add an destURL > argument to compare (this could be done automatically by scanning the > DOM for every element and adding events to each of theses). > Another thought on this: Use an onload event (similar to those used for Suckerfish menus) to loop through all of a page's links and add an onclick event which passes this.hostname to a function which compares the link hostname to the current domain name. If they are the same, do nothing; if not, issue the alert. The alert will halt the transfer until cleared. Since the onclick event takes precedence over the link activation, you can eliminate the unload event. Triche From wdlists at triche-osborne.com Sat Sep 10 17:26:29 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Sat, 10 Sep 2005 17:26:29 -0500 Subject: [Javascript] Alert user when leaving site - Simplified In-Reply-To: <4323548E.1020700@triche-osborne.com> References: <4321F541.2070608@t8design.com> <05EF652D-B4FB-4C31-A9B5-F460EA9C7CA1@junado.com> <4323548E.1020700@triche-osborne.com> Message-ID: <43235D95.3090409@triche-osborne.com> The non-automated version would look like this: JS (linked or in page HEAD): function sayGoodbye(domainName) { if(window.location.hostname != domainName) { alert("B'Bye!"); } } Link structure: Link Text If you like, you can add the onclick event only to outgoing links. However, if you choose to automate the attachment of the onclick event through an onload function, the function is set up to perform only for outgoing links, so it won't matter that the onclick gets attached to every link. Triche From dwayne.conyers at hp.com Mon Sep 12 09:31:35 2005 From: dwayne.conyers at hp.com (Conyers, Dwayne) Date: Mon, 12 Sep 2005 09:31:35 -0500 Subject: [Javascript] Alert user when leaving site - Simplified Message-ID: Triche Osborne wrote: > If you like, you can add the onclick event only to outgoing links. What if a person leaves the site without clicking a link -- say through the nav bar or through a link on the browser toolbar or favorites? Just curious. -- Dwacon www.dwacon.com From judah-fc at t8design.com Mon Sep 12 10:10:05 2005 From: judah-fc at t8design.com (Judah Frangipane) Date: Mon, 12 Sep 2005 10:10:05 -0500 Subject: [Javascript] Alert user when leaving site - Simplified In-Reply-To: <43235D95.3090409@triche-osborne.com> References: <4321F541.2070608@t8design.com> <05EF652D-B4FB-4C31-A9B5-F460EA9C7CA1@junado.com> <4323548E.1020700@triche-osborne.com> <43235D95.3090409@triche-osborne.com> Message-ID: <43259A4D.1040605@t8design.com> Thanks everyone! Triche Osborne wrote: > The non-automated version would look like this: > > JS (linked or in page HEAD): > > function sayGoodbye(domainName) > { > if(window.location.hostname != domainName) > { > alert("B'Bye!"); > } > } > > Link structure: > > onclick="sayGoodbye(this.hostname);">Link Text > > If you like, you can add the onclick event only to outgoing links. > However, if you choose to automate the attachment of the onclick event > through an onload function, the function is set up to perform only for > outgoing links, so it won't matter that the onclick gets attached to > every link. > > Triche > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > From mdougherty at pbp.com Mon Sep 12 10:56:28 2005 From: mdougherty at pbp.com (Mike Dougherty) Date: Mon, 12 Sep 2005 11:56:28 -0400 Subject: [Javascript] Alert user when leaving site - Simplified In-Reply-To: References: Message-ID: My boss wanted me to trap a user leaving uncommited data in a form. "I don't want you to disable the BACK button, just usurp it" -- I told him that was wrong for many reasons. If a user leaves a page without hitting the submit button, they will learn that form submission won't work. I made the request rediculous to the Nth degree by suggesting that next management will want us to trap the windows shutdown key via javascript and prevent the computer from being turned off - or possibly preventing power failures while our site is being viewed.... On Mon, 12 Sep 2005 09:31:35 -0500 "Conyers, Dwayne" wrote: > Triche Osborne wrote: > >> If you like, you can add the onclick event only to outgoing links. > > What if a person leaves the site without clicking a link -- say through > the nav bar or through a link on the browser toolbar or favorites? > > Just curious. > > > -- > Dwacon > www.dwacon.com > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > __________________________________________________________ > This message was scanned by ATX > 10:32:57 AM ET - 9/12/2005 From wdlists at triche-osborne.com Mon Sep 12 12:30:36 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Mon, 12 Sep 2005 12:30:36 -0500 Subject: [Javascript] Alert user when leaving site - Simplified In-Reply-To: References: Message-ID: <4325BB3C.3080903@triche-osborne.com> Mike Dougherty wrote: > My boss wanted me to trap a user leaving uncommited data in a form. "I > don't want you to disable the BACK button, just usurp it" -- I told him > that was wrong for many reasons. If a user leaves a page without > hitting the submit button, they will learn that form submission won't > work. I made the request rediculous to the Nth degree by suggesting > that next management will want us to trap the windows shutdown key via > javascript and prevent the computer from being turned off - or possibly > preventing power failures while our site is being viewed.... > LOL! Be careful what you suggest. They may want you to implement it. ;-) Triche From alaneaston666 at hotmail.com Wed Sep 14 05:17:55 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Wed, 14 Sep 2005 11:17:55 +0100 Subject: [Javascript] No right click on images Message-ID: An HTML attachment was scrubbed... URL: From javascript at mattbarton.org Wed Sep 14 05:21:49 2005 From: javascript at mattbarton.org (Matt Barton) Date: Wed, 14 Sep 2005 11:21:49 +0100 Subject: [Javascript] No right click on images In-Reply-To: References: Message-ID: <4327F9BD.1060001@mattbarton.org> Hi Alan, Pretend that at this point I'm telling you all the things that loads of other people are likely to say about it being a bad idea, bad practice, pointless if the client doesn't have javascript enabled etc, etc, and so on ad. nauseum. What you want is something like: Hello All, > > I realise this type of function is quite pointless, but a client would > like it. > > I need to disable right click on images, but I DO NOT want any alert box > popping up, I merely do not want the right click menu to appear. > > I also need the right click to work on any other part of the screen, so > they can still right click and refresh, view source, etc.... > > Hope I have made myself clear, let me know if you need anything else > from me. > > As usual, any help would be really appreciated. > > Alan... > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net From alaneaston666 at hotmail.com Wed Sep 14 05:38:43 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Wed, 14 Sep 2005 11:38:43 +0100 Subject: [Javascript] No right click on images In-Reply-To: <4327F9BD.1060001@mattbarton.org> Message-ID: An HTML attachment was scrubbed... URL: From elmuchacho at gmail.com Wed Sep 14 05:50:55 2005 From: elmuchacho at gmail.com (Laurent Muchacho) Date: Wed, 14 Sep 2005 11:50:55 +0100 Subject: [Javascript] No right click on images References: Message-ID: <007a01c5b91a$30202b30$5100680a@persistenzl1> Hi Alan, You could try something like this for(var i=0; i var clickmessage="Images Copyright NC3Rs 2005" function disableclick(e) { if (document.all) { if (event.button==2||event.button==3) { if (event.srcElement.tagName=="IMG"){ alert(clickmessage); return false; } } } else if (document.layers) { if (e.which == 3) { alert(clickmessage); return false; } } else if (document.getElementById){ if (e.which==3&&e.target.tagName=="IMG"){ alert(clickmessage); return false; } } } function associateimages(){ for(i=0;i //-----------------code----------------------- Again, all help appreciated.......... Alan... ---------------------------------------------------------------------------- From: Matt Barton Reply-To: "\[JavaScript List\]" To: "[JavaScript List]" Subject: Re: [Javascript] No right click on images Date: Wed, 14 Sep 2005 11:21:49 +0100 >Hi Alan, > >Pretend that at this point I'm telling you all the things that loads >of other people are likely to say about it being a bad idea, bad >practice, pointless if the client doesn't have javascript enabled >etc, etc, and so on ad. nauseum. > >What you want is something like: > > > ... or ... > > >Try those, and have an experiment, I'm sure it's something like >that. > >Matt > >Alan Easton wrote: >>Hello All, >> I realise this type of function is quite pointless, but a client >>would like it. >> I need to disable right click on images, but I DO NOT want any >>alert box popping up, I merely do not want the right click menu to >>appear. >> I also need the right click to work on any other part of the >>screen, so they can still right click and refresh, view source, >>etc.... >> Hope I have made myself clear, let me know if you need anything >>else from me. >> As usual, any help would be really appreciated. >> Alan... >> >>-- >>This email has been verified as Virus free >>Virus Protection and more available at http://www.plus.net >> >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >>-- >>This email has been verified as Virus free >>Virus Protection and more available at http://www.plus.net >_______________________________________________ >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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From javascript at mattbarton.org Wed Sep 14 05:52:39 2005 From: javascript at mattbarton.org (Matt Barton) Date: Wed, 14 Sep 2005 11:52:39 +0100 Subject: [Javascript] No right click on images In-Reply-To: References: Message-ID: <432800F7.6070904@mattbarton.org> Apologies that I don't have much time for experimentation, but I'll just quote you a quick bit from my O'Reilly DHTML reference ... "To block the display of the context menu (and perhaps display a custom one of your own design via DHTML), set event.returnValue to false in the oncontextmenu event handler." It should be noted that oncontextmenu is IE5(Win) only, but you could try to get the same results by using onmousedown/onmouseup and interrogating the event.button property? Matt Alan Easton wrote: > Thanks Matt, > > This does work, oncontextmenu="return false;" > > however, the images involved are from a content management system, and > the client already has hundreds all over the site. > > I was hoping there could be a universal function I could paste into the > HEAD of the page, and it would effect all images, instead of having to > re-work all the existing images. > > I have been playing with this function, which works, but it has the > alert box popping up, and if I comment it out, the function does not work. > > Any ideas........ > > //------------------code----------------------- > > > > //-----------------code----------------------- > > Again, all help appreciated.......... > > Alan... > > ------------------------------------------------------------------------ > From: /Matt Barton / > Reply-To: /"\[JavaScript List\]" / > To: /"[JavaScript List]" / > Subject: /Re: [Javascript] No right click on images/ > Date: /Wed, 14 Sep 2005 11:21:49 +0100/ > >Hi Alan, > > > >Pretend that at this point I'm telling you all the things that loads > >of other people are likely to say about it being a bad idea, bad > >practice, pointless if the client doesn't have javascript enabled > >etc, etc, and so on ad. nauseum. > > > >What you want is something like: > > > > > > > ... or ... > > > > > > >Try those, and have an experiment, I'm sure it's something like > >that. > > > >Matt > > > >Alan Easton wrote: > >>Hello All, > >> I realise this type of function is quite pointless, but a client > >>would like it. > >> I need to disable right click on images, but I DO NOT want any > >>alert box popping up, I merely do not want the right click menu to > >>appear. > >> I also need the right click to work on any other part of the > >>screen, so they can still right click and refresh, view source, > >>etc.... > >> Hope I have made myself clear, let me know if you need anything > >>else from me. > >> As usual, any help would be really appreciated. > >> Alan... > >> > >>-- > >>This email has been verified as Virus free > >>Virus Protection and more available at http://www.plus.net > >> > >> > >> > >>------------------------------------------------------------------------ > >> > >>_______________________________________________ > >>Javascript mailing list > >>Javascript at LaTech.edu > >>https://lists.LaTech.edu/mailman/listinfo/javascript > >> > >>-- > >>This email has been verified as Virus free > >>Virus Protection and more available at http://www.plus.net > >_______________________________________________ > >Javascript mailing list > >Javascript at LaTech.edu > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net From trojani2000 at hotmail.com Wed Sep 14 06:03:36 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Wed, 14 Sep 2005 13:03:36 +0200 Subject: [Javascript] No right click on images In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From nick at nickfitz.co.uk Wed Sep 14 06:24:31 2005 From: nick at nickfitz.co.uk (Nick Fitzsimons) Date: Wed, 14 Sep 2005 12:24:31 +0100 (BST) Subject: [Javascript] No right click on images In-Reply-To: <007a01c5b91a$30202b30$5100680a@persistenzl1> References: <007a01c5b91a$30202b30$5100680a@persistenzl1> Message-ID: <56652.193.195.164.58.1126697071.squirrel@www.easilymail.co.uk> > Hi Alan, > > You could try something like this > > for(var i=0; i document.getElementsByTagName('IMG').oncontextmenu = function > (){return false} > } > > Laurent FWIW, those repeated call to document.getElementsByTagName are very inefficient, and there's no reason for the closure over the function. (Also, you missed off the indexing into the array :-) A faster method in terms of execution speed, which is also less likely to encounter problems from memory leaks, is to get all the images outside the loop and add a function reference: function cancelMenu() { return false; } window.onload = function() { var allImages = document.getElementsByTagName("img"); for (var i = 0; i < allImages.length; i++) { allImages[i].oncontextmenu = cancelMenu; } } (Note that the above clobbers any other onload handlers, so adapt it accordingly for your circumstances.) HTH, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/ From alaneaston666 at hotmail.com Wed Sep 14 07:59:42 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Wed, 14 Sep 2005 13:59:42 +0100 Subject: [Javascript] No right click on images In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From alaneaston666 at hotmail.com Wed Sep 14 08:01:17 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Wed, 14 Sep 2005 14:01:17 +0100 Subject: [Javascript] No right click on images In-Reply-To: <007a01c5b91a$30202b30$5100680a@persistenzl1> Message-ID: An HTML attachment was scrubbed... URL: From elmuchacho at gmail.com Wed Sep 14 08:10:03 2005 From: elmuchacho at gmail.com (Laurent Muchacho) Date: Wed, 14 Sep 2005 14:10:03 +0100 Subject: [Javascript] No right click on images References: Message-ID: <010501c5b92d$a0a9da00$5100680a@persistenzl1> Hi Alan, I will either put it at the end of the page or on an onload. Remember the comment made by Nick about the performance as well I didn't had time to go in details function cancelMenu(e) { return false; } window.onload = function() { var allImages = document.getElementsByTagName("img"); for (var i = 0; i < allImages.length; i++) { allImages[i].oncontextmenu = cancelMenu; } } ----- Original Message ----- From: Alan Easton To: javascript at LaTech.edu Sent: Wednesday, September 14, 2005 2:01 PM Subject: Re: [Javascript] No right click on images HI Laurent, Do you mean simply put this code in script tags in the HEAD of the document...?? ---------------------------------------------------------------------------- From: "Laurent Muchacho" Reply-To: "\[JavaScript List\]" To: "[JavaScript List]" Subject: Re: [Javascript] No right click on images Date: Wed, 14 Sep 2005 11:50:55 +0100 Hi Alan, You could try something like this for(var i=0; i var clickmessage="Images Copyright NC3Rs 2005" function disableclick(e) { if (document.all) { if (event.button==2||event.button==3) { if (event.srcElement.tagName=="IMG"){ alert(clickmessage); return false; } } } else if (document.layers) { if (e.which == 3) { alert(clickmessage); return false; } } else if (document.getElementById){ if (e.which==3&&e.target.tagName=="IMG"){ alert(clickmessage); return false; } } } function associateimages(){ for(i=0;i //-----------------code----------------------- Again, all help appreciated.......... Alan... ------------------------------------------------------------------------ From: Matt Barton Reply-To: "\[JavaScript List\]" To: "[JavaScript List]" Subject: Re: [Javascript] No right click on images Date: Wed, 14 Sep 2005 11:21:49 +0100 >Hi Alan, > >Pretend that at this point I'm telling you all the things that loads >of other people are likely to say about it being a bad idea, bad >practice, pointless if the client doesn't have javascript enabled >etc, etc, and so on ad. nauseum. > >What you want is something like: > > > ... or ... > > >Try those, and have an experiment, I'm sure it's something like >that. > >Matt > >Alan Easton wrote: >>Hello All, >> I realise this type of function is quite pointless, but a client >>would like it. >> I need to disable right click on images, but I DO NOT want any >>alert box popping up, I merely do not want the right click menu to >>appear. >> I also need the right click to work on any other part of the >>screen, so they can still right click and refresh, view source, >>etc.... >> Hope I have made myself clear, let me know if you need anything >>else from me. >> As usual, any help would be really appreciated. >> Alan... >> >>-- >>This email has been verified as Virus free >>Virus Protection and more available at http://www.plus.net >> >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >>-- >>This email has been verified as Virus free >>Virus Protection and more available at http://www.plus.net >_______________________________________________ >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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From elmuchacho at gmail.com Wed Sep 14 08:20:18 2005 From: elmuchacho at gmail.com (Laurent Muchacho) Date: Wed, 14 Sep 2005 14:20:18 +0100 Subject: [Javascript] No right click on images References: Message-ID: <011a01c5b92f$0e7b99f0$5100680a@persistenzl1> Hi Alan, I just tryied this out by putting this at the bottom of my page just before closing the body and this work fine in IE and Firefox function cancelMouseClick(e){ return false; } var allImages = document.getElementsByTagName('IMG') for(var i=0; allImages.length;i++){ allImages[i].oncontextmenu= cancelMouseClick; allImages[i].onmousedown= cancelMouseClick; allImages[i].onmouseup= cancelMouseClick; } or you could have it in the onload of the document as describe below function cancelMouseClick(e){ return false; } function onload_cancelMouseClick(){ var allImages = document.getElementsByTagName('IMG') for(var i=0; allImages.length;i++){ allImages[i].oncontextmenu= cancelMouseClick; allImages[i].onmousedown= cancelMouseClick; allImages[i].onmouseup= cancelMouseClick; } ) window.onload = onload_cancelMouseClick; Laurent ----- Original Message ----- From: Alan Easton To: javascript at LaTech.edu Sent: Wednesday, September 14, 2005 2:01 PM Subject: Re: [Javascript] No right click on images HI Laurent, Do you mean simply put this code in script tags in the HEAD of the document...?? ---------------------------------------------------------------------------- From: "Laurent Muchacho" Reply-To: "\[JavaScript List\]" To: "[JavaScript List]" Subject: Re: [Javascript] No right click on images Date: Wed, 14 Sep 2005 11:50:55 +0100 Hi Alan, You could try something like this for(var i=0; i var clickmessage="Images Copyright NC3Rs 2005" function disableclick(e) { if (document.all) { if (event.button==2||event.button==3) { if (event.srcElement.tagName=="IMG"){ alert(clickmessage); return false; } } } else if (document.layers) { if (e.which == 3) { alert(clickmessage); return false; } } else if (document.getElementById){ if (e.which==3&&e.target.tagName=="IMG"){ alert(clickmessage); return false; } } } function associateimages(){ for(i=0;i //-----------------code----------------------- Again, all help appreciated.......... Alan... ------------------------------------------------------------------------ From: Matt Barton Reply-To: "\[JavaScript List\]" To: "[JavaScript List]" Subject: Re: [Javascript] No right click on images Date: Wed, 14 Sep 2005 11:21:49 +0100 >Hi Alan, > >Pretend that at this point I'm telling you all the things that loads >of other people are likely to say about it being a bad idea, bad >practice, pointless if the client doesn't have javascript enabled >etc, etc, and so on ad. nauseum. > >What you want is something like: > > > ... or ... > > >Try those, and have an experiment, I'm sure it's something like >that. > >Matt > >Alan Easton wrote: >>Hello All, >> I realise this type of function is quite pointless, but a client >>would like it. >> I need to disable right click on images, but I DO NOT want any >>alert box popping up, I merely do not want the right click menu to >>appear. >> I also need the right click to work on any other part of the >>screen, so they can still right click and refresh, view source, >>etc.... >> Hope I have made myself clear, let me know if you need anything >>else from me. >> As usual, any help would be really appreciated. >> Alan... >> >>-- >>This email has been verified as Virus free >>Virus Protection and more available at http://www.plus.net >> >> >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >>-- >>This email has been verified as Virus free >>Virus Protection and more available at http://www.plus.net >_______________________________________________ >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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From alaneaston666 at hotmail.com Wed Sep 14 08:27:31 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Wed, 14 Sep 2005 14:27:31 +0100 Subject: [Javascript] No right click on images In-Reply-To: <011a01c5b92f$0e7b99f0$5100680a@persistenzl1> Message-ID: An HTML attachment was scrubbed... URL: From alaneaston666 at hotmail.com Wed Sep 14 08:36:21 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Wed, 14 Sep 2005 14:36:21 +0100 Subject: [Javascript] No right click on images In-Reply-To: <011a01c5b92f$0e7b99f0$5100680a@persistenzl1> Message-ID: An HTML attachment was scrubbed... URL: From alaneaston666 at hotmail.com Wed Sep 14 10:04:13 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Wed, 14 Sep 2005 16:04:13 +0100 Subject: [Javascript] No right click on images In-Reply-To: <010501c5b92d$a0a9da00$5100680a@persistenzl1> Message-ID: An HTML attachment was scrubbed... URL: From trojani2000 at hotmail.com Wed Sep 14 23:32:26 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Thu, 15 Sep 2005 06:32:26 +0200 Subject: [Javascript] No right click on images In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From alaneaston666 at hotmail.com Thu Sep 15 03:06:23 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Thu, 15 Sep 2005 09:06:23 +0100 Subject: [Javascript] No right click on images In-Reply-To: Message-ID: An HTML attachment was scrubbed... URL: From alaneaston666 at hotmail.com Thu Sep 15 07:03:25 2005 From: alaneaston666 at hotmail.com (Alan Easton) Date: Thu, 15 Sep 2005 13:03:25 +0100 Subject: [Javascript] No right click on images In-Reply-To: <432966D0.3090002@triche-osborne.com> Message-ID: An HTML attachment was scrubbed... URL: From wdlists at triche-osborne.com Thu Sep 15 07:19:28 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Thu, 15 Sep 2005 07:19:28 -0500 Subject: [Javascript] No right click on images In-Reply-To: References: Message-ID: <432966D0.3090002@triche-osborne.com> Alan Easton wrote: > > I realise you cannot prevent your images being taken, all developers know it, > but it is basically a bit of "piece and mind" for the client. They feel > something like this enough of a deterent to the normal web user. > Hi Alan, I know you've already said somewhere in this thready, though I can't recall where that in this case you were dealing with an extant site with lots of images. Given that, I can see why you might want something that doesn't take a lot of fuss to do, especially if all you're protecting is graphics. So . . . the following is offered only as an alternative for future reference: I have two clients who are commercial photographers. Both realize that you can't stop a determined thief, but both (understandably) wish to discourage casual swiping. Since I get really annoyed at disabled context menus--especially since you can turn off JS and disable the script--I've resorted to a non-JS solution that's a bit more complex but less intrusive. For each image display, I create a DIV the same size as the image with the photo as its background, then put a single-pixel transparent image stretched to exactly the same size within it. If the viewer right-clicks and tries to view or save the image, they get the transparent GIF, and since it exactly covers the background, they can't reach the background image to save or print it. As I said, this takes a bit more work, and I wouldn't bother unless I was building the site from scratch and the pictures are the source of income. I'm just throwing it out for an alternative. You never know when it may come in handy. Triche From trojani2000 at hotmail.com Thu Sep 15 10:17:49 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Thu, 15 Sep 2005 17:17:49 +0200 Subject: [Javascript] No right click-Web dialog! In-Reply-To: <432966D0.3090002@triche-osborne.com> Message-ID: An HTML attachment was scrubbed... URL: From trojani2000 at hotmail.com Thu Sep 15 10:19:04 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Thu, 15 Sep 2005 17:19:04 +0200 Subject: [Javascript] No right click-Web dialog! In-Reply-To: <432966D0.3090002@triche-osborne.com> Message-ID: An HTML attachment was scrubbed... URL: From wdlists at triche-osborne.com Thu Sep 15 12:00:23 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Thu, 15 Sep 2005 12:00:23 -0500 Subject: [Javascript] No right click-Web dialog! In-Reply-To: References: Message-ID: <4329A8A7.2020902@triche-osborne.com> Troy III Ajnej wrote: > This is a very good idea, but it takes to much of coding & overcoding. Geting > the div's exact size, setting the background, positioning exactly the > transparent image again, streching it to fill the div and all over again untill > the last image. It will at least take trice the weight than it would normally > take. And the code would bebome very unreadable. > Not at all. I use a single JavaScript to write out the DIVs and IMG tags on the fly. The only thing it requires is a single function to do the two docwrites and a short function call where you need to write an image in which includes the image name, width and height. That's no more trouble than adding the IMG tag itself. Triche From trojani2000 at hotmail.com Thu Sep 15 22:40:06 2005 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Fri, 16 Sep 2005 05:40:06 +0200 Subject: [Javascript] No right click-Web dialog! In-Reply-To: <4329A8A7.2020902@triche-osborne.com> Message-ID: An HTML attachment was scrubbed... URL: From wdlists at triche-osborne.com Fri Sep 16 08:24:32 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Fri, 16 Sep 2005 08:24:32 -0500 Subject: [Javascript] No right click-Web dialog! In-Reply-To: References: Message-ID: <432AC790.8050001@triche-osborne.com> Troy III Ajnej wrote: > > But again I'm afraid it would take me a lot of nerves to position them rightly > and se if none of the text paragraphs flees under, over,left, right,top of the > wrong image, position text objects absolutely also, etc? Because both the > img-div and the img-transparent would have to be absolutely positioned in case > you want them overlaped and give them some fancy position on the document flow. > I guess I wasn't very clear. You just do one inside the other, and use JS (or PHP, if you're using a db to manage the site) to write out this:
An entry in the style sheet closes any gaps around the image: .class, .photo { border: 0; padding: 0; } .photo { margin: 0; } What you do with the DIV as far as positioning depends on how it's used in the page. Remember, I said I only use this method for art and photography clients. Most of their work is displayed gallery-style, usually with small thumbnails that are clicked to produce an enlargment in a popup or a single target. Since the thumbnails are so small--usually less that 150px wide, and more often 50x50px--the only image that receives this treatment is the enlargement. On regular sites, I discourage clients from trying to protect images, and once I demonstrate how quickly I can capture an image on a site that's supposedly protecting them, they usually get the point. ;-) With the photographers, it's different. They know you can't completely protect them. Their goal is simply to make it difficult enough that it discourages casual theft, like someone who might swipe their photo of cousin Jane's wedding instead of paying for one. Triche From Dstoltz at SHH.ORG Mon Sep 19 12:43:46 2005 From: Dstoltz at SHH.ORG (David Stoltz) Date: Mon, 19 Sep 2005 13:43:46 -0400 Subject: [Javascript] Controling a SELECT from a child window Message-ID: <487E7D0857FE094590BF2DC33FE3E1088C2A3B@SHHS-MAIL.SHH.ORG> Hi All, I have a problem - I am popping up a child window, and I need to: 1) Clear a select box on the parent of all it's options 2) Add new options to the select box on the parent window 3) Select (highlight) an option in the select box on the parent window Can anyone give me any code how I can do this from the CHILD window? I am trying with this so far to select an option, with no luck: window.opener.document.form1.mylist.option[0].selected=true; Thanks for any help From peter at brunone.com Mon Sep 19 13:23:32 2005 From: peter at brunone.com (Peter Brunone) Date: Mon, 19 Sep 2005 11:23:32 -0700 Subject: [Javascript] Controling a SELECT from a child window Message-ID: <6e57381d87fb48a298981efb818c465e@brunone.com> Hi David, You should be able to use the same syntax, as long as you refer to it through the window.opener object... When someone tells me "it doesn't work", I automatically ask what is really going on. Are you seeing an error message -- and if so, what does it say -- or is something unexpected happening, or is nothing at all happening? Cheers, Peter From: "David Stoltz" Dstoltz at SHH.ORG Hi All, I have a problem - I am popping up a child window, and I need to: 1) Clear a select box on the parent of all it's options 2) Add new options to the select box on the parent window 3) Select (highlight) an option in the select box on the parent window Can anyone give me any code how I can do this from the CHILD window? I am trying with this so far to select an option, with no luck: window.opener.document.form1.mylist.option[0].selected=true; Thanks for any help -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvinayakam at gmail.com Tue Sep 20 05:04:03 2005 From: mvinayakam at gmail.com (Vinayakam Murugan) Date: Tue, 20 Sep 2005 15:34:03 +0530 Subject: [Javascript] document.getElementById has no properties Message-ID: Hi I am trying to append a preloaded image to a tag. It is giving me the following error Error: document.getElementById("bottomback") has no properties Source File: http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&Class_Id=first Line: 63 ------------------------------------------ ------------------------------------------ Any ideas, I have googled but it didn't help much. -- Warm Regards ~~~~~~~~~~~~~~~ Vinayak http://theregoesanotherday.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dstoltz at SHH.ORG Tue Sep 20 07:03:39 2005 From: Dstoltz at SHH.ORG (David Stoltz) Date: Tue, 20 Sep 2005 08:03:39 -0400 Subject: [Javascript] Controling a SELECT from a child window Message-ID: <487E7D0857FE094590BF2DC33FE3E1088C2A48@SHHS-MAIL.SHH.ORG> I get an error that says "window.opener.document.form1.mylist.option" is null or is not an object ________________________________ From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Sent: Monday, September 19, 2005 2:24 PM To: javascript at LaTech.edu Subject: re: [Javascript] Controling a SELECT from a child window Hi David, You should be able to use the same syntax, as long as you refer to it through the window.opener object... When someone tells me "it doesn't work", I automatically ask what is really going on. Are you seeing an error message -- and if so, what does it say -- or is something unexpected happening, or is nothing at all happening? Cheers, Peter From: "David Stoltz" Dstoltz at SHH.ORG Hi All, I have a problem - I am popping up a child window, and I need to: 1) Clear a select box on the parent of all it's options 2) Add new options to the select box on the parent window 3) Select (highlight) an option in the select box on the parent window Can anyone give me any code how I can do this from the CHILD window? I am trying with this so far to select an option, with no luck: window.opener.document.form1.mylist.option[0].selected=true; Thanks for any help -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dstoltz at SHH.ORG Tue Sep 20 08:12:13 2005 From: Dstoltz at SHH.ORG (David Stoltz) Date: Tue, 20 Sep 2005 09:12:13 -0400 Subject: [Javascript] Controling a SELECT from a child window Message-ID: <487E7D0857FE094590BF2DC33FE3E1088C2A4B@SHHS-MAIL.SHH.ORG> I think I got it: It should be: window.opener.document.form1.mylist.options[0].selected=true; not: window.opener.document.form1.mylist.option[0].selected=true; The "option" should be "options" ________________________________ From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Stoltz Sent: Tuesday, September 20, 2005 8:04 AM To: [JavaScript List] Subject: RE: [Javascript] Controling a SELECT from a child window I get an error that says "window.opener.document.form1.mylist.option" is null or is not an object ________________________________ From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Sent: Monday, September 19, 2005 2:24 PM To: javascript at LaTech.edu Subject: re: [Javascript] Controling a SELECT from a child window Hi David, You should be able to use the same syntax, as long as you refer to it through the window.opener object... When someone tells me "it doesn't work", I automatically ask what is really going on. Are you seeing an error message -- and if so, what does it say -- or is something unexpected happening, or is nothing at all happening? Cheers, Peter From: "David Stoltz" Dstoltz at SHH.ORG Hi All, I have a problem - I am popping up a child window, and I need to: 1) Clear a select box on the parent of all it's options 2) Add new options to the select box on the parent window 3) Select (highlight) an option in the select box on the parent window Can anyone give me any code how I can do this from the CHILD window? I am trying with this so far to select an option, with no luck: window.opener.document.form1.mylist.option[0].selected=true; Thanks for any help -------------- next part -------------- An HTML attachment was scrubbed... URL: From wdlists at triche-osborne.com Tue Sep 20 09:51:17 2005 From: wdlists at triche-osborne.com (Triche Osborne) Date: Tue, 20 Sep 2005 09:51:17 -0500 Subject: [Javascript] document.getElementById has no properties In-Reply-To: References: Message-ID: <433021E5.3060607@triche-osborne.com> Vinayakam Murugan wrote: > Hi > > I am trying to append a preloaded image to a tag. It is giving me the > following error > > Error: document.getElementById("bottomback") has no properties > Source File: > http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&Class_Id=first > Line: 63 > > ------------------------------------------ > > > > I tested this twice, once with a child SPAN I made up and once with your URL query but without (obviously) your image array. The first test looked like this: document.getElementById("bottomback").appendChild(newSpan); It successfully attaches the span to bottomback. The second test worked as I expected, returning the error message "top.bottombar has no properties". It writes out the following script source code: document.getElementById("bottomback").appendChild(top.bottombar[1][01]); Neither of these tests refuses to recognize bottomback itself. (Though unless your PHP is printing more than just a URL there, that showmouse() function is out of place.) Since the SPAN attached just fine, recheck the code that you're using to create the top.bottombar array to be sure there's something there. Also, be sure that you are recognizing 01 in the second dimension, not just 1. Triche From peter at brunone.com Tue Sep 20 10:15:53 2005 From: peter at brunone.com (Peter Brunone) Date: Tue, 20 Sep 2005 08:15:53 -0700 Subject: [Javascript] document.getElementById has no properties Message-ID: Vinayak, It looks like maybe your server-side PHP stuff isn't executing...? If so, those angle brackets inside your anchor tag could be wreaking havoc on the HTML parser. What do you see around there when you View Source in the browser? Peter From: Vinayakam Murugan mvinayakam at gmail.com Hi I am trying to append a preloaded image to a tag. It is giving me the following error Error: document.getElementById("bottomback") has no properties Source File: http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&Class_Id=first Line: 63 ------------------------------------------ ------------------------------------------ Any ideas, I have googled but it didn't help much. -- Warm Regards ~~~~~~~~~~~~~~~ Vinayak http://theregoesanotherday.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Tue Sep 20 10:18:02 2005 From: peter at brunone.com (Peter Brunone) Date: Tue, 20 Sep 2005 08:18:02 -0700 Subject: [Javascript] Controling a SELECT from a child window Message-ID: Okay... what happens when you try to manipulate the list from the current window instead (minus the window.opener part)? Wait a minute. I think the problem lies in your use of "option" instead of "options". From: "David Stoltz" Dstoltz at SHH.ORG I get an error that says "window.opener.document.form1.mylist.option" is null or is not an object From: javascript-bounces at LaTech.edu On Behalf Of Peter Brunone Hi David, You should be able to use the same syntax, as long as you refer to it through the window.opener object... When someone tells me "it doesn't work", I automatically ask what is really going on. Are you seeing an error message -- and if so, what does it say -- or is something unexpected happening, or is nothing at all happening? Cheers, Peter From: "David Stoltz" Dstoltz at SHH.ORG Hi All, I have a problem - I am popping up a child window, and I need to: 1) Clear a select box on the parent of all it's options 2) Add new options to the select box on the parent window 3) Select (highlight) an option in the select box on the parent window Can anyone give me any code how I can do this from the CHILD window? I am trying with this so far to select an option, with no luck: window.opener.document.form1.mylist.option[0].selected=true; Thanks for any help -------------- next part -------------- An HTML attachment was scrubbed... URL: From Dstoltz at SHH.ORG Tue Sep 20 11:40:10 2005 From: Dstoltz at SHH.ORG (David Stoltz) Date: Tue, 20 Sep 2005 12:40:10 -0400 Subject: [Javascript] Controling a SELECT from a child window Message-ID: <487E7D0857FE094590BF2DC33FE3E1088C2A54@SHHS-MAIL.SHH.ORG> Actually - everything works now except ADDING an option to the select box (on the parent page)...the following fails: window.opener.document.form1.mylist.options[window.opener.document.form1 .mylist.length] = new Option('yourText', 'yourValue'); So does this: var opt = new Option('text', 'value'); var sel = window.opener.document.form1.mylist; sel.options[sel.options.length] = opt; window.opener.document.form1.mylist.options[window.opener.document.form1 .mylist.options.length] = opt; Both give a "Server threw an exception" error... Any ideas? Perhaps you cannot add an item to a select box on a parent window? ________________________________ From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Stoltz Sent: Tuesday, September 20, 2005 8:04 AM To: [JavaScript List] Subject: RE: [Javascript] Controling a SELECT from a child window I get an error that says "window.opener.document.form1.mylist.option" is null or is not an object ________________________________ From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Sent: Monday, September 19, 2005 2:24 PM To: javascript at LaTech.edu Subject: re: [Javascript] Controling a SELECT from a child window Hi David, You should be able to use the same syntax, as long as you refer to it through the window.opener object... When someone tells me "it doesn't work", I automatically ask what is really going on. Are you seeing an error message -- and if so, what does it say -- or is something unexpected happening, or is nothing at all happening? Cheers, Peter From: "David Stoltz" Dstoltz at SHH.ORG Hi All, I have a problem - I am popping up a child window, and I need to: 1) Clear a select box on the parent of all it's options 2) Add new options to the select box on the parent window 3) Select (highlight) an option in the select box on the parent window Can anyone give me any code how I can do this from the CHILD window? I am trying with this so far to select an option, with no luck: window.opener.document.form1.mylist.option[0].selected=true; Thanks for any help -------------- next part -------------- An HTML attachment was scrubbed... URL: From junado at junado.com Tue Sep 20 16:14:24 2005 From: junado at junado.com (Julien Nadeau) Date: Tue, 20 Sep 2005 17:14:24 -0400 Subject: [Javascript] document.getElementById has no properties In-Reply-To: References: Message-ID: It's hard to get an idea of what's going wrong without a live example, but I can think of two things: 1) Your $Back_Link PHP variable could contain faulty characters (I'm thinking about \, ', "... theses chars, if not escaped, would wreck havoc on your "rendered" source). or 2) If your PHP is configured with register_globals = off, $Language_Id should be called as $_GET['Language_id'] (turning off register_globals is a good thing, too). If this is not the problem, I would suggest you start debugging by changing the appendChild statement to try and append a textNode to your tag, just to see if this works. If it does, then you know that you have to narrow your debugging to your top.bottombar[1][] part. Something like this: Julien Nadeau junado at junado.com Le 05-09-20 ? 06:04, Vinayakam Murugan a ?crit : > Hi > > I am trying to append a preloaded image to a tag. It is giving me > the following error > > Error: document.getElementById("bottomback") has no properties > Source File: http://192.168.100.11/app_dir/layout/preload.php? > Language_Id=01&Class_Id=first > Line: 63 > > ------------------------------------------ > > > > > ------------------------------------------ > > Any ideas, I have googled but it didn't help much. > > -- > Warm Regards > ~~~~~~~~~~~~~~~ > Vinayak > http://theregoesanotherday.blogspot.com/ > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvinayakam at gmail.com Tue Sep 20 20:27:37 2005 From: mvinayakam at gmail.com (Vinayakam Murugan) Date: Wed, 21 Sep 2005 06:57:37 +0530 Subject: [Javascript] document.getElementById has no properties In-Reply-To: <433021E5.3060607@triche-osborne.com> References: <433021E5.3060607@triche-osborne.com> Message-ID: Hi The problem got resolved. I put the appendchild code in the onload event of body and it worked. Thanks for your help. On 9/20/05, Triche Osborne wrote: > > Vinayakam Murugan wrote: > > Hi > > > > I am trying to append a preloaded image to a tag. It is giving me the > > following error > > > > Error: document.getElementById("bottomback") has no properties > > Source File: > > > http://192.168.100.11/app_dir/layout/preload.php?Language_Id=01&Class_Id=first > > Line: 63 > > > > ------------------------------------------ > > > > > > > > > I tested this twice, once with a child SPAN I made up and once with your > URL query but without (obviously) your image array. > > The first test looked like this: > document.getElementById("bottomback").appendChild(newSpan); > > It successfully attaches the span to bottomback. > > The second test worked as I expected, returning the error message > "top.bottombar has no properties". It writes out the following script > source code: > document.getElementById("bottomback").appendChild(top.bottombar[1][01]); > > Neither of these tests refuses to recognize bottomback itself. (Though > unless your PHP is printing more than just a URL there, that showmouse() > function is out of place.) > > Since the SPAN attached just fine, recheck the code that you're using to > create the top.bottombar array to be sure there's something there. Also, > be sure that you are recognizing 01 in the second dimension, not just 1. > > Triche > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > -- Warm Regards ~~~~~~~~~~~~~~~ Vinayak http://theregoesanotherday.blogspot.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Tue Sep 20 23:46:00 2005 From: peter at brunone.com (Peter Brunone) Date: Tue, 20 Sep 2005 21:46:00 -0700 Subject: [Javascript] Controling a SELECT from a child window Message-ID: <295a9b4156524bd79a06db587e755fbc@brunone.com> Weird. Does it say which line? Also, did you increase the length of the options collection by 1 before adding the new option (in which case the index would be options.length - 1)? (hopefully this will come through sooner than my *last* message, which was delayed for hours and came through after you answered your own question) From: "David Stoltz" Dstoltz at SHH.ORG Actually - everything works now except ADDING an option to the select box (on the parent page)...the following fails: window.opener.document.form1.mylist.options[window.opener.document.form1.mylist.length] = new Option('yourText', 'yourValue'); So does this: var opt = new Option('text', 'value'); var sel = window.opener.document.form1.mylist; sel.options[sel.options.length] = opt; window.opener.document.form1.mylist.options[window.opener.document.form1.mylist.options.length] = opt; Both give a "Server threw an exception" error... Any ideas? Perhaps you cannot add an item to a select box on a parent window? From: javascript-bounces at LaTech.edu On Behalf Of David Stoltz I get an error that says "window.opener.document.form1.mylist.option" is null or is not an object From: javascript-bounces at LaTech.edu On Behalf Of Peter Brunone Hi David, You should be able to use the same syntax, as long as you refer to it through the window.opener object... When someone tells me "it doesn't work", I automatically ask what is really going on. Are you seeing an error message -- and if so, what does it say -- or is something unexpected happening, or is nothing at all happening? Cheers, Peter From: "David Stoltz" Dstoltz at SHH.ORG Hi All, I have a problem - I am popping up a child window, and I need to: 1) Clear a select box on the parent of all it's options 2) Add new options to the select box on the parent window 3) Select (highlight) an option in the select box on the parent window Can anyone give me any code how I can do this from the CHILD window? I am trying with this so far to select an option, with no luck: window.opener.document.form1.mylist.option[0].selected=true; Thanks for any help -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick at nickfitz.co.uk Wed Sep 21 02:51:49 2005 From: nick at nickfitz.co.uk (Nick Fitzsimons) Date: Wed, 21 Sep 2005 08:51:49 +0100 (BST) Subject: [Javascript] Controling a SELECT from a child window In-Reply-To: <487E7D0857FE094590BF2DC33FE3E1088C2A54@SHHS-MAIL.SHH.ORG> References: <487E7D0857FE094590BF2DC33FE3E1088C2A54@SHHS-MAIL.SHH.ORG> Message-ID: <63997.193.195.164.58.1127289109.squirrel@www.easilymail.co.uk> > Actually - everything works now except ADDING an option to the select > box (on the parent page)...the following fails: > > Perhaps you cannot add an item to a select box on a parent window? > As you surmise, it's probably something to do with the fact that you're creating the option element in one window and trying to add it to the document in another - this is not allowed under the DOM standard. Try: var newOptionText = window.opener.document.createTextNode("Your text"); var newOption = window.opener.document.createElement("option"); newOption.appendChild(newOptionText); newOption.setAttribute("value", Your value"); window.opener.document.form1.mylist.appendChild(newOption); which uses the opener window's document to create the text node, and should therefore be OK. It's also going to work cross-browser (IE, Mozilla Firefox, Opera and any other browser that supports the DOM), whereas I think I'm correct in saying that new Option() is a non-standard Internet-Explorer-only technique. (BTW, I haven't tested the above code, but barring typing mistakes, it should work :-) HTH, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/ From Marty at assetresearch.com Wed Sep 21 03:00:34 2005 From: Marty at assetresearch.com (Martin Franklin) Date: Wed, 21 Sep 2005 01:00:34 -0700 Subject: [Javascript] automated response Message-ID: <10509210100.AA02008@assetresearch.com> Greetings I will be on vacation from Sept 22, 2005 through Oct 11, 2005. Best Regards, Martin Franklin Marty at assetresearch.com From pnjaisan at yahoo.com Wed Sep 21 07:00:13 2005 From: pnjaisan at yahoo.com (Jai Sankar N) Date: Wed, 21 Sep 2005 05:00:13 -0700 (PDT) Subject: [Javascript] Permision Denied error - reg Message-ID: <20050921120013.8862.qmail@web50308.mail.yahoo.com> Sir, i'm developing dynamic website for our university. i have small editor for update the data's through website. it's working fine but when i try to using format like as bold, italic ... while give permision denied error in status bar but that data successfuly stored in database. in same time when i insert image, the same error occur and image is not store in specified folder. i give's permision(IUSR_, IWAM_, Guest and all system users with FULL Control and SCRRUN.DLL file also) for my relative and absolute folder. but same error occur. this is a my code <%if(session("user")<>"")then Set fileobject = Server.CreateObject("Scripting.FileSystemObject") set scriptobject=server.CreateObject("scripting.filesystemobject") set scriptobject1=server.CreateObject("scripting.filesystemobject") set rs_temp=server.CreateObject("adodb.recordset") set rs_tempbot=server.CreateObject("adodb.recordset") fld_nm="/Common" createfolder(fld_nm) fld_nm="/Common\Images" createfolder(fld_nm) img_ref_fldnm="/Common\Temp" 'lkcode=1----------About university 'lkcode=2----------Trust 'lkcode=3----------Exam&Result 'lkcode=4----------Online 'lkcode=5----------Webmail if request.QueryString("lkcode")=1 then ph_ref="About" Com=1 val="About VMRF - Deemed University " elseif request.QueryString("lkcode")=2 then ph_ref="Trust" Com=2 val="About Trust" elseif request.QueryString("lkcode")=3 then ph_ref="Exams" Com=11 val="Examinations And Results" elseif request.QueryString("lkcode")=4 then ph_ref="Online" Com=14 val="Online Programs" elseif request.QueryString("lkcode")=5 then ph_ref="Webmail" Com=15 val="WEBMAIL" end if if request.QueryString("fw")="ls" then rs_temp.open "select * from cont_type where lk_code_in="&request.QueryString("lkcode"),con,2,2 if rs_temp.eof then response.Redirect("un_com_det.asp?fw=nw&Com="&Com&"&lkcode="&request.QueryString("lkcode")) end if elseif request.QueryString("fw")="sv" then rs_temp.Open "select max(t1_code_in) from cont_type",con,2,2 if rs_temp.Fields (0)>0 then inc=rs_temp.Fields(0)+1 else inc=1 end if rs_temp.Close ref_ref=0 'this is for increment var for image count. like ..0,1,2,3,4,..etc. quizpath="" if(not Request.Cookies("ref")="")then 'set scriptobject=server.CreateObject("scripting.filesystemobject") if scriptobject.FolderExists (server.MapPath (img_ref_fldnm)) then set img_det=ScriptObject.GetFolder(server.MapPath(img_ref_fldnm)) for each img_name in img_det.files final_val=split(img_name,"\") value=split(final_val(ubound(final_val)),".") val_ref=split(value(ubound(value)-1),"_") img_value_ref="" for idx_idx=0 to ubound(val_ref)-1 if img_value_ref="" then img_value_ref=val_ref(idx_idx) else img_value_ref=img_value_ref&"_"&val_ref(idx_idx) end if next if img_value_ref=ph_ref&"_"&trim(Request.Cookies("ref")) then scriptobject.CopyFile server.MapPath(img_ref_fldnm&"\"&final_val(ubound(final_val))),server.MapPath(fld_nm&"\"&final_val(ubound(final_val))) scriptobject.DeleteFile server.MapPath(img_ref_fldnm&"\"&final_val(ubound(final_val))) end if next end if end if Response.Cookies("ref")="" rs_temp.open "select * from cont_type",con,2,2 rs_temp.addnew rs_temp.fields("t1_code_in")=inc rs_temp.fields("lk_code_in")=request.QueryString("lkcode") 'rs_temp.fields("t1_desc_nt")=getText(Request.Form("Description1"),Request.Form("images"),inc,ph_ref,fld_nm) rs_temp.fields("t1_desc_nt")=Request.Form("Description") rs_temp.fields("t1_date_vc")=cstr(date) rs_temp.update response.Redirect("un_com_det.asp?fw=ls&sv=ok&Com="&Com&"&name="&request.Form("title_rcp")&"&lkcode="&request.QueryString("lkcode")) elseif request.QueryString("fw")="edsv" then if not Request.Form("images")="" then img=split(Request.Form("images"),",") for idx=0 to ubound(img) img_ref=split(img(idx),"/") allow=false value="" for idx1=0 to ubound(img_ref)-1 if allow=true then if value="" then value=img_ref(idx1) else value=value&"/"&img_ref(idx1) end if end if Response.Write(value) if Request.ServerVariables("HTTP_HOST")=img_ref(idx1) then allow=true end if next if allow=true then value=value&"/"&ph_ref&"_"&Request.QueryString ("edcode")&"_"&img_ref(ubound(img_ref)) if ScriptObject.FileExists (server.MapPath (value)) then scriptobject.CopyFile server.MapPath(value),server.MapPath(fld_nm&"/"&ph_ref&"_"&Request.QueryString ("edcode")&"_"&img_ref(ubound(img_ref))) end if end if next end if if(not Request.Cookies("ref")="")then if scriptobject.FolderExists (server.MapPath (img_ref_fldnm)) then set img_det=ScriptObject.GetFolder(server.MapPath(img_ref_fldnm)) for each img_name in img_det.files img_ref=split(img_name,"\") if ScriptObject.FileExists (server.MapPath (img_ref_fldnm&"\"&img_ref(ubound(img_ref)))) then if scriptobject.FolderExists (server.MapPath (fld_nm)) then set img_det1=ScriptObject1.GetFolder(server.MapPath(fld_nm)) for each img_name1 in img_det1.files img_ref1=split(img_name1,"\") img_ext=split(img_ref1(ubound(img_ref1)),".") img_snd=split(mid(img_ref(ubound(img_ref)),instr(1,img_ref(ubound(img_ref)),"_")+1),".") if cstr(img_ext(ubound(img_ext)-1))=cstr(img_snd(ubound(img_snd)-1)) then scriptobject1.DeleteFile server.MapPath(fld_nm&"\"&img_ref1(ubound(img_ref1))) end if next end if scriptobject.CopyFile server.MapPath(img_ref_fldnm&"\"&img_ref(ubound(img_ref))),server.MapPath(fld_nm&"\"&img_ref(ubound(img_ref))) scriptobject.DeleteFile server.MapPath(img_ref_fldnm&"\"&img_ref(ubound(img_ref))) end if next end if end if set scriptobject1=nothing Response.Cookies("ref")="" rs_temp.open "select * from cont_type where lk_code_in="&request.QueryString("lkcode"),con,2,2 rs_temp.fields("t1_desc_nt")=getText(request.Form("Description"),Request.Form("images"),Request.QueryString("edcode"),ph_ref,fld_nm) rs_temp.fields("t1_mdate_vc")=cstr(date) rs_temp.update response.Redirect("un_com_det.asp?fw=ls&Com="&Com&"&sv=up&name="&request.Form("title_rcp")&"&lkcode="&request.QueryString("lkcode")) elseif request.QueryString("fw")="dl" then set img_det=ScriptObject.GetFolder(server.MapPath(fld_nm)) for each img_name in img_det.files final_val=split(img_name,"\") value=split(final_val(ubound(final_val)),".") val_ref=split(value(ubound(value)-1),"_") img_value_ref="" for idx_idx=0 to ubound(val_ref)-1 if img_value_ref="" then img_value_ref=val_ref(idx_idx) else img_value_ref=img_value_ref&"_"&val_ref(idx_idx) end if next if img_value_ref="ConPhoto_"&trim(Request.QueryString("dlcode")) then ScriptObject.DeleteFile (server.MapPath (fld_nm&"\"&final_val(ubound(final_val)))) end if next con.execute "delete from cont_type where lk_code_in="&Request.QueryString("lkcode") response.Redirect("un_com_det.asp?fw=nw&sv=dok&Com="&Com&"&&name="&name&"&lkcode="&request.QueryString("lkcode")) set scriptobject=nothing end if %> <%=prj_tle%>&<%=mPath%> <%if (Request.QueryString ("fw")="nw") then%> <%elseif (Request.QueryString ("fw")="ed") then%> <%else%> <%end if%> <%if (Request.QueryString ("fw")="ls") then%> <%elseif (Request.QueryString ("fw")="nw") then%>

 <%=val%>

<% if (request.QueryString("sv")="ok") then response.Write("Your Template details saved successfully.") elseif (request.QueryString("sv")="up") then response.Write("Your Template details updated successfully.") elseif (request.QueryString("sv")="dok") then response.Write("Your Template details deleted successfully.") end if %>

<%=rs_temp.fields("t1_desc_nt")%>
<% ref="un_com_det.asp?fw=dl&Com="&Com&"&&dlcode="&rs_temp(0)&"&lkcode="&request.QueryString("lkcode") %> ">Edit   Delete
<% rs_temp.Open "select max(t1_code_in) from cont_type",con,2,2 if rs_temp.Fields (0)>0 then inc_cook=rs_temp.Fields(0)+1 else inc_cook=1 end if rs_temp.close() Response.Cookies ("ref")=inc_cook %>

 <%=val%>

<%elseif (Request.QueryString ("fw")="ed") then%>

<% if (request.QueryString("sv")="dok") then response.Write(""&ucase(request.QueryString("name"))&" deleted successfully.") end if %>

">
Description
<%=RTAToolBar%>
<%rs_temp.open "select * from cont_type where lk_code_in="&request.QueryString("lkcode"),con,2,2 set myfile=fileobject.CreateTextFile(server.MapPath("/Common\Disp\Content.html"),true) myfile.write(""&rs_temp("t1_desc_nt")&"") myfile.close() Response.Cookies ("ref")=Request.QueryString("edcode")%>

 <%=val%>

<%end if%>
&lkcode=<%=request.QueryString("lkcode")%>">
Description
<%=RTAToolBar%>
<% file_ref="un_com_det.asp?fw=ls&Com="&Com&"&lkcode="&request.QueryString("lkcode") Response.Write("") %>
<%else Response.Redirect ("unauth.asp") end if%> sorry for inconvenience... pls reply me.. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From allard-schripsema at procergs.rs.gov.br Wed Sep 21 07:01:38 2005 From: allard-schripsema at procergs.rs.gov.br (Allard Schripsema) Date: Wed, 21 Sep 2005 09:01:38 -0300 Subject: [Javascript] Controling a SELECT from a child window In-Reply-To: <63997.193.195.164.58.1127289109.squirrel@www.easilymail.co.uk> Message-ID: Hi there, i tried to solve this yesterday, but got the same strange error Today i found a solution though: (works in IE 6) It seems that you are allowed to manipulate objects in other documents (as i would expect), but when trying to insert the Option object there is something blocking it. I think this might be a bug, as it?s not logical behaviour as far as i can see. hope this helps, allard Schripsema www.visualDigital.com.br -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of Nick Fitzsimons Sent: Wednesday, September 21, 2005 4:52 AM To: [JavaScript List] Subject: RE: [Javascript] Controling a SELECT from a child window > Actually - everything works now except ADDING an option to the select > box (on the parent page)...the following fails: > > Perhaps you cannot add an item to a select box on a parent window? > As you surmise, it's probably something to do with the fact that you're creating the option element in one window and trying to add it to the document in another - this is not allowed under the DOM standard. Try: var newOptionText = window.opener.document.createTextNode("Your text"); var newOption = window.opener.document.createElement("option"); newOption.appendChild(newOptionText); newOption.setAttribute("value", Your value"); window.opener.document.form1.mylist.appendChild(newOption); which uses the opener window's document to create the text node, and should therefore be OK. It's also going to work cross-browser (IE, Mozilla Firefox, Opera and any other browser that supports the DOM), whereas I think I'm correct in saying that new Option() is a non-standard Internet-Explorer-only technique. (BTW, I haven't tested the above code, but barring typing mistakes, it should work :-) HTH, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From Dstoltz at SHH.ORG Wed Sep 21 08:05:04 2005 From: Dstoltz at SHH.ORG (David Stoltz) Date: Wed, 21 Sep 2005 09:05:04 -0400 Subject: [Javascript] Controling a SELECT from a child window Message-ID: <487E7D0857FE094590BF2DC33FE3E1088C2A62@SHHS-MAIL.SHH.ORG> You freakin ROCK!!! I bow down to the great NICK FITZSIMONS of the javascript world! Man, I tried everything - but your code worked beautifully!!!! THANK YOU!!! -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Nick Fitzsimons Sent: Wednesday, September 21, 2005 3:52 AM To: [JavaScript List] Subject: RE: [Javascript] Controling a SELECT from a child window > Actually - everything works now except ADDING an option to the select > box (on the parent page)...the following fails: > > Perhaps you cannot add an item to a select box on a parent window? > As you surmise, it's probably something to do with the fact that you're creating the option element in one window and trying to add it to the document in another - this is not allowed under the DOM standard. Try: var newOptionText = window.opener.document.createTextNode("Your text"); var newOption = window.opener.document.createElement("option"); newOption.appendChild(newOptionText); newOption.setAttribute("value", Your value"); window.opener.document.form1.mylist.appendChild(newOption); which uses the opener window's document to create the text node, and should therefore be OK. It's also going to work cross-browser (IE, Mozilla Firefox, Opera and any other browser that supports the DOM), whereas I think I'm correct in saying that new Option() is a non-standard Internet-Explorer-only technique. (BTW, I haven't tested the above code, but barring typing mistakes, it should work :-) HTH, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From nick at nickfitz.co.uk Wed Sep 21 09:36:19 2005 From: nick at nickfitz.co.uk (Nick Fitzsimons) Date: Wed, 21 Sep 2005 15:36:19 +0100 (BST) Subject: [Javascript] Controling a SELECT from a child window In-Reply-To: References: <63997.193.195.164.58.1127289109.squirrel@www.easilymail.co.uk> Message-ID: <64357.193.195.164.58.1127313379.squirrel@www.easilymail.co.uk> > It seems that you are allowed to manipulate objects in other documents (as > i would expect), but when trying to insert the Option object there is > something blocking it. > I think this might be a bug, as it?s not logical behaviour as far as i can > see. > No, it's not a bug, and it is logical once you examine the way the DOM (Document Object Model) works. When you try to add an option, what you are actually doing, at DOM level, is: 1. Create a Node of type Element having the tagName "option"; 2. Append it as a child of the Node of type Element having the tagName "select". The DOM specification states: a) "The Node objects... have a ownerDocument attribute which associates them with the Document within whose context they were created." [1] b) (DomException types:) "WRONG_DOCUMENT_ERR If a node is used in a different document than the one that created it" [2] c) (appendChild method:) "WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node." [3] If you have a script running in a different window to the . If one uses window.opener.document.createElement("option") then the