518 Posted Topics
Re: Everything has been configured according to the code's the you've provided. All codes is as follows: [b]Starting Page[/b] [code=javascript]<?xml version="1.0" encoding="utf-8"?> <!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" 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="X-UA-Compatible" content="IE=EmulateIE7" /> <title>Browser Information</title> <style … | |
Re: Same issue with Firefox vs IE thread. Have you checked it out? | |
Re: You can use the [icode]replace()[/icode] method. e.g. [code]loc = "#http://www.wesite.com/".replace(/#/ig, ""); alert( loc );[/code] | |
Re: Assuming that this is the your leftFrame. Then simply add [icode]target="rightFrameId"[/icode] attribute with your links'. [b]Left Frame.html[/b] [code]<html> <head> <title>Left Frame</title> </head> <body> <a target="right" href="http://www.google.com/" id="product">strproduct</a> </body> </html>[/code] Javascript is not necessary on this issue. Hope it helps you... | |
Re: Hi itsjareds, You can expand this function to be able to work with your needs. [code=javascript]<html> <head> <title>Test Page</title> <script type="text/javascript"> <!-- var parseHTML; var root; var head; var body; var AJAXdummy; parseHTML = function( html ) { head = document.getElementsByTagName("head"); body = document.getElementsByTagName("body")[0]; root = document.createElement("div"); root.id = "newDiv"; … | |
Re: You'll need to specify both method's with your elements to make it work in IE and firefox. Here's a short example [code]//The getElementById Method handles all modern browser - // while the document.all goes with IE mode browser. var company = (( document.getElementById ) ? document.getElementById("company") : document.all["company"] ); Switch( … | |
Re: Hi there, the [icode]onClick[/icode] event, must be all in lowercase [icode]onclick[/icode]: [code]links[i].[b]onclick[/b] = "getPage('" + links[i].href + "');";[/code] | |
Re: Here's a simple Javascript demo that will display time and date, based on the local time in your system. [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="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" … | |
Re: Use the following method to refresh your page: [code]window.location.reload(); // Reloads' the page or. self.location.reload(); // Reloads' the page and brings back focus.[/code] just choose one... | |
Re: Try doing it this way: [code=javascrip]var isConstructor, myfunc; isConstructor = function() { myfunc = function() { alert("Hello World!"); }; return { myfunc : myfunc }; }(); window.onload = isConstructor.myfunc; [/code] | |
Re: Your problem goes with the [icode]getElementById[/icode] method, were it is only available for IE7+ browser. If you want to make it cross-platform, you'll need to provide separated statements that handles IE6-. Here's a short example: [code]var obj; if ( document.getElementById && !document.all ) { // Applies to all modern browsers. … | |
Re: Try the following format in your links': [code=html]<a target="iframeName" href="iframePage.html/#iframeName/yourDemoPage.html">DEMO</a>[/code] | |
Re: You can also try this demo. This layout is supported in all types of browser's. [code=html]<?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="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <title>Test Page</title> <style type="text/css"> /* <![CDATA[ … | |
Re: The best way to do it: [code]<html> <head> <title>Test Page</title> <script type="text/javascript">var myFunc = function() { alert("Hello World!"); }; window.onload = myFunc; </script> </head> <body> </body> </html>[/code] | |
Re: This will be alot more easier to solve, if you can provide the script that generates your preload function. | |
Re: CSS comes in 3 Levels and probably the best way to understand it is by taking some time on [url=http://www.w3.org/TR/CSS2/]this link[/url]. Hope it helps you... | |
Re: You've posted on the wrong side of the forum, this query belongs to the javascript section. But since i've intercepted, this thread, then let me provide you with some help. Let's just perform a basic routine of capturing which part of the option has selected state, using a native alert. … | |
Re: Use this method: [code]var _img = (( document.getElementById ) ? document.getElementById("yourImageId") : document.images["yourImageId"] ); var iWidth = (( _img.width !== 0 ) ? img.width : (( _img.clientWidth ) ? _img.clientWidth : _img.offsetWidth )); alert( iWidth ); // Do the same with the image height[/code] | |
Re: That would probably go best with [b]ssi[/b]. But you may also want to try using [b]AJAX[/b] to update portion of your page, and display needed information in a single [icode]<div>[/icode]. | |
Re: This is possible with cookie session. But im sure you won't prefer using cookie's for a simple function like this. | |
Re: I'm not sure if this is what you exactly needed, but maybe this will help... [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="X-UA-Compatible" content="IE=EmulateIE7" /> <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>Test Page</title> … | |
Re: You can try this code --> [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="X-UA-Compatible" content="IE=EmulateIE7" /> <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>Test Page</title> <style type="text/css"> /* <![CDATA[ */ html, body { background-color … | |
Re: You can easily solve this problem, if you fix [url=http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.peterpaulnavarro.blogspot.com%2F&profile=css21&usermedium=all&warning=1&lang=en]this line's[/url] in CSS. | |
Re: You can do this with AJAX. Do you need some demos? | |
Re: This [url=https://developer.mozilla.org/en/AJAX/Getting_Started]LINK[/url] will provide you brief information--on how to handle [icode]XMLHttpRequest[/icode] in Firefox browser. | |
Re: Prevent form processing, if the user failed to supply valid data in the UI field's. Here's one quick demo to get you started. [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="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Script-Type" … | |
Re: This demo will evaluate all non-valid entries in the field! [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="X-UA-Compatible" content="IE=EmulateIE7" /> <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>Test Page</title> <style type="text/css"> /* <![CDATA[ */ … | |
Re: You can also try this code. This demo will automatically inject vbscript in your document, if it detects IE browser's and the code output is also converted into vbscript: Tested in IE6 --> [code=javascript]<!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="X-UA-Compatible" content="IE=EmulateIE7"> <meta http-equiv="Content-Type" content="text/html; … | |
Re: It's either you create a function that will handle your specified URLs or you can just apply simple inline execution like this: [code]<a onclick="javascript: this.href = this.href.replace('ei', 'ie');" href="www.google.ei" >Changing URL with JavaScript!</a>[/code] | |
Re: Assuming you have this div in your page, initially set as [b]div1[/b] for its id. [code]<div id="div1">Link 1</div> <a href="javascript:void(0);" onclick="showPic('div1');">Hide Div</a>[/code] it seems that your created function is used for hiding images. Anyway you can easily create another function that will handle element's inside your page (showing/hiding). | |
Re: [code]var blurAll = function() { alert("all"); var win = window.open(" ").focus(); (( win.focus() && window.opener !== null ) ? win.blur() : win ); } window.onload = blurAll; // The body onload attribute, is deprecated, so you do this instead of assigning the onload event inside your <body> tag. [/code] your … | |
Re: you can manipulate form element's by simply icrementing it using the element propreties: [code]var chbVal = []; for ( var x = 0; x < form.elements.length; x++ ) { // checkbox ids can also be provided in replace of x varible. // But if you have no other elements in … | |
Re: It can be done using another window, but this more reliable than a pop-up! All codes is as follows: [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="X-UA-Compatible" content="IE=EmulateIE7" /> <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" … | |
Re: Hi av1, Here's how you can do it, using [icode]RegExp[/icode]. Try to input a single word in "[b]bu[/b]", [b]bug[/b], or any specific word containing ([b]bu[/b]) and it will search all the string's inside the div and output the closest match. [code=javascript]<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" … | |
Re: [icode]clientX[/icode] and [icode]clientY[/icode] is supported wel in IE mode browser's. You can use [icode]screenY[/icode] and [icode]screenX[/icode] in safari. | |
Re: Hi Nagekar, What sorts of validation do you need, asside from an alert box? And also the link that you have provided, does not exist... | |
Re: If you're referring about javascript and not JAVA. Then you can do the following format to achieved this issue. [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="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>Test Page</title> … | |
Re: Simply seperate this using .js and attach it to the page where you want your images to be preloaded. [code=javascript]/*********************************************** * Unobtrusive Image Preloader script - by essential * This notice MUST stay intact for use ***********************************************/ var preload, myImages; var img, iLen, x, y; var isImage = [ { … | |
Re: You can sanitize the field's using regular expression, which allow's you to specify pattern's that will validate's against field entries... | |
Re: Meaning, if i passed some entries on the field's present in the [b]leftFrame[/b] -- you want those data, to be reflected in the [b]rightFrame[/b] inside its [b]iframe[/b] which hold's another [b][icode]<form>[/icode][/b] element's? Am i getting it right? | |
Re: Hope this will help. This simple demo will display different product's and item's for every 5 sec. [code=javascript]<html> <head> <title>DEMO</title> <script type="text/javascript"> <!-- var myItems, rotator, rotate, counter = 0; var products = function ( ) { function rotator( rotateThis, delays ) { return setTimeout( rotateThis, delays ); }; rotate … | |
Re: Here's a little example, that allow's you to specify how many row's/cell's to be added and deleted. As long as the inputted value is lower than than the [b]rowIndex[/b] present in the table, then the value wil be incremented to add new row's / cell's. [code=javascript]<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html … | |
Re: Try this: [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="X-UA-Compatible" content="IE=EmulateIE7" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>JavaScript DEMO : Odd Numbers</title> <style type="text/css"> /* <![CDATA[ */ table { border : 1px … | |
Re: Here's a little demo about clearing the timer in the given funtion: [code=javascript]<!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="X-UA-Compatible" content="IE=EmulateIE7"> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE>Clear Interval DEMO</TITLE> <SCRIPT type="text/javascript"> <!-- var time, timer, counter; counter = 21; Function.prototype.count = function( DELAY ) { return … | |
Re: You will need to provide a counter which will trigger different events depending on the value. And here's a simple demo to get you started: [code=javascript]<!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="X-UA-Compatible" content="IE=EmulateIE7"> <META http-equiv="Content-Type" content="text/html; charset=utf-8"> <TITLE>Clear Interval DEMO</TITLE> <SCRIPT type="text/javascript"> <!-- var … | |
Re: I'm not sure if this is what you really need: [code]<html> <head> <title>Test Page</title> <script type="text/javascript"> <!-- function changeIt( imageName, objName ) { document.getElementById( objName ).innerHTML = '<img src="' + imageName + '" alt="image0" />'; window.open( imageName, target="_blank", "width=300,height=300"); } //--> </script> </head> <body> <a href="javascript:void(0);" onclick="changeIt('image1.gif', 'content');">one</a> </body> </html>[/code] … | |
Re: You can load different style sheet's for specific browser's by detecting it using the [b]navigator[/b] object. | |
Re: You can do this with AJAX. | |
Re: Yo can do it this way: [code]<div onclick="window.open('http://linky.com',target='_blank','width=800,height=600')">1</div>[/code] | |
Re: Nest your frames using this format, this the same as with my last posted code: [code]document.getElementById("frameA").document.getElementById("frameB").document.getElementById("frameC").style.backgroundColor = "black";[/code] |
The End.