Test Hyperlinks
anyone know some good ASP code to go through a page and test the hyperlinks to make sure that they are valid. Couldn't find anything good yet, but if someone knows of anthing.
View Repliesanyone know some good ASP code to go through a page and test the hyperlinks to make sure that they are valid. Couldn't find anything good yet, but if someone knows of anthing.
View RepliesI am building a shopping cart where orders are send by email. Even though it says it's sent, I receive nothing. So I did a test script to send an email using CDO since we are using an exchange server for email and it's on the same network as the site. Code:
View Replies View RelatedI have an ASP Session where I add values on Page1 and then use them on Page2 e.g Session("newsid").
What I want to do is when I click on a specific link, clicking on the link adds a value to the Session and then redirects the user to a new page, but nothing I do seems to allow me to do this. The code where I want it to be done is as follows: Code:
I posted awhile back about displaying line breaks in ASP pages from MS Access Database records which was solved very well with the use of a replace function. is there a replace function to display hyperlinks mixed in with regular text in a memo field? If so, could someone tell me what the code is?
I use this for line breaks:
Code:
MemoField = Recordset1.Fields.Item("ArtText").Value ' Field from database
MemoField = Replace(MemoField,chr(13) & chr(10), "<br>") ' build in html line returns
and then:
Code:
<p align="left"><%=MemoField%> </p>
Can anybody help me understand why these two examples do not work? The database has www.domain.com in it.
<a href="http://<% rs('URL') %>"><% rs('URL') %> </a>
<a href="mailto: <% rs('e-mail') %>"><% rs('e-mail') %> </a>
My other question is how should I store hyperlinks in my database? I'm assuming text but should I add the http:// there as well?
Is there any way to how to put hyperlinks in a (flex/hflexgrid)?
View Replies View RelatedSay for instance that I have 2 frames and I have code in one. That code is returning information from a database. In that database there are hyperlinks to images. Upon clicking that hyperlink how do I force the image into the other frame?
At present It opens appears to go to a new page, but everything is coded in one ASP page. So I have to click back to select another image? I want to be able see both the database and image so I dont have to go back and forth
I need to format each row being returned in a recordset as
a hyperlink. One of the fields being returned is the
subject of a message that my hyperlink will show. When
the hyperlink is clicked then the ASP page loads further
message details of that link. Does anyone know how to do
this?
I added a column to my Access database and defined it as hyperlink.
I added some URL in the fields and i was able to see the underline under each address.
In my code i added the following line :
Response.Write("<td align=right>" & oRS("info").Value & "</td></tr>")
(The hyperlinks defined in my database as info).
I'm able to see the hyperlink when i retrieve all other data but it appears as
#http://www...asp# and with no underline what is the reason and how can i change this ?
<%
' Loop through the array holding the result set and display the data
For iCounter= varC1Begin to varC1End
Response.Write("<a href=prices.asp?manuf=" & arrResultSet(0,iCounter) & ">"
& arrResultSet(0,iCounter) & "</a><br>")
Next
%>
In the above Response.Write statement arrResultSet(0,iCounter) displays the
manufacturer just like it should.
However, within the hyperlink, if a manufacturer has 2,3, or more words, it
will only show the first word. Anything after the first space is ignored.
Why?
I'm writing a company intranet site,and on the home page,I'd like there to be links to some of the software that the employees frequently use on their own computer.This will be the inducement to get them to use the intranet home page as their default home page, and visit it frequently.
For example a program which is under:
"C:Program FilesNow SoftwareNow Up-to-DateNUD.exe"
if I write that link into the hyperlink,it will not work,because the hyperlink also adds the url as a prefix to the link, so it will say
"http://www.url.com/C:Program FilesNow SoftwareNow
Up-to-DateNUD.exe"
im currently trying to generate a list of links to files held within my database.The file itself is a pdf
Im currently using this code :
Code:
response.write "<A HREF='" & RS("file") & "'>" & RS("linkname") & "</A>"
and its giving me the error:
Microsoft VBScript runtime error '800a000d'
Type mismatch
/irtwebsite/welcome.asp, line 27
I'm using Visual Web Developer Express 2005 to get me started - probably a bad idea I'm told. Anyhow, I've connected a drop-down list ('Components') to a column in a SQL DB, and, upon selection, the resulting gridview is being generated as I hoped (with the corresponding 'Applications').
However, I would like each of these resulting rows in my gridview to be "clickable" as a hyperlink so that I can display each of the applications details on another page. If someone could enlighten me as to whether/not this is even possible, and if so, how?
Can anyone provide the code to hide hyperlinks (change to background colour?) if the files they link to do not exist?
View Replies View RelatedI'm trying to excecute all the hyperlinks on a webpage one by one with a specific order automatically, any suggestions/helps on that?
when a link is executed (clicked), a popup comes up asking you to open or save the document, is there a way to by pass that? And save the file automatically into a specified location?
I have a page which takes data in an HTML table, and exports it to an Excel file. It works fine, but I want several things about the spreadsheet to look different from the HTML version. Things like fonts and colors. I think I can use a style sheet for the latter, but I haven't figured out how to remove hyperlinks from some of the items. On the HTML page, the hyperlinks are useful, but I don't want the spreadsheet to have them.
So on my ASP page which builds the Excel file, I have this: ...
I pull file paths from a database that point to files on our internal server and create links to them. For Explorer this works...
File://servername/file/path/filename.snp
But not for FireFox.
I have a Submit button on a web page that runs the following hyperlink code below.
<p>
<a href="ProducsTotalBasket.asp?Remote_computer_name=<%=FP_FieldURL(fp_rs,"Remote_computer_name")%>&Committed=<%=FP_FieldURL(fp_rs,"Committed")%>">
<input type="submit" value="Click to Continue" name="ClicktoContinue"></a></p>
The hyperlink uses parameters that pass the value of the "Remote_computer_name" and the value of "committed" to a SQL statement that uses the values returned to update the underlying database.
The hyperlink code runs perfectly when I click on the submit button on the web page and updates the database however at that point I want the user to be redirected to a new page i.e. a second URL address.
I have a Submit button on a web page that runs the following hyperlink code below.
<p>
<a href="ProducsTotalBasket.asp?Remote_computer_name=<%=FP_FieldURL(fp_rs,"Remote_computer_name")%>&Committed=<%=FP_FieldURL(fp_rs,"Committed")%>">
<input type="submit" value="Click to Continue" name="ClicktoContinue"></a></p>
The hyperlink uses parameters that pass the value of the "Remote_computer_name" and the value of "committed" to a SQL statement that uses the values returned to update the underlying database.
The hyperlink code runs perfectly when I click on the submit button on the web page and updates the database however at that point I want the user to be redirected to a new page i.e. a second URL address.
I need a menu in one of my asp pages. A click on one hyperlink should display its pull down menu of the other related hyperlinks ... as that appears in search option this forums. As an example... main link will be Alphabets. A click on it or on focus.. it should display a drop down list of other related hyperlinks.
View Replies View RelatedIs it possible to allow a person whom navigates to a particular page to type in a URL to a website they visit often, and have it be treated like code on the page itself for them to use it as a hyperlink?
View Replies View RelatedLets say I have a list of all of Jimi Hendrix's live shows. I can view the entire list at shows.asp. Now, what do I do if I just want to see shows for, lets say 1971?
I want hyperlinks on my page for each year and when I click the year, it generates the list of shows from that year. I dont want to make an ASP file for every year. How do I do this? Do I use a METHOD=GET and then do something like "shows.asp?year=1971"?
Basically, I'm trying to make a web-enabled database for band. So this is gonna get complicated. Like once I get a certain year, I may also want to view by states and so on.
I have an access database that holds among other info, web addresses and email addresses. They are in a hyperlink format in Access. When I run the ASP code, they disappear. I want to pull the data out, with the web addresses as hyperlinks.
View Replies View RelatedI currently us JavaScript to populate a hidden field with my scroll
location in order to retain the page location when I post the page back
to itself. However, I don't know how to pass that hidden field value
in a hyperlink as the value is always changing. Anyone have any
suggestions?
I'm trying to get my head round includes:
A page that works fine when called by name from the includes folder loses its images etc when called as an include in a page closer to the web root.
Thus:includes/page1.asp contains the following
img scr="../images/pic.gif"
This displays the picture when the page is viewed on its own. The picture url is http://localhost/school/images/pic.gif
But when includes/page1.asp is used as an include in page2.asp (in the web root) the image is not found because the url is http://localhost/images/pic.gif
Is it something to do with virtual versus absolute file paths?
I downloaded this simple function from 4Guys that uses RegEx to convert all URLs into hyperlinks. I need to alter it slightly so that the end of the link will be determined by a space (it does this now), or a "?", which ever comes first.
The problem is, I don't have a good grasp on RegEx patterns and I can't find how to do this. My pattern is below. Can someone tell me how to alter it to do this?
objRegExp.Pattern = "(www|http|S+@)S+"
I have certain Keywords stored in a table of the Database.All i need is when ever i find the Keyword in the webpage i need to have a link which opens up as a seperate page and give me the detail information from the database for the seleted keyword.
View Replies View RelatedMy clients have 4.0 and I can't seem to get 6.0 off of my W2K machine. Any suggestions?
View Replies View RelatedI have:
Dim foo
Set foo = Nothing
If foo = Nothing Then
response.write "foo is nothing"
Else
response.write"foo is something"
End If
I get an error in the line "If foo = Nothing Then". It says:
"Object variable not set"
How then do I test if something has been previously set to Nothing?
I have always used this in ASP to test if the client is accepting cookies:
<%@language="VBScript"%>
<%
Session ("nc") = 1
If Len(Session("nc")) = 0 Then
'Cookies Off
Else
'Cookies On
End If
%>
But I only ever tested it in Microsoft Internet Explorer 6 though not sure. Anyway with Microsoft Internet Explorer 5.5 SP2 Len(Session("nc")) <> 0 always whether cookies are on or off. Can anyone suggest a better cookie test that will work in most browsers?
I have a PC running Win XP Home and want to learn how to write ASPs.
In order to test them I think I need a web server installed on my PC. Since
I don't believe IIS can be run under Win XP Home I downloaded and
installed the Apache web server. I'm stuck at this point and would appreciate
opinions on whether I am on the right track, and, if so, advice on the following.
1. Having written a test asp page how do I use Apache to test it?
2. Can Apache handle VBScript on an ASP page? From the info on the
Apache web site I don't think it can.
iam making asp test engin and i dont want the user to use the keyboard
so is there a way to disable the keyboard of the computer that have the
exam on ? its not a website world wide. i will make it on my room computers.
is it possible ?
The current code (see below) works. But, I wonder if there's better way to test if a node object has something or not.
<%
...
' want to find if /Root/Node's id attribute is 1,
' if yes: get its child node <num>
Dim nodeA : Set nodeA = xmlDoc.selectSingleNode("/Root/Node[@id='1']/num")
' test if nodeA have something
If TypeName(nodeA) = "Nothing" Then
' -- NO: nodeA has nothing
Else
' -- TypeName is "IXMLDOMElement"
' -- YES: nodeA has something
End If
...
%>
I have tried other functions, such as IsEmpty(), IsNull(), IsObject(): none can
get the result I wanted.