473,396 Members | 2,093 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,396 software developers and data experts.

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:UpdatePanel ID="popupPanel" runat="server">
<ContentTemplate>

<div id="menu" class="menu" display:none>
<asp:Label ID="popupLabel" runat="server" /><br />
<asp:Button ID="Button3" runat="server" Text="opt1"
OnClick="Button3_Click" />
<asp:Button ID="Button4" runat="server" Text="opt2"
OnClick="Button4_Click" />
<asp:Button ID="Button5" runat="server" Text="opt3"
OnClick="Button5_Click" />
</div>
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="Button3"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button4"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button5"
EventName="Click" />
</Triggers>

</atlas:UpdatePanel>

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

//---- JS Function to send data to
Webservice----------------------------------------
function RightClick(username)
{
//Call script proxy passing the input element data
requestSimpleService =
AtlasTest.Service.UserRightClick.GetUserOptions(
username, //params
OnComplete, //Complete event
OnTimeout //Timeout event
);
return false;
}

//----JS Function to receive data from webservice
function OnComplete(result)
{
//Show context menu
ShowPopup();
popuplabel = document.getElementById("popupLabel").innerHTML =
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 1340
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:UpdatePanel ID="popupPanel" runat="server">
<ContentTemplate>

<div id="menu" class="menu" display:none>
<asp:Label ID="popupLabel" runat="server" /><br />
<asp:Button ID="Button3" runat="server" Text="opt1"
OnClick="Button3_Click" />
<asp:Button ID="Button4" runat="server" Text="opt2"
OnClick="Button4_Click" />
<asp:Button ID="Button5" runat="server" Text="opt3"
OnClick="Button5_Click" />
</div>
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="Button3"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button4"
EventName="Click" />
<atlas:ControlEventTrigger ControlID="Button5"
EventName="Click" />
</Triggers>

</atlas:UpdatePanel>

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

//---- JS Function to send data to
Webservice----------------------------------------
function RightClick(username)
{
//Call script proxy passing the input element data
requestSimpleService =
AtlasTest.Service.UserRightClick.GetUserOptions(
username, //params
OnComplete, //Complete event
OnTimeout //Timeout event
);
return false;
}

//----JS Function to receive data from webservice
function OnComplete(result)
{
//Show context menu
ShowPopup();
popuplabel = document.getElementById("popupLabel").innerHTML =
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
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...
0
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...
8
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...
2
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....
2
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...
5
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...
3
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...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.