View Full Version : DHTML methods
shyjuu
10-15-2013, 01:09 PM
I need a good tutorial link on DHTML methods especially following Methods
1.alert,
2.back,
3.forward,
4. click
5 dreagDrop
6 findText
I already searched and not getting relevant tutorial
Thanks a lot in advance
jscheuer1
10-15-2013, 03:37 PM
It sounds like to me that you might be a beginner, if so the W3Schools (http://www.w3schools.com/) is a good place to start. For a grounding in DHTML you would want to take their javascript, HTML, and css tutorials.
That said, there are no DHTML methods per se. DHTML stands for Dynamic Hyper Text Markup Language and is achieved by combining HTML, javascript and css.
The alert is is a javascript only method:
<script type="text/javascript">
alert('Hello World');
</script>
That's all there is to it.
Back and Forward are also javascript only methods:
<script type="text/javascript">
history.go(-1);
</script>
That's back. Forward is:
<script type="text/javascript">
history.go(1);
</script>
Click can be very complex. But in it's simplest form, it's just javascript and HTML:
<span onclick="alert('Hello World');">Test</span>
There's nothing I know of called "dreagDrop". I think you mean Drag and Drop, which is also sometimes known as draggable.
That's pretty complex. Dynamic Drive has at least one script for that:
http://www.dynamicdrive.com/dynamicindex11/domdrag/index.htm
For other examples, use Google. Search for:
drag and drop javascript
or:
draggable
Finding text is also quite complex. We recently had a new member offer his script for free here:
http://www.dynamicdrive.com/forums/showthread.php?75324-Using-JavaScript-to-Search-For-and-Highlight-Text-on-a-Web-Page
It looks pretty good to me. To get the code you have to go to his demo and view the page source and copy it.
Google also offers a service for highlighting text on a page as part of custom search. Last I checked there were both free and paid versions of this service available. For more information on that Google:
google custom search
As this is a general question with many parts, I'm going to close this thread. If after you have looked at the answers here and checked the resources mentioned, if you have a specific question about one of these things, or something else, feel free to start a new thread about it.
But please, only one or two questions per thread. Tell us what you've tried and what it doesn't do that you want it to do.
I would recommend Google's "HTML, CSS, and JavaScript From the Ground Up (http://www.youtube.com/playlist?list=PL697D36B35F92E9E4)" series. SitePoint (http://reference.sitepoint.com/) is also a great reference. For a more comprehensive (though more technical) reference, Mozilla's MDN (https://developer.mozilla.org/en-US/docs) is arguably the best resource that exists. w3Schools (http://w3fools.com), while very popular and easy to browse, is misleading in many places and gets thing flat-out wrong in others. I recommend against using them as a resource.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.