?
Solved

How to call web service from html href link

Posted on 2015-01-07
2
Medium Priority
?
496 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 82

Accepted Solution

by:
David Johnson, CD, MVP earned 1600 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 400 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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

777 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