HTML bar disables itself in JavaScript (strings) & .js f

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
jjc
Posts: 2
Joined: Tue Jul 11, 2006 7:11 pm

HTML bar disables itself in JavaScript (strings) & .js f

Post by jjc »

I use RapidPHP 7 and the following strange behaviour is really bugging me:

When in an HTML or PHP file, you open a piece of JS code, the HTML works, however, as soon as you open een string (ie. var a = ""; ) and you put your cursor between the quotes, the HTML bar disables itself (except!!!) for the color selector.

Same thing is true when a .js file is opened.

This is not good, since JS (as PHP) is intended to manipulate HTML (see innerHTML DOM value for instance).

How do I turn this behaviour off, so that my HTML commands are always available?

Alternatively, how can I enable ctrl-B for bold etc if I cannot turn the HTML bar back on. (using macros asigned to key-strokes for instance?)

Thanks,
james
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Why would you need HTML code insertion in the javascript? This is not difficult to change, but I am trying to find out whether many of us need this. Cast your votes by replying.
Karlis Blumentals
Blumentals Software
www.blumentals.net
jjc
Posts: 2
Joined: Tue Jul 11, 2006 7:11 pm

Post by jjc »

The thing is that if one uses document.write functions to create re-usable HTML object functions, this is a must.

The silly thing is that if I do this:

<script>

var a = "whatever the text is"; // it doesn't work between the quotes

<b> </b> //HERE IT DOES WORK

</script>

Why turn it off in a string, but allow it within the SCRIPT tags?

Thanks,
James

PS. I know I'm new and I don't try to be difficult, the logic just escapes me.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Post by Karlis »

Ok, I got the picture.
Karlis Blumentals
Blumentals Software
www.blumentals.net
a-biz
Posts: 1
Joined: Tue Jul 11, 2006 11:35 pm

Post by a-biz »

Karlis wrote:Why would you need HTML code insertion in the javascript? This is not difficult to change, but I am trying to find out whether many of us need this. Cast your votes by replying.
Yes, I'm for it. I use a lot of html in my JavaScript routines and I can't use bold and such or shift+space to generate   and so on.
www.a-biz.nl Internet Solutions
Post Reply