Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #40288 > unrolled thread
| Started by | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| First post | 2021-07-08 08:51 +1000 |
| Last post | 2021-07-15 09:01 +1000 |
| Articles | 10 — 5 participants |
Back to article view | Back to comp.lang.javascript
Select in one device but view on another Andrew Poulos <ap_prog@hotmail.com> - 2021-07-08 08:51 +1000
Re: Select in one device but view on another JJ <jj4public@gmail.com> - 2021-07-08 06:04 +0700
Re: Select in one device but view on another Jon Ribbens <jon+usenet@unequivocal.eu> - 2021-07-07 23:09 +0000
Re: Select in one device but view on another Andrew Poulos <ap_prog@hotmail.com> - 2021-07-08 12:57 +1000
Re: Select in one device but view on another "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-07-11 14:33 -0700
Re: Select in one device but view on another Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-07-14 02:28 +0200
Re: Select in one device but view on another Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-07-14 02:53 +0200
Re: Select in one device but view on another Andrew Poulos <ap_prog@hotmail.com> - 2021-07-14 15:15 +1000
Re: Select in one device but view on another Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-07-14 23:19 +0200
Re: Select in one device but view on another Andrew Poulos <ap_prog@hotmail.com> - 2021-07-15 09:01 +1000
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2021-07-08 08:51 +1000 |
| Subject | Select in one device but view on another |
| Message-ID | <Wr-dnVJw-NB9snv9nZ2dnUU7-c3NnZ2d@westnet.com.au> |
There's an elearning web page I'm working on. It generates a quiz (as a collection of a HTML page, JavaScript, and images) that gets downloaded. The quiz needs to be responsive ie also run well on a phone. Within the elearning page there's a button which will generate a live version of the quiz for testing purposes. I work with a desktop computer to test the quiz on a phone I have to either download the quiz, upload it to a server or to run the elearning page on a phone and then launch the test from there. I was wondering if there's a way I can work on a desktop computer but more easily test on a phone. I have a library that can create valid QR codes that my phone can read and thought that it might be useful. Alas I can't really see how I can view a website on one device and have the output display on another. Perhaps if you click a button in the elearning page it creates a file on the server (which is the HTML for the quiz) and a QR code for that page? Does anyone have any ideas on this? Andrew Poulos
[toc] | [next] | [standalone]
| From | JJ <jj4public@gmail.com> |
|---|---|
| Date | 2021-07-08 06:04 +0700 |
| Message-ID | <16q4wtxqvb92j$.o0kpxq5e0yhp.dlg@40tude.net> |
| In reply to | #40288 |
On Thu, 8 Jul 2021 08:51:11 +1000, Andrew Poulos wrote: > There's an elearning web page I'm working on. It generates a quiz (as a > collection of a HTML page, JavaScript, and images) that gets downloaded. > > The quiz needs to be responsive ie also run well on a phone. > > Within the elearning page there's a button which will generate a live > version of the quiz for testing purposes. > > I work with a desktop computer to test the quiz on a phone I have to > either download the quiz, upload it to a server or to run the elearning > page on a phone and then launch the test from there. > > I was wondering if there's a way I can work on a desktop computer but > more easily test on a phone. I have a library that can create valid QR > codes that my phone can read and thought that it might be useful. > > Alas I can't really see how I can view a website on one device and have > the output display on another. Perhaps if you click a button in the > elearning page it creates a file on the server (which is the HTML for > the quiz) and a QR code for that page? > > Does anyone have any ideas on this? > > Andrew Poulos I don't think this can be solved using JavaScript.
[toc] | [prev] | [next] | [standalone]
| From | Jon Ribbens <jon+usenet@unequivocal.eu> |
|---|---|
| Date | 2021-07-07 23:09 +0000 |
| Message-ID | <slrnsecd1v.5f1.jon+usenet@raven.unequivocal.eu> |
| In reply to | #40288 |
On 2021-07-07, Andrew Poulos <ap_prog@hotmail.com> wrote: > There's an elearning web page I'm working on. It generates a quiz (as a > collection of a HTML page, JavaScript, and images) that gets downloaded. > > The quiz needs to be responsive ie also run well on a phone. > > Within the elearning page there's a button which will generate a live > version of the quiz for testing purposes. > > I work with a desktop computer to test the quiz on a phone I have to > either download the quiz, upload it to a server or to run the elearning > page on a phone and then launch the test from there. On the desktop: Right click -> Inspect -> Responsive Design Mode
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2021-07-08 12:57 +1000 |
| Message-ID | <fc-dnbaD4Kou9Hv9nZ2dnUU7-fHNnZ2d@westnet.com.au> |
| In reply to | #40290 |
On 8/07/2021 9:09 am, Jon Ribbens wrote: > On 2021-07-07, Andrew Poulos <ap_prog@hotmail.com> wrote: >> There's an elearning web page I'm working on. It generates a quiz (as a >> collection of a HTML page, JavaScript, and images) that gets downloaded. >> >> The quiz needs to be responsive ie also run well on a phone. >> >> Within the elearning page there's a button which will generate a live >> version of the quiz for testing purposes. >> >> I work with a desktop computer to test the quiz on a phone I have to >> either download the quiz, upload it to a server or to run the elearning >> page on a phone and then launch the test from there. > > On the desktop: > Right click -> Inspect -> Responsive Design Mode > Ok, but is testing within Chrome is as good as testing on a device that users are using. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2021-07-11 14:33 -0700 |
| Message-ID | <a9ad510f-bb3b-46dc-afbe-bb2f7a73bcf5n@googlegroups.com> |
| In reply to | #40291 |
On Wednesday, July 7, 2021 at 9:58:05 PM UTC-5, Andrew Poulos wrote: > On 8/07/2021 9:09 am, Jon Ribbens wrote: > > On the desktop: > > Right click -> Inspect -> Responsive Design Mode > > > Ok, but is testing within Chrome is as good as testing on a device that > users are using. If you are using basic standards compliant stuff in your webpage and not bleeding edge technologies it's probably fine. If you want to test things like orientation of the phone in 3d space or some service-worker stuff you might have some challenges.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2021-07-14 02:28 +0200 |
| Message-ID | <1936879.oMNUckLgyt@PointedEars.de> |
| In reply to | #40288 |
Andrew Poulos wrote: > There's an elearning web page I'm working on. It generates a quiz (as a > collection of a HTML page, JavaScript, and images) that gets downloaded. This can be easily be tampered with. > The quiz needs to be responsive ie also run well on a phone. OK. > Within the elearning page there's a button which will generate a live > version of the quiz for testing purposes. Meaning? > I work with a desktop computer to test the quiz on a phone I have to > either download the quiz, upload it to a server or to run the elearning --------------------------^ > page on a phone and then launch the test from there. Parse error. > I was wondering if there's a way I can work on a desktop computer but > more easily test on a phone. Set up a Web server either A) on the desktop computer or B) on another computer that acts as a remote server that can be accessed with the desktop computer and the mobile phone alike. In case B you will also have to synchronize your code with the remote server; special possibilities include opening files on the server in your IDE via SSH, in which case the synchronization is implicit. I am occasionally using case A: I am using my mobile phone as an Internet modem for my laptop (i.e. I am using mobile tethering via WLAN), which also means that the phone and the laptop are in the same network. I can therefore use the IP address assigned to the laptop’s WLAN adapter (by the mobile phone) to access Web sites on the local (development) Web server on the laptop from the mobile phone. I had to configure the Web server so that it reacts to that IP address which, fortunately, appears to be static (maybe it is based on the MAC address of the WLAN adapter of the laptop): $ head /etc/apache2/sites-available/local ServerName localhost ServerAlias 127.0.0.1 […] # home […] ServerAlias 192.168.x.y whereas the latter address is IPv4 address assigned to my laptop’s WLAN adapter. > I have a library that can create valid QR > codes that my phone can read and thought that it might be useful. QR codes for what? > Alas I can't really see how I can view a website on one device and have > the output display on another. That is something else than you have asked above. > Does anyone have any ideas on this? <http://www.catb.org/~esr/faqs/smart-questions.html> -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2021-07-14 02:53 +0200 |
| Message-ID | <2588613.mvXUDI8C0e@PointedEars.de> |
| In reply to | #40295 |
Thomas 'PointedEars' Lahn wrote:
> I am occasionally using case A: I am using my mobile phone as an Internet
> modem for my laptop (i.e. I am using mobile tethering via WLAN), which
> also
> means that the phone and the laptop are in the same network. I can
> therefore use the IP address assigned to the laptop’s WLAN adapter (by the
> mobile phone) to access Web sites on the local (development) Web server on
> the laptop from the mobile phone. I had to configure the Web server so
> that it reacts to that IP address which, fortunately, appears to be static
> (maybe it is based on the MAC address of the WLAN adapter of the laptop):
>
> $ head /etc/apache2/sites-available/local
> ServerName localhost
> ServerAlias 127.0.0.1
> […]
>
> # home
> […]
> ServerAlias 192.168.x.y
>
> whereas the latter address is IPv4 address assigned to my laptop’s WLAN
> adapter.
Correction: This directive was for another use-case. Apparently the only
directive that is required for case A, is the “Allow” directive below:
<Directory "$DOCUMENT_ROOT">
[…]
Order deny,allow
Deny from all
[…]
# WLAN (Android)
[…]
Allow from 192.168.43
</Directory>
whereas $DOCUMENT_ROOT is the document root of this virtual Apache host, and
192.168.43.0/24 is the subnet that is used by my mobile phone when it is
used for tethering. (I do not find any other configuration file where “.43”
occurs.)
--
PointedEars
FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2021-07-14 15:15 +1000 |
| Message-ID | <s6SdneznXO9w73P9nZ2dnUU7-XHNnZ2d@westnet.com.au> |
| In reply to | #40296 |
On 14/07/2021 10:53 am, Thomas 'PointedEars' Lahn wrote: > Thomas 'PointedEars' Lahn wrote: > >> I am occasionally using case A: I am using my mobile phone as an Internet >> modem for my laptop (i.e. I am using mobile tethering via WLAN), which >> also >> means that the phone and the laptop are in the same network. I can >> therefore use the IP address assigned to the laptop’s WLAN adapter (by the >> mobile phone) to access Web sites on the local (development) Web server on >> the laptop from the mobile phone. I had to configure the Web server so >> that it reacts to that IP address which, fortunately, appears to be static >> (maybe it is based on the MAC address of the WLAN adapter of the laptop): >> >> $ head /etc/apache2/sites-available/local >> ServerName localhost >> ServerAlias 127.0.0.1 >> […] >> >> # home >> […] >> ServerAlias 192.168.x.y >> >> whereas the latter address is IPv4 address assigned to my laptop’s WLAN >> adapter. > > Correction: This directive was for another use-case. Apparently the only > directive that is required for case A, is the “Allow” directive below: > > <Directory "$DOCUMENT_ROOT"> > […] > Order deny,allow > Deny from all > […] > # WLAN (Android) > […] > Allow from 192.168.43 > </Directory> > > whereas $DOCUMENT_ROOT is the document root of this virtual Apache host, and > 192.168.43.0/24 is the subnet that is used by my mobile phone when it is > used for tethering. (I do not find any other configuration file where “.43” > occurs.) Thanks. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2021-07-14 23:19 +0200 |
| Message-ID | <2590997.mvXUDI8C0e@PointedEars.de> |
| In reply to | #40297 |
Andrew Poulos wrote: > On 14/07/2021 10:53 am, Thomas 'PointedEars' Lahn wrote: >> [a fracking lot] > > Thanks. Seriously, that is all that you have to say? What about the effort that I put in to understand what you meant, the question that *I* asked? You do not inspire people to help you again with this behaviour. :-( -- PointedEars FAQ: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix> <https://github.com/PointedEars> | <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2021-07-15 09:01 +1000 |
| Message-ID | <pf-dnaSFvqdX8XL9nZ2dnUU7-SnNnZ2d@westnet.com.au> |
| In reply to | #40298 |
On 15/07/2021 7:19 am, Thomas 'PointedEars' Lahn wrote: > Andrew Poulos wrote: > >> On 14/07/2021 10:53 am, Thomas 'PointedEars' Lahn wrote: >>> [a fracking lot] >> >> Thanks. > > Seriously, that is all that you have to say? What about the effort that I > put in to understand what you meant, the question that *I* asked? You do > not inspire people to help you again with this behaviour. :-( I'm on Windows and the local web server is IIS. I couldn't do the Apache directives. Instead I gave IIS a "faux" certificate to allow me to use https though connecting to it from another device on the same network still meant working through the normal lot of security warnings. Although the media (images, video, audio...) associated with a generated quiz must always exist on the server the actual control part of the quiz only gets generated when the quiz is "published" (in which case the HTML and associated scripts are written to the server) or when I'm testing locally (in which case the HTML and associated scripts exist in memory). I couldn't work out how to access the test version from a separate device so when I tested locally I wrote the "in memory" files to the server. Then I generated a QR code to the test version which I printed and scanned with whatever mobile device I wanted to test with. The same thing "worked" on the production IIS server. The downsides are: - I need to write the files to the server each time I make a change to the quiz. - If the files don't eventually get deleted it's possible that some student will find them and do the test without any tracking. Sorry if you expected more from my response. Andrew Poulos
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web