Solved

How to call web service from html href link

Posted on 2015-01-07
2
422 Views
Last Modified: 2015-01-28
I have a requirement to be implemented. The functionality should be same as like Google calender guest invitation. The Application is all about workshop scheduling. When there is new workshop identified mails would be sent to all the members of the application. The mail would have following there html buttons,

test.jpg
all the members would give their wish. When a members clicks yes/no/maybe only the status should be updated in our data base server. New tab or new window should not get opened or the page should not get posted. we have tried with web service by assigning the web service url to buttons but when button is clicked the web service url gets opened in new tab.  Any ideas to over come this issue.
0
Comment
Question by:Loganathan Natarajan
2 Comments
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 400 total points
Comment Utility
on the onclick item for the button in the code behind you do the web service call
0
 
LVL 42

Assisted Solution

by:Rob Jurd, EE MVE
Rob Jurd, EE MVE earned 100 total points
Comment Utility
To expand on David's comment, this is typically done with ajax, rather than redirecting the user to the url of the webservice.

so you've got the above buttons:

<button id='yes'>Yes</button>
<button id='no'>No</button>
<button id='maybe'>Maybe</button>

using javascript (jquery framework www.jquery.com) you can see an example of this here:

http://jsbin.com/miyeji/1/edit?html,js,output

JavaScript has its own caveats because there is security restrictions that the browser has when it has to access another domain outside of where it is served from.  See CORS for more information http://www.w3.org/TR/cors/
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now