Gossamer Forum
Home : Products : DBMan : Customization :

start database-querys through a text-link?

Quote Reply
start database-querys through a text-link?
Is there a way to start a database query with a normal textlink. You know what i mean?
cheers, alex

Quote Reply
Re: start database-querys through a text-link? In reply to
You mean from a link on a static .html page? Sure.

First you have to be sure that you allow default users to view.

Your link would look something like:

http://url/to/db.cgi?db=default&uid=default&view_records=1

(Change default if your .cfg file is named something else.)

At that point, you can add whatever search terms you want, in the form of

&FieldName=value

A couple of things to be aware of. FieldName must match the name of your field in your .cfg file *exactly*. They are case-sensitive. Also, if you have any spaces in either your field name or your value, you must replace the spaces with a + sign.

You can stack as many search terms as you'd like into the link and add "sort by" and "sort order" values as well.

A little hint to building the link -- go to your database as a default user. Do a search that you want to create a link for. When the search results appear, you can just copy the URL that's in the "Location" window in your browser. There will probably be more there than you need, but it'll work.


JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: start database-querys through a text-link? In reply to
Hi JPDeni,
thanks for your detailed answer. I'm sorry but I asked the question in
the wrong way. Sorry - my blame!
I have to build about 400 html links so it would be easier if i could
start an query over an text link like
an submit button.

i.e. every text link gets an name and a value and with an mouse-click
it gets submitted like a submit button.
(you have to build a formular around all, probably )
oh god my english

greetings from germany
alex

Quote Reply
Re: start database-querys through a text-link? In reply to
Can you give me an example of what you want to do?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: start database-querys through a text-link? In reply to
Hi JPDani,
I'm sorry for my post. But i really thought you wouldn't
read my reply. Won't do it again!
It's hard to describe but please go to my hp:
http://www.rphmuench.de/mobilienverwertung/wic-i_gerichte.html
There's a list of about 180 "Insolvenzgerichte" and as you can see I linked the first of them in 'normal' way. But it
takes too long time to link them all with the whole phrase.
So my idea was to do the same as a search-box does - (takes the word in the input-box and sends it as the query to the database) - with a normal text link.

Ulterior motive is the possibility to define 'Actions' to a normal text link with my html-composer "AdobeGolive".
For example can you create code like that: "when mouse srolls over link x" -> "set a cookie" or "read a variable".
So my idea was give a text link a value like "uid=2000"
and send it to db.cgi defined by an action like "when mouse button is clicked on link X"

But i think there's no way. Doesn't matter - save your time
for my next questions :-)
cheers, alex




Quote Reply
Re: start database-querys through a text-link? In reply to
I really don't think there is a way to do what you want.

There is a problem with your current links, though. Your &uid= is empty. You have to have &uid=default if you want to have links on a static html page. And you have to allow default users to view the database.




JPD
http://www.jpdeni.com/dbman/