Jump to content

javascript syntax


natalieG

Recommended Posts

Hello-
We are  working  with Ajax nd have the below script: We keep getting an"error on page"  mesage and cannot
fgure why. We are not asking on AjaxGold help, just javascriupt help.  Is thewre anything obvious here that we
missed?

Thanks
Natallie
-------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<title>Posting data and returning text with Ajax Gold</title>
<script type = "text/javascript" src = "ajaxgold.js"></script>
<script language = "javascript">
function display(text)
{
document.getElementById('targetDiv').innerHTML = text;
}
</script>
</head>
<body>
<h1>Posting data and returning text with Ajax Gold</h1>
<form>
<input type = "button" value = "Get the message"
onclick = "postDataReturnText('shownotes2.php', 'INDEXA=12', display)">
</form>
<div id="targetDiv">The fetched text will go here.</div>
</body>
</html>
Link to comment
https://forums.phpfreaks.com/topic/14803-javascript-syntax/
Share on other sites

I don't see any errors in the code you posted. If you are getting an error, please post it here. You can see the actual JS errors in FireFox by clicking on "Tools"->"JavaScript Council"

for the bigpoppa

AJAX stands for "Asynchronous JavaScript and XML" and by definition from domscripting.webstandards.org it means
[quote]
A scripting technique for silently loading new data from the server. Although AJAX scripts commonly use the soon to be standardized XMLHttpRequest object, they could also use a hidden iframe or frame. An AJAX script is useless by itself. It also requires a DOM Scripting component to embed the received data in the document.
[/quote]
Link to comment
https://forums.phpfreaks.com/topic/14803-javascript-syntax/#findComment-59487
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.