×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Integrating JavaScript. Some characters are converted which shouldn't

Integrating JavaScript. Some characters are converted which shouldn't

Integrating JavaScript. Some characters are converted which shouldn't

(OP)
Hello!

In order to make a more stylish and dynamic prompt I didn't use PROMPT but the following:

I wrote a HTML form and Javascript commands within -HTMLFORM BEGIN and -HTMLFORM END and on submit, submitted all the variables the user set to another report. This other reprot generates the actual output.

I tested the JavaScript outside WebFocus to make sure it works. But when I copied it into WebFocus and ran the report, two strange character conversions occured (I looked at the generated HTML source code):

|| became !! and
\  became Ö

I used the ladder because many of my lines within the JavaScript exceeded the length of 80 characters. So I set a \ at character number 80 and continued the JavaScript statement in the next line. This works fine within HTML but the \ always becomes Ö within JavaScript.

Does anybody know how I can suppress this strange automatic character conversion?

Eva

RE: Integrating JavaScript. Some characters are converted which shouldn't

Try not to give a linebreak on the 80th position. And if this has to be, you probably can break the statement (string) into several components and concatenate these by using the plussign.

Frank van de Kant
http://www.explicit.nl

RE: Integrating JavaScript. Some characters are converted which shouldn't

(OP)
Hello Frank,

If do'nt break the line after 80 characters, the rest is simply cut and thus ignored.

I now tried your advice about using + for concatenation and splitting lines according to JavaScript syntax. This works fine, but the problem that || becomes !! still remains. Do you know how this can happen? Or how I can avoid this?

Eva

RE: Integrating JavaScript. Some characters are converted which shouldn't

Hi Eva,

Can you send me the javascript-code.

Frank van de Kant
http://www.explicit.nl

RE: Integrating JavaScript. Some characters are converted which shouldn't

Hi Eva,

If you put your javascript-code in a separate document the problem will not occur. You can include the javascript-code onto your WebFocus-page by starting the page with this:

 <head>
  <script language="JavaScript" src="/js/validations.js"></script>
 </head>

By doing this you increase your performance as well. Your browser will load this document once, until it is changed on the server or on your client it is deleted. Your advantage is that you can reuse the same code on several WebFocus-pages.

Frank van de Kant
http://www.explicit.nl

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close