Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 General help me questions
 HREF="#"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

apswater
VP-CART Super User

444 Posts

Posted - February 21 2005 :  10:57:56  Show Profile  Visit apswater's Homepage  Reply with Quote
Strange problem..

We are having some problems on ou site and I cam across the following tag thoughout the site on pages that have problems....

href="#"

I am not familiar with this and dont remember seeing them before.
FOr isntance when you mouse over the click for spec sheets liinks here http://66.121.213.146/products/shopdisplayproducts.asp?id=23&cat=Timer+Based+Water+Softeners

you will see that the # shows up attahed to a link that makes no sense and where the link goes to isnt the same as where the mouse over shows... does that makes sense?

a search finds 4 href="#" in the shopproductsformat and at elaset one in the shopdisplay products right before "on on click oen" the shopexd page....

At first I though a my cat steped on the key and I inadvetantly saved but there seems to be a few too many in different files for that.

any thoughts?

UPDATE :

ok, I fixed it by rewritting the popup window to being a straigh link (I wanted to get rid of the popup anyway) and now it is fine...

Is the a href="#" normal? and what does it do if it is?







Edited by - apswater on February 21 2005 11:34:10

devshb
Senior Member

United Kingdom
1904 Posts

Posted - February 21 2005 :  11:54:22  Show Profile  Visit devshb's Homepage  Reply with Quote
href="#" will point the link to itself (ie same page, same location).

When clicked on it won't do anything.

Often this is used as a placeholder for people to put real links in later on, or alternatively it might be used as a way of running javascript via an onclick trigger in the <a> tag, which is (I think) what it was doing to kick-off the popup window.

Another way of doing javascript on an href is just by doing

<a href="javascript:yourjavascriptfunction();">link</a>

that would have the same kind of effect as doing:

<a href="#" onclick="yourjavascriptfunction();">link</a>
Simon Barnaby
Developer
[email protected]
www.BigYellowZone.com
Web Design, Online Marketing and VPASP addons

Edited by - devshb on February 21 2005 11:56:36
Go to Top of Page

apswater
VP-CART Super User

444 Posts

Posted - February 21 2005 :  13:57:11  Show Profile  Visit apswater's Homepage  Reply with Quote
Thanks.

I must have had an open tag so the text tag got messed up. Fixing it eliminated the popup and the problems of popup blockers so I guess it is all good now!

I have a few more strays I still got to chase down... the explanation really helps.

It also allowed my search spider (and I assume Google and the rests) to grab all the shopexd pages adding about 1000 pages to the mix.

One more question for you... do you have a qiuck piece of code that will allow the shopexd link to be generated only if there is text in the extended description do you?




Edited by - apswater on February 21 2005 13:59:50
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00