I have put probes which feeds back to the textbox on my page.
I have commented out sections of code but although the PROBE1 and 2 show,
The line displaying the contents of Heading 1 does not nor anything after that.
I have since simplified and recoded the routine with the same problem.
The script is set to return the result to the calling html.
It is returning the PROBE1 and the PROBE2, but falls and does not reach the PROBE3 line.
function init()
{
var str = "Text content in Javascript" ;
var obj=document.getElementById( "wb_txtJS" ) ;
obj.innerHTML = str + "<br> PROBE: 1" ;
var heading1 = "PROBE: 2" ;
obj.innerHTML += "<br>" + heading1 ;
var conn = new ActiveXObject("ADODB.Connection") ;
obj.innerHTML += "<br>" + "PROBE: 3" ;
conn.close;
}
document.addEventListener( "DOMContentLoaded" , init , false ) ;
I am trying to get data eventually from an SQL database but … code fails before I get there.
OK… maybe getting somewhere, error in console is
ActiveXObject is not defined - line 11
The question now is why is it not taking the definition… please
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>external</title>
<script type="text/javascript" src="external.js"></script>
</head>
<body>
<div id="wb_txtJS"></div>
</body>
</html>
Using Firefox and Chrome - Windows7Pro
Thank you for the replies and feedback.
In doing my research tonight and discussing with my brother I realise that we need to allow for the code to work across phones and all browsers.
In short Javascript I do not think is going to cut it. I have been instructed to go down the PHP path (groan) which is another language I have to learn from the start again.
Many thanks for your help.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.