518 Posted Topics

Member Avatar for ayi_102

You can try this one... [code=javascript]<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>Demo</title> <style type="text/css"> /* <![CDATA[ */ html, body { min-width: 800px; max-width: 1024px; width: auto; } …

Member Avatar for ayi_102
0
2K
Member Avatar for trevata

I really don't understand what you are trying to achieve here! But you can refresh the page with this bits of code: [code=html]<input type="button" value="refresh" onclick="window.location.reload();" />[/code]

Member Avatar for fatihpiristine
0
113
Member Avatar for Reliable

Im not sure if this is what you need. But may be this wil claim your issue, simply insert the code below, between the [b]head[/b] section of your page: [code=javascript]<script type="text/javascript"> <!-- window.onload = function(e) { try { var askThem = ( confirm('Do you wish to load any popup's from …

Member Avatar for Reliable
0
152
Member Avatar for densman

This code is basic as needed. You are free to modify this according to what purpose you need. Hope it helps and good day to you... [code=javascript]<?xml version="1.0" encoding="UTF-8"?> <?xml-sylesheet type="text/css" href="#internal"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> …

Member Avatar for essential
0
115
Member Avatar for uringinteristi

Yeah i agree to kanaku's point. But since we all have it here. I'l throw a simple demo regarding this issue. [code=html]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <meta http-equiv="Content-Script-Type" content="text/javascript"> <title>Creatingt Simple table Using JavaScript</title> <script type="text/javascript"> <!-- function tableSamp() { …

Member Avatar for kanaku
0
115
Member Avatar for vjw757

Here's a quick example. Assuming that you have this external style sheet in your directory [b]default.css[/b] -- and the rules would be: [code=css]ul { list-style-type: none; line-height: 140%; margin-left: 1em; width: 100%; } li { display: inline; margin: 0.8em 0 0 0.8em; padding-left: 0.5em; line-height: 140%; width: auto; } li …

Member Avatar for ccube921
0
112
Member Avatar for sacarias40

Hope this will help u up! [code=html]<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>Centering The Page</title> <style type="text/css" media="all"> /* <![CDATA[ */ @media screen { html, body { height: 100%; min-width: 800px; max-width: …

Member Avatar for kanaku
0
235
Member Avatar for essential

[color=red][b]Merry x-mas to everbody![/b][/color] May you have all the blessings in life and good health...

Member Avatar for jbennet
0
49
Member Avatar for cpeeyush1

Things can be done with CSS. But here's a basic example to get you started... [code]<img src="yourImage.jpg" alt="[ Home ]" id="image1" onmouseover="this.src='home.jpg';" onmouseout="this.src='myImage.jpg';" /><br /> <a href="#" onmouseover="document.getElementById('image1').src='home.jpg';" onmouseout="document.getElementById('image1').src='yourImage.jpg';">Hoover Me!</a>[/code]

Member Avatar for essential
1
138
Member Avatar for squarkman

Hope this example will give you some idea on how to validate fields' using regExp()... [code=javascript]<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="#myStyle" media="all"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Validate the field</title> <style id="myStyle" type="text/css"> /* <![CDATA[ */ @media screen { body { width: …

Member Avatar for sid78669
0
147
Member Avatar for farshidk

Try this one... [code=html]<a title="" href="javascript:void(0);" onclick="window.open ('my_page.htm',target='_blank','width=500,height=500,toolbar=no,scrollbars=no,menubar=no,status=no,location=no');"> <img border="0" src="test.gif"></a>[/code]

Member Avatar for essential
0
80
Member Avatar for emilio

Here you have it... Hope this will solve the issue... [code=javascript]<html> <head> <title>javascript1</title> </head> <script lnaguage="javascript"> function Init() { var table = document.createElement("tbody"); var newrow,newcol,tmp; var array = new Array(16); for (var i=0 ; i<16 ; i++) array[i] = 0; for (var row = 0 ; row <4 ; row++) …

Member Avatar for emilio
0
337
Member Avatar for brechtjah

Hi there, i've come up with a lite modification in your code! Hope this will help you out... [code=html]<?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/css" href="#myStyle" media="all"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Try to Avoid using Absolute Width</title> <style id="myStyle" type="text/css"> /* <![CDATA[ */ …

Member Avatar for essential
0
161
Member Avatar for bdicasa

A CSS based drop down menu would aide you from this issue. Try the HTML/CSS section am sure they will be happy to help you from there.

Member Avatar for essential
0
89
Member Avatar for linekill

Hope this will add a few ideas' in your coding technique... This simple script will generate random quotes' each time you reload or open up the page! [code=javascript]<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Random Quotes</title> <script type="text/javascript"> /* <![CDATA[ */ …

Member Avatar for essential
0
184
Member Avatar for kvdd

Or you can just simplify things by doing this: [code=html]<form name="myform27" action="#" onsubmit="return false;"> <label for="chk1"> <input type="checkbox" name"myCheck" id="chk1" onmouseover="if (!this.checked) { this.checked = true; } else { this.checked = false; }" />Checkbox</label> </form>[/code]

Member Avatar for kvdd
0
2K
Member Avatar for mlohokare

Hope this will help you up! This example will display all images on the fixed width of 130pixel. The Image i used is included on this demo. See the attached file. [code=javascript]<html> <head> <title><!--Sample--></title> <style type="text/css"> <!-- #wrapper { width: 560px; margin: 0; padding: 0; text-align: center; } #content { …

Member Avatar for mlohokare
0
269
Member Avatar for besktrap

[b]HTML[/b] itself can provide you all the elements you need. But with dynamic changes, you will be needing some script for this to generate the output you need. Perhaps you can start with [b]DHTML[/b].

Member Avatar for Walkere
0
147
Member Avatar for besktrap

You may also try this to skip the coding... [icode]<form action="#" onsubmit="return false;"> <input type="text" value="Email" name="Email" style="color:grey;text-align:left;background:white" onfocus="this.style.color = '#000';" onblur="this.style.color = '#aaa';" /> </form> [/icode]

Member Avatar for essential
0
1K
Member Avatar for OmniX

All can be done with CSS by partialy putting all elements and nesting them within the [icode]div[/icode] container.

Member Avatar for OmniX
0
91
Member Avatar for jobojo

Use the sort() method, this will sort an Array alphabetically. If you would like to create your own sorting criteria, supply a function for the sort method to call. Sort will pass your function (a,b). If a is less than b then return -1, if a is equal to b …

Member Avatar for jobojo
0
182
Member Avatar for schlo_50

If you will consider my advice, then the easiest way, is to show all information with just one container instead of making those 3 elements disappear. The following demo will show you how things will work. This Markup is a [url=http://validator.w3.org/]Valid xHTML 1.0 Strict[/url] and also validates using [url=http://jigsaw.w3.org/css-validator/]CSS Level …

Member Avatar for essential
0
130
Member Avatar for brimike

I've gone into lite modification in your code. This document is a valid [url=http://validator.w3.org/]HTML 4.01 Transitional[/url] [code=javascript]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title><!--Sample--></title> <style type="text/css"> <!-- .style1 { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #142f57; } .name { font-size: 14px; font-family: Arial, Helvetica, sans-serif; color:#255ba8; …

Member Avatar for essential
0
155
Member Avatar for nikesh.yadav

You may try this instead! Enjoy coding... [code=html]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Change style</title>[/code] [code=javascript]<script type="text/javascript"> <!-- BEGING HIDING function changeStyle(change) { if ( change ) { document.body.style.backgroundColor = '#000000'; document.body.style.color = '#FFFFFF'; } else { document.body.style.backgroundColor = '#C0C0C0'; document.body.style.color …

Member Avatar for essential
0
2K
Member Avatar for danishbacker

Yes it can be done with the help of css. I wil play a simple demo to clear things up! Asuming that you have 2 media print1.css and print2.css, With print1.css you have the following attribution [icode] html { width: 1024px; height: 100%; } body { font: 700 16px Arial, …

Member Avatar for essential
0
4K
Member Avatar for complexcodes

Hope that this will help you up... [code=javascript]<html> <head> <title>Calculator</title> <script type="text/javascript"> function numberReader() { x = []; n = prompt('Enter a number that is separated by "space" or ","',''); m = n.replace(/(\s)|(\,)/g, '').slice(); for ( var i = 0; i < m.length; i++) { x[i] = m[i]; } document.write((x[0]*1 …

Member Avatar for essential
0
184
Member Avatar for jobojo

Just a quick brief regarding arrays. Since an Array can store other Arrays you can get the benefit of multi-dimension arrays. [icode]var x=[0,1,2,3,4,5]; var y=[x];[/icode] In the above example i've created an array named "[b]x[/b]" and assigned it as the first element in the array "[b]y[/b]". If we ask for …

Member Avatar for jobojo
0
1K
Member Avatar for collegestudent

This will do it! The value of the input box retrieved, and the output division updated. Creating HTML and inserting it into the document which means that html tags you typed will be appropriately processed. Hope it helps... [code=javascript]<html> <head> <title><!--Sample--></title> <style type="text/css"> <!-- @media screen, handheld { html, body …

Member Avatar for sasankasekhar
0
165
Member Avatar for trinityavatar

A quick throw over this 1. Hope it will help you all the way... [code=javascript]<html> <head> <title><!--Sample--></title> <style type="text/css"> <!-- body { font-family: Arial, Verdana; font-size: 10pt; color: #696969; text-align: left; } form span { display: block; margin: 25px 0 10px 5px; font: 700 18px Verdana, Helvetica, Arial, sans-serif; } …

Member Avatar for trinityavatar
0
135
Member Avatar for rejisha

If you have a floating elements next to --> [icode]document.getElementById ("divid");[/icode] just simply add this up --> [code=javscript]document.getElementById ("divid").style.display="block"; document.getElementById ("divid").style.float= "left"; /* It's up to you to set things up wheather it's left, right or center floated */ document.getElementById ("divid").style.clear= "both"; [/code]

Member Avatar for Drew
0
139
Member Avatar for Punkis448

You can do it this way... Simply insert this bits of code inside the head section of your default page... [code=javascript]<script type="text/javascript"> <!-- /* To ensure that it will be loaded with appropriate ext. */ window.onload = function() { window.location = 'http://www.yourdomain.com'; } //--> </script>[/code]

Member Avatar for essential
0
139
Member Avatar for digioz

You may try this code, i've done a lite modification over you script. Hope you find it useful... [code=javascript]<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Collapsible Panel Test</title> <style type="text/css"> <!-- body { font: 70%/1.5em Arial, sans-serif; color: #696969; text-align: left; } h3 { font: 700 16px Arial; color: #181818; } …

Member Avatar for digioz
0
178
Member Avatar for frezz

Am not sure if this what you need. But this wil help you to get familiar with confirm boxes. Feel free modify this script according to your needs... [code=javascript]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang = "en" dir="ltr"> <head> <title>Exit Row Requirements</title> <meta http-equiv="content-type" content="text/html; …

Member Avatar for essential
0
121
Member Avatar for mwa

Let's play a simple demo, hope you find this useful... [code=html]<html> <head> <title><!--Sample--></title>[/code] [code=css]<style type="text/css"> @media handheld, print { body { width: 50%; height: 50%; font-size: 11px; background-color: #FFFFFF !important; } } @media screen { body { background-color: #F6F6F6; color: #696969; font-size: 70%; font-family: Verdana,Helvetica, Arial, Sans-Serif; text-align: left; } …

Member Avatar for essential
0
182
Member Avatar for colweb

Maybe this would help. Try to use the css hack to fix rendering problem. As we can see to it, that in pre-IE browsers on PC, where by the border and padding are included in the width of an element, as opposed to added on. For example, when specifying the …

Member Avatar for colweb
0
203
Member Avatar for dariush29722

CSS-based websites to look the same across all browsers can often be difficult. Many of the problems however lie with Internet Explorer implementing CSS commands differently to other, more standards compliant browsers. All is not lost, however, as many of the differences you see across browsers are caused by the …

Member Avatar for essential
0
90
Member Avatar for gurudattbhat

Since i don't have any reference in your code. I will just play a simple demo based on what you wanted to happend. Here's the basic to deal with it... [code=javascript]<html> <head> <title><!--Sample--></title> <script type="text/javascript"> <!-- document.onclick = function(e) { e = e ? e : window.event; t = e.target …

Member Avatar for essential
0
93
Member Avatar for complexcodes

Hope you'll enjoy my simple demo, on how to get around with prompt boxes. Good day... [code=javascript]<html> <head> <title><!--Sample--></title> <script type="text/javascript"> <!-- function abc() { var validValue = /^[1-9]{1,4}$/; var openValue = /[0-9]/; var a = prompt('What is a's value?', 'Value goes here!'); do { if (!validValue.test(a)) { alert('You must …

Member Avatar for essential
0
111
Member Avatar for riscphree

Here's what you need. I've added some span elements to control the portion of the text. Hope this will help you up. Enjoy [code=html]<html> <head> <title></title> <style type="text/css"> .cards { width: 537px; height: 140px; float: left; margin: 0; padding: 0; background: #66AAFF; overflow: hidden; } .cards ul { list-style-type: none; …

Member Avatar for essential
0
142
Member Avatar for cmills83

Here's a simple demo, to get you started! [code=javascript]<html> <head> <title><!--Sample--></title> <script language="JavaScript"type="text/javascript"> <!-- function createDiv() { var _body = document.getElementsByTagName('body') [0]; var _div = document.createElement('div'); var _text = document.createTextNode('Creating Div Element') _div.appendChild(_text); _body.appendChild(_div); } window.onload = createDiv; --> </script> </head> <body> </body> </html>[/code] If you need something else just …

Member Avatar for cmills83
0
2K
Member Avatar for kaushik259106

Javasript wont be necessary for this one. CSS wil do fine and here's the actual code and along with your image. Just dont forget to polish the styles according to your needs. [code=css]<html> <head> <title><!--Sample--></title> <style type="text/css"> <!-- body { margin: 10px 0 0 0; padding: 0; text-align: center; background: …

Member Avatar for essential
0
118
Member Avatar for komrad

Am not sure if this is what you need. [code=html]<!-- Assuming that this the targeted frame in your page --> <iframe id="frame1" src="myPage.html" width="700" height="700"></iframe> <FORM><INPUT TYPE="BUTTON" VALUE="Go Back" ONCLICK="document.getElementById('frame1').contentWindow.location = 'someLocation.html';"></FORM> <!-- Just another option --> <FORM><INPUT TYPE="BUTTON" VALUE="Go Back" ONCLICK="document.getElementById('frame1').src = 'someLocation.html';"></FORM>[/code]

Member Avatar for essential
0
82
Member Avatar for inadcod

Here you have it! [code=javascript]<html> <head> <title><!--Sample--></title> <style type="text/css"> <!-- body { margin: 16px 0px 4px 0px; padding: 10px; font: bold 12px/80% Verdana, sans-serif, Arial; color: DeepSkyBlue; text-align: center; } #wrapper { margin: 0px; padding: 0px; width: 700px; } #contents { display: block; clear: both; padding: 4px ; line-height: 20px; …

Member Avatar for essential
0
198
Member Avatar for positrix

Try to recall all the lines of your code! [code=javascript]function emailchk () { //Refering to what value?--> if (!document.getElementById("email").value) { document.getElementById("emailmsg").innerHTML = " "; } else { url = "emailchk.php?email=" + document.getElementById("email").value; //Missing curly!--> } //So we'l have to add our end curly for this block! if (window.XMLHttpRequest) { xhr …

Member Avatar for ~s.o.s~
0
269
Member Avatar for FlashCreations

It's better if we will use the onchange event for this function! Here's the code: [code=javascript]<html> <head> <title><!-- Sample --></title> <script type="text/javascript"> <!-- function editBox(id,name,e) { e = e ? e : window.event; t = e.target ? e.target : e.srcElement; thisValue = document.getElementById(id); if ((t.name) && (t.name == name)) { …

Member Avatar for FlashCreations
0
147
Member Avatar for kvdd

This may come in handy! [code=html]<html> <head> <title><!-- Sample --></title>[/code] [code=javascript]<script type="text/javascript"> <!-- function scrollDown() { t = form1.list; for ( var x = 0; x <= t.options.length; x++ ) { t.options[x].selected = true; } } window.onload = function() { var el = document.getElementsByTagName('option'); for ( var i = 0; …

Member Avatar for kvdd
0
2K
Member Avatar for odntuk

Simply add the following lines in your code... [code=javascript]//Additional lines starts here --> if (document.all && !document.layers) { document.all.linkout.href = urlout; document.all.linkout2.href = urlout; } else { //Preserved Lines --> document.getElementById ('linkout').href = urlout; document.getElementById ('linkout2').href =urlout; } } // Additional lines --> if (window.addEventListener) window.addEventListener('load',link,false); else if (window.attachEvent) window.attachEvent('onload',link); …

Member Avatar for essential
0
112
Member Avatar for jobojo

Here you go! Hope that this will solved the issue... [code=javascript]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Gross Pay Amount</title> <script type="text/javascript"> <!-- /* Assuming that this is an external srcript */ function thisPrompt() { var nVal = /^[0-9]{1,4}[\.\d]{0,2}$/; do { var h …

Member Avatar for jobojo
0
138
Member Avatar for pletch99

Simply Insert this inside the [icode]<head>[/icode] section of your page! [code=javascript]<script type="text/javascript"> <!-- var thisName = /^[A-Za-z]{3,50}$/ var validEmail = /^(\w+[\-\.])*\w+@(\w+\.)+[A-Za-z]+$/; var zip = /^[0-9]{4,10}$/; document.onsubmit = function(e) { e = e ? e : window.event; t = e.target ? e.target : e.srcElement; var info = []; if (( t.name …

Member Avatar for essential
0
346
Member Avatar for clueless101

Here you have it! I've done a lite modification in your code! [code=javascript]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Calculate Gas Mileage</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> /* <![CDATA[ */ var validValue = /^[0-9]{1,4}$/; function calcMPG() { var startMiles = document.mpgform.startingMileage.value * 1; var …

Member Avatar for clueless101
0
101

The End.