473,804 Members | 3,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with onClick inside an Anchor & SSL

(My 4 questins at end after explination) The code below was provided to me
to "Popup" a window explaining what a Credit Card Verification Number is and
where to find it on a card... it is used as people enter their credit card
info on an ecommerce site. This is the first such site (Shopping Cart) I
have done and this code was provded by a user of the standard ASP Shopping
Cart software (CandyPress shopping cart.)

It works, but I don't think it is good code... but I haven't done ASP in a
long tme.

==========HERE IS THE CODE (FORMATTED FOR EASY READING)======= =====

<a href="<%=urlNon SSL%>Card_Verif _Examp.htm" TITLE="What is Card
Verification Number?"

onClick='window .open("<%=urlNo nSSL%>Card_Veri f_Examp.htm",
"cardverificati on",
"width=550,
height=610,
resizable=1,
scrollbars=1")

;return false;' target="_blank" > What is Card Verification Number? </a>
========== EASY READING FORMATTED CODE ENDS =============== =========

========== CODE STARTS - Exactly as it appears in program =====
<a href="<%=urlNon SSL%>Card_Verif _Examp.htm" TITLE="What is Card
Verification Number?"
onClick='window .open("<%=urlNo nSSL%>Card_Veri f_Examp.htm","c ardverification "
,"width=550,hei ght=610,resizab le=1,scrollbars =1");return false;'
target="_blank" >What is Card Verification Number?</a>

========= CODE ENDS =============== =============== ====

QUESTION 1: The code seems redundant to me with the reference to
"Card_Verif_Exa mp.htm" appearing twice.
QUESTION 2: What is the... TITLE="Bla Bla" part? I'm not familar with that
tag in an Anchor Link.
QUESTION 3: Is there a more simple way to create this code?
QUESTION 4: What is the "cardverificati on" paramater right after the
onClick='window .open("<%=urlNo nSSL%>Card_Veri f_Examp.htm", ???

thanks for any help on this - Will

Jul 23 '05 #1
2 1654
On Mon, 15 Nov 2004 19:24:30 GMT, Will <ws*******@netp v.com> wrote:

[snip]
<a href="<%=urlNon SSL%>Card_Verif _Examp.htm"
TITLE="What is Card Verification Number?"
onClick='window .open("<%=urlNo nSSL%>Card_Veri f_Examp.htm",
"cardverificati on","width=550, height=610,resi zable=1,scrollb ars=1");
return false;' target="_blank" >What is Card Verification Number?</a>

========= CODE ENDS =============== =============== ====

QUESTION 1: The code seems redundant to me with the reference to
"Card_Verif_Exa mp.htm" appearing twice.
It is. See below.
QUESTION 2: What is the... TITLE="Bla Bla" part? I'm not familar with
that tag in an Anchor Link.
It's not a tag; it's an attribute. Elements have start and end tags. The
starting tag for any element can contain one or more attributes that
specify certain properties for that element. See
<URL:http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2> for more
detailed information.

As for the title attribute itself, it annotates an element. Usually it's
rendered as a tooltip. See
<URL:http://www.w3.org/TR/html4/struct/global.html#h-7.4.3>. The title
attribute is applicable to virtually every element, by the way.
QUESTION 3: Is there a more simple way to create this code?
<a href="<%=urlNon SSL%>Card_Verif _Examp.htm" target="_blank"
title="What is a card verification number?"
onclick="window .open(this.href ,this.target,
'width=550,heig ht=610,resizabl e,scrollbars');
return false;">

This uses the attribute values in the link to create the window. The this
operator yields an object reference that represents the element, and I'm
sure you can guess what the properties after the dot (.) yield.
QUESTION 4: What is the "cardverificati on" paramater right after the
onClick='window .open("<%=urlNo nSSL%>Card_Veri f_Examp.htm", ???


It specifies a window or frame name. If that window exists, the url is
opened there. If not, it's created.

