Script Error

This forum is for all Flare related Tips and Tricks.
Have a tip or trick you use while working in Flare? Share it here.

Script Error

Postby beth1 on Fri Aug 03, 2018 12:31 pm

I am very new to this, so please bear with me. I am trying to use a script, however, keep getting error messages to open in text only because it is invalid. One of the errors is "Reference to undeclared entity 'nbsp'. Line 9, Position 6. This is valid code, so I'm not sure why I'm getting an error. Another one is "for (var i = 0, length = radiosNo.length; i < length; i++) {". Is there some reason Flare doesn't like <script> tags?
beth1
Jr. Propeller Head
 
Posts: 2
Joined: Fri Aug 03, 2018 12:05 pm

Re: Script Error

Postby RamonS on Sat Aug 04, 2018 12:33 pm

I think it has more to do wit what is in the script tags. Can you post the script here?
RamonS
Senior Propellus Maximus
 
Posts: 4272
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: Script Error

Postby Dave Lee on Mon Aug 06, 2018 12:25 am

beth1 wrote:One of the errors is "Reference to undeclared entity 'nbsp'. Line 9, Position 6. This is valid code, so I'm not sure why I'm getting an error.


The &nbsp; entity isn't valid for Flare/XHTML - use &#160; instead.

beth1 wrote:Another one is "for (var i = 0, length = radiosNo.length; i < length; i++) {". Is there some reason Flare doesn't like <script> tags?


What error do you get? The Flare editor won't report any errors in the script itself, only errors in the (X)HTML. You'll only be able to check script errors using the browser dev tools at runtime.

You can insert scripts in 2 ways: (1) in the XML editor, use Insert > Script and enter the javascript without <script> tags, or (2) in the text editor, insert the script with <script> tags.
Dave Lee
Master Propellus Maximus
 
Posts: 5397
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 4 guests

cron