Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 21st, 2004, 04:31 AM
rok rok is offline
Registered User
 
Join Date: Apr 2004
Location: New Delhi, Delhi, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rok
Default 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
JavaScript-Plz save my soul. Magxtopher ASP.NET 1.0 and 1.1 Basics 9 November 8th, 2008 03:21 AM
Javascript Function return save in XSL Variable Vrokad XSLT 2 June 2nd, 2007 02:54 AM
Excel Save Prompt in javascript interrupt Javascript How-To 2 March 18th, 2005 04:52 AM
error using XML save method in javascript Heroic Dose Javascript 3 September 22nd, 2003 08:05 AM





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