Hope that helps,
Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #2
Will wrote:
QUESTION 1: The code seems redundant to me with the reference to
"Card_Verif_Exa mp.htm" appearing twice.
It is. Use this.href in the JavaScript to reference the URI from the href
attribute.
QUESTION 2: What is the... TITLE="Bla Bla" part? I'm not familar with that
tag in an Anchor Link.
http://w3.org/TR/html4/

It provides advisory information about the element, browsers often render
this as a tooltip.
QUESTION 3: Is there a more simple way to create this code?
By not opening a new window, or putting the information on the same page (it
shouldn't take much space to type "The last three digits on the signature
strip on the back of the card" and add a small picture!)
QUESTION 4: What is the "cardverificati on" paramater right after the
onClick='window .open("<%=urlNo nSSL%>Card_Veri f_Examp.htm", ???


The window name. (Yes, for some reason the author can't decide between
"_blank" and "cardverificati on". I'd switch to this.target ... if I were
going to open a new window).

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3

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

Similar topics

3
14908
by: GhislainTanguay | last post by:
Hi everyone. I'm not from Internet word i have some difficulties with events. I have a session variable who change the selected language (French or English) and i try to change this variable when someone click on my anchor. This is my code <% if session("IdVersion")="" THEN intIdVersion=1
1
1590
by: Will | last post by:
(My 4 questins at end after explination) The code below was provided to me to "Popup" a window explaining what a Credit Card Verification Number is and where to find it on a card... it is used as people enter their credit card info on an ecommerce site. This is the first such site (Shopping Cart) I have done and this code was provded by a user of the standard ASP Shopping Cart software (CandyPress shopping cart.) It works, but I don't...
1
2020
by: Julius Mong | last post by:
Dear all, according to the ASV3 manual known problem section, to make an <a> execute some Javascript onclick: http://www.google.co.uk/search?q=cache:OPDjMJfL50sJ:www.adobe.com/svg/indepth/pdfs/ReadMewin.pdf+adobe+svg+javascript+problem&hl=en&ie=UTF-8#5 4. Due to design limitations of Netscape, avoid using HTML with the following form: <a href="#" onclick="myScriptWhichModifiesSVG()">The problem is that JavaScript responds to the onclick...
2
2224
by: Greg T | last post by:
Hi, I have a rather long form that I don't want people submitting unless they are absolutely sure they are ready. I figured the easiest way to prevent an accidental form submission by way of hitting of the enter key was to simply not have a submit button, instead going for a regular anchor which calls a javascript confirmation box and then submits the form.
4
16427
by: Jerry Sievers | last post by:
JS Programmers, "I'm a server-side coder PHP, Postgres etc... My question; Given the following anchor <a href="http://www.somesite.com/somefile.html">link text</a> Is there a way to code an onClick event to call a script and pass the href URL and link text? That is; We'd like to put an identical piece of JS code into each
8
4812
by: knoxautoguy | last post by:
This problem has consumed a lot of my time, and I'm aftraid someone will tell me that my whole approach to this objective is wrong; however, I would like to know if there is a way to do this. I have a web page divided into two major segments, with the top segment fixed and the bottom segment allowed to scroll, thus giving the look of frames without frames. I also have anchors so that users can click on a letter of the alphabet to jump...
9
3230
by: monomaniac21 | last post by:
hi all i want to use hyperlinks to 'load' content by changing the display of div tags. the problem i have is that unless i specify a href the anchor does not change the mouse pointer on hover even if display is set to block. it only look changes when there is a href there. but if i have a href there then when i click it will load the page, which i dont want. how can i get the anchor to look like a proper link where the users pointer...
8
3120
by: Samik R. | last post by:
Hello, I am using the innerHTML property of a div placeholder to update the contents, and the HTML is provided from a perl script on the server side. The perl script gets called through AJAX when I press a button in the first page. The returned HTML in the div has another button, which, when pressed, should call the same perl script again. Think of the program as some sort of wizard. The problem is, this works perfectly as expected in FF...
4
7225
by: pbd22 | last post by:
Hi. I am trying to add an "onclick" 'event to an anchor tag and this is proving harder than I imagined. The anchor HAS NO ID. And, there will be tons of them on the page. So, I cannot access it via FindControl. the tag is nested as such:
0
9706
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9152
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.