Home arrow JavaScript arrow Page 3 - The Script Approach to Active Client Pages: Chrys`s Enhancement
JAVASCRIPT

The Script Approach to Active Client Pages: Chrys`s Enhancement


In this conclusion to a three-part series on active client pages, I give you my enhancements to the Script Approach. I am the one who came up with the Script Approach. I derived it from Vlad’s work. Before I start my enhancements, let me talk about the store and Vlad’s Fake Get Method. Vlad himself calls one of his methods the Fake Get Method.

Author Info:
By: Chrysanthus Forcha
Rating: 3 stars3 stars3 stars3 stars3 stars / 2
June 19, 2009
TABLE OF CONTENTS:
  1. · The Script Approach to Active Client Pages: Chrys`s Enhancement
  2. · Script Approach Without Frameset
  3. · The innerHTML Property
  4. · Summary of ACP

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
The Script Approach to Active Client Pages: Chrys`s Enhancement - The innerHTML Property
(Page 3 of 4 )

Now that you are producing the content at the client, it might interest you to be able to change the content of HTML elements. You probably already knew that you could change the table cell content with the innerHTML property. Many browsers today can allow you to change the content of almost any HTML element.

Consider the following code:


<html>

<head>

<script type="text/javascript">

function changeContent()

{

document.getElementById('S1').innerHTML = "two";

document.getElementById('D1').innerHTML = "second";

}

</script>

</head>

<body>

<span id="S1">one</span>

<div id="D1">First</div>

<button type="button" onclick="changeContent()">Click</button>

</body>

</html>


When you click the button, the contents of the SPAN and DIV elements will be changed by the function in the script. This is just to show you that now, as your web pages or forms would be produced at the client, you may have to change the contents of HTML elements. This feature is not imperative for ACP. It comes as a complement. You can try the above code.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials