Hello,
I need some advice on how to handle the following scenario in
Javascript.
Imagine an HTML page that displays relational database records from an
address book application. Each record displayed is simply a summary of
information. In order to see more of the record details the user
clicks on the persons name (set up as a link) to display a popup window
with all of the remaining fields in the record. This allows the user
to display as many popup windows as they like.
This is a very simply application, but I am interested in learning how
to set it up so that the popup window receives the users name (or some
other ID) as a key and looks up the record in the database and
populates the popup window.
Can I do this in HTML alone? Javascript? Any help would be
appreciated.
Patrick 2 7573
"Patrick" <pd******@aol.c om> wrote in news:1149710138 .732873.279500
@j55g2000cwa.go oglegroups.com: Can I do this in HTML alone? Javascript? Any help would be appreciated.
You will need to get some back-end action involved in order to look up
the record in the database, so no, you cannot do it in HTML and
Javascript alone. Javascript cannot connect to a database (or a file on
the server (without AJAX)) as its run entirely on the client side (your
browser).
This is a very simply application, but I am interested in learning how to set it up so that the popup window receives the users name (or some other ID) as a key and looks up the record in the database and populates the popup window.
Your popup URL would need to be a backend scripted page, ie. PHP or ASP
(called "more_info.php" , for this example), and you would have to pass it
a key/id/reference via the URL. So, on the HTML page, the link to show
more records would have some javascript (to open the pop-up window) and
link to "more_info.php? id=12". Your "more_info. php" page would grab the
id number (12), hit the database for the additional info, and present it.
Of course there are a few other things to consider (will you mind if
people manipulate the id to get info about other users?, etc).
I hope I understood your question...
Good Man wrote: "Patrick" <pd******@aol.c om> wrote in news:1149710138 .732873.279500 @j55g2000cwa.go oglegroups.com:
Can I do this in HTML alone? Javascript? Any help would be appreciated.
You will need to get some back-end action involved in order to look up the record in the database, so no, you cannot do it in HTML and Javascript alone. Javascript cannot connect to a database (or a file on the server (without AJAX)) as its run entirely on the client side (your browser).
This is a very simply application, but I am interested in learning how to set it up so that the popup window receives the users name (or some other ID) as a key and looks up the record in the database and populates the popup window.
Your popup URL would need to be a backend scripted page, ie. PHP or ASP (called "more_info.php" , for this example), and you would have to pass it a key/id/reference via the URL. So, on the HTML page, the link to show more records would have some javascript (to open the pop-up window) and link to "more_info.php? id=12". Your "more_info. php" page would grab the id number (12), hit the database for the additional info, and present it. Of course there are a few other things to consider (will you mind if people manipulate the id to get info about other users?, etc).
I hope I understood your question...
Yes, you have understood the question well. I appreciate your
response.
The actual application for this functionality is an embedded system
that contains a very scaled down (home grown) webserver that has no way
to handle any fancy back-end processing such as PHP, ASP, etc. So
instead of using this dynamic approach I think I am going to have to
use static web pages, which would work okay.
Thanks again!
Patrick This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jack |
last post by:
Hi,
I need to build a asp page where it would serve as a data entry record page
as well as display page for records saved. This page should also allow
editing of records that has been saved.
e.g.
SAVEBUTTON
SS# EntryBox Name EntryBox Date EntryBox Revenue Generated EntryBox
|
by: Richard Holliingsworth |
last post by:
Hello:
I'm building a report to display statistics on the entire database. I
have successfully built a report that groups the entire db on one field
and gives me a count of db records for the categories in that field and
a total record count for the db.
Now, I need to add another "total database" grouping to get another set
of record counts. I DO NOT want to nest this group, It MUST consider
ALL database records.
|
by: Steve |
last post by:
I'm using a ListView control in conjunction with a TreeView control to
display SqlServer database records. Clicking a Node in the TreeView
refreshes the ListView with the content of the associated record.
The ListView contains two columns; the first column contains a
user-friendly field name and the second column contains the data
content, with the first column being tied to an Item and the second
column declared as a SubItem.
This is all...
|
by: Santosh |
last post by:
Dear all,
i am giving selection to the user like when it select country from
asp.net dropdownlist it will display all records in next dropdownlist
related to it on asp.net dropdownselectionchanged event. it is working
on server side ,but i want to work it on client side, i want to give
selection to user without page post back. so that purpose obiously i
need javascript. can anyone tell me how i can do this using javascript.
any help...
|
by: dheroan |
last post by:
Hi there,
I'm fairly new to using databases with VB .NET. I'm currently working on an application using a Microsoft Access database as a data source. I have created a form to display the fields for each record in a particular table (using the feature that allows you to drag and drop a field from a table in the database onto the form, automatically attaching a BindingNavigator and TableAdapter and all that jazz to it). As you probably know,...
| |
by: Mubs |
last post by:
Hi all,
I have a website set up using database,
what i want to achieve is, i want a user to enter their number and then the database to display the records for only that number they entered...am using dreamweaver cs3
|
by: Coll |
last post by:
I have a form that had been setup with a combo box. You'd select a
value from the combo box and a query would open and display matching
records. I now need to remove the combo box and set up a text box so
the user types in a value and the query opens displaying any records
that contain that value in the field. For example, the user enters
"smith" in the text box. The query opens, and filters for any records
that contain *smith* in the name...
|
by: puneetmca |
last post by:
hi
i m new in php.... i want to generate a report of my database records having field names FirstName ,LastName and Age in student table and test database.....and i want to display these records in notepad as a txt file.....how can i do this?plz hlp me out......
|
by: reymon |
last post by:
<?PHP
//THIS IS MY DB CLASS CONNECTION
class db
{
private $hostname;
private $username;
private $password;
private $database;
private $connect;
private $select_db;
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |