473,320 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Client Side in Server side..Confused....


Hello All,

I am using AJAX library( AjaxEngine from
http://www.mathertel.de/AJAXEngine/) and having problems and hope
someone here can help me.
I have some piece of javascript code that I intend to use in server
side code.As I am using a javascript library so I have placed necessary
javascript files in the project directory.
I've placed a button on the webform and I would like to invoke
following javascript code on every button click
<div class="VEPart" id="me" style="LEFT: 220px; WIDTH: 180px; TOP:
106px; HEIGHT: 90px">
<div class="VEMover">: : : move me
</div>
I can be moved.
</div>
<script type="text/javascript">

jcl.LoadBehaviour("me", MoverBehaviour);

</script>
My another concern is as I have to execute above javascript code on
every click of the button I might have to figure out a way to generate
random files of id of div, moreover, how would I access this id in
server side code?

At the bottom of this message, I have pasted the same program I was
experimenting with. Being new to ASP.NET and especially Javascript
world I have no idea what is required , though after relentless
Googling I've been able to churn out the code attached at the bottom.
Any help will highly be appreciated.

Thanks,
Erland

------------------------------------------------------------
<%@ Page Language="C#" %>
<script runat="server">

private void page_load(object o,EventArgs e)
{

if (IsPostBack)

this.Button1.Attributes.Add("onclick","javascript: create()");
}

</script>
<html>
<head runat="server">
<title>Simple Mover Demo</title>
<link href="mathertel.css" type="text/css" rel="stylesheet" />
<script src="Mover.js" type="text/javascript"></script>
<script src="jcl.js" type="text/javascript"></script>
<script src="ajax.js" type="text/javascript"></script>
<style>
..VEPart {
border:1px solid gray;padding:2px;
position:absolute;top:60px;left:80px;background-color:#FFFFAA}

..VEMover {
position:relative; cursor:move;
padding:0px 0px 2px 2px;background-color:#203050;color:white;}
</style>
</head>
<body>
<form runat="server">
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>

</form>

<div class="VEPart" id="me" style="LEFT: 220px; WIDTH: 180px; TOP:
106px; HEIGHT: 90px">
<div class="VEMover">: : : move me
</div>
I can be moved.
</div>
<script type="text/javascript">

jcl.LoadBehaviour("me", MoverBehaviour);
</script>
</body>
</html>

Sep 6 '06 #1
0 758

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim | last post by:
I having a difficult time here trying to figure out what to do here. I need a way to scroll through a recordset and display the results with both forward and backward movement on a web page(PHP...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
8
by: Mike Fellows | last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is beyond me i have a piece of client side code that requires a piece of data from the server side (an ID number in this...
1
by: Matthew Louden | last post by:
Personally, I am totally confused with the following control terms and usage and advantages of each one in ASP.NET web application. Here's what I know so far.. 1. HTML Client Control: understood...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.