473,698 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to click and capture text

72 New Member
Hi,

I am displaying a table of records, one column is the student id. What html code do I need to allow user to select a student record by a click of a student id. In other words how do I make the id column clickable and at the same time capture the id number so I can process and display that student's details?

Thanks
Sep 21 '11 #1
6 1964
drhowarddrfine
7,435 Recognized Expert Expert
It depends on how the records are displayed. You can just make the record an anchor with the id as part of the href.
Expand|Select|Wrap|Line Numbers
  1. <a href="example.com/mypage?record=12345">ID12345</a>
  2.  
  3. or
  4.  
  5. <a href="example.com/mypage/record/12345>ID12345</a>
Sep 21 '11 #2
dragon52
72 New Member
Thanks drhowarddrfine,

It is now clickable but..

How do I click to refresh the same page to display student details?

What code do I use to get hold of the student id?

Here is my code

Expand|Select|Wrap|Line Numbers
  1. while ($row = mysql_fetch_array($result)) {
  2. echo "<tr><td>";
  3. echo "<a href='example.com/mypage?record=".$row['StudentID']."'>".$row['StudentID']."</a>";
  4. echo "</td><td>"."-".$row['FamilyName'].", ".$row['GivenNames']."</td></tr>";
  5. }
  6.  
  7.  
Sep 21 '11 #3
drhowarddrfine
7,435 Recognized Expert Expert
Wrong board. Need to ask that question in that language's forum.
Sep 22 '11 #4
dragon52
72 New Member
drhowarddrfine,

My previous sample code uses php to output html. However, my question still relates to html. What should the 'href=' statement look like to refresh the same page rather than jumping to another page? Also I need to grap the student id when clicked so that I can look up that record in the db. The 'record' bit in 'href=...record =xyz' is where I can find the id? How should I write that html code?

Can you help??


Sorry if I didn't make myself clear.
Sep 22 '11 #5
drhowarddrfine
7,435 Recognized Expert Expert
HTML can't do any of that.
Sep 22 '11 #6
dragon52
72 New Member
Ok, I will try my luck in the php forum.

Thanks drhowarddrfine
Sep 22 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3355
by: jennyw | last post by:
I'm trying to parse a product catalog written in HTML. Some of the information I need are attributes of tags (like the product name, which is in an anchor). Some (like product description) are between tags (in the case of product description, the tag is font). To capture product descriptions, I've been using the save_bgn() and save_end() methods. But I've noticed that the result of save_end() only includes text that isn't marked up. ...
9
2233
by: lkrubner | last post by:
I've got a function, you can see it below, that is being called onmouseup in the textarea on my main form. The idea is to find a selection if possible and store that text in a global variable. I can't get this to work in any browser on a Mac, though it works alright on a PC. What am I missing?
1
1722
by: rerb | last post by:
I would like to be able to capture the address bar URL as well as other text from text boxes in other applications. I can get the window handle but how to I get the text from a specific box? I am using VB.net 05 and have found in my search GetDlgItem may be a solution but can't find any code. Thanks in advance :)
1
6059
by: =?Utf-8?B?Sm9obiBHcmF2ZXM=?= | last post by:
Does any one know how to caputer text data sent to a printer to a file. I have seen a window service that captures text data sent to a printer on the server and save it to a file. I would like to know how to do this. I have many reports that are produced on an IBM mainframe as text that I would like to send to a Windows' sever as printer output but capture to a text file. Currently we use an FTP process and a print to printer would reduce...
2
1508
by: swethak | last post by:
hi, My requirement is to capture the text information from website when we submit the url in the form.plz help that whats logic in that we used?
1
1644
by: zeny | last post by:
Hey ppl, How can we capture text between html tags using regular expressions? For example, how to capture the words "hello", "world", "bla", "bla" and "bla" in the following input: <br><i>hello world <br><br> bla bla bla <br> Best Regards
3
3079
by: zeny | last post by:
Hey ppl, How can we capture text between html tags using regular expressions? For example, how to capture the words "hello", "world", "bla", "bla" and "bla" in the following input: <br><i>hello world <br><br> bla bla bla <br> Best Regards
1
1826
by: ssugumar7684 | last post by:
The problem is: I open 1 application i want that is correctly opened or not. I want to capture or get text value or anything value from window using VB Script can you give me code
3
2261
by: khalidjan9 | last post by:
I have been given an assignment: Here is what i have? I have an app. (with out source code) that has some where about 20000 records in it. I want to extract all those records through my app. and save them somewhere (in vb.net )... :) Can you please gimme some idea how would i do that, ,how would i capture that window and how to capture that text in a control of that window and then save it somewhere through my App. tkssss :)
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7739
agi2029
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...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
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();...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
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
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.