Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Click on Image/Open info in different Table on same page!

Posted on 2003-11-20
8
Medium Priority
?
264 Views
Last Modified: 2013-12-24
I have two tables on the same page. Nothing real elaberate. The top table has the page info and several smaller images that when "clicked" will display their info. How do I get the smaller image's info to display in the second table without it reloading the page?

thanxx
0
Comment
Question by:elixxer
7 Comments
 
LVL 31

Expert Comment

by:seanpowell
ID: 9790788
Can you post the code for what you have now, so we can look at the best way to add that functionality?
0
 
LVL 14

Expert Comment

by:hhammash
ID: 9790938
Hi,

You can do it in two ways (without programming)

Method 1
-----------
On the same page you will have the table that has the images and underneath it the table that will display the information of the image.

Make each table as a DRW,  the second table which will display the info will be a DRW that is waiting for the info from the hyperlink.  When you click on the picture the second DRW (the table which will display info) will display the information.

In the Picture Hyperlink include a parameter so when clicked,  the destination will be the same page.  www.pagename?id=900

Method 2
----------
Create the second table (DRW) on a separate page and call it Details.asp

Go back to the first page that has the table with the images and go under the table and insert an Inline Frame:  Insert>Inline Frame

Set the Inline Frame properties to display Details.asp page. The picture hyperlink should have parameters holding info that the second DRW is waiting for.

You can remove the Inline frame borders and  you can make it look like a part of the page. You can extend it Vertically and Horizontally to be able to hold the entire page,  in this case the scroll bars will not appear.

Regards
hhammash
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 9797850
Very Easy Approach.
Code is Really simple and Easy to Modify.
Give it a Try and let me know if you have any questions.
(Copy and paste into notepad, Save as .html to see this Code in action).

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<Script>
// Define HTML for your imgaes information

html_1 = "<b>You Clicked Image1</b>"
html_2 = "<b>You Clicked Image 2!</b>"

function info(whi, i)      {

// whi is the ID name <div> within your table, and i is the index WHICH html variable you want to assign

document.getElementById(whi).innerHTML = eval("html_"+i)
document.getElementById(whi).innerHTML = eval("html_"+i)

}

// See below how the function is been used.

</Script>
</head>

<body>

<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
  <tr>
    <td width="50%"><a href="javaScript:info('info', 1)">Image 1 info</a></td>
    <td width="50%"><a href="javaScript:info('info', 2)">Image 2 Info</a></td>
  </tr>

</table><br>
<table border="3" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#800000" width="100%" id="AutoNumber2">
  <tr>
    <td width="100%"><div id="info">Select a Image</div></td>
  </tr>
</table>

</body>

</html>
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:elixxer
ID: 9875431
Please close. Currently I will not be needing this as I am not going to use it.
0
 
LVL 23

Expert Comment

by:Saqib Khan
ID: 11050810
But what about Expert's input. this means we were just wasting our time when we were trying to help him/her?
0
 
LVL 29

Expert Comment

by:coreybryant
ID: 11050844
Asker did request to close this question 5 months ago with no input at that time from anyone.

-Corey
0
 
LVL 29

Accepted Solution

by:
coreybryant earned 0 total points
ID: 11089875
force accept
coreybryant
FP Page Editor
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Geo-targeting is the practice of distributing content based on a person’s location, as best as you can determine it. Let’s look at some ways you could successfully use this tactic. The following tips and case studies could lead to meaningful results.
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question