User Profile
Collapse
-
I see that you don't understand what I am looking for. All I wanted was to display a html document in the iframe once a cell was clicked on and the document would replace the table in the iframe. -
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptI do not receive any errors as it just won't display the listing from DisplayConstell ations. In the previous code it displays the constellation names in the clickable cells but when I click on the cells, the listing does not display in the iframe.Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptCode:var ConName=new Array(); ConName[0]="Andromeda"; ConName[1]="Antlia"; ConName[2]="Apus"; ConName[3]="Aquarius"; ConName[4]="Aquila"; ConName[5]="Ara"; ConName[6]="Aries"; ConName[7]="Auriga"; ConName[8]="Bootes"; ConName[9]="Caelum"; ConName[10]="Camelopardalis";
Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptI have the utility functions here that include left and right strings. There hasn't been any new problems as there is the only problem is getting the cells to display the documents in the iframe called john.
Code:function ltrim(str) { for(var k = 0; k < str.length && isWhitespace(str.charAt(k)); k++); return str.substring(k, str.length); } function rtrim(str) { for(var j=str.length-1; j>=0 &&
Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptI have a working copy here but the output won't go in the iframe and that is what I need.Code:<!DOCTYPE html> <html lang="en"> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/w3css/3/w3.css"> <head> <script type="text/javascript"
Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptI have the menu to load Display_Table() and the iframe receives the table at the end of the function so without including the iframe's name in the document.body.i nnerHTML= content the table won't go into the iframe. removing the name of the constellation where you put count won't tell the user what constellation to click on. As far as the left right function go they have been in this since 2001Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptI had to go back to using content += "<td><a href= 'javascript:Dis playConstellati ons(" + count + ");'>" + ConName[count] + "</a></td>"; since the onclick didn't work. I right clicked with the mouse button and selected copy what was in the cell and it said javascript:Disp layConstellatio ns(0) and I still can;t get the function DisplayConstell ation to display in the iframe to replace the table....Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptI ended up with this but it only created empty cells.Code:content += "<td onclick='DisplayConstellations(" + count + ")'>" + ConName[count] + "</td>";
Code:function Display_Table(){ var numOfCells = 88; columns = 8; rows = Math.ceil(numOfCells / columns), content = "", count = 0; content = "<table border='1' cellspacing='1' cellpadding='5'>";
Last edited by gits; Aug 12 '19, 06:52 AM. Reason: no need to have 2 posts and please use code tags when posting codeLeave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in Javascriptyes I realize that is the troble line of code but there are so many quotes involved that I get confused what gets a quote and what doesn't. I have four directories filled with tryitout functions in html and javascript that I have no idea anymore as what I am doing.Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in Javascriptyes exactly that but when I click on the cell nothing happens. I can't help feeling that the quote marks are in the wrong place whee I am inserting the onclick so that is why I am on here.Leave a comment:
-
John Alexander replied to How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptI am unable to type the correct format line in the function Display_Table() where I try to use the onclick command to insert the name of the file in my directory that replaces the table after the cell is clicked. I am new at using onclick in javascript.Leave a comment:
-
John Alexander started a topic How do I use a html5 table to insert onclick into each cell to display a file?in JavascriptHow do I use a html5 table to insert onclick into each cell to display a file?
Code:<!DOCTYPE html> <html lang="en'> <meta charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <head> <title>Pilot Star Catalogue</title> <script type="text/javascript" src="http://localhost/PSC/Documents/zonesjs/includedata.js"></script> <script
-
I have success with one of the functions but the other
won't cooperate. This is the one that won't go into the iframe
Code:<script> function DisplayConstellations(selection){ var Z = trim(Left(ZoneOrder[selection],2)); var Order = trim(Right(ZoneOrder[selection],2)); document.body.innerHTML = "http://localhost/PSC/Documents/Zonesjs/Zone" + Z + ".html?Order="
Leave a comment:
-
I managed to get the table into the iframe but the table erased the menu. when I clicked the cell to start a listing the list went to another page.Leave a comment:
-
I tried the w3schools.com but no one seems to understand that all I want to do is insert my html5 table into iframe and keep the iframe away from the top iframe.Leave a comment:
-
I have 2 iframes one for the horizontal menu and the other is underneath the menu iframe to recieve whatever is selected from the menu. I just need some sample code to insert the 88 cells into the iframe so the User can click on a cell and let the corresponding listing appear where the table was. I used to do this before html 5 came out but now I have no idea as to what code I need to use. I am an 81 year old retired vb6 programmer and I am out of...Leave a comment:
-
insert html table in iframe
I have been trying for many years to insert my html table into the lower main iframe with no success. Here is my javascript code:
Code:<a href="javascript:Display_Table()" target="main">Constellations</a> <script type="text/javascript"> function Display_Table(){ var numOfCells = 88; var columns = 8, rows = Math.ceil(numOfCells / columns), content = "",
-
Option Explicit
Private Declare Function GetMem8 Lib "msvbvm60" (ByRef src As Any, ByRef Dst As Any) As Long
Private Declare Function GetMem4 Lib "msvbvm60" (ByRef src As Any, ByRef Dst As Any) As Long
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundW " (ByRef pData As Any, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Declare Function Sleep Lib "kernel32"...Leave a comment:
-
My rtf.dll was deleted when I installed vs2013
I installed VS2013 with vb.net last month and I tried to use the RichTextBox but it didn't function in any way. I used VB 6 as I still have that installed on my PC and the rtf box wouldn't work there either. I looked for the rtf.dll and it was not in the windows directory or any other directory. I did a search in Windows File explorer and it couldn't find rtf.dll. I tried to search in the Internet but I wasn't able to find a web site that offered... -
John Alexander replied to I need to have a js function display in the current window but it opens a new windowin HTML CSSI found this on w3schools.com. It works as long as I don't use a function with document.getEle mentById("demo" ).innerHTML = newDoc(); How can I submit the table if it will only run if the above code isn't in a function. When it is in a function the table goes to another page. I tried target="_self" and "_blank" and it still goes to a new window. I need to be able to display the table with the menu buttons not when...Leave a comment:
No activity results to display
Show More
Leave a comment: