473,320 Members | 1,876 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.

Help with inline code?

I'd like to use a conditional that checks the URL to make sure I'm not
on the localhost, which will increment the counter. I want the counter
to work only when the page is on the web server. I have the long
string below which is not fitting into the Response.Write() method as
one string.
<script language="C#" runat="server">
private void showCounter()
{
Response.Write(@"
<!-- Start of Code -->
<script type="text/javascript" language="javascript">
var sc_project=1000;
var sc_invisible=1;
var sc_partition=10;
var sc_security="7708ea54";

</script>
<script type="text/javascript" language="javascript"
src="http://www.abc.com/counter/counter.js"></script>
<noscript>
<a href="http://www.abc.com/" target="_blank"><img
src="http://c11.abc.com/counter.php?sc_project=1000&amp;java=0&amp;securit y=7708ea54&amp;invisible=1"
alt="free statistics" border="0"></a>
</noscript>
<!-- End of Code -->
");
}
</script>
How should I be doing this?

Thanks,
Brett

Jan 6 '06 #1
2 1252
Dan
Not sure what you are trying to achieve. aere you trying to make a page
counter to judge how many hits your site gets? If so why not make a
statistics table in your db and increment a value in there everytime a
appstart event is called? Then read this back when you need to display your
counter?

--
Dan
"brett" <ac*****@cygen.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'd like to use a conditional that checks the URL to make sure I'm not
on the localhost, which will increment the counter. I want the counter
to work only when the page is on the web server. I have the long
string below which is not fitting into the Response.Write() method as
one string.
<script language="C#" runat="server">
private void showCounter()
{
Response.Write(@"
<!-- Start of Code -->
<script type="text/javascript" language="javascript">
var sc_project=1000;
var sc_invisible=1;
var sc_partition=10;
var sc_security="7708ea54";

</script>
<script type="text/javascript" language="javascript"
src="http://www.abc.com/counter/counter.js"></script>
<noscript>
<a href="http://www.abc.com/" target="_blank"><img
src="http://c11.abc.com/counter.php?sc_project=1000&amp;java=0&amp;securit y=7708ea54&amp;invisible=1"
alt="free statistics" border="0"></a>
</noscript>
<!-- End of Code -->
");
}
</script>
How should I be doing this?

Thanks,
Brett

Jan 6 '06 #2
No - I already have a page counter. I just need to hide it when I'm on
the local computer and display it when I'm on the web server. I only
want hits from the web server.

Brett

Jan 7 '06 #3

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

Similar topics

1
by: Johnny | last post by:
Hi together, I'm new to XML and have problems with FOP (http://www.apache.org/dyn/closer.cgi/xml/fop) When I try to convert my .fo document to .pdf, I get this message: fo:39:26...
14
by: Akbar | last post by:
Hey there, Big-time curiosity issue here... Here's the test code (it's not that long)... it's to display a large number of image links with captions, ideally pulled in from an external file...
1
by: FrankBooth | last post by:
Hello, I have a list of names, and when I click ona name I want the extar info to show and then I want to clcik and hide it again. I have the following HTML which works perfectly if I use one...
14
by: Chris Mantoulidis | last post by:
I am not clear with the use of the keyword inline... I believe you add it do a function when you implement the function inside the header file where the class is stored... But is that all? What...
4
by: Joseph | last post by:
The idea is to show only one of the <Baby_Div> while hiding all the others. At the moment all I have managed to do is to show each <Baby_Div> in turn as expected, but the problem is that once a...
6
by: RainBow | last post by:
Greetings!! I introduced the so-called "thin-template" pattern for controlling the code bloat caused due to template usage. However, one of the functions in the template happens to be virtual...
3
by: Stephen Sprunk | last post by:
On a project I'm working on, I ran across the following macros: /* assume s is struct stream *, s->p is char, v is unit16_t or uint32_t */ #define in_uint16_le(s,v) { v = *((s)->p++); v +=...
7
by: inftoconc | last post by:
Hi all, I wrote a macro to read 8 bytes from a byte stream. Am not sure if it is working ok. Can anyone please point out if there looks to be a problem! #define READ64(b) ( (uint64_t(*b)) <<...
5
by: iapx86 | last post by:
My parser project calls for a computed goto (see code below). The C preprocessor delivers the desired result, but is ugly. Template metaprogramming delivers results I do not understand. Can...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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: 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: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.