Solved

How to call web service from html href link

Posted on 2015-01-07
2
477 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 81

Accepted Solution

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

Assisted Solution

by:Rob
Rob earned 100 total points
ID: 40537211
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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.
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…

729 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