is there a javascript support forum? - Mozilla
This is a discussion on is there a javascript support forum? - Mozilla ; Is there a forum where non-extension javascript coding techniques are
discussed?
Questions like:
Is it possible to determine what subset of content in a text box is
currently selected, and how?
Is it possible to drag-n-drop a file from Windows ...
-
is there a javascript support forum?
Is there a forum where non-extension javascript coding techniques are
discussed?
Questions like:
Is it possible to determine what subset of content in a text box is
currently selected, and how?
Is it possible to drag-n-drop a file from Windows Explorer to a file
upload box in the browser, and how or why not or what ways might be
available to catch file drop options for this purpose?
--
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
-
Re: is there a javascript support forum?
Glenn wrote:
> Is it possible to determine what subset of content in a text box is
> currently selected, and how?
>
Yes, by examining the textbox's selectionStart and selectionEnd properties.
> Is it possible to drag-n-drop a file from Windows Explorer to a file
> upload box in the browser, and how or why not or what ways might be
> available to catch file drop options for this purpose?
No, but there is a bug filed on drag and drop to file upload widgets.
-
Re: is there a javascript support forum?
Thanks to Eric for the form, and to Neal for the specific answers.
On approximately 4/25/2008 3:36 PM, came the following characters from
the keyboard of Neil Deakin:
> Glenn wrote:
>> Is it possible to determine what subset of content in a text box is
>> currently selected, and how?
>>
>
> Yes, by examining the textbox's selectionStart and selectionEnd properties.
I guess this answer isn't cross-platform
But I do have it working
now for SM. Yes, I realize I asked in a mozilla newsgroup 
>> Is it possible to drag-n-drop a file from Windows Explorer to a file
>> upload box in the browser, and how or why not or what ways might be
>> available to catch file drop options for this purpose?
>
> No, but there is a bug filed on drag and drop to file upload widgets.
Would be nice if the drag-n-drop on an input text or textarea grabbed
the file name, also; one might not always wish to upload the file...
although that is clearly the most obvious use.
--
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
-
Re: is there a javascript support forum?
On approximately 4/25/2008 3:49 PM, came the following characters from
the keyboard of Glenn:
> Thanks to Eric for the form, and to Neal for the specific answers.
Neil, sorry, misspelled your name. Have a friend Neal locally here...
> Would be nice if the drag-n-drop on an input text or textarea grabbed
> the file name, also; one might not always wish to upload the file...
> although that is clearly the most obvious use.
Maybe Javascript can extract the name from the upload widget without
uploading... will investigate that.
--
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking
-
Learning the hard way [Was: Re: is there a javascript support forum?]
On approximately 4/25/2008 3:49 PM, came the following characters from
the keyboard of Glenn:
> On approximately 4/25/2008 3:36 PM, came the following characters from
> the keyboard of Neil Deakin:
>> Glenn wrote:
>>> Is it possible to determine what subset of content in a text box is
>>> currently selected, and how?
>>
>> Yes, by examining the textbox's selectionStart and selectionEnd
>> properties.
>
> I guess this answer isn't cross-platform
But I do have it working
> now for SM. Yes, I realize I asked in a mozilla newsgroup 
OK, I searched, and found a cross-platform solution, of sorts, at
. IE is really weird regarding
text selections. Seems like it is optimized for a different brain than
mine, and what I consider very simple things, which are simple on
Mozilla, takes extremely complex code by comparison, for IE.
But the _real_ mystery, is, once I found the solution, I started coding
something closer to what I might want to do with it, to see if I
understood how to use it.
My test case is at .
This code works on IE, works on Opera about the same, and works on
SeaMonkey.
It points out two incompatibilities between IE 7 and SM besides the
different (no standard in this area) methods of selecting the text.
Incompatibility #1:
1) SM counts newlines as 1 character (\n ?)
2) IE and Opera count newlines as 2 characters (\r\n ?)
This could, I suppose, be a bug in the code that I've found? The source
data is only in the file one way, so one of the two is converting it
somehow.
This is relatively minor, but annoying. I'll have to try to find what
the standard says about multiline delimiters, if it actually says
anything, unless someone has already researched that and wishes to
respond here. My guess is that it says it should be \n only, but that
is from fading memories from years ago, when I first started reading
about the web, and the "Standards" were pretty loose.
Incompatibility #2:
This one took me _hours_ to find 
Note that and
work identically on SM and
Opera. But the latter doesn't work on IE7.
The difference? Whether the included fooie.js file is included in the
(works, fooie) or the (doesn't work, fooie2) section.
Can anyone explain that? Is IE7 non-standard in placement of Javascript
also? Some effect if you inline the code in each of those two places
rather than using src= option to grab it from a file. Or is there
really an intended difference in using