Click here to Skip to main content
11,481,265 members (65,302 online)
Click here to Skip to main content

Tagged as


, 22 Feb 2013 CPOL 6.3K
Rate this:
Please Sign up or sign in to vote.
Initially, I set off to write quite a big post about how I want my version of HTML to be, offering more simplicity and capability by having a few tags included in the already existing version.Then I realized, there is no need to write an elongated post, it is possible

Initially, I set off to write quite a big post about how I want my version of HTML to be, offering more simplicity and capability by having a few tags included in the already existing version.

Then I realized, there is no need to write an elongated post, it is possible to succintly present what I want in HTML in a few words. What I really want in html is a simple method of communicating between the server and the client without refreshing the page (like they do in ajax style programming). In my view, the current mechanizm of behind the scene request/update is not simple and elegant enough to make sense of the overall process with better readability. 

To achieve it, we would only need three simple attribute tags for an html element (such as a dropdown list box), postbehindscenetrigger, postbehindscenedata and postbehindsceneresponsehandler and this is how the three attributes can be laid out inside an html element tag:

<select id="dropdown1", onchange="onchangeDropdown1Trigger", postbehindscenetrigger="onchangeDropdown1Trigger", postbehindscenedata="getdataOnchangeDropdown1" postbehindsceneresponsehandler="handleOnchangeDropDown1Response"......>

The basic idea is whenever the javascript function onchangeDropDown1Trigger javascript function is triggered (due to any operation in client side), a server side function will be invoked and the server side function'ss argument would be a stream of data which would be obtained from the client side javascript function getdataOnchangeDropdown1. The server's address can be taken from the form where the html element, (in this case a dropdown combo box ) resides. To keep things simple, a nice convention for the server side event handler can be formname_postbehindscenetriggername(string data). In this case, the server side event handler function name can be form1_onchangeDropdown1Trigger(string data).

And postbehindsceneresponsehandler is a simple client side javascript function with a string argument as first parameter which gets triggered automatically when the server responds to the client request for onchangeDropDown1Trigger.

Although the example is for a dropdown, we should able to use any HTML GUI element to have features to perform ajax style server-client communication behind the scene (and if required without the knowledge of the user).

The above mentioned concept is a basic idea to keep dynamic ajax based web programming simple and elegant. We can tweak the argument of the above mentioned three functions as well as the server side function to come up with more classy and elegent solution. Moreever, some basic argument parsing functions can be introduced in the javascript libraries to put the argument string fragments (separated by certain delimeters) in proper variables in an orderly fashion to make the whole process even simpler. An example can be the implode method of php, how it nicely places the variables contained in a string in an array - I am referring to the possibility of such functions in the javascript libraries for argument parsing in similar fashion; but instead of an array, it may put the arguments (contained in one long string) in a map. Using of proper framework will help to achieve this ajax style data communication by just a few clicks as well. If this para is not making any sense, don't bother; you'd know what I am wanting to tell if you ever get a chance to implement my chain of thoughts regarding client server communication with my version of HTML in your programming.

Have I gone wrong somewhere here? Too simple a solution for the web gurus yet to implement? I don't know. I don't know also, why it took almost a decade to get a basic and necessary tag like IFrame to be integrated in (and compatable among) all browsers.

None the less, the ultimate objective of this post is the standardization of behind scene client server communication, so that when you switch from programmer to programmer, u don't have to see different codes to achieve the same purpose.. (for example, on change of a combo box, populate a field somewhere in the document). If you use the three functions that I mentioned, you would see a standard practice which would be easy to follow as a code reviewer. 

Before coming up with negative suggestions againt this idea, I hope some thoughts would be given on favor of it.

signing off,


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


About the Author

Mukit, Ataul
Chief Technology Officer Rational Technologies
Bangladesh Bangladesh
Your Lord does not like people who waste by extravagance, and only the righteous C s, and does so in increments, and they are of those people who are mindful of what memory and time has in offer and they waste none of it.
Follow on   Twitter

Comments and Discussions

GeneralMy vote of 5 Pin
Max_Power_Up26-Feb-13 5:42
memberMax_Power_Up26-Feb-13 5:42 
GeneralThe overall concept in short [modified] Pin
Mukit, Ataul22-Feb-13 6:50
memberMukit, Ataul22-Feb-13 6:50 
GeneralMy vote of 1 Pin
x3021-Feb-13 19:46
memberx3021-Feb-13 19:46 
GeneralRe: My vote of 1 Pin
Mukit, Ataul21-Feb-13 20:28
memberMukit, Ataul21-Feb-13 20:28 
GeneralRe: My vote of 1 Pin
John Brett22-Feb-13 3:33
memberJohn Brett22-Feb-13 3:33 
GeneralRe: My vote of 1 Pin
Mukit, Ataul22-Feb-13 3:55
memberMukit, Ataul22-Feb-13 3:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150520.1 | Last Updated 22 Feb 2013
Article Copyright 2013 by Mukit, Ataul
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid