473,320 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

conditional compilation is turned off

Hi every body,

What does that mean?
The following script raises the subject alarm.

<p><a href="javascript:void();"
onClick="mailto:sg*****@cyberus.ca?Subject=BRITTAN Y&nbsp;WORKSHOP">

<img align=left src="britany.gif" width="231" height="40" border=0
alt="BRITTANY WORKSHOP with Sylvio Gagnon" style="text-indent: .2em;
background:ffffff; color:bb5500;">
</a></p>

Jean Pierre Daviau
Jul 20 '05 #1
10 21995
"Québec" <jp**@vidn.ca> writes:
What does that mean?
What? (I.e., don't put an essential part of your message in the subject,
it is confuzing to readers).
The following script raises the subject alarm. <p><a href="javascript:void();"
onClick="mailto:sg*****@cyberus.ca?Subject=BRITTAN Y&nbsp;WORKSHOP">


Apart from using javscript:-URLs at all, which is recommended against,
the href is syntactically incorrect Javascript. The "void" operator is
not a function, it needs an expression after it.

The onclick attribute value should contain javascript, but instead
contains a mailto:-URL (also recommended against, at least don't rely on
the user being able to use it).

Conditional compilation is something IE uses with its scripting. I guess
it is the "@" in the onclick attribute value that triggers the alert.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2
VK
The interpereter expects a JavaScript code in the onClick handler.
This mailto address looks like a uniline conditional assignement
x=(condition)?y:z
So it tries to process this assignement and eveidently falls miserably,
this is the source of the error message.

