JavaScript - Zlib De-compressing With Javascript
I receive an input stream which is compressed by ZLIB. I need to de-compress the same on the client side using JavaScript/Ajax/JQuery, etc.
Please help Similar TutorialsWhat is the best program or website for compressing Javascript? Optimally, I would like it to optimize variable and function names. I also have a tiny bit of PHP in the code, so it would be nice if it could recognize that but not a big deal if it can't. Thanks in advance for the suggestions! Hello! I am trying to find a script that allows you to open multiple browser tabs and then close each of those tabs, either one by one or all at once. Does anyone know how to do this please? Thanks so much for your help. I want to have another go at Javascript. I have several books on the subject but I find that my eyesight is a major problem. Therefore I want to try an on-line solution, preferably free. I have Googled, but there are so many that I am almost dizzy with the choices. Perhaps someone could recommend one. Not too fussy visually. My knowledge is VERY basic. Frank Does anyone know how to make URL links that use Javascript still work when users have Javascript disabled on their browser? The only reason I'm using JS on a URL is because my link opens a PDF file, and I'm forcing it not to cache so users have the latest version. I tried the <script><noscript> tags, but I'm not sure if I'm using it correctly, as my URL completely disappears. Below is my HTML/Javascript code: <p class="download"> <script type="text/javascript">document.write("<span style=\"text-decoration: underline;\"><a href=\"javascript:void(0);\" onclick=\"window.open( 'http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf?nocache='+ Math.floor( Math.random()*11 ) );\" >The Child Magazines Media Kit</a></span> (PDF 1 MB) ");</script> <noscript><span style="text-decoration: underline;"><a href="http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf" >The Child Magazines Media Kit</a></span> (PDF 1 MB)</noscript> </p> Thanks for any help, Michael Hi, I have the following code snippet: test.html ====== <script language="javascript" type="text/javascript"> var testVariable = "test"; </script> <script language="javascript" type="text/javascript" src="test.js"> </script> test.js ===== var testVariable = window.top.testVariable; In firefox, I'm able to access testvariable defined within test.html in test.js. But in chrome, test.js couldnot get the window.top.testVariable field defined in test.html. Can any one please let me know how i can make it work in chrome?. Am i missing something here?. Hi Guys, I am new at JavaScript and start to do some tutorials.What I am trying to do here is prompting user to input a name and if the name was valid the page(document) will display with all objects like the button.But if user enter a wrong name then the button will be disabled! I create the following code but it did not work <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>New Web Project</title> <script language="JavaScript" type=""> function changeColor(){ document.bgColor = "Gray"; } </script> </head> <body> <script language="JavaScript" type="text/javascript"> var person = ""; person = prompt('What is Your Name:'); if (person == "Foo") { document.write("<h1 />Welcome " + person); document.bgColor = "Yellow"; } else { document.write("<h1 />Access Denied!!!!"); document.bgColor = "Red"; document.getElementById("gree").disabled = true; } </script> <div> <p/><input id="gree" type="button" value="Gray " onClick="changeColor();"> </div> </body> </html> as you can see I used the: document.getElementById("gree").disabled = true; but it did not work , could you please give an idea how I can solve this problem? Thanks I got an index.php Code: <html> <form action="bacakomik.php" method='post'> <select name="kodekomik"> <option value='../komik1/|23'>Judul Komik1</option> <option value="../komik2/|20">Judul Komik2</option> <option value="../komik3/|10">Juduk Komik3</option> <option value="../komik4/|20">Judul Komik4</option> </select> <input type="submit" /> </form> <?php echo ('<select>'); echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); echo ('</select>'); ?> </html> As you can see, each of the option brings specific value "../komik1/|23" komik1 is a directory | is a delimiter 23 is the pages in one chapter and can be considered also as how many images are there on a specific directory This is my bacakomik.php Code: <?php $dirkomik = $_POST['kodekomik']; $exploded = explode("|", $dirkomik); echo ($exploded[0]); //picture directory echo ("<br>"); echo ($exploded[1]); //total page in the comic $pagecount = (int)$exploded[1]; //Take last posted value, process it right away echo ('<FORM name="guideform"> '); echo ('<select name="guidelinks">'); $i=1; do { echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); $i= $i+1; }while($i <= $pagecount); //Printing option and select echo ("</select>"); ?> <input type="button" name="go" value="Go!" onClick="document.getElementById('im').src=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value+'.png';"> </FORM> <img src="img0.jpg" id="im"> With the current code on bacakomik.php, I only can change the img src of id "im" in the same directory only. What I want is that the Javascript could "add" the "$exploded[0]" variable so that the picture can be loaded from different directory. Anyone can do this? I believe that the fix should be somewhere on input tag inside OnClick, or do you know where? Anyway, I found this on the net http://p2p.wrox.com/php-faqs/11606-q...avascript.html Please help me to those who can... I want to insert this js snippet Code: function addText(smiley) { document.getElementById('message').value += " " + smiley + " "; document.getElementById('message').focus(); return false; } to a loaded iframe with name&id chtifrm. I can access it & change embed something in its html via using something like: Code: $(parent.chtifrm.document.body).append('<div id=\"smly\" style=\"cursor:pointer;float:left;top:200px;display:none;position:absolute;\"><\/div>'); .... Code: parent.chtifrm.document.getElementById('chatbox_option_disco').style.display == 'none' but how do I insert js in the head of loaded iframe? Hey, I've got to make the values of some textboxes change the co-ordinates of my sprite on a canvas and havent a clue on how to do it, Here is my form with the two textboxes and submit button: <form> x: <input type="text" name="x" /><br /> y: <input type="text" name:"y" /><br /> <input type="submit" value="Submit"/><br /> </form> And i need it so that they change the values of these: //this shows where my sprite will start on the canvas var block_x; var block_y; searched the internet for hours and cant really find anything i understand or works. any help is much appreciated Hi Guys I am trying to modify the functionality of my page. I want to be able to activate this piece of code using another javascript function. This is the code I want to activate: Code: <script type="text/javascript"><!-- $('#button-cart').bind('click', function() { $.ajax({ url: 'index.php?route=checkout/cart/update', type: 'post', data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea, .date_data input[type=\'text\']'), dataType: 'json', success: function(json) { $('.success, .warning, .attention, information, .error').remove(); if (json['error']) { if (json['error']['warning']) { $('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.warning').fadeIn('slow'); } for (i in json['error']) { $('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>'); } } if (json['success']) { $('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>'); $('.success').fadeIn('slow'); $('#cart_total').html(json['total']); $('html, body').animate({ scrollTop: 0 }, 'slow'); } } }); }); //--></script> And this is how I want the format of the function to be: function testsession() { if there is a session called 'hiredate' { activate the script above } else { var el = document.getElementById("product_data"); } } I just dont know how to write this in javascript Could you help me if possible please All -- I have a JavaScript config file called gameSetting.js which contains a bunch of variables which configures a particular game. I also have a shared JavaScript library which uses the variables in gameSetting.js, which I include like so: <script type="text/javascript" src="gameSetting.js" ></script> <script type="text/javascript" src="gameLibrary.js" ></script> In gameSetting.js I have: $(document).ready(function() { // call some functions / classes in gameLibrary.js } in Firefox, Safari, and Chrome, this works fine. However, in IE, when it's parsing gameSetting.js, it complains that the functions that live in gameLibrary.js aren't defined. When it gets to parsing gameLibrary.js, the variables in gameSetting.js are reported as not being defined. I've tried dynamically bootstrapping the gameLibrary file using this function in document.ready for dynamic load... $.getScript("gameLibrary.js"); However, the same problem still happens in IE, where when it parses the files individually it's not taking into context the file/variables that came before, so it's not an out of load order problem. My options a 1) collapsing all the functions in gameLibrary.js and variables in gameSetting.js into one file. However, this is not practical because this is dealing with literally hundreds of games, and having a gameLibrary.js in ONE location for ONE update is what makes most logical sense. 2) figure out a way to get this to work where variables in file1 are accessible to file2 in IE (as it seems they are in other browsers). jQuery seems to be able to have multiple plugins that all refer to the based jQuery-1.3.2.js, so I know there is a way to get this to work. Help appreciated. Nero I wrote a log function that took note of various function calls. Thinking that functions are first class objects, and objects have properties, I made the name of each logged function a property of that function, e.g., brightenInnerPara.name = "brightenInnerPara"; Every browser I tried (Firefox, MSIE, Opera, Chrome, Safari) accepted the assignment, no problem. In Firefox and MSIE, the result was what I wanted: brightenInnerPara.name == "brightenInnerPara" But in the others, the result was: brightenInnerPara.name == null Question 1. Which Javascript is correct here? I favor Firefox and MSIE, not merely because they were willing to give me what I wanted, but also because it makes no sense to accept an assignment statement without throwing an error and then give it a null semantics, like Chrome, Opera, and Safari did. I found a workaround, using assignments like this: brightenInnerPara.prototype.name = "brightenInnerPara"; To my surprise, that worked in every browser. But I don't know why. It seems that such assignments are enough to cause each function to have its own distinct prototype. Question 2. Just how inefficient is my workaround, and why does it work? thanks for the help
I am having trouble modifying this to make the number of guesses limited to 5 and if guessed under 5 guesses prints pass otherwise prints failed. Thanks for the help. var mycolor = 'green'; var guess = ''; while (guess != mycolor){ guess = prompt("Guess my color:"); } println('You guessed it!'); I need some help with this Code. I can't seem to get it to go to the page I want it to. You can make a dummy page for example Page 1.html to see if it works for ya. Thanks Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org"> <title>Calculate Groom's Dowry</title> </head> <body> <center> <i><font size="6"><b>Groom's Dowry Rate Calculator*</b></font> </i> </center><br> <br> <br> <br> <i>*Dedicated to all the match making aunties of India</i> <center> <b>Groom's Age</b> </center> <form name="Age" id="Age"> <center> <select name="Groom’s Age"> <option value="a1"> Select </option> <option value="a2"> 23 </option> <option value="a3"> 24 </option> <option value="a4"> 25 </option> <option value="a5"> 26 </option> <option value="a6"> 27 </option> <option value="a7"> 28 </option> <option value="a8"> 29 </option> <option value="a9"> 30 </option> <option value="a10"> 31-35 </option> <option value="a11"> 36-40 </option> <option value="a12"> 41-45 </option> <option value="a13"> 46-50 </option> <option value="a14"> 51+ </option> </select> </center> </form><br> <b>Groom's Caste</b><br> <form name="Caste" id="Caste"> <select name="Groom’s Caste"> <option value="b1"> Select </option> <option value="b2"> Brahmin </option> <option value="b3"> Bania </option> <option value="b4"> Kayastha </option> <option value="b5"> Kshatriya </option> <option value="b6"> Dalit </option> <option value="b7"> Maravar </option> <option value="b8"> Mudaliar </option> <option value="b9"> Nair </option> <option value="b10"> Jat </option> <option value="b11"> Labanas </option> <option value="b12"> Rajput </option> </select> </form><b>Groom's current Profession</b> <form name="Profession" id="Profession"> <select name="Groom’s Profession"> <option value="c1"> Select </option> <option value="c2"> Doctor </option> <option value="c3"> Engineer </option> <option value="c4"> Lawyer </option> <option value="c5"> CA </option> <option value="c6"> IAS </option> <option value="c7"> Engineer + MBA </option> <option value="c8"> Family Business </option> <option value="c9"> None of the above </option> </select> </form><b>Groom's Degree at the Bachelor's Level</b> <form name="Bachelor" id="Bachelor"> <select name="Groom’s Bachelor"> <option value="d1"> Select </option> <option value="d2"> BTech/BE/BS </option> <option value="d3"> MBBS </option> <option value="d4"> BA </option> <option value="d5"> B.Com </option> <option value="d6"> B.Ed </option> <option value="d7"> Bsc </option> <option value="d8"> BBA </option> <option value="d9"> Diploma </option> <option value="d10"> Certification Course </option> </select> </form><b>Groom's Degree at the Master's Level</b> <form name="Master" id="Master"> <select name="Groom’s Master"> <option value="e1"> Select </option> <option value="e2"> MBA </option> <option value="e3"> MS </option> <option value="e4"> MTech </option> <option value="e5"> MPhil </option> <option value="e6"> M.Ed </option> <option value="e7"> MHA </option> <option value="e8"> No Master's degree </option> </select> </form><b>Groom's Degree at the Doctorate Level</b> <form name="Doc" id="Doc"> <select name="Groom’s Doc"> <option value="f1"> Select </option> <option value="f2"> Doctor of Philosophy (Phd) </option> <option value="f3"> Doctor of Medicine (MD) </option> <option value="f4"> No Doctorate Degree </option> </select> </form><b>The Groom is working in</b> <form name="Country" id="Country"> <select name="Groom’s Country"> <option value="g1"> Select </option> <option value="g2"> India </option> <option value="g3"> USA </option> <option value="g4"> Any European Country </option> <option value="g5"> Australia </option> <option value="g6"> Canada </option> <option value="g7"> Any Country more developed than India </option> <option value="g8"> Any Country less developed than India </option> </select> </form><b>Groom's Skin Color</b> <form name="Color" id="Color"> <select name="Groom’s Color"> <option value="h1"> Select </option> <option value="h2"> Fairy White </option> <option value="h3"> White </option> <option value="h4"> Wheatish (Almost White. Would need some Fair n Lovely) </option> <option value="h5"> Brown </option> <option value="h6"> Black </option> <option value="h7"> Pitch Black (Not visible on a moonless night) </option> </select> </form><b>Groom's Height</b> <form name="Height" id="Height"> <select name="Groom’s Height"> <option value="i1"> Select </option> <option value="i2"> Less than 5'4" </option> <option value="i3"> 5'5" </option> <option value="i4"> 5'6" </option> <option value="i5"> 5' 7" </option> <option value="i6"> 5'8" </option> <option value="i7"> 5'9" </option> <option value="i8"> 5' 10" </option> <option value="i9"> 5'11" </option> <option value="i10"> 6' </option> <option value="i11"> 6'1" </option> <option value="i12"> Greater than 6'1" </option> </select> </form><b>Number of times the Groom has married before</b> <form name="Marriage" id="Marriage"> <select name="Groom’s Marriage"> <option value="j1"> Select </option> <option value="j2"> 0 </option> <option value="j3"> 1 </option> <option value="j4"> 2 </option> <option value="j5"> More than 2 </option> </select> </form><b>What is Groom's father's profession</b> <form name="Father" id="Father"> <select name="Groom’s Father"> <option value="k1"> Select </option> <option value="k2"> Engineer </option> <option value="k3"> Doctor </option> <option value="k4"> IAS </option> <option value="k5"> Lawyer </option> <option value="k6"> CA </option> <option value="k7"> IAS </option> <option value="k8"> Engineer + MBA </option> <option value="k9"> Family Business </option> <option value="k10"> None of the above </option> </select> </form><script type="text/javascript"> function Selected_Age(Age) { var myindex = Age.selectedindex; var sel_groom_age = Age.options[myindex].text; return sel_groom_age; } </script> <script type="text/javascript"> function Selected_Caste(Caste) { var myindex_1 = Caste.selectedindex; var sel_groom_caste = Caste.options[myindex_1].text; return sel_groom_caste; } </script> <script type="text/javascript"> function Selected_profession(Profession) { var myindex_2 = Profession.selectedindex; var sel_groom_profession = Profession.options[myindex_2].text; return sel_groom_profession; } </script> <script type="text/javascript"> function Selected_Bachelor(Bachelor) { var myindex_3 = Bachelor.selectedindex; var sel_groom_bachelor = Bachelor.options[myindex_3].text; return sel_groom_bachelor; } </script> <script type="text/javascript"> function Selected_Master(Master) { var myindex_4 = Master.selectedindex; var sel_groom_master = Master.options[myindex_4].text; return sel_groom_master; } </script> <script type="text/javascript"> function Selected_Doc(Doc) { var myindex_5 = Doc.selectedindex; var sel_groom_doc = Doc.options[myindex_5].text; return sel_groom_doc; } </script> <script type="text/javascript"> function Selected_country(Country) { var myindex_6 = Country.selectedindex; var sel_groom_country = Country.options[myindex_6].text; return sel_groom_country; } </script> <script type="text/javascript"> function Selected_color(Color) { var myindex_7 = Color.selectedindex; var sel_groom_color = Color.options[myindex_7].text; return sel_groom_color; } </script> <script type="text/javascript"> function Selected_height(Height) { var myindex_8 = Height.selectedindex; var sel_groom_height = Height.options[myindex_8].text; return sel_groom_height; } </script> <script type="text/javascript"> function Selected_married(Marriage) { var myindex_9 = Marriage.selectedindex; var sel_groom_married = Marriage.options[myindex_9].text; return sel_groom_married; } </script> <script type="text/javascript"> function Selected_father(Father) { var myindex_10 = Father.selectedindex; var sel_groom_father = Father.options[myindex_10].text; return sel_groom_father; } </script> <script type="text/javascript"> var age; var sel_groom_age_1 = function Selected_Age(Age) switch(sel_groom_age_1) { case '23': age = 1.6; break; case '24': age = 1.8; break; case '25': age = 1.7; break; case '26': age = 1.8; break; case '27': age = 1.9; break; case '28': age = 1.75; break; case '29': age = 1.7; break; case '30': age = 1.4; break; case '31-35': age = 1.8; break; case '36-40': age = 1.9; break; case '41-45': age = 1.75; break; case '46-50': age = 1.7; break; case '51+': age = 1.4; break; default: alert ('Please select an option'); } </script> <script type="text/javascript"> var caste; var sel_groom_caste_1 = function Selected_Caste(Caste) switch(sel_groom_caste_1) { case 'Brahmin' : caste = 2.0; break; case 'Bania': caste = 1.8; break; case 'Kayastha' : caste = 1.6; break; case 'Kshatriya' : caste = 2.0; break; case 'Dalit': caste = 1.8; break; case 'Maravar' : caste = 1.6; break; case 'Mudaliar' : caste = 2.0; break; case 'Jat': caste = 1.8; break; case 'Labanas' : caste = 1.6; break; case 'Rajput' : caste = 1.6; break; default : alert ('Please select an option'); } </script> <script type="text/javascript"> var profession; var sel_groom_profession_1 = function Selected_Profession(Profession) switch(sel_groom_profession_1) { case 'Engineer': profession = 1.8; break; case 'Doctor': profession = 1.9; break; case 'Lawyer': profession = 1.65; break; case 'CA' : profession = 1.7; break; case 'IAS': profession = 2.0; break; case 'Family Business': profession = 1.5; break; case 'MBA + Engineer': profession = 1.95; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var bachelor; var sel_groom_bachelor_1 = function Selected_Bachelor(Bachelor) switch(sel_groom_bachelor_1) { case 'BTech/BE/BS': bachelor = 1.8; break; case 'MBBS': bachelor = 1.9; break; case 'BA' : bachelor = 1.1; break; case 'B.Com' : bachelor = 1.4; break; case 'BSc': bachelor = 1.9; break; case 'BBA' : bachelor = 1.1; break; case 'Diploma' : bachelor = 1.4; break; case 'Certification Course' : bachelor = 1.4; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var master; var sel_groom_master_1 = function Selected_Master(Master) switch(sel_groom_master_1) { case 'MS' : master = 1.9; break; case 'MBA' : master = 2.0; break; case 'MHA' : master = 1.4; break; case 'MTech' : master = 1.4; break; case 'M.Ed' : master = 1.4; break; case 'No Master’s degree' : master = 1.4; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var doc; var sel_groom_doc_1 = function Selected_Doctor(Doc) switch(sel_groom_doc_1) { case 'Doctor of Philosophy (Phd) ' : doc = 2.0; break; case 'Doctor of Medicine (MD)' : doc = 2.0; break; case 'No Doctorate degree' : doc = 1.4; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var country; var sel_groom_country_1 = function Selected_Country(Country) switch(sel_groom_country_1) { case 'India': country = 1.9; break; case 'USA' : country = 2.0; break; case 'Any European Country ': country = 1.7; break; case 'Australia ': country = 1.7; break; case 'Canada ': country = 1.7; break; case 'Any Country more developed than India ': country = 1.7; break; case 'Any Country less developed than India ': country = 1.2; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var color; var sel_groom_color_1 = function Selected_Color(Color) switch(sel_groom_color_1) { case 'Fairy White' : color = 1.9; break; case 'Black': color= 0.6; break; case 'Wheatish (Almost White. Would need some Fair n Lovely) ': color= 1.4; break; case 'Brown': color= 1.4; break; case 'White': color= 1.9; break; case 'Pitch Black (Not visible on a moonless night) ': color= 0.6; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var height; var sel_groom_height_1 = function Selected_Height(Height) switch(sel_groom_height_1) { case 'Less than 5'4"' : height = 0.6; break; case '5'4"' : height = 0.6; break; case '5'5"' :height = 0.8; break; case '5'6"' :height = 1.0; break; case '5'7"' :height = 1.4; break; case '5'8"' :height = 1.5; break; case '5'9"' :height = 1.6; break; case '5'10"' :height = 1.7; break; case '5'11"' :height = 1.8; break; case '6' :height = 1.85; break; case '6'1"' :height = 1.9; break; case 'Greater than 6'1"' :height = 1.8; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var marriage; var sel_groom_marriage_1 = function Selected_Marriage(Marriage) switch(sel_groom_marriage_1) { case '0': marriage = 1.8; break; case '1' :marriage = 0.7; break; case '2': marriage = 0.4; break; case 'More than 2' : marriage = 0.2; break; default:alert ('Please select an option'); } </script> <script type="text/javascript"> var father; var sel_groom_father_1 = function Selected_Father(Father) switch(sel_groom_father) { case 'Doctor': father= 1.8; break; case 'IAS': father = 2.0; break; case 'Engineer': father= 1.7; break; case 'Lawyer': father= 1.65; break; case 'CA': father= 1.8; break; case 'Engineer + MBA': father= 1.9; break; case 'Family Business': father= 1.2; break; default : alert ('Please select an option'); } </script> <script type="text/javascript"> var total = age + caste + bachelor + master + doc + color + profession + father + marriage + height + country; var pageNumber = Math.floor((20 - total) / 2 + 1); if (pageNumber == 1) { window.location="Page 1.html"; } else if (pageNumber == 2) { window.location="Page 2.html"; } else if (pageNumber == 3) { window.location="Page 3.html"; } else if (pageNumber == 4) { window.location="Page 4.html"; } else if (pageNumber == 5) { window.location="Page 5.html"; } else if (pageNumber == 6) { window.location="Page 6.html"; } else if (pageNumber == 7) { window.location="Page 7.html"; } else if (pageNumber == 8) { window.location="Page 8.html"; } else if (pageNumber == 9) { window.location="Page 9.html"; } else if (pageNumber == 10) { window.location="Page 10.html"; } else { window.location="Page 11.html"; } </script> <form> <input type="submit" value="Calculate"> </form> <br> <a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="Plebeian42">Tweet</a><script type="text/javascript" src= "http://platform.twitter.com/widgets.js"> </script><br> <div style="float: center; padding: 4px;"> <a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php" id= "fb_share">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"> </script> </div><br> <br> <iframe src= "http://www.facebook.com/plugins/like.php?href&layout=standard&show_faces=true&width=450&action=like&font&colorscheme=light&height=80" scrolling="no" frameborder="0" style= "border:none; overflow:hidden; width:450px; height:80px;" allowtransparency= "true"></iframe> <center> ©Creator Name </center><a rel="license" href= "http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src= "http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png"></a><br> This work is licensed under a <a rel="license" href= "http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License</a>. </body> </html> am using google.load("jquery", "1.6.2"); in my grower.js file. The following error is showing in IE8 'google is undefined' but its working fine in FF. please any one help me to how to overcome this error.
I have 3 items in menu. For example- Training qualification seminar If I click Training link,it should display the web page of Training in the same page itself,where this menu exist.If I click qualification link,the web page of qualification should be replaced in the same page. similarly for seminar link.Please help.... Hello I am trying to validate a web form. Someone else wrote the Html code and implemented it with an iframe using asp and php. I didn't want to mess too much with the code so I decided to use javascript to make the form validate, before it was sending email alerts with every field blank. For the most part the validation works but it skips the email field for some reasons and is really bugging me to death. I hope that there is someone that is more experienced in javascript than me to help me find the bug. this is the code: <head> <link type="text/css" rel="stylesheet" href="CSS/style.css"/> <title>Bid Form</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <script src="gen_validatorv4.js" type="text/javascript"></script> <script type="text/javascript"> function docload() { var frmvalidator = new Validator("bidrequest"); if(frmvalidator.addValidation) { frmvalidator.addValidation("CompanyName","req","Please enter the company Name"); frmvalidator.addValidation("CompanyName","maxlen=50","Max length for company name is 50 characters"); frmvalidator.addValidation("Contact","req","Please enter the contact name"); frmvalidator.addValidation("Contact","maxlen=30","Max length for contact name is 30 characters"); frmvalidator.addValidation("email","req","Please insert your E-mail"); frmvalidator.addValidation("Phone","req","Enter the phone number please"); frmvalidator.addValidation("Phone","maxlen=30","Max lenght is 30"); frmvalidator.addValidation("Phone","numeric","Only numbers please"); frmvalidator.addValidation("Fax","numeric","req","Enter the phone number please"); frmvalidator.addValidation("Address1","req","maxlen=100","Enter the address please"); frmvalidator.addValidation("Address2","maxlen=100"); frmvalidator.addValidation("Country","dontselect=000"); frmvalidator.addValidation("State","dontselect=000"); frmvalidator.addValidation("City","alpha","req","Please insert your City"); frmvalidator.addValidation("Zip","req","numeric"); frmvalidator.addValidation("SourceLanguage","req","Please insert the Source Language"); frmvalidator.addValidation("TargetLanguage","req","Please insert the Target Language"); /*var chktestValidator = new Validator("bidrequest"); chktestValidator.EnableOnPageErrorDisplaySingleBox(); chktestValidator.EnableMsgsTogether(); chktestValidator.addValidation("NewProject","selectradio","Is this a new project? Plese select the one'"); chktestValidator.addValidation("Revision","selectradio","Is this a Revsion? Plese select the one'"); chktestValidator.addValidation("Glossary","selectradio","Any Glossary Development? Please select one'");*/ } } </script> </head> I found the gen_validatorv4.js file online. One more thing, if I un-commnet the radio buttons validations the whole validation stop working...weird. I appreciate any help. Best, Manu Hi everyone, can someone please help me to find a way to rewrite this code function evenorodd( form ) { var x = new Number( form.x.value ); if( isNaN( x ) || x == "" ) { alert( "Not a number or no value entered" ); return ""; } for( var i = 0; i <= x; i++ ) ( i % 2 == 0 ) ? alert( i + " is even!" ) : alert( i + " is odd!" ); } the purpose is to show an alert box with a odd or even number Thanks in advanced! I am trying to create an informational alcohol website and in order for it to be suitable I need visitors to enter their birthdate to verify that they are of age. I have got that figured out and it works great. Here is what I am trying to do now. When someone types the home address it goes to the verify page but how can I get it to go there when they are trying to get to another page. An examle: www.donjulio.com. Goes to the verify page fine. www.donjulio.com/blanco.aspx. This doesnt go to the product page it goes back to the verify page. HOW? Also when they get to the verify page, whats a script where I can get the site to remember their information if they click a remember me button. Any help is appreciated. I have been tryin to research this for awhile now and cant seem to find anything. |