by http://webgeektutorials.blogspot.com
Showing posts with label XHTML. Show all posts
Showing posts with label XHTML. Show all posts

Friday, August 5, 2011

Javascript to get URL of page

In my project, today i need to get the URL of the page, i used a small Javascript to implement it. In Javascript location object contains information about the current URL. It is supported by all the major browsers.
The location object is part of the window object and is accessed through the window.location property. Quite simple script to do this is :


<script language="javascript" type="text/javascript">
    document.write (document.location.href);
</script>

Properties of Location Object
 hash  Returns the anchor portion of a URL
 host  Returns the hostname and port of a URL
 hostname  Returns the hostname of a URL
 href  Returns the entire URL
 pathname  Returns the path name of a URL
 port  Returns the port number the server uses for a URL
 protocol  Returns the protocol of a URL
 search  Returns the query portion of a URL

Note : Please note that this won't work if you are using frames in your page.

Wednesday, December 22, 2010

Technologies for web design

This might be a common interview question in front of you, while hunting a job, some points i would like to discuss about this question.
  • HTML provides the basis for creation of web pages.
  • Photoshop is software which is used for image editing.
  • Flash for creating presentation.
  • CSS helps creates uniformity across the entire web site.
  • Javascript provides certain user interface controls.
  • MySQL and Oracle are well-known database management technologies.

After stagnating for quite some time, Web powering technologies are now experiencing rapid development. CSS (Cascading Style Sheets) is just the first wave, and it's already giving way to more robust technologies like DHTML, LAMP, XML (read An Introduction to the Extensible Markup Language for more information on this technology), and AJAX. Attempting to stay current on these technologies can be both time consuming and expensive, which raises the question: should you stick with what you have, or take the plunge and incorporate these advanced techniques?