Highlighted

Simple javascript function not working on smaller devices

New Here ,
Aug 17, 2017

Copy link to clipboard

Copied

Hi, i needed to make an url validation so i added a script to the exported html to do so, it works like a charm.

the problem is when i use a smaller screen (mobile or resized desktop browser) the script doesn't run at all. this happens when the browser screen is less than 960px.

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Many older mobile devices don't fully support JavaScript and other fancies, hence the emulation gives you exactly that. If you want to make your page usable on these devices that e.g. have outdated versions of android, you have to forego such stuff. Nothing stops you from overriding it in a desktop emulation, of course, but the point still sticks - it may not work on a real device.

Mylenium

Views

151

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Simple javascript function not working on smaller devices

New Here ,
Aug 17, 2017

Copy link to clipboard

Copied

Hi, i needed to make an url validation so i added a script to the exported html to do so, it works like a charm.

the problem is when i use a smaller screen (mobile or resized desktop browser) the script doesn't run at all. this happens when the browser screen is less than 960px.

Most Valuable Participant
Correct answer by Mylenium | Most Valuable Participant

Many older mobile devices don't fully support JavaScript and other fancies, hence the emulation gives you exactly that. If you want to make your page usable on these devices that e.g. have outdated versions of android, you have to forego such stuff. Nothing stops you from overriding it in a desktop emulation, of course, but the point still sticks - it may not work on a real device.

Mylenium

Views

152

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 17, 2017 0
Most Valuable Participant ,
Aug 17, 2017

Copy link to clipboard

Copied

Many older mobile devices don't fully support JavaScript and other fancies, hence the emulation gives you exactly that. If you want to make your page usable on these devices that e.g. have outdated versions of android, you have to forego such stuff. Nothing stops you from overriding it in a desktop emulation, of course, but the point still sticks - it may not work on a real device.

Mylenium

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 17, 2017 0