Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




A-B-C-D... Links


Im new to ASP, and have hit a snag.I am trying to build a page that has 'A-B-C-D...' links along the top
of the page. When you click 'A', it goes to a table with everyones
usernames and grabs the ones that start with the letter A.
The problem is that the username field contains the names of people
who wrote an article, so in some cases there are actually two names in
this field. So for example, if it contained 'Bob, Jack', I would need
'Bob' to show up under B, and 'Jack' under J.
Im totally stuck as to how I might do this. Changing the layout of my
tables is no trouble if a different table setup helps




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Links
I am taking an ASP course and I am stuck with one error message that I can't seem to correct.Here are the links:

http://www40.brinkster.com/ccraigbro...assignment.txt
http://www40.brinkster.com/ccraigbro...assignment.asp

Links.asp?id=whatever
links.asp?id=whatever how do i do this, i know response.write is part of the code but i forgot the rest of it.

Many Links
I am creating a spot where people can redownload items if
they have access. I have everything written but the part
where people actually get to the page due to a huge
issue. So far there are 96 uniquie combinations of the 8
items they can download.

Here is the flow of my system.

Person creates a login, and in that login there is a spot
to put in a specific code for the items they need to have
access to. After that they are sent an email regarding
login location and login info.

The login site has all of the verfication to login, but i
am stuck at how to get the users to the actual page to
download due to the 94+ combos of items, (and that number
is only going to grow). Am i just screwed and this is
impossible without taking a HEAVY hit to the server or do
i need to find a program that does this?

Top Nav Links
How do you create the links similar to the links on the forum Viewing: ASP Free Forums > Programming > ASP Development > Post New Thread .If there is examples on the net please let me know.

Broken Links
i have a search engine which contains all of the links in an access db.

basically what i am wanting to know is:

is there some code i can make to query all the results for a matching word such as "elephant" all the results (url) in the database would be opened and checked, Any broken links would be removed.

does any one know how to do this. what i was thinking of doing was creating some code to open all the pages that match a search....say 50 open

i could then click through them closing them individually to check all urls rather than doing it manually

Links To EML Files
I need to create a hyperlink to an .eml file so as to view it when the link is followed. The code is:

Response.Write "<a href='serverfoldermyeml.eml'>eml link</a>"

The problem is that the url automatically produced by this link is:
"mhtml:file://serverfoldermyeml.eml"
and the file cannot be found.

If I manually type "file:///serverfoldermyeml.eml" everything works fine.

How can I produce the correct url from my asp code? Any ideas?

Standard Links
A friend has told me that links that worked fine in IE 6 on a PC are now not
working in IE 7. The only thing they can see is that these links have the
following common traits:
a) long file names, ie about 30 plus chars
b) underscores in the filenames.
c) They are derived from the old asp routine to force a pdf download rather
than open them up in the browser window.
I'm desperately trying to borrow a PC to install IE 7 (I don't want to
affect my own PC in anyway at the moment) to test this

Checking Links
win 2k pro
sql server 2k
asp - vbscript

I got the below code from somewhere ages ago. I have a list of links on my site that link to other sites but I want to check if the link is a valid link automatically and if it fails after x checks (checks every 7 days) then to mark the link as a possible broken link

the below seems to take ages to process and was wondering if there is a better way to do the below. Code:

Separting Links
i am having a textarea in which the website links r entered by the user separated by a comma(,). and the same i am storing in the database field with type memo. now i want to retrieve the entered links and display all the links separated so when the user clicks on a particular link the page for that page opens us.

Links Off Page
does anyone know how to request the static links off a page using XML and asp?
I would really appreciate any help you can give me on the subject. I need full links including the
http:// and everything.

Links In Firefox But Not IE
I wish to hide links, i'm at present trying to 'float' as such invisible links over a background image....
the line i'm wishin to use that i think is right is

#links a i {visibility: hidden;}

when taken out we can see the links, as needed, but the minute i add this line, they should be invisible but still there, this is the case in IE but with FF they disappear completely...