The right way is (you don't need any script here at all):
<a href="mailto:sg*****@cyberus.ca?subject=BRITTANY%2 0WORKSHOP">Send
e-mail</a>

It's very important to remember to URLEncode (escape) text for subject
and body.
In the particular all spaces have to be replaced by %20 and all line
breaks by %0D%0A
Jul 20 '05 #3
VK wrote:
The right way is (you don't need any script here at all):
<a href="mailto:sg*****@cyberus.ca?subject=BRITTANY%2 0WORKSHOP">Send
e-mail</a>


And it is to be noted that such hyperlinks depend on an e-mail client
configured for the HTTP user agent that *understands* `mailto:' URIs,
which excludes many visitors using only web interfaces for their e-mail.
One should therefore use a feedback form utilizing a server-side formmailer
application where possible. BTW, an easily configurable and (for
non-commercial use) free formmailer that does not require CGI support
for your webspace, can be found at http://formmailer.com/
PointedEars

Jul 20 '05 #4
VK
Mailto is an official protocol accepted and documented by 3W years and
years ago.
If some UserAgents still didn't implement it, it's their problem.
~97% did, and it's mighty good for Web.
(Some browsers still cannot handle properly CSS, but it's not a reason
to do not use styles at all).

Yes, mailto has its defaults, the main is that it's easy to grab by
spammers.

Still it gives an opportunity to easy and quickly generate adjusted
e-mail messages without learning server-side scripting, getting access
to this scripting etc.
It's a very helpful tool for beginners.
Jul 20 '05 #5
"VK" <sc**********@yahoo.com> wrote in
news:3f***********************@news.freenet.de:
Mailto is an official protocol accepted and documented by 3W years and
years ago.
If some UserAgents still didn't implement it, it's their problem.
~97% did, and it's mighty good for Web.
(Some browsers still cannot handle properly CSS, but it's not a reason
to do not use styles at all).


You've missed the point. The big problem isn't that *browsers* don't
understand it (the majority of them do), but that even if the browser
understands it, it works only if the user's system has a *mail* user agent
configured, which will *not* be the case if

1) The user's email provider works by a purely Web interface rather than
SMTP or

2) The user is running on a shared-access machine such as a library
terminal or a computer in an Internet cafe (there are entire countries
where the latter is how the vast majority of Internet users access the
net).
Jul 20 '05 #6
In article <Xn*******************************@130.133.1.4>, Eric Bohlman
<eb******@earthlink.net> writes:

<-snip->
You've missed the point. The big problem isn't that *browsers* don't
understand it (the majority of them do), but that even if the browser
understands it, it works only if the user's system has a *mail* user agent
configured, which will *not* be the case if

1) The user's email provider works by a purely Web interface rather than
SMTP or

2) The user is running on a shared-access machine such as a library
terminal or a computer in an Internet cafe (there are entire countries
where the latter is how the vast majority of Internet users access the
net).


And a 3rd case:

3) The user has a browser that does not have an email program associated to
handle mailto: Of the 17 or so browsers that I have, only one (the AOL
browser), has an email program associated with it. Any other browser, it
prompts me to install its self-associated email program (which I never do - I
have an email program of choice) so that the authors unreliable mailto: works
for the page.
--
Randy
Jul 20 '05 #7
[preceding]
YES
so I added by pressing this button or by writing to: sg*****@cyberus.ca
================
If I write
alert((a == sg*****@cyberus.ca)?'subject':'BRITTANY WORKSHOP');

I get conditionnal compilation is turned off

If I write without the @
alert((a == sgagnoncyberus.ca)?'subject':'BRITTANY WORKSHOP');

I get sgagnoncyberus.ca is undefined

alert((a == 'sgagnoncyberus.ca' )?'subject':'BRITTANY WORKSHOP');
Jul 20 '05 #8
Québec wrote:
[preceding]
YES
?

<http://www.netmeister.org/news/learn2quote.html>
so I added by pressing this button or by writing to: sg*****@cyberus.ca
?
================
If I write
alert((a == sg*****@cyberus.ca)?'subject':'BRITTANY WORKSHOP'); ^[1] ^^^^^^^^^^^^^^^^^^[2]

[1] What is `a'?

[2] The mail address must be a string literal,
enclose it in single or double quotes.

[3] What should the above code achieve?
I get conditionnal compilation is turned off
http://msdn.microsoft.com/library/de...statements.asp
If I write without the @
The `@' is not the point, the type of the operand of `==' is.
alert((a == sgagnoncyberus.ca)?'subject':'BRITTANY WORKSHOP');

I get sgagnoncyberus.ca is undefined
Of course, see [2].
alert((a == 'sgagnoncyberus.ca' )?'subject':'BRITTANY WORKSHOP');


FWIW, that is at least syntactically correct and you can re-include
the `@' here.

BTW, I doubt that you have fully understood what was written about
the use of `mailto:'.
PointedEars
Jul 20 '05 #9
> Québec wrote:
[preceding]
YES
I say ok to what was written about browsers in the thread.

If I write
alert((a == sg*****@cyberus.ca)?'subject':'BRITTANY WORKSHOP');

I get conditionnal compilation is turned off

If I write without the @
alert((a == sgagnoncyberus.ca)?'subject':'BRITTANY WORKSHOP');

I get sgagnoncyberus.ca is undefined The var a = ""
I know I should have quoted the address.
So. The @ is what turns on the "conditionnal compilation is turned off"
http://msdn.microsoft.com/library/de...-us/jscript7/h

tml/jsconconditionalcompilationstatements.asp
Aren't we on a javascript newsgroup?

I am sure I mixed you up a bit more. It is a bad talent I have to mix up
everybody and especially myself. :-)
Thank you very much.
Jul 20 '05 #10
Québec wrote:
So. The @ is what turns on the "conditionnal compilation is turned off"


As you can read in the linked documentation, `@' is part of statements for
conditional compilation in JScript, but you need to enable that first. If
you do not and use ´@' *outside* of String/RegExp literals followed by a
alphabetic character anyway, the JScript engine assumes that you are using
such a statement and you get that error message. Tested with IE 6.0 SP-1
on Win2k.
http://msdn.microsoft.com/library/de...-us/jscript7/h

tml/jsconconditionalcompilationstatements.asp
Aren't we on a javascript newsgroup?


We are. JavaScript is Netscape's implementation of ECMAScript, and JScript
is Microsoft's implementation of ECMAScript used in Internet Explorer which
has some special features, as you have seen.
PointedEars
Jul 20 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Steven T. Hatton | last post by:
I've made no secret of the fact that I really dislike the C preprocessor in C++. No aspect of the language has caused me more trouble. No aspect of the language has cause more code I've read to be...
2
by: Steve Jorgensen | last post by:
To begin with an example... Let's say you were wanting to write code usign early binding to the MSXML library, but then be able to switch between early and late binding at will. Conditional...
1
by: chris han | last post by:
Hi, all, I'm trying to use Conditional Compilation Statements in my code. using System; #define DEBUG public class MyClass { public static void Main() {
12
by: wanghz | last post by:
Hi, Could I ask some questions about the conditional compilaion? Suppose I have three simple files: a.c, b.c and c.h /* --------a.c--------- */ #include <stdio.h> #include "c.h" int...
2
by: FireStarter | last post by:
Guys, in the code that follows, why does the method F() still compile, even if DBG is undefined? Inside method G(), the code inside <#if DBG> does not compile (notice that I can write whatever I...
1
by: A.M-SG | last post by:
Hi, We have a solution with several c# projects within it. How can I define solution wide conditional compilation symbols?
4
by: Bob | last post by:
Hi, In VS2003 conditional compilation constants and their state could be defined at project level. I was using this to control what features where offered by various builds. i.e....
10
by: Dave | last post by:
I'm a C++ programmer of many years, trying to get my feet wet in C#. I have a question about conditional compilation. In C++, I would sometimes define a constant in an include file, and then...
6
by: maxwell | last post by:
I'm trying to use the gpp utility (Gnu points to http://en.nothingisreal.com/wiki/GPP) to do conditional compilation in Python, and I'm running into a problem: the same '#' character introduces...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.