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

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="<%=urlNonSSL%>Card_Verif_Examp.htm" TITLE="What is Card
Verification Number?"

onClick='window.open("<%=urlNonSSL%>Card_Verif_Exa mp.htm",
"cardverification",
"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="<%=urlNonSSL%>Card_Verif_Examp.htm" TITLE="What is Card
Verification Number?"
onClick='window.open("<%=urlNonSSL%>Card_Verif_Exa mp.htm","cardverification"
,"width=550,height=610,resizable=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_Examp.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 "cardverification" paramater right after the
onClick='window.open("<%=urlNonSSL%>Card_Verif_Exa mp.htm", ???

thanks for any help on this - Will

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

[snip]
<a href="<%=urlNonSSL%>Card_Verif_Examp.htm"
TITLE="What is Card Verification Number?"
onClick='window.open("<%=urlNonSSL%>Card_Verif_Exa mp.htm",
"cardverification","width=550,height=610,resizable =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_Examp.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="<%=urlNonSSL%>Card_Verif_Examp.htm" target="_blank"
title="What is a card verification number?"
onclick="window.open(this.href,this.target,
'width=550,height=610,resizable,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 "cardverification" paramater right after the
onClick='window.open("<%=urlNonSSL%>Card_Verif_Exa mp.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_Examp.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 "cardverification" paramater right after the
onClick='window.open("<%=urlNonSSL%>Card_Verif_Exa mp.htm", ???


The window name. (Yes, for some reason the author can't decide between
"_blank" and "cardverification". 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
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...
1
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...
1
by: Julius Mong | last post by:
Dear all, according to the ASV3 manual known problem section, to make an <a> execute some Javascript onclick: ...
2
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...
4
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...
8
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...
9
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...
8
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...
4
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...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
1
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.