hi
i m using IE 6.0.
i want to refresh just the captcha part when the user clicks on an image.
i searched for articles on it and got a fairly good understanding of it.
but i m still unable to get any results.
i have used Simple AJAX Code-Kit (SACK) (http://www.twilightuniverse.com/)
my code:
head part:::
[code=html]
<head>
<script type="text/javascript" src="ajax.js"></script>
// i have saved ajax.js in my common website folder which contains all the files
<script type="text/javascript">
var ajax = new sack();
var contentObj;
function showContent()
{
contentObj.inne rHTML = ajax.response;
}
function showWaitMessage ()
{
contentObj.inne rHTML = 'Loading image...Please wait';
}
function getAjaxFile(fil eName)
{
ajax.requestFil e = fileName;
ajax.onCompleti on = showContent;
ajax.onLoading = showWaitMessage ;
ajax.runAJAX();
}
function captcha()
{
getAjaxFile(cap tcha.php);
}
function initAjaxDemo()
{
contentObj = document.getEle mentById('div_c aptcha');
}
window.onload = initAjaxDemo;
</script>
</head>
[/code]
-------------------------
body part:::::
[code=html]<div id="div_captcha ">
default text
</div>
<img alt="Request new image" src="req_im.gif " onclick="captch a()">[/code]
but the script is not working
and it is not loading the contents of captcha.php on clicking on the image.
please help
i m using IE 6.0.
i want to refresh just the captcha part when the user clicks on an image.
i searched for articles on it and got a fairly good understanding of it.
but i m still unable to get any results.
i have used Simple AJAX Code-Kit (SACK) (http://www.twilightuniverse.com/)
my code:
head part:::
[code=html]
<head>
<script type="text/javascript" src="ajax.js"></script>
// i have saved ajax.js in my common website folder which contains all the files
<script type="text/javascript">
var ajax = new sack();
var contentObj;
function showContent()
{
contentObj.inne rHTML = ajax.response;
}
function showWaitMessage ()
{
contentObj.inne rHTML = 'Loading image...Please wait';
}
function getAjaxFile(fil eName)
{
ajax.requestFil e = fileName;
ajax.onCompleti on = showContent;
ajax.onLoading = showWaitMessage ;
ajax.runAJAX();
}
function captcha()
{
getAjaxFile(cap tcha.php);
}
function initAjaxDemo()
{
contentObj = document.getEle mentById('div_c aptcha');
}
window.onload = initAjaxDemo;
</script>
</head>
[/code]
-------------------------
body part:::::
[code=html]<div id="div_captcha ">
default text
</div>
<img alt="Request new image" src="req_im.gif " onclick="captch a()">[/code]
but the script is not working
and it is not loading the contents of captcha.php on clicking on the image.
please help
Comment