navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Hyperlink Query Question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Hyperlink Query Question
Page: [1]
 
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
Hyperlink Query Question - 6/25/2004 15:06:21   
I've got a results page that I'm sending query info to using hyperlinks. I'm doing this of course to limit the number of pages I have to take care of. My question is, How can one pass a request via hyperlink to the results page to show everything in the table instead of a criteria query? The parameter section in Hyperlinks contains a place for "Name" which is the field and "Value" which is the value you want to search for. I've tried putting a "*" in the Value line but that doesn't work.

I know this is easily done by using the wizard, but that would create another results page with a Select statement in the code of the page and that isn't what I'm looking for.

Any ideas on this one is appreciated. Thanks again.

- Frank
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 15:17:37   
:) OK, I'm puzzled. Why would you need to send information in the querystring if you just want to display everything in the table?

Anyway, the wildcard for ASP is "%" not "*", so try putting % in the parameter value. However, for that to work, the WHERE clause in your SQL statement must use a LIKE instead of =.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 15:26:21   
I guess what I should have asked then is what does the statement look like if you simply include it in the address rather than trying to use the parameters page. I've tried several things in the address line and have yet to get one to work.

Thanks.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 15:43:24   
I may be wrong, but I don't think you can enter the wildcard via the address line because the % will be interpreted as a html character, not a wildcard. However, if the results page has a form for searching you can enter the % in the search form.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 15:44:43   
Ya, it doesn't have a search form. Hmm. Well back to the drawing board. :)

(in reply to BeTheBall)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 15:45:58   
Use server.urlencode("value")

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 16:00:13   
I'm not familure with how that works.

(in reply to Spooky)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 20:50:15   
When constructing the URL, urlencode will change all of the contents to a hyperlink friendly string.

eg :

search.asp?content=<%=server.urlencode("value")%>

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 23:51:39   
When I try that the <%=server.urlencode("value")%> shows up in the URL in the webpage instead of a hyperlink friendly string.

(in reply to Spooky)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 23:55:13   
What does your code look like? Also, be certain your page has a .asp extension.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/25/2004 23:59:05   
You'll be able to tell I'm not sure what I'm doing with this. :)

<area shape="rect" coords="450, 115, 554, 133" href="tf_sale_trade_interface/Results/results.asp?Series=server.urlencode("%")">

(in reply to BeTheBall)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 0:07:27   
<area shape="rect" coords="450, 115, 554, 133" href="tf_sale_trade_interface/Results/results.asp?Series=%25">

(%25 is the url equivalent)

However, if "%" is the default search - why not do that in the query itself as the default value?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to galactimus)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 0:11:39   
How about:

<area shape="rect" coords="450, 115, 554, 133" href="tf_sale_trade_interface/Results/results.asp?Series=<%=server.urlencode("%")%>">

server.urlencode is an asp function and thus needs the script delimiters.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 0:14:06   
hehe, well I'm not really sure what the best thing is to do. I just need to pass on to the Results page to show everything in table "Results". I'm not sure the best way to go about it.

(in reply to Spooky)
Spooky

 

Posts: 26606
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 0:45:44   
By default - if there is no "where" clause, it will show all records :)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 0:49:40   
I tried passing nothing to the results page but with no statement in the results page code it doesn't show anything.

(in reply to Spooky)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 10:03:19   
Can you post the code for the entire page and maybe clarify a bit what you are hoping to have happen? For example, do you always want to show all the records or only when certain conditions exist. If you always want all records, then Spooky is right. You would just get rid of any criteria. For exampe, instead of:

SELECT * FROM YourTable WHERE Condition = '::Condition::'

You would simply use:

SELECT * FROM YourTable

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 10:52:16   
I have hyperlinks that pass the query info on to the results page so the user doesn't have to do any searching themselves. There is a limited number of searches that need to be done. To allow the hyperlink query to work I had to have this as my statement on the Results page:

fp_sQry="SELECT * FROM Results WHERE (Series = '::Series::')"

The thing is, one of the searches some users might want to see is all the records and not just the "WHERE (Series = '::Series::')"

I would like to be able to use the same results page to limited what has to be maintained.

I'm not able to attach a file to my message as I've not posted enough on here. It says I must post 50 messages first. :) Didn't know if I should just cut and paste the whole page or not.

(in reply to BeTheBall)
BeTheBall

 

Posts: 6381
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 11:34:31   
quote:

fp_sQry="SELECT * FROM Results WHERE (Series = '::Series::')"


Aha, part of the problem. To be able to use a wildcard, your where clause must be:

WHERE (Series) LIKE '%::Series::%' instead of WHERE (Series = '::Series::')

Make that change and then use this link:

<area shape="rect" coords="450, 115, 554, 133" href="tf_sale_trade_interface/Results/results.asp?Series=<%=server.urlencode("%")%>">All records</area>

Think that should get you there.

Note: if you are unable to directly change the code for the SQL statement, look at the Spooky Diet link in my signature or redo the Database Results Wizard and when you get to your criteria in Step 3, choose Series - Contains - Series, instead of Series - Equals - Series

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to galactimus)
galactimus

 

Posts: 16
Joined: 6/22/2004
Status: offline

 
RE: Hyperlink Query Question - 6/26/2004 19:55:22   
Looks like that might have worked. :) Thanks so much. I'll run some tests and make sure everything is working like I need it.

Thanks for taking the time to work with me on this. It's very much appreciated. Thanks to Spooky as well.

- Frank

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Hyperlink Query Question
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts