CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 Listbox to show clickable hyperlinks from database

Print topic Send  topic

Author Message
Posted: 12/30/2003, 8:10 PM

I have an application were I need many entry forms and reports associated to a certain record.

To keep it simple I am trying to implement the following:

On my data grid I want to display a list box on each row containing hyperlinks filled from a table.

Each hyperlink will lead to a data entry forms or a report.

A user will click on the pull down menu and select the form or report he wants to use, related to to the record.

The hyperlink will lead to selected form or report and also transfer the record_id to the form.

I don't know on how to modify the listbox to show hyperlinks instead of regular text and that it will also transfer the record_id.

Has anybody an idea on how to do this?

Any help would be appreciated.

I am using MYSQL and PHP.

Tony Elmiger


Posts: 547
Posted: 12/31/2003, 4:48 AM

If the database is returning the hyperlinked location and the "text value of the location" then the list boxes should be populated OK.

If you want to force a hyperlink from the listbox use an onchange event on the listbox and call Javascript to extract the listbox value and jump to the new location.

To Add the record_id you could build the listbox yourself and prepulate the parameter value in the listbox.

I have done this a number of times only in ASP.

Accepting and instigating change are life's challenges.
View profile  Send private message
Posted: 01/23/2004, 10:09 AM

Thanks to Helen here is the solution to my problem.

1. Create a grid with the editable grid builder. (Editable grid is important)
2. Disable Insert, Update, Delete, Cancel and change all fields to a label when building the grid wit the editable grid builder
3. Ad a hidden field called Hidden1 and point the control source to the Record_ID
4. Add a listbox connected to your link table were the Bound column points to the actual link in your table and the Text Column points to the Link Name.
5. Add Custom code to the onChange event of the listbox.
6. Copy the following code into the custom code

var name;
var len;
var id;
var pos;
name =;
len =;
pos = name.lastIndexOf("_");
id = name.substr(pos+1, len-pos);
// build Hidden field full name
var corr_name = "Hidden1_" +id;
// get the hidden element
var Tnames = document.getElementsByName(corr_name);
window.location= this.value+".php?evidence_id=" + Tnames[0].value;

// evidence_id was the record_id from my grid table.

Hope this helps for anyone interested

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.