The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

What is wrong with < in script ?

View previous topic View next topic Go down

In progress What is wrong with < in script ?

Post by TamDonCo on August 30th 2016, 4:15 pm

the script file does not accept less than sign (<) whenever I change to < , script errors


ERROR



NO ERROR


TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by Ange Tuteur on August 30th 2016, 4:41 pm

Hi @TamDonCo,

I didn't manage to replicate an error on my end. Then again I was doing it in the HTML pages, is that where you were getting the error ? Think

Try placing the content of your script in a CDATA section :
Code:
//<![CDATA[
// JAVASCRIPT HERE
//]]>

Here's my example script using CDATA :
Code:
<script type="text/javascript">//<![CDATA[
(function() {
  var a = 5,
      b = 6;
 
  if (a && b && window.console) {
 
    if (a < b) {
      console.log('Lesser');
    } else {
      console.log('Greater');
    }
 
  }
 
}());
//]]></script>

Here's a topic on CDATA :
http://stackoverflow.com/questions/7092236/what-is-cdata-in-html

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by TamDonCo on August 30th 2016, 5:59 pm

Thanks Ange Tuteur

Let me try later

TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by TamDonCo on August 30th 2016, 10:24 pm

hi Ange Tuteur

just update

it still has error

when I do

<script src=.......link here> < / script>

it works fine but I copy the contents and paste into file to run local and it has error


TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by SLGray on August 31st 2016, 2:57 am

Where are you adding this code?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by TamDonCo on August 31st 2016, 2:34 pm

@SLGray wrote:Where are you adding this code?

overall_footer_end

TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by Ange Tuteur on August 31st 2016, 5:58 pm

@TamDonCo would it be possible for you to post the code here so that we may look over it ?

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by TamDonCo on August 31st 2016, 6:09 pm

@Ange Tuteur wrote:@TamDonCo would it be possible for you to post the code here so that we may look over it ?

Yes I can but it 's very long script .. is it OK

TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by TamDonCo on August 31st 2016, 6:56 pm

I can not post , it says "The posted message is too long."

TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by SLGray on August 31st 2016, 8:59 pm

You can post it in 2 posts.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by TamDonCo on September 1st 2016, 12:00 am


TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by SLGray on September 1st 2016, 3:28 am

Could you post a screenshot of the error message you get?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by TamDonCo on September 1st 2016, 3:57 am

This is no screen shot, this works backgroud, it lets user to type in Vietnamese because Vietname has accents such as , , ư , ủ ... etc.

the above link works well when you put in <script scr= ..... > < / script>

TamDonCo
Forumember

Posts : 171
Reputation : 2
Language : English

http://nhomcho.forummotion.com/

Back to top Go down

In progress Re: What is wrong with < in script ?

Post by SLGray on September 1st 2016, 5:25 am

Maybe I do not understand the purpose of this for your forum. You can set your language in your profiles and forum for Vietnamese.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35661
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum