473,563 Members | 2,856 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

my script doesn't work.... sigh!

About one month ago I have inserted in my web site a
clickcounter who controls the access to almost every link, but this script
who changed the path in every link so the
search engines couldn't recognize my links and my web site has lost a lot in
search engines ranks;
this is the script:
<A href="http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://www.fiao.it"
Target="_blank" >
F.I.A.O.
</A>

<p class=notasxinf >
<script
src="http://www.mywebsite.c om/cgi-bin/click/stats.cgi?url=h ttp://www.fiao.it
&type=js"> <!this script send the number to the counter>
</script>
accessi dal 13/12/2003
</p>

Last week a person said to me to insert this javascript to solve all off my
problems (I'm a javascript begginner):
<a href="http://www.fiao.it" (here I added: target="_blank" )
onclick="self.l ocation.href='h ttp://www.mywebsite.c om/cgi-bin/click/go.cgi?h
ttp://www.fiao.it'; return false">
FIAO.it </A>
and to mantein the other script:

<p class=notasxinf >
<script
src="http://www.mywebsite.c om/cgi-bin/click/stats.cgi?url=h ttp://www.fiao.it
&type=js"> <!this script send the number to the counter>
</script>
accessi dal 13/12/2003
</p>

Whith this script though I have added: target="_blank" , i couldn't raise to
have the second window opened so I changed a little the javascript (I'm a
javascript begginner) in this way:

<a href="http://www.fiao.it" target="_blank"
onclick="window .open(self.loca tion.href='http ://www.mywebsite.c om/cgi-bin/cl
ick/go.cgi?http://www.fiao.it'; return false)">
FIAO
</A>

at the beginning it looks to work, so I inserted it in almost all my site
(working hard during two days), but half an hour ago I have discovered it
doesn't work:
Now a new window open, but the counter does not count!!!
Every one can say to me where is the error in this last my script, or better
which script I need to use to obtain the result to count clicks, to open the
site in a new window and to left a copy of the link that could be read by
search engine (possibly without using the noscript tag)?

thanks lot to every who answer this may question
bye luca (from Italy).


Jul 20 '05 #1
16 2070
Is this so difficult? :-)

"Luca" <dr************ ****@hotmail.co m> ha scritto nel messaggio
news:m4******** ***********@twi ster2.libero.it ...
About one month ago I have inserted in my web site a
clickcounter who controls the access to almost every link, but this script
who changed the path in every link so the
search engines couldn't recognize my links and my web site has lost a lot in search engines ranks;
this is the script:
<A href="http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://www.fiao.it" Target="_blank" >
F.I.A.O.
</A>

<p class=notasxinf >
<script
src="http://www.mywebsite.c om/cgi-bin/click/stats.cgi?url=h ttp://www.fiao.it &type=js"> <!this script send the number to the counter>
</script>
accessi dal 13/12/2003
</p>

Last week a person said to me to insert this javascript to solve all off my problems (I'm a javascript begginner):
<a href="http://www.fiao.it" (here I added: target="_blank" )
onclick="self.l ocation.href='h ttp://www.mywebsite.c om/cgi-bin/click/go.cgi?h ttp://www.fiao.it'; return false">
FIAO.it </A>
and to mantein the other script:

<p class=notasxinf >
<script
src="http://www.mywebsite.c om/cgi-bin/click/stats.cgi?url=h ttp://www.fiao.it &type=js"> <!this script send the number to the counter>
</script>
accessi dal 13/12/2003
</p>

Whith this script though I have added: target="_blank" , i couldn't raise to have the second window opened so I changed a little the javascript (I'm a
javascript begginner) in this way:

<a href="http://www.fiao.it" target="_blank"
onclick="window .open(self.loca tion.href='http ://www.mywebsite.c om/cgi-bin/cl ick/go.cgi?http://www.fiao.it'; return false)">
FIAO
</A>

at the beginning it looks to work, so I inserted it in almost all my site
(working hard during two days), but half an hour ago I have discovered it
doesn't work:
Now a new window open, but the counter does not count!!!
Every one can say to me where is the error in this last my script, or better which script I need to use to obtain the result to count clicks, to open the site in a new window and to left a copy of the link that could be read by
search engine (possibly without using the noscript tag)?

thanks lot to every who answer this may question
bye luca (from Italy).



Jul 20 '05 #2
@SM


Luca a ecrit :

About one month ago I have inserted in my web site a
clickcounter who controls the access to almost every link, but this script
who changed the path in every link so the
search engines couldn't recognize my links and my web site has lost a lot in
search engines ranks;
this is the script:

<A href="http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://www.fiao.it"
Target="_blank" >
F.I.A.O.
</A>

<p class=notasxinf >
<script
src="http://www.mywebsite.c om/cgi-bin/click/stats.cgi?url=h ttp://www.fiao.it
&type=js"> <!this script send the number to the counter>
</script>
accessi dal 13/12/2003
</p>

