Javascript not working in IPhone - javascript

I have write code to change color at run time using Javascript. It work well on Desktop and Andriod Mobile Phones but It is not working on IPhone 5 and 6, I have also tested with Safari in Desktop it works fine on Desktop Safari but not works in Iphone Safari.
Thanks

You get Scripterrors when clicking the buttons:
Uncaught TypeError: undefined is not a function (index):181
document.getElementById("logoimg")
does not return an element as there is none with this id.
If you fix this it may will work :)

It seems to work on my iPhone 6, the page didn't crash or throw an error. have you made sure that JavaScript is turned on in the Safari settings of your phone? It's Settings > Safari > Advanced and theres a toggle switch for turing JavaScript on or off.

you probably have to toggle javascript on your iphone in settings... have you tried with a third party browser like chrome on your iPhone? did it work?

Related

JavaScript Differences between Mobile iOS and Android Safari/Chrome

I have been trying to google around for a few days to find some kind of answer, but is their a difference between how iOS mobile devices understand JavaScript, vs Android?
I currently have some code that works as expected on Android (Chrome/Edge), and on Windows (Chrome, Edge, IE 8). But once we get to iOS devices, it doesn't work as expected.
I also tried to see if I could find an emulator for iOS mobile, or just downloading the mobile Safari browser, but wasn't able to find one (that didn't have a cost related to it).
I found the issue, it was related to the selectors in the code not being completed - Chrome got it, but safari didn't.

How to open to an existing tab in safari with an html 'a' link?

From Safari I can launch another app with:
Open WebBrowserApp
But I can't seem to return to Safari with:
Return to Safari
If possible I'd like to return to the tab I came from.
Thanks!!!
The problem is that.... You can not open safari using
Safari://
Well... you can not open safari on iOS using another browser..... so that means you cannot achieve what you are looking for... even in iOS 13 and I don’t think Apple is gonna implement that anytime soon....
So you can use any other browser like:
Firefox: Return to Firefox
Google Chrome: <a href=“GoogleChrome://“>Return To Chrome</a>
And I am sure there are many other great alternatives.... Goodluck!

Webpage breaks on mobile devices (aw, snap!)

I have a problem with the https://konfiguratorszkolen.pl/ webpage - it works fine on desktop, but breaks on mobile devices.
On mobile, it loads at first and everything looks fine, but after a 1-2sec it shows "aw, snap" error. I've checked it only with Chrome and Safari on iPhone, but I believe it's a general problem.
I've already checked the website on
https://search.google.com/test/mobile-friendly
and
https://developers.google.com/speed/pagespeed/insights/
and the result are alright (mobile performance would be better).
What might be the problem? How can I debug this issue on mobile (of course works fine on a desktop browser)?
Here is the repository (it's only a code look-in): https://github.com/KamilSobieraj/Konfigurator_szkolen
What you're looking for is called remote debugging and is available for firefox, chrome and there's even solutions to debug iOS safari from your computer (no Mac needed).

Custom jQuery Slider does not work on iOS 7 Safari

I am working on a mobile site, my first, and I am facing strange problems. I have created a custom jQuery slider with left and right buttons. I have tried it on my Android's own browser, Firefox and Chrome for Android. It works fine, as it is supposed to.
When I gave the work to my client he said it doesn't work on iPhone for which it is originaly intended. I was confused as how this is possible, as it worked flawlessly on my Android. So I asked my friend for his iPhone 4S with iOS7 and opened up the site. To my surprise, the slider did not work. I took out my phone and opened it on my Firefox, it worked!
Why is this so? If it is working on Android, shouldn't it be working on iOS too? And how can I solve it?
Regards
I came to know why this happens. By default, iOS Safari doesn't allow everything to be "clickable". This means you need to make it cursor: pointer via CSS to make it "clickable".
I have got my answer from here: This link tell is why this happens. Read it!
Regards

Cannot discover ipad in Develop menu in Mac Safari

I need to debug a Javascript on iPad Safari (iOS-6). I guess this can be done using remote debugging by connecting it to the Mac (or using a xCode iPad or iPhone simulator instead of connecting an actual iPad). I also need to turn on Safari->Advanced->WebInspector on the iPad and Safari->Preferences-> Advanced ->check the "show Develop menu in the menu bar" option in my macbook. And then when the Develop option appears in the top Safari toolbar (I dont know the exact terminology for this) I should be seeing my iPad there and then can start remote debugging. Now everything is fine except the fact that I cant see the ipad (or the simulator as I tried both option) in the Develop option in Safari. Any ideas/thought what am I missing here?
You must have at least Safari 6+
Looks like you can't on Windows unless you're doing some form of emulation--
http://developer.apple.com/library/ios/#DOCUMENTATION/AppleApplications/Reference/SafariWebContent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html
"Important: You can only inspect apps on devices that have been transferred to your device from Xcode. You cannot inspect apps that have been downloaded from the App Store, even if it is your app."
You also need OSX 10.7 and safari 6, which doesn't exist for windows yet. :(

Categories