Click here to Skip to main content
15,900,598 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
the idea is

no matter what the back-end is
this HTML control should work with any application
no matter if the server code is done using PHP, C# or Ruby
consider a sample control
which will be used to show following information on a profile page
1. Logged in user's Photo
2. His/her Name
Assume we need to show only these 2 things on this control
and this control should be reusable
i.e. I should be able to use this HTML control with an application written in PHP, C# or Ruby
This control will accept the Photo URL and show the photo
also it will accept the string for user name and will display the name
Posted
Updated 13-Aug-12 20:54pm
v2
Comments
Sergey Alexandrovich Kryukov 14-Aug-12 11:31am    
In v.2, you made is not a question. What's the question? Problem? Concern?
--SA

1 solution

1) No. PHP works on the server side, and HTML control exists only on the client side. Besides, HTML control is not a method, function, procedure, operator or property, not a callable object. The notion of "call" is not applicable.

2) You can send a HTTP request to a Web service or call a Web method from the client size the same way you normally generate HTTP request: an anchor with some URI as a value of its href attribite (a trivial case), a Web form or an Ajax call. Again, you don't "call a service" (please see above). You need to read on each of these method in corresponding HTML chapters, read about Ajax, read on Web services and Web method; but first of all, on how HTTP works.

[EDIT]

Disclaimer: this answer was based on v.1 of the question.

—SA
 
Share this answer
 
v2
Comments
Abdul Quader Mamun 14-Aug-12 4:48am    
Great answer!
Sergey Alexandrovich Kryukov 14-Aug-12 11:29am    
Thank you very much, Abdul.
--SA
Abdul Quader Mamun 14-Aug-12 11:50am    
keep it up!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900