p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP Databases (http://p2p.wrox.com/forumdisplay.php?f=62)
-   -   not able to save data using javascript (http://p2p.wrox.com/showthread.php?t=12084)

rok April 21st, 2004 04:31 AM

not able to save data using javascript
 
hi,

i created an asp page that stores and retrieve data from sql database. the thing is that there is a floating menu(created using javascript) in the page that performs the functions such as edit, save etc....the prblm is tht i am not able to save the data using the floating menu(even document.form1.submit didnt work) but is able to save it using the menus available on the page..pls help..:(..the floating menu code is as below:-
<script language=javascript>

if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>

<layer id="divStayTopLeft">

<table border="1" width="130" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" bgcolor="black">
<p align="center"><b>Menu</b></td>
</tr>
<tr>
<td width="100%" bgcolor="beige">
<p align="center">
<a href="#" onclick="javascript:return add_onclick();"><b>Add</b></a><br>
<a href="javascript:document.form1.submit();" onclick="javascript:savelk();"><b>Save</b></a><br>
<a href="#" onclick="javascript:edit_onclick();"><b>Edit</b></a><br>
<a href="javascript:document.location.replace('../academicmodule/masters.asp')"><b>Close</b></a><br>
<a href="#" onclick="javascript:saveall_onclick();"><b>Save All Classes</b></a></td>

</
</table>

</layer>


<script type="text/javascript">

var verticalpos="frombottom"

if (!document.layers)
document.write('</div>')

function JSFX_FloatTopDiv()
{
var startX = 650,
startY = 400;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function ml(id)
{
var

el=d.getElementById?d.getElementById(id):d.all?d.a ll[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.t op=y;};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop +

document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function()
{
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop +

document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopDiv();
</script>




rgds,
rok


All times are GMT -4. The time now is 12:01 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.