Last week a person said to me to insert this javascript to solve all off my
problems (I'm a javascript begginner):

<a href="http://www.fiao.it" (here I added: target="_blank" )
onclick="self.l ocation.href='h ttp://www.mywebsite.c om/cgi-bin/click/go.cgi?h
ttp://www.fiao.it'; return false">
FIAO.it </A>
and to mantein the other script:

<p class=notasxinf >
<script
src="http://www.mywebsite.c om/cgi-bin/click/stats.cgi?url=h ttp://www.fiao.it
&type=js"> <!this script send the number to the counter>
</script>
accessi dal 13/12/2003
</p>

Whith this script though I have added: target="_blank" , i couldn't raise to
have the second window opened so I changed a little the javascript (I'm a
javascript begginner) in this way:

<a href="http://www.fiao.it" target="_blank"
onclick="window .open(self.loca tion.href='http ://www.mywebsite.c om/cgi-bin/cl
ick/go.cgi?http://www.fiao.it'; return false)">
FIAO
</A>

at the beginning it looks to work, so I inserted it in almost all my site
(working hard during two days), but half an hour ago I have discovered it
doesn't work:
Now a new window open, but the counter does not count!!!
Every one can say to me where is the error in this last my script, or better
which script I need to use to obtain the result to count clicks, to open the
site in a new window and to left a copy of the link that could be read by
search engine (possibly without using the noscript tag)?

thanks lot to every who answer this may question
bye luca (from Italy).


Do not understand why you want to open in a new window ... ? !
Perhaps is it why it doesn't work ?
You call a cgi and you don't know how it runs !
It would be preferable to do not open it in a new window.
Certainly on fiao.it they have a FAQ about their counter.
Try to do exactly what they say, before to test other ways ... !

in your code to open a new window there are some mistakes :

Correct it like that :

<a href="http://www.fiao.it" target="_blank"
onclick="
window.open('ht tp://www.mywebsite.c om/cgi-bin/click/go.cgi?http://www.fiao.it');
return false;">FIAO</A>

You could try :

<a href="http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://www.fiao.it"
target="vinivic i" onclick="window .open('','viniv ici');">FIAO</A>

or :

<a href="http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://www.fiao.it"
target="vinivic i" onclick="window .open('','viniv ici','resizable =1,menubar=1'); ">FIAO</A>

or (for a full screen) (very not recommanded ! )

<a href="http://www.mywebsite.c om/cgi-bin/click/go.cgi?http://www.fiao.it"
target="vinivic i" onclick="window .open('','viniv ici','width='+
screen.width-26+',height='+s creen.height-50+',resizable= 1,top=0,left=0' );">FIAO</A>

--
******** (enlever/remove [OTER_MOI] du/from reply url) *******
Stéphane MORIAUX : mailto:st****** *************** @wanadoo.fr
Aide aux Pages Perso (images & couleurs, formulaire, CHP, JS)
http://perso.wanadoo.fr/stephane.moriaux/internet/
*************** *************** *************** *************** **
Jul 20 '05 #3
Thanks lot!!!
I had already found the solution and it works:

<a href="http://www.xyzwebsite. com/"
onclick="window .open('http://mywebsite.com/cgi-bin/click/go.cgi?http://www.x
yzwebsite.com/'); return false;">
xyzwebsite</a>

Can you tell me if this script could have any problem?

thanks, bye
Luca
Jul 20 '05 #4
On Tue, 03 Feb 2004 15:16:07 GMT, Luca <dr************ ****@hotmail.co m>
wrote:
<a href="http://www.xyzwebsite. com/"
onclick="window .open('http://mywebsite.com/cgi-bin/click/go.cgi?http://www.x
yzwebsite.com/'); return false;">
xyzwebsite</a>

Can you tell me if this script could have any problem?


The window.open() method requires two arguments. The first (which you
have) is the URI of the document to load. The second is the name of the
new window, which can be used with the target attribute in links. Even if
you never intend to use the name, you should supply it - even 'w' would be
fine. I think some browsers refuse to open the window if you don't.

Mike

--
Michael Winter
M.******@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #5
The window.open() method requires two arguments. The first (which you
have) is the URI of the document to load. The second is the name of the
new window, which can be used with the target attribute in links. Even if
you never intend to use the name, you should supply it - even 'w' would be
fine. I think some browsers refuse to open the window if you don't.

So the script would be this? ---> (inserting target="_blank" )

<a href="http://www.xyzwebsite. com/" target="_blank"
onclick="window .open('http://mywebsite.com/cgi-bin/click/go.cgi?http://www.x
yzwebsite.com/'); return false;">
xyzwebsite</a>

