473,804 Members | 3,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Atlas 2 way interaction

Hi.

I want to implement a right click context menu using Atlas for a web
app.

The page will list some usernames.

Right clicking on a username needs to send the user name to a
webservice, which then returns a list of available options for that
user to be displayed in the right click menu.

Selecting the option in the menu then needs to process another web
method on the selected user..

How can this be done?

So far, I have managed to send data to the webservice doing something
like this..

//---- Div containing the popup menu
<atlas:UpdatePa nel ID="popupPanel " runat="server">
<ContentTemplat e>

<div id="menu" class="menu" display:none>
<asp:Label ID="popupLabel " runat="server" /><br />
<asp:Button ID="Button3" runat="server" Text="opt1"
OnClick="Button 3_Click" />
<asp:Button ID="Button4" runat="server" Text="opt2"
OnClick="Button 4_Click" />
<asp:Button ID="Button5" runat="server" Text="opt3"
OnClick="Button 5_Click" />
</div>
</ContentTemplate >
<Triggers>
<atlas:ControlE ventTrigger ControlID="Butt on3"
EventName="Clic k" />
<atlas:ControlE ventTrigger ControlID="Butt on4"
EventName="Clic k" />
<atlas:ControlE ventTrigger ControlID="Butt on5"
EventName="Clic k" />
</Triggers>

</atlas:UpdatePan el>

//---- Asp label in repeater item to display user
name----------------------------------------
<asp:Label ID="userLabel" runat="server" Text="ADesai"
oncontextmenu=" return RightClick('ADe sai');return " />

//---- JS Function to send data to
Webservice----------------------------------------
function RightClick(user name)
{
//Call script proxy passing the input element data
requestSimpleSe rvice =
AtlasTest.Servi ce.UserRightCli ck.GetUserOptio ns(
username, //params
OnComplete, //Complete event
OnTimeout //Timeout event
);
return false;
}

//----JS Function to receive data from webservice
function OnComplete(resu lt)
{
//Show context menu
ShowPopup();
popuplabel = document.getEle mentById("popup Label").innerHT ML =
result
}
This code currently sends the username to the webservice which at the
moment just echos it back. The OnComplete function then gets the
response from the webservice and displays it in the popup menu.

What I now need to be able to do is.. when one of the ASP:Buttons are
clicked in the panel, i need the username to be sent to the server so I
can access it from the onclick event in the code behind, and process
the selected option for the user.

Currently because I am changing the value of the label client side via
javascript, when the onclick event fires server side, it doesnt know of
this value.

What is the correct way of communicating between webcontrols and atlas
scripts?

Is there a better way to consume the response from a webservice server
side in the code behind page if it was fired via javascript?

Thanks
Amit

Mar 28 '06 #1
1 1359
DWS
Amit,

Javascript updates label and hidden field, the hidden field will be
available on the server.

Hopefully someone will come along with a link to an example for you.

Good Luck
DWS

"am**@c4ppy.net " wrote:
Hi.

I want to implement a right click context menu using Atlas for a web
app.

The page will list some usernames.

Right clicking on a username needs to send the user name to a
webservice, which then returns a list of available options for that
user to be displayed in the right click menu.

Selecting the option in the menu then needs to process another web
method on the selected user..

How can this be done?

So far, I have managed to send data to the webservice doing something
like this..

//---- Div containing the popup menu
<atlas:UpdatePa nel ID="popupPanel " runat="server">
<ContentTemplat e>

<div id="menu" class="menu" display:none>
<asp:Label ID="popupLabel " runat="server" /><br />
<asp:Button ID="Button3" runat="server" Text="opt1"
OnClick="Button 3_Click" />
<asp:Button ID="Button4" runat="server" Text="opt2"
OnClick="Button 4_Click" />
<asp:Button ID="Button5" runat="server" Text="opt3"
OnClick="Button 5_Click" />
</div>
</ContentTemplate >
<Triggers>
<atlas:ControlE ventTrigger ControlID="Butt on3"
EventName="Clic k" />
<atlas:ControlE ventTrigger ControlID="Butt on4"
EventName="Clic k" />
<atlas:ControlE ventTrigger ControlID="Butt on5"
EventName="Clic k" />
</Triggers>

</atlas:UpdatePan el>

//---- Asp label in repeater item to display user
name----------------------------------------
<asp:Label ID="userLabel" runat="server" Text="ADesai"
oncontextmenu=" return RightClick('ADe sai');return " />

