Jump to content

Archived

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

natalieG

javascript syntax

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>

Share this post


Link to post
Share on other sites
WTF is AJAX???? I have seen it everywhere and am to lazy to fig it out for myself

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

×

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.