HTML - Click To Show Additional Data
I'm trying to develop a page that displays a simple concise summary of data neatly in rows. I am including a magnifying glass image next to each field to be used to display details of the summary field. I want the onclick event of the image to bring up an alert box with data in the field that contains the details of the summary field, but I can't get it to work.
Here is the code from my ASP page: Code: <html> <head> <% DB_ConnectionString = "Provider=SQLOLEDB.1; Password=pwd;User ID=user;Initial Catalog=myDB;Data Source=www.myserver.com;" SQL = "SELECT * FROM myTable" Set RST = Server.CreateObject("ADODB.Recordset") RST.Open SQL,DB_ConnectionString sFont = "<font face=" + chr(34) + "Arial" + chr(34) + "size=" + chr(34) + "2" + chr(34) + ">" eFont = "</font>" vToday = Date() %> <title>Daily Info</title> </head> <body bgproperties="fixed" topmargin="0" leftmargin="0"> <table border="1" width="100%" style="border: 1 solid #000000" cellspacing="0" cellpadding="2"> <tr> <td width="100%" bgcolor="#FFFFFF" bordercolorlight="#000000" bordercolordark="#000000" colspan="10"> <p align="center"><b><font face="Arial" size="3"> Daily Info for <%Response.write(vToday)%></i></font></b></p> </td> </tr> <% Cellstart ="<td bgcolor=""#C0C0C0"" align=""center"">" Response.Write "<tr>" Response.Write Cellstart + sFont + "<B>Buyer Name</B>" + eFont + "</TD>" Response.Write Cellstart + sFont + "<B></B>" + eFont + "</TD>" Response.Write Cellstart + sFont + "<B>Company Name</B>" + eFont + "</TD>" Response.Write Cellstart + sFont + "<B></B>" + eFont + "</TD>" Response.Write Cellstart + sFont + "<B>Order Total</B>" + eFont + "</TD>" Response.Write Cellstart + sFont + "<B></B>" + eFont + "</TD>" Response.Write "</tr>" Do Until RST.eof vBuyer = rst("BuyerName") vBuyerAddr = rst("BuyerAddress") vCompany = rst("CompanyName") vCompanyAddr = rst("CompanyAddress") vOrderSum = rst("OrderSummary") vOrderDetail = rst("OrderDetail") Cellstart ="<td bgcolor=""#FFFFFF"" align=""center"">" Response.Write "<tr>" Response.Write Cellstart & sFont & vBuyer & eFont &"</td>" response.write "<td>" & "<img src='magnifyB.JPG' onClick=alert(vBuyerAddr) width='15'>" & "</td>" Response.Write Cellstart & sFont & vCompany & eFont &"</td>" response.write "<td>" & "<img src='magnifyB.JPG' onClick=alert(vCompanyAddr) width='15'>" & "</td>" Response.Write Cellstart & sFont & vOrderSum & eFont &"</td>" response.write "<td>" & "<img src='magnifyB.JPG' onClick=alert(vOrderDetail) width='15'>" & "</td>" Response.Write "</tr>" rst.movenext loop Set rst = Nothing %> </table> </body> </html> Can someone point out what I'm doing wrong. Thanks, Sup Similar TutorialsHi I created a table with multiple rows and coloms.. I want show image on purtical table element after user clicks it. do i need tha help of javascript... i am already using javascript to display table.. can i use one more script in javascript I want to use HTML to make the following task... I little link, when someone clicks on it, it displays an image at the top of it (Not load a whole new page with an image) Example Say you have this link linky I want when people click on it, it displays an image above it Can this be done using HTML? Thanks hi, i created a html form. Can i show watever data that key in by the user under the form? Following is my coding. <html> <head> <title>Websites</title> </head> <body bgcolor="#ffffff"> <h1>Goverment Websites</h1> <form action="form_action.asp" method="get"> Website address: http://<input type="text" name="website" size="60"/> destination:<input type="text" name="destination"size='30" <input type="submit" value="Submit" /> </html> Can you please guide me so that whatever data that key in by user will be shown under the same html pagr too.. thanks :-) Hey, I'm making a website about a television show. I want to show the broadcast times of the TV show, the times can be found on the website of the television company. http://www.zappelin.nl/pororo Under the bit where it says: ''Volgende Aflevering'' it shows the date of the next episode. Whenever the episode is over it automatically changes to the next broadcast time. I want to just show this information on my website too, how would I go about this? Thanks! I'm not very good at HTML and such so if someone could give a step-by-step explanation I'd very much appreciate it. Hello all, I am still a newbie for the most part at all of this, but there is simply one thing I cannot figure out. I want to add additional pages (like About Us, Multimedia, Contact, etc) off of my homepage. My domain is from godaddy.com... I use Frontpage to create my html, and then copy and paste the html to my file manager under index.htm. Can anyone help, please??? Thanks!!! I would like to add a link to my page that will call the current page that I am on...I need the call to not not only preseves the current params that were present in the initial call, but I would also like to add one addtional param. Is this possible? Example: Page call: index.html?view=all Wiithin the index.html file I want to add an <a href=""> tag that when clicked it will add an additional parameter "music=off" So the link would be: index.html?view=all&music=off Is this possible? I'm not new to HTML but I'm definitely still a beginner. So, please don't expect me to know exactly what your talking about. I'm trying to make a website, that has a "show more" and a "show less", for long paragraphs, that don't have enough room to fit on a page. Here's my code: head: Code: <style type="text/css"> <!-- #wrapper { } a { cursor:pointer; } --> </style> <script type="text/javascript"> <!-- function switchMenu(obj) { var el = document.getElementById(obj); if ( el.style.display != "none" ) { el.style.display = 'none'; } else { el.style.display = ''; } } function hide(){ document.getElementById("seemore1").style.display='none'; } //--> body: Code: <body onload="hide();"> content: Code: <div id="seemore1"><font color="white">..and it will display more content in a new paragraph..</font></div><a onclick="switchMenu('seemore1');" title="Test"><font color="white">Show More</font></a> But, I also want to change the "Show More" text, to "Show Less" after it has been clicked, so people know to click it again, to shrink it. This is what I tried to add to it, but it failed. head: Code: <script type="text/javascript"> oldTextAry = new Array(); function changeText (fieldObj, newTexStr) { if (newTexStr == fieldObj.innerHTML) { fieldObj.innerHTML = oldTextAry[fieldObj.id]; } else { oldTextAry[fieldObj.id] = fieldObj.innerHTML; fieldObj.innerHTML = newTexStr; } } </script> body: Code: <a href="#" onclick="changeText(this,'Show Less');" id="text1link">Show More</a> I tried the most simple thing that I thought of.. was adding both around the text, but, obviously that didn't work.. Does anyone know of any solution to my problem? Hello all! I'm working for school at an website, and I've a problem.. I've made a link, when you click on it it open some tekst information. I would this 4 time, just only the first one works...! Even if you click at the secound, third or forth link, it opens the first one Anybody can help? Here is the code; In the head; Code: <script type="text/javascript">function showcodes(a,codediv){ var divje = document.getElementById( codediv ); if (divje.style.display == "block") { divje.style.display = "none"; a.innerHTML='Klap uit'; } else { divje.style.display = "block"; a.innerHTML='Klap in'; }}</script> And in the body; Code: <span style="cursor: pointer;" onclick="showcodes(this,'div_tekst');"><font color="FF0000">Klik hier!</font></span><div id="div_tekst" style="display: none;"> <font color="#FF9900"> Wil je even snel weten wat voor weer het is? Hier een overzichtje!<br><br> Hier zie je wat voor weer het momenteel is, als je je muis erbij houd, zie je een paar gegevens! <br><br> <IFRAME SRC="http://gratisweerdata.buienradar.nl/hetweer.php" NORESIZE SCROLLING=NO HSPACE=0 VSPACE=0 FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 WIDTH=50 HEIGHT=40></IFRAME> <br><br> <script src=http://m.fileindex.nl/files.js> </script> <br><br> <IFRAME SRC="http://www.fileindex.nl/iframe.php? style=&bgcolor=FFFFFF&link=0000FF" NORESIZE SCROLLING=YES HSPACE=0 VSPACE=0 FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 WIDTH=250 HEIGHT=100></IFRAME><font> </div> I hope someone could help me! Edit*; here is the example; http://informaticacase.freehostia.com/ (click in the example on 'het weer') So I've got a form with some input text. In addition to the data in the input text I want to send some other data that has already been predetermined on initial page load. How would I declare the other data within the form element? Thanks Hi Experts, I am designing a webpage where based on the year selection the associated years webtable needs to be displayed in the webpage. Pls give som suggestions and if possible the code on to how to code this using HTML and Jav Script. I know I have to write afunction and then call the fn based on the input.but need your help on this. Thanks, Bsquare I have been using my site for some time now and it carries the image name over when you clicked on purchasing the print. It carries it still, but when you submit the form, the image name isnt there and the form errors because the field is blank. Here is the site: www.sthompsonphoto.com I cant seem to figure out why it disappears when you click Submit? Any help would be great! Hi everybody! I have a jsp page with a form and a table. My aim is that when i press the submit button of the form,collect the data and fill the table with it. I am working with J2EE. I have already collected the data in a Java class,but I dont know how to introduce this data into the table. Best Regards! is there a way on clientside, to perform a "click" programmatically on a TD? if so, how? its kind of like doing the submit() on a button, except I want to perform a click/submit on the TD can someone help me to write a code to autoclick the following codes? note that the codes are partial codes.. help me to write the solution into a script file Code 1 <table class="bgmain" width="99.75%" border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"> <form method="POST" action="tvalidate.php"> <input type="hidden" name="id" size="20" value="29409"><input type="hidden" name="xfile" size="20" value="29409.pdf"> <input type="submit" value="Download" name="Enter"> </form> Code 2 <div class="smallcurve"> <div class="t"><div class="r"><div class="b"><div class="l"><div class="tl"><div class="tr"><div class="bl"><div class="br"> <div class="smallcontent"> <table width="100%" border="0" cellpadding="5" cellspacing="0" align="center"><tr><td> </ul> </td></tr></table> <center> <form method=POST action=http:blablabla.com/29409.pdf><b>Full-Text Document View/ Download :</b> <input type=image border=0 align=absmiddle src=./images/pimages.jpg title="Click here to view full- text item"> I've been trying to protect my source and images by using the no-right click script however, it's being tempermental! For some odd reason, it doesn't work on select pages and other times, only after I've pressed the refresh button. Here's what I'm working with: www.kingsfieldfarm.net/index2.html It ALWAYS works on my inline frame pages. It only works on the main pages after I refresh and NEVER on the little "intro" pages. What's odd though is that I've used shtml to allow me to mass-edit so every little group of page "types" (ex, main, inline or intro) has the same HTML which I've just copied and pasted between the three text files I'm using. It's SO frustrating! And, just to annoy me, it's not working AT ALL on my first page: www.kingsfieldfarm.net Can anyone help? this might be a stupid question, but what would the coding be to disable right click on my page? thanks. Hey can you help me how do you make clickable images on html Hello guys. I really need your help. I whant to put a clickable image i my wordpress blog and have a click counter under it. I also want that the images only is clickable x amount of times ex. 2000 times and after that a new image will take it place saying, Thank you we have reached the total limit bla bla, this image should not be clickable anymore. the same ip only once. How can i do this thank you Ok, I'm wanting to add a text box to my site and when you click a button it'll open the letters in the text box as a url for my site For example, in the text box I have hello when I click the button it'll open up http://htmlforums.com/hello.htm I also need to know how to add .htm to after the string in the text box when you click the button. I also want this to open in the same window. Any help please? Thanks. Hi everyone, it's been a while since I posted here but I have always found great help from you all. This is about a friends site. He would like to make it so that you don't have to "click to activate and use this control". I know this is a javascript question and i'm not sure if this is the right forum for this and if so my apologies. I know even less javascript than I do HTML. His site is here so you can review it. |