//---- JS Function to send data to
Webservice----------------------------------------
function RightClick(user name)
{
//Call script proxy passing the input element data
requestSimpleSe rvice =
AtlasTest.Servi ce.UserRightCli ck.GetUserOptio ns(
username, //params
OnComplete, //Complete event
OnTimeout //Timeout event
);
return false;
}

//----JS Function to receive data from webservice
function OnComplete(resu lt)
{
//Show context menu
ShowPopup();
popuplabel = document.getEle mentById("popup Label").innerHT ML =
result
}
This code currently sends the username to the webservice which at the
moment just echos it back. The OnComplete function then gets the
response from the webservice and displays it in the popup menu.

What I now need to be able to do is.. when one of the ASP:Buttons are
clicked in the panel, i need the username to be sent to the server so I
can access it from the onclick event in the code behind, and process
the selected option for the user.

Currently because I am changing the value of the label client side via
javascript, when the onclick event fires server side, it doesnt know of
this value.

What is the correct way of communicating between webcontrols and atlas
scripts?

Is there a better way to consume the response from a webservice server
side in the code behind page if it was fired via javascript?

Thanks
Amit

Mar 28 '06 #2

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

Similar topics

2
3581
by: Justin Lemkul | last post by:
Hello all, I am hoping someone out there will be able to help me. I am trying to install a program that utilizes NumPy. In installing NumPy, I realized that I was lacking Atlas. I ran into the following problems installing Atlas and NumPy, as I realized that NumPy could be installed using the Mac OSX veclib already built in. If anyone has any ideas on how to fix either of these, I would be most grateful. I am fairly new to Python...
0
620
by: Darren L. Weber | last post by:
The following is a first attempt to almost create a shell script for installation of ATLAS and LAPACK. It does not work right now and it is specific to a particular platform. It is posted here to archive it and throw into the public domain, maybe others will find it useful. It is at least a documentation of some relevant notes on the procedure. Corrections and updates would be really appreciated. Alternatives to automate this process...
8
1544
by: Chris | last post by:
Hi, I can't seem to find any info on calling a webservice with atlas and populating a gridview with the results. All the doc shows on the atlas website is alert. Who would want to alert? Please assist? Thanks
2
1805
by: A.Wussow | last post by:
Hi Everybody, i want to load dynamically content from some user controls (with forms, or some data-controls) using atlas. So i use an UpdatePanel for loading the user control into a placeholder. Using buttons for loading new content works fine. But i still want to use a function which is callable per javascript. I think this way is more flexable than using the Buttons, becaus every button needs it's own Sub-Routine. But i want to have...
2
1270
by: Bob | last post by:
Hi, I discovered the new framework 'Atlas' and i want to use it on my existing application. The problem is that on any page of my existing page, the tag <atlas: .../is not recognized. So my question is: how to use Atlas with existing pages? Thanks Bob
5
1890
by: igotyourdotnet | last post by:
I have a question on atlas: I can create an 'atlas project' and I can add atlas controls fine. but when I try and add an atlas control to an existing asp.net web app I can't, Why? I did notice that the web.cofig file is different then a normal web app web.config. Do I need to add anything to the web.config file of my existing web app or no? I have the Microsfot.Web.Atlas.dll referenced in my web app. what else do I need to do to add...
3
1559
by: Robert Scheer | last post by:
Hi. I think I have some conceptual questions here. I have an asp.net web application up and running and now I intend to use Atlas on some of my pages. I have read that after installing Atlas, I need to create a specific Atlas project. But what I need is to just adapt Atlas on existing pages, so my questions are: Can I simply add Atlas controls like UpdatePanel on an existing web application page? If so, do I need to adjust some kind of...
1
3533
by: jmdolinger | last post by:
Hi all, I'm a newbie to Atlas (and recently ASP.NET) after coming from a long Java background, also have done quite a bit with an Ajax.NET/ASP.NET 1.1 project, but it was basically all javascript, nothing really having to do with ASP.NET... I'm attempting to put together an application that consists of several GridView controls each bound to some xml data. Each table exists in its own update panel. The two effects I'm going for are:
0
1792
by: YellowFin Announcements | last post by:
Yellowfin, Powered by J2EE, Jasper, BIRT, Spring, jfreeChart Advanta releases ATLAS BI using Yellowfin Business Intelligence 3rd of August, 2007 - Advanta Software, specialist software solutions provider to the 3PL and logistics markets, announced the release of ATLAS BI, a state of the art business intelligence module as an addition to Advanta's ATLAS logistics suite. ATLAS BI comes as a result of a partnership with local business...
0
9710
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9589
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10329
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.