if not what could be (sorry i'm a javascript beginner :-) )

thanks, bye

Luca

Jul 20 '05 #6
On Tue, 03 Feb 2004 15:48:32 GMT, Luca <dr************ ****@hotmail.co m>
wrote:
On Tue, 03 Feb 2004 15:19:51 GMT, Michael Winter
<M.******@bluey onder.co.invali d> wrote:
The window.open() method requires two arguments. The first (which you
have) is the URI of the document to load. The second is the name of the
new window, which can be used with the target attribute in links. Even
if you never intend to use the name, you should supply it - even 'w'
would be fine. I think some browsers refuse to open the window if you
don't.


So the script would be this? ---> (inserting target="_blank" )

<a href="http://www.xyzwebsite. com/" target="_blank"
onclick="window .open('http://mywebsite.com/cgi-bin/click/go.cgi?http://www.x
yzwebsite.com/'); return false;">
xyzwebsite</a>

if not what could be (sorry i'm a javascript beginner :-) )


The HTML is fine. I was referring to the JavaScript call. You currently
have

window.open('UR L');

What you need is

window.open('UR L', 'windowName');

So, using your current example (omitting the URL for clarity), we have:

<a href="http://www.xyzwebsite. com/"
onclick="window .open('theURL', 'xyzwebsite'); return false">...</a>

If you did want to direct a page opened by a link to the new window, you
could do:

<a href="http://www.example.com/" target="xyzwebs ite">...</a>

Notice that the values of the target attribute, and the second argument to
window.open(), are the same.

Mike

--
Michael Winter
M.******@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #7
> Notice that the values of the target attribute, and the second argument to
window.open(), are the same.

So I need to use both target="_Newwin dow" and the second argumento of
window.open ?

<a href="http://www.xyzwebsite. com/" target="_Newwin dow"
onclick="window .open('theURL', 'xyzwebsite'); return false">...</a>

or is enough:
<a href="http://www.xyzwebsite. com/"
onclick="window .open('theURL', 'xyzwebsite'); return false">...</a>
And I 've seen a little particular in your script:

I need to remove the semicolon at the end of the script? ----> ); return
false;">...</a> to make so (i had read is better to put it there) : ---> );
return false">..</a>
thanks, bye
luca


Jul 20 '05 #8
> Notice that the values of the target attribute, and the second argument to
window.open(), are the same.

So I need to use both target="_Newwin dow" and the second argumento of
window.open ?

<a href="http://www.xyzwebsite. com/" target="_Newwin dow"
onclick="window .open('theURL', 'xyzwebsite'); return false">...</a>

or is enough:
<a href="http://www.xyzwebsite. com/"
onclick="window .open('theURL', 'xyzwebsite'); return false">...</a>
And I 've seen a little particular in your script:

I need to remove the semicolon at the end of the script? ----> ); return
false;">...</a> to make so (i had read is better to put it there) : ---> );
return false">..</a>
thanks, bye
luca


Jul 20 '05 #9
On Tue, 03 Feb 2004 16:30:15 GMT, Luca <dr************ ****@hotmail.co m>
wrote:
Notice that the values of the target attribute, and the second argument
to window.open(), are the same.

Sorry, I shouldn't have introduced the target attribute to the discussion.
So I need to use both target="_Newwin dow" and the second argumento of
window.open ?

<a href="http://www.xyzwebsite. com/" target="_Newwin dow"
onclick="window .open('theURL', 'xyzwebsite'); return false">...</a>

or is enough:

<a href="http://www.xyzwebsite. com/"
onclick="window .open('theURL', 'xyzwebsite'); return false">...</a>
The second example (without the target attribute) is sufficient.

And I 've seen a little particular in your script:

I need to remove the semicolon at the end of the script?


No, you don't. I just tend to. In an intrinsic event, you don't need to
include a semi-colon at the end of the last statement, but it is good
practice to add it. With scripts in general, you should always terminate
statements with a semi-colon.

Mike

--
Michael Winter
M.******@blueyo nder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #10

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

Similar topics

4
2335
by: Raptor | last post by:
I'm an experienced C/C++ programmer learning PHP. I'm currently trying to write a simple unit converter script. I thought I saw a tutorial somewhere that used isset() to determine whether the script is running for the first time, initialize if so, perform the usual function otherwise. But my own attempt at this doesn't seem to work. ...
11
2366
by: Fuzzyman | last post by:
What's the best, cross platform, way of finding out the directory a script is run from ? I've googled a bit, but can't get a clear answer. On sys.argv the docs say : argv is the script name (it is operating system dependent whether this is a full pathname or not). So this doesn't seem to be the answer.
1
8710
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast, returned the hyperlinked page title, filename, and the body txt (30 preceding and following words) in context with the search word highlighted. ...
13
1872
by: nobody | last post by:
Hello all, I've searched just about everything and although I can see that other people are having problems, but theirs don't seem to relate, so in a last ditch attempt, my posting! Script tags are hanging in ie when generating a html page in a new window. Works fine in netscape/moz. I know ie does some weird things with scripts but...
149
25032
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
7
1783
by: selen | last post by:
I am using above script for Focus to txtAdi which is textbox in c# web application.But it doesnt work. Have you any idea why it doesnt work thanks....... char c=(char)34;
12
2970
by: tshad | last post by:
I am not sure why I am getting this error: I have the following code I want to run from another include file that holds all my functions. functions.inc ************************************************************************************ <Script runat="Server"> Sub fnHeader(client As String) response.write("<!-- #include file =...
19
3814
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
4
1413
by: haplobaaz | last post by:
I've just had a look at your fading opacity script. As I'm new to programming and I'm amazed by the script could I ask for some hints how to implement it in a site with a mouseover, mouseout events ? Sorry for my complete ignorance in this matter. I'd greatly appreciate any help. Thanks a million !
0
7665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.