Paging Links
I have a search box called r_name on the results page is requesting it
but if a person searched for a pub name then i'd like to page by pub name
if a person typed in a town then i'd like to page by rsTown
and if a person typed in a postcode i'd like to page by postycode something like:
Code:
IF r_name = rsTown THEN
Response.Write("&nbsp;&nbsp;<a href=""search_results1.asp?<%rs="rsTown"%>& r_name & "&pageno=" & paging & """class=""textareatext"">" & paging+1 & "</a> ")
END IF

the above bit of code is incorrect?!
or
Code:
IF r_name = rsPubName THEN
Response.Write("&nbsp;&nbsp;<a href=""search_results1.asp?rsPubname=" & r_name & "&pageno=" & paging & """class=""textareatext"">" & paging+1 & "</a> ")

Next And Previous Links
I'm trying to add a Next and Previous link on a detail page but i'm not sure how to go about it....

First page displays listings.
Second page displays main item.

Now what i'm trying to do is maintain a next and previous buttons so people don't have to go back to the display listings page

Navigational Links
Please refer to altavista by search the 'asp'.

First page:

[<< Prev] 1 2 3 4 5 6 7 8 9 10 [Next >>]
Second page:

[<< Prev] 1 2 3 4 5 6 7 8 9 10 [Next >>]

BUT, at the 10th page:

[<< Prev] 5 6 7 8 9 10 11 12 13 14 [Next >>]

How do make this kind of navigational links in asp?

Text Into Links...
Is there an ASP command that can I use to make every occurance of a certain word into a link? For example, if I have an article about marketing, and I want every occurance of the word "marketing" to link to a page called marketing.htm, how would I do this using ASP

Redirect Aff Links
I have a site where an affiliate program has been wreaking some havoc with their affiliate links, and has now been cancelled.

The site is hosted on windows and the files are .asp files.I need to be able to redirect the affiliate IDs to something safer, such as domain.com/ instead of domain.com/aff.php?id=1

PREVIOUS And NEXT Links
I have a db that users search to return records. However, I want them to see only 10 per page and then, a NEXT 10 link that will display the next 10 results.I have tried using LIMIT , but it only returns the specified number but no links or way for users to view them or the remaining the search results.

The search results is getting lengthy and users are beining to scroll, whine and complain.I am using Asp, MS SQL 7 on WINNT.

Header Links
I have created a header file that has some hyperlinks, I want to enable the hyperlinks depending on the situation for eg: the header has link1, link2, link3 and they correspond to page1, page2, page3. suppose I am on page1, I want to disable link1.... and so on.

Characters In Links
i have a small question for all that know asp, below i have a sample of code that ive noticed that is linked with other characters after the file type ".asp" what is this used for, and why?

if j = true then response.redirect "Default.asp?r=a1"
end if

how can i locate the file it is refering too or is it simply the standard "Default.asp" page and the characters after simply refer to part of the code located within. but still why is it used ?

Parsing Links
i need the code for parsing urls from text and changing them to <a> tags, for a forum .

No-Refresh Links
after reading the article on No-refesh links i was wondering if i could link to an asp page that will simply open a new window without changing the original window. i was wondering if there was a way using

<% Response.Status = "204 No Content" %>
and some script or something?

Disabling Links
I would like to know how to disable a link when a certain value is false. I have the following link.

<br><a href="OrderProgress.asp" class="blueLink">Check Order
Progress</a><br><br>

I wish to disable the link if blnValidCustomer = false and enable it otherwise.

Dynamic Email Links
I am storing data in a table in Access, one of the fields contains email addresses (field is set as 'text' not 'hyperlink').

When I retrieve these records from my website how do I show them as mailto links?

Here is what i've tried...I don't even know if it's close.

<a href="mailto:" & <%=(rsContacts.Fields.Item("ContactEmail").Value)%> & >" & <%=(rsContacts.Fields.Item("ContactEmail").Value)%> & "</a>

I know that I could just add "Mailto:" before the recordset, but I don't want this to show on the page.

Application Object Links
Below you can find quick links to information about the Application Object. I would write a post like my CDONTS one, but I just don't have time, but when I do, I'll see if I can get one done.

An intro to the Application object, this its in JScript but its easy to change
Using the Application Object to Improve Performance

HOW TO: Declare an Array at Application Level Scope in Active Server Pages (Q165293)

A Real-World Example of Caching Data in the Application Object
W3 Schools Application Reference

HOW TO: Use the Application Object to Store ASP State

Collect Links On My Site
I am trying to crawl my site to get a list of links. I am using the regular
expressions to get the href tags from the pages and reading the links using
xmlhttp module.
is there an efficient way to loop through the links? If you start with the
home page, how do you do it? How do yo ukeep track of the pages you have
been to and which to do next.
I am not sure how to go about tihs.
I tried some loop but it seemed to take too long to crawl my site.

Two ASP Related Questions - SSI And Links
I am designing a Web site with about 500 - 600 pages of festivals on it and would like opinions on two ASP subjects. I have designed about 20 pages or so as of now. These are the contact us, FAQ, about us pages and such. I also have a template to go by for each festival's page. But I have two problems I need fixed before I start to replicate.

(1) SSI and styles - There are four sections to each page. I use SSI (ASP virtual version) for the top, bottom and a small section of featured festivals (which is above the bottom) on each page. Between the top and featured festivals is the actual page. This way I can change a link on the top or bottom and it is fixed on all pages.

But, I have an enormous amount of styles listed (all styles on four pages) in the code from each page's fonts. Each page's styles are called something different. For example, the festival page itself has the styles as normal, ".style1." But the styles on the top the links, which once again is an ASP include, would be called ".style1top." I used that approach because .style1 on the festival page and top links could be different.

It works, but I have dirty code and I want the site to be as Google friendly as possible. I have thought about adding all the styles to a page and using it as an ASP include on all pages, but that would have way too many styles each page and be even dirtier. What is the best practice for this? Code:

Extract Links From A String
Ive been searching the net now for about a week for someway to extract all of the links and images out of source code. I want to make a search engine. I can get the HTML of an entered URL, but now I need to EXTRACT all of the links e.g href, src and I want to place them into an access database.

Adding Links To An Array
I have an array where the data is pulled from a DB. I output the results of the DB like this:

<%=myArray_MenuIdeas(4,i)%>

where "4" is the recordset field from the DB.

The actual record being output looks like this: 4444, 1211, 2222
I need to add links to each of these values in this array.

how can I do this?!

Generated Content Links
My Asp database generated pages' content links all open a new window containing the same page by default; this is strange since the default behavior for anchor links is to open in the same window; I can and have corrected this with target="_self" but I have additional anchor links that call JavaScript to submit a form and these aren't stopped from opening the new window by the "_self" value.

Interestingly, once the new window is open with the original page within, the links all work as expected in that window(!?!); is there a window or DOM value I need to instantiate so the generated windows will "recognize"themselves?

Querystrings And Anchor Links
Whenever I click on a link (on the shoppingcart site I'm developing) that contains a querystring with the category name and an anchor name (whatever the name of the '#' bit in the URL is), SQL retrieves the category name from the querystring, filters out the appropriate information on the products and the page jumps down to the anchor link.

Once the customer clicks on a product, the processing page is meant to redirect, via the server.redirect command, back to the products page with a querystring identical to the initial filtering one (with the anchor name attached), thus teh customer is back to the same product that he clicked on, without having to scroll down every few seconds to add more of the same product.

However, even though the querystring sent by the response.redirect command is identical, the ASP code can't seperate it again properly and thus the SQL statement shows nothing, as the ASP coding thinks that the info following (and including) the # is apart of the 'category' part of the querystring.

Checking Dead Links Within DB
I have a DB, within that DB is a table, within that table is a column.Anyway, that column holds content for a page i.e.PHP Code:

<p>Paragraph</p><a href="http://www.google.co.uk"> google< /a><h1>heading</h1> 
etc etc

I want a script that would scan each record/column for dead links i.e. ones that don't respond with a nice "all is ok" message (I forget the code at the moment - it's in my brain somewhere.Without installing any additonal components, what's the easiest way to do this?

Links Exchange Script
I am looking for a ASP Links Exchange Script. if there is any ASP Links Exchange Script, then let me know. Because i m Tired of Adding links and then Uploading FTP and more.

Finding Links On A Page
I'm looking for an ASP/VBScript function that would accept a string of text, use a regular expression to find all of the links within that text, and output an array of the links with the text that was linked (i.e. between the "a" tags).

Does anyone have such a thing? Right now I would even settle for just the regular expression pattern. I've done some searching and haven't found what I'm looking for. With some trial and error I could probably create it but I was hoping someone else might be willing to share.

SQL/ASP Approach To Alphabetical Links
Say I have a DB with 10,000 records and using MySQL paging. I want to put a link setup at the top of the page with the alphabet that will pop to the proper page for each of the letters.

So: 1 A B C D...

Click on 1, goes to page 1, click on A goes to page 7, click on B goes to page 10.. so on so forth. how to find the pages either through an SQL subquery or through ASP. I can write code to make it happen, but I'm looking for a solution that will not hamper performance as much as an array dump and search.

Inserting Picture Links
I plan to create an ASP site with a SQL Server d/b, where the SQL table would be able to retrieve picture links. here's an example of what I'm referring to:

Let's say the ASP page is about umm... Florida beaches So, the page would naturally contain text on said beaches (not a problem storing text), but I would also want to retrieve pictures about Florida beaches. So essentially, the page would have both text and pictures about said beaches. Now, the only way I can think of diplaying the pictures is having a separate column PICTURES storing the URL to the images.

what happens when I retrieve the URL, does it show up in the parsed ASP page as an actual URL or the picture itself? If it's the latter, how do I go about coding it to straightaway displaying the picture rather than the URL to the picture?

View Links That Were Accessed
i have a restricted website with login access.

now in one section, there is a list of links that link to pdf documents. new pdf documents are added weekly.

what i need though is some way of showing which users accessed a certain pdf, and which did not.

is there a way of recording this information?

Using Buttons As Download Links
It is mainly HTML and JavaScript, but it is built on an ASP page. I just wanted to know what the code is to make a form button that will download a file when clicked on. Such as, when a user clicks the "Click here to download" button, using javascript, it will go get that file.

Either that, or make a webpage that will use a string to download the file from a certain directory, such that, if the page is download.asp?file=office, then the server would go to a specific directory and download say, office.zip, or make it so that two arguments are passed, such as download.asp?file=office&type=zip, so it know to look for office.zip in the specific directory.

Update Websites Links In Access Db
I'm trying to update an Access db: if link is ok, then status=up else status=down, in a form with 3 fields: names, link, status:

<%
Server.ScriptTimeout = 1500
%>

<%
Session.timeout = 1
If IsObject(Session("press_conn")) Then
Set conn = Session("press_conn")
Else
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "press","",""
Set Session("press_conn") = conn
End If


sql = "SELECT names, status, link from websites order by names"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
rs.MoveFirst

Dim GotothisURL

Do Until rs.EOF
GotothisURL = rs("link")
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
GetConnection.Open "get", GotothisURL, False
on error resume next
GetConnection.Send
ResponsePage = GetConnection.responseText

if ResponsePage="" then
sql = "UPDATE (websites) set status=(offline) WHERE names = '"&rs("names")&"' AND link = '"&rs("link")&"'"
conn.Execute(sql)
else
sql = "UPDATE (websites) set status=(online) WHERE names = '"&rs("names")&"' AND link = '"&rs("link")&"'"
conn.Execute(sql)
end if

Set GetConnection = Nothing
Set ResponsePage = Nothing

rs.MoveNext

Loop

conn.close
set conn = nothing
rs.close
set rs = nothing
%>

I get no errors at all. The path to db is ok.

The script acts very very strange. On the first run, it seems that everything is ok, but the page freezes on half [the blue bar on bottom of browser]. If I'll stop the script, on the second run, the page loads very quick, but nothing happens.

How To Handle Many Page Links In A Search?
Search results on my site started to show a large number of page
links. I never had to deal with it before but it is time now. I am
trying to come up with a good logic / idea how to display a large
number of page links without showing all of them at once.
For example, if user is searching for "pets" and gets 50 pages back, I
want to show 10-20 page links and hide the rest. Also, the closer user
gets to the last visible pages, the more hidden page links become
visible. Something like Google does...

If somebody worked with it before, could you share with ideas, or
suggestions, or good examples to look at? Is there a standard way to
implement this, perhaps?

Regular Expression :: Extract Links
here is a pattern I am using in regexp module:
href(.*?)[x22>][^x22]*x22

This string seems to work in that it will return
href = "http://www.domain.com"

from href tags such as this.
<a href = "http://www.domain.com">This is a link</a>

it handles the spaces that may exist before and after equal sign. (basically I am trying to extract links out of my url)

is there a way I can take this pattern a bit further to return just the http://www.domain.com

I am new to regexp but have managed to get this far.

Anchor Links And Image Swapping
I have a menu made up of images that swap when clicked (ie home_on and home_off, contact_on and contact_off etc) but when i tried to put anchor tags around the images they wont swap any more?

How Can I Refer To A Query Which Links Different Records In One Table In ASP
I am new to ASP and I want to use a query which links one record in a table to another record in the same table to display a list of values. The query lists the names of all managers (the managers staff no is held in the reports_to field of an employee)

Set rs=Server.CreateObject("ADODB.Recordset")

rs.Open "SELECT DISTINCT p2.Surname + ', ' + p2.[First name] AS Expr1
FROM People p1 INNER JOIN People p2 ON p1.reports_to = p2.[Staff no] WHERE (p1.[Staff no] IS NOT NULL)",con,3,3
while not rs.EOF
%>
<option value="<%=rs("p2.surname")%></option>
<%
rs.MoveNext
wend
rs.Close

However it doesn't like the alias (p2). Is it possible to return a list from this type of query?

Statistic Report Regarding Links Pressed In Asp Pages? MTS?IIS?
NOT SURE It's an MTS matter or just IIS , and if not, do tell me what is the software to use for it,a dn where to ask.

I'd like to get a daily/weekly/monthly report regarding number of links that r pressed from my site.

Details:

1. I have 4 pages, and each page has a list of links. I'd like to get statistics reports regarding usage of these links. I.e. - I'd like to know how many times each link is pressed (pre day, week, month) by users.

2. I would also like to know what hour/day/date each pressing took place, and also the IP number of the user.

3. I would also like to know if possible to get the info as a table that can be edited later (if copied to excel etc.), and get Graphs also.

We r using IIS (Intranet), OS IS windows NT, and DB is Microsoft Access. I'd like the administrator to perform such reports on a daily basis (and weekly and monthly as well), and send it to us (the asp programmers).

I have no access to the live server (besdies copying files to there), so can not use the IIS/MTS myself.


How Can We Send Email With Links And Images By Using CDOSYS?
I have a CDOSYS mail and it's working ok but it sends plain text massage. But i want to send with images and links. But when i put a link with image in the .HTMLBody field like <a href="http://www.mysite.com/"><img src="file:///C:/My Documents/image.gif" border="0"></a> so, i got an error message.

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/cdo/cdosys.asp, line 41 .....

Using Alphabetical Index With Internal Page Links
I want to create a page that uses a horizontal alphabetical index such as

a b c .....

so when the user clicks on a letter they go to that section listing the manufacturer names beginning with that letter.

My question is that since I am pulling the names from a database, what is the best way to create the sections for each letter? My first thought is a basic and overkill solution creating a record set for each letter. Would I use arrays?

I know I could just create a separate page for each letter to display the corresponding entries. Would rather have one page at this time.

Regular Expression :: Testing For Invalid Links
Have a regular expression that I can't quite get my head around. I need to remove invalidate links like the one below...

<a href="java_script_: alert('blah');" onClick="alert('blah')">Bad Link</a>'

A validate link would look like this...

<a href="http://www.hotmail.com">Good Link</a>

I believe I have the regex for removing validate links:

str.replace(/<a href="[^">]+">/gi,'')
// result on validate link: Good Link</a>

Display Unique Random Links From Access Db
I have a database with 20 companies and their links in it. Ive tried to develop some code that i found in another forum while i was searching for a solution to 'unique random links' but, although i feel im close, Code:

Send Login Via URL That Links To Pw Protected Wiki On Apache
I need to display a URL that links to a password protected wiki (htaccess) on an apache server. I'd like to include the userID and password in the URL so that the user is not prompted for it on the wiki end. If I was linking to another ASP page I could send the login info in the querystring, but how is this done with apache? Is this even possible?

Convert A Physical File Path To A URL For Hypertext Links
I have a Physical path that I need to convert on the FLY I thought using Replace would be a good idea, and it almost works

function MapURL(path)

dim url2
'Convert a physical file path to a URL for hypertext links.
url2 = (path)
MapURL = Replace(url2, "", "/")
MapURL = Replace (url2,"E:","http://myscs/docLibraryDocs")
MapURL = Replace (url2, "IntranetLibrary", "")

end function %>


- Is it possible to have multiple replace on the same variable ?
- am I doing it the right way ? or is it possible to concatenate those replace in one go ?

Is there a limit on how many Replace one can use for one variable ?

The problem I have is that it takes the first two Replace in consideration but not the third one. If I remove or comment the second one then the First and the third one works fine. For some reason, it doesn't like to have the three in the same time.

by the way, the link I try to change is as follow: Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved