Discussion Forums  >  WebViews and HTML for Mobile

Replies: 6    Views: 135

Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
08/15/12 01:23 PM (13 years ago)

problems with html page when viewed in app

I created a jotform with product order but when i view it inside buzztouch app the quantity option acts strange. It fails to change the quantity number on some items but works fine when launched in native browser or when viewed on laptop.a I treid it via custom url and html doc but same results. At this point i can only think there is some kind of conflict with buzztouch. any help will b great
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/15/12 08:12 PM (13 years ago)
@Mr Stuck: Not sure what you mean by "conflict" but it doesn't matter I guess. It's all about the HTML and Web View. Not sure if you're iOS or Android but it's the same idea. The plugin in your buzztouch app that's displaying the content uses the standard Web View Widget available for use by developers. This is either a UIWebView (for iOS) or a WebView (for Android). These Web engines are very very powerful and display HTML content on millions of phones without any trouble. This means there is something funky, unusual, strange about the content you're trying to load. Who knows what the HTML looks like that you've created with the jotform tool. I've never used jotform. I can say that you'll want to make sure that... a) The HTML being loaded in the app is actually the HTML you want and expect. Lots of ways to verify this but each way depends on where you're getting it ( a URL, from in the app, from the app's cache, etc) b) The HTML being loaded is loading all of it's required resources (CSS, Javasript, additional includes, etc) Probably going to be tough to figure this out but for sure it's not related to the Web View...when these kinds of issues arise it's always, 100% of the time related to the actual HTML being loaded in the view. Oftentimes it's not what you may think it is ;-)
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/16/12 12:05 AM (13 years ago)
Thanks for your help. I have been following the info and asking questions in this thread. http://www.jotform.com/answers/113256-Add-Categories-to-Purchase-Order I imported the form with the code that had not yet been moved in order to practice with it. I believe in taking it slowly so the only alterations I made were to move the first category "Meals" collapsing field and added 1 item to the "sub meals" section in jotform editor. This is the only alteration jotform allows as the other collapsing fields have to be moved manually. So I copied the jotform created source html and placed into the buzztouch html editor. I then copied the 2nd collapsing field code and moved it to create the "Snacks" collapsing field and deleted the original collapsing field html to prevent any issues as I now had 2 of the same due to copy/paste. I cross referenced the html with what jotform created for the first collapsing field to check I had same code running and also with the source html of the form details in the thread that had already been fully altered and I can't see where the mistake is. I am using android and when viewed via native browser it behaves perfectly. but when used in the app the first collapsing field quantity options sometimes change but sometimes don't. or they change ok but when I then click the next collapsing field and go back to the first to try to change a quantity it fails to do so. I hope I am making sense here. Another question for you. Is it possible in any way to use the buzztouch html editor on an android phone?. I have Galaxy S2 and it allows access to the source html part of the editor but not to the main text screen of the editor. The ability to use this would be awesome as at present I have a lot of free time in my current Job during my working day but unable to bring a laptop to work. Anyway hope it makes sense and I can post or send a copy of the source html if you require it. once again many thanks
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/16/12 02:25 AM (13 years ago)
Hi again, Second question first: The ckeditor (the html editor in the control panel) doesn't work too well on mobile. We agree that it would be nice if it did, it doesn't. First question: I can't say for sure what the html is doing in the Android browser. I can say that all sorts of Android devices behave in all sorts of different ways. It's entirely possible that the html you're using works fine on some Android gadgets and not on others. This is a major pain for Android developers for sure. iOS is much more predictable. What is also strange is that you mention that it works sometimes and sometimes not. Who knows why? You'll need to do some debugging of the HTML and figure out step by step what's working and what is not. Something in the file is for sure not Android-safe. What is it, who knows. It may take you a few minutes to figure this out or a few years! It's all about the HTML and the javascript that's used to do the magic expando / contract thing you describe.
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/16/12 03:18 AM (13 years ago)
Ok. thanks. I guess I will just have to use the launch native app function to use it as I'm not a coder by any means so will be unable to debug it however that won't stop me trying. I will try breaking it down by creating a basic form without the expand/collapse sections and include the quantity option to determine if its what's causing the problem. although I could not write a html document I have toa basic understanding of how it works so don't mind playing around with the code a little. once again thanks for your time David. hopefully I will be able to get it working in the app as it is much more pro looking that way.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/16/12 03:31 AM (13 years ago)
Yup, no worries. That's a great plan and one I didn't think of. If you remove all the complex "fancy pants" controls it sounds like this page has, you may isolate what's not working. Maybe start with the most basic page this "builder" will create for you, have a look a the HTML and see if there are any strange includes (like javascript files, flash, embed tags, etc) to establish and understanding of what's loading. The file shouldn't have anything included if it's super duper basic. Then, assuming this works in mobile, keep getting more complex by adding new features until it breaks. So laughing. I'm sure you'll figure it out!
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/16/12 03:43 AM (13 years ago)
I will give it my best shot. nothing ventured, nothing gained! still puzzling as to how it works perfect in android browser but not in webview in app but I will try to figure it out. Looking forward to getting home from work, so I can get to work! Thanks again.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.