While making ads or pop-ups in browser, web developer can conceal a few features of browser window attract attention. One of these options is URL displayed at top address bar. Hiding text deletes needless elements on pop-up so users see ad or pop-up message and aren't abstracted by main text. This feature is done using JavaScript. JavaScript has a "window.open()" function enabling developers to make a new window and add parameters that manages size, display text and scroll bars.
• Open HTML file to edit. Open file in a normal text editor like Notepad.
• Open script tag element on page. Script tag indicates JavaScript entry and enters element to use in page. Following code is used to create a JavaScript element:
<script type="text/javascript"> </script>
• Make function that opens window hiding URL in address bar.
<script type="text/javascript">
window.open('my_file.htm','null','width=600,height =600,toolbar=no,scrollbars=no,location=no,resizabl e =yes');
</script>
"location" parameter deletes URL in address bar. "my_file.htm" is file used to inhabit content in new window.
• Save file and open it form web browser to check code.



Reply With Quote
Copyright Techfuels
Bookmarks