ziggy11 Posted November 3, 2011 Report Share Posted November 3, 2011 Hello all, new to both js and the forum. I am trying to use one of the js solutions from the forum (to help me write some other code) and for the life of me cannot get it to work. The topic is this link: http://forums.caspio.com/viewtopic.php?f=14&t=12232. I have put it in the Header section exactly how it says to do making only one change; I changed the [columnnumber] from "0" to "4" so I could place the "Label" over the fifth column instead of the first. Here is the code exactly how it is pasted into the Header section of my Elements box. function HeaderLabel() { /* (1) Get the results table and rows */ var tbl = document.getElementsByTagName("table")[1]; var rows = tbl.getElementsByTagName("tr"); /* (2) Get the header row’s data cells */ var colheader = rows[4].getElementsByTagName("td"); /* (3) Assign a label to the first data cell */ colheader[0].innerHTML="Label"; window.onload = HeaderLabel; } Would anyone have any idea why this code does not bring up anything at all? When I run it through Firebug it tells me that "var colheader = rows[4]..." is undefined. Any help would be appreciated. thx, Zig Quote Link to comment Share on other sites More sharing options...
ShWolf Posted November 4, 2011 Report Share Posted November 4, 2011 Hi, You can change field labels in the datapage wizard on the "Configure Results Page Fields" page. HTML Block label can be changed now in the wizard too, without any scripting . Hope it helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.