Discussion Forums  >  WebViews and HTML for Mobile

Replies: 5    Views: 82

Iaxia
I hate code!
Profile
Posts: 108
Reg: Feb 04, 2012
Toronto
7,080
04/20/12 12:44 PM (13 years ago)

Incorrect interpretation of text

I've used the text 'plot(1:10, 1:10)' in an .html document I've created in Word. When I load that .html document to my app the 1:10s of that text appear underlined and in a blue colour, and the iPhone offers my the option to Create an Event if I tap on the numbers -- not what I want. Any idea how to make it so that the those numbers are just numbers? I've included the relevant html code below. <p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span style='font-family:Arial;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font: minor-bidi'>Example#1: </span></b><span style='font-family:Arial;mso-bidi-font-family: "Times New Roman";mso-bidi-theme-font:minor-bidi'>Make a plot with two series as lines. <b style='mso-bidi-font-weight:normal'><o:p></o:p></b></span></p> <p class=MsoNormal><span class=GramE><span style='font-family:Arial;mso-bidi-font-family: "Times New Roman";mso-bidi-theme-font:minor-bidi;color:red'>plot</span></span><span style='font-family:Arial;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font: minor-bidi;color:red'>(1:10, 1:10, type=&quot;n&quot;) <o:p></o:p></span></p> <p class=MsoNormal><span class=GramE><span style='font-family:Arial;mso-bidi-font-family: "Times New Roman";mso-bidi-theme-font:minor-bidi;color:red'>lines</span></span><span style='font-family:Arial;mso-bidi-font-family:"Times New Roman";mso-bidi-theme-font: minor-bidi;color:red'>(1:10, sample(1:10), <span class=SpellE>lwd</span>=2, col=&quot;blue&quot;)<o:p></o:p></span></p>
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/20/12 01:18 PM (13 years ago)
Hi @Iaxia, I'll start off by saying that using HTML created from a program like word or anything else that introduces a lot of weird formatting can be somewhat dangerous. The results can be unexpected. One thing to try is going into your control panel, select the screen you are interested in, click on Advanced Properties, then Document Behaviour. There is a drop-box there called "Detect Phone Number / Address links?" Turn that off, and it "might" take care of your problem. I'm not entirely sure this option also pertains to dates and times. Mark
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/20/12 02:38 PM (13 years ago)
Sorry, but that code is horrible! mshtml or something.. If you have word, do you have frontpage too, it's part of the extended office package? That'd produce better html and the UI isn't too much different to word.
 
Iaxia
I hate code!
Profile
Posts: 108
Reg: Feb 04, 2012
Toronto
7,080
like
04/20/12 03:10 PM (13 years ago)
@Raveyd, HA, I wondered why everyone else had such different looking code from mine. Stupid Word. I don't have Frontpage but I've got Dreamweaver, perhaps I'll just re-write things in that. @Mark, thanks. I'll give it a try. If it doesn't work -- I'll just continue to regret using Word and go through the re-write on Dreamweaver.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/20/12 04:03 PM (13 years ago)
Dreamweaver's ok. It'll be worth re-writing before you get in too deep with word!
 
Iaxia
I hate code!
Profile
Posts: 108
Reg: Feb 04, 2012
Toronto
7,080
like
05/06/12 08:07 AM (13 years ago)
"I've used the text 'plot(1:10, 1:10)' in an .html document I've created in Word. When I load that .html document to my app the 1:10s of that text appear underlined and in a blue colour, and the iPhone offers my the option to Create an Event if I tap on the numbers -- not what I want. Any idea how to make it so that the those numbers are just numbers?" I figured it out, it has nothing to do with Word interfering with things. Turn off "Detect Phone Number / Address links?" in "Document Behaviour"
 

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.