Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Lionsanime Directory   Improve your ranking, submit to directories   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 04-11-2008, 11:04 AM   #1 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 2,927
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
Share your JavaScript tips [and tricks]

If you have some JavaScript tips and tricks you might like to share, than this is a good place to start!


My #1:
Use expression method to set up individual css styles for Internet Explorer browser only:

Code:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> P#paragraph { color: #009933; /* Green */ color: expression('#FF0000'); /* Red --> IE ONLY */ } </style> </head> <body> <p id="paragraph"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </body> </html>
If you run this code in multiple browsers you'll see that the paragraph shows up red only in IE, and green in all others.
__________________
JUNE - JavaScript Framework
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 04-16-2008, 04:38 PM   #2 (permalink)
v7n Mentor
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 2,927
iTrader: 0 / 0%
Costin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web proCostin Trifan is a highly respected web pro
open a popup window in fullscreen mode

At first this could be an easy task (hell, it really is) but not without a little trick. As you know, IE suports the fullscreen mode but other browsers don't, so in my example I'll show you how to make a crossbrowser popup window to be shown in fullscreen mode:

First, let's create the function that we'll use to open the popup window:
Code:
function openPopup(url, name, features) { return window.open(url, name, features); }
Now, let's get the available screen size:
Code:
var width = screen.width, height = screen.height;
Running the code:
Code:
openPopup("http://www.www.www", "windowName", 'width='+width+', height='+height +'toolbar=yes, scrollbars=yes');

Just a small note in the end: don't use popup windows excessivelly, use them only if you have something important to show.
__________________
JUNE - JavaScript Framework
Costin Trifan is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamweaver Tips & Tricks ToddW Web Design Lobby 9 09-17-2007 01:48 PM
CSS Tips - Tricks - Tutorials - Tools Webnauts Web Design Lobby 4 02-26-2004 07:40 AM
Tips and Tricks -Today-::::.Drop Shadow.:::: PrinceZead Web Design Lobby 7 01-22-2004 09:46 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:20 PM.
© Copyright 2008 V7 Inc