Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.