Why wont return false disable enter? - JavaScript Help


I am trying to disable the user from being able to go to a new line in my text area. Why doesn't return false work

if (is_key(event, 13) && (with_field.value.length > 1)){ var search_list_ele_array = new Array(); var search_list_ele_array = document.getElementById('with_auto').getElementsByTagName('li'); for (j=0; j
Posted On: Wednesday 2nd of January 2013 12:11:28 AM Total Views:  105
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Javascript table issues

I am trying to create a javascript table using the numbers 5-15 that squares and then cubes a number in a row. My result should look like this 5 25 125 6 36 216 7 49 343 8 64 512 9 81 729 10 100 1000 11 121 1331 goes all the way to 15 Here is what I have so far // alert("Table of Squares and Cubes from 5-15"); document.write(''); //loop for rows for (j=5;j
VIEWS ON THIS POST

83

Posted on:

Wednesday 21st November 2012
View Replies!

popMenu & hideActive help

tempest.htm The Tempest if (document.images) { var ImgOver=new Array(); ImgOver[0]=new Image(); ImgOver[1]=new Image(); ImgOver[2]=new Image(); ImgOver[3]=new Image(); ImgOver[4]=new Image(); ImgOver[0].src="plays_over.jpg"; ImgOver[1].src="son_over.jpg"; ImgOver[2].src="bio_over.jpg"; ImgOver[3].src="globe_over.jpg"; ImgOver[4].src="strat_over.jpg"; var ImgOut=new Array(); ImgOut[0]=new Image(); ImgOut[1]=new Image(); ImgOut[2]=new Image(); ImgOut[3]=new Image(); ImgOut[4]=new Image(); ImgOut[0].src="plays_out.jpg"; ImgOut[1].src="son_out.jpg"; ImgOut[2].src="bio_out.jpg"; ImgOut[3].src="globe_out.jpg"; ImgOut[4].src="strat_out.jpg"; } function RollOver(i) { if (document.images) document.images[i].src=ImgOver[i].src; } function RollOut(i) { if (document.images) document.images[i].src=ImgOut[i].src; } var ActiveMenu=""; function HideMenu() { if (ActiveMenu!=="") { hideIt(ActiveMenu); ActiveMenu=""; } } function TransMenu(M) { var menuobject=eval(M); menuobject.style.filter="revealTrans(duration=5, transition=6)"; menuobject.filters[0].apply(); showIt(M); menuobject.filters[0].play(); } function PopMenu(M) { HideMenu(); if () TransMenu(M); else if () showIt(M); ActiveMenu=M; } Act i, scene i Act i, scene ii Act ii, scene i Act ii, scene ii Act iii, scene i Act iii, scene ii Act iii, scene iii Act iv, scene i Act v, scene i Alonso Sebastian Prospero Antonio Ferdinand Gonzalo Caliban Trinculo Stephano Miranda Ariel Others The Tempest combines elements of tragedy and romantic comedy, while posing deeper questions regarding life and art and loyalty that are not completely resolved at the end. Usually classified as a romance, The Tempest is marked by the inclusion of these tragic, comic, and problematical ingredients and further marked by a happy ending in which all, or most, of the characters are brought into harmony. The central character of the work is Prospero, an outcast magician who acts as Shakespeare's avatar, commenting on the actions of the players, and the art of creative expression. In his words, we hear Shakespeare reflecting upon his art as his own career as an artist draws to a close. Written in 1610, The Tempest is generally agreed to be Shakespeare's last stage piece (though he may have helped in the writing of The Two Noble Kinsman a decade later). scripts.js function hideIt(object) { object.style.visibility="hidden"; } function showIt(object) { object.style.visibility="visible"; } I can't get my menus to cooperate with me. The popMenu first wouldn't show at all, then it wouldn't hide for me, and now the code isn't wanting to work at all. Please someone look over it and maybe I just have a type-o somewhere.
VIEWS ON THIS POST

181

Posted on:

Thursday 22nd November 2012
View Replies!

Validate input base on css class

Everyone, Can you please give me some advise on how to validate input or select based on the class used For example: Then for the validation: if input class = "alphanumeric" if !isAlphaNumeric(input.value) alert(Enter valid value);input.focus Before, I used onblur on the input to call the validator but it keeps prompting when I tried to out focus the input and I need to refresh the page. Looking forward to your replies.
VIEWS ON THIS POST

104

Posted on:

Saturday 24th November 2012
View Replies!

JQuery & Forms - Add new form options

I google'd myself silly, I can't find tutorials for this. I hope someone could lend me a hand. I'll try to make this simple. I have a PHP & MySQL driven site. I have a form for adding new content. The form has a set of check box options that are pulled from MySQL. At the bottom of the check boxes there is an "Add New" input field which I want to be used to add new check box options right above it. database table options id int 255 auto increment primary key name varchar 255 index.php [...New options here...] [...the rest of the form...] So as I understand how this should work, when I click in the 'add new' text field, type something in, then press enter - the value of the add new field should be sent to a php script, addnew_backend.php. The form itself should not submit it's data. The PHP script will add the new value to the mysql table of options, and if successful, returns the newley generated checkbox which should fade in right above the add new text field into div#newoptions. addnew_backend.php
VIEWS ON THIS POST

93

Posted on:

Saturday 24th November 2012
View Replies!

Scrollbar help?

I need serious help with Scrollbars. how can i position them so they go exactly where i need them. say on a picture i need it in the circle area how can i get it there and what do i need to do Could somebody point me in the right direction or towards a tutorial
VIEWS ON THIS POST

185

Posted on:

Saturday 24th November 2012
View Replies!

Need help with submit button

Please read the Terms & Conditions. If you accept the Terms, simply click below to connect. Six Continents Hotels, Inc. Terms of Use of Internet TERMS, CONDITIONS AND NOTICES USE OF THE SERVICE AND ACCESS TO THE WEB SITE The Service ..... You agree ..... Please accept the Terms & Conditions and check the access code. I accept the Terms & Conditions.
VIEWS ON THIS POST

99

Posted on:

Saturday 24th November 2012
View Replies!

JavaScript Control of Form Inputs

Hi again I have an HTML form with three groups of inputs. These inputs are all text. Group 1 has 1 input, group 2 has one input, and group 3 has 3 inputs. What I would like to do is this... If a user inputs any data into a particular group input, then entry to the other 2 groups will be blocked. I'm assuming that this can be accomplished with JavaScript
VIEWS ON THIS POST

43

Posted on:

Saturday 24th November 2012
View Replies!

Can't change CSS style for "onClick" text?

Greetings. I am using this code for a photo gallery. With an onclick statement like this: Link It totally works but I would like to have the "Link" when clicked change from the style designated in the tag below: To another CSS style .style 2 I am stuck on how to get this to work. I have tried many things with no luck. Do I need another function or could it be added to my gallery script
VIEWS ON THIS POST

75

Posted on:

Saturday 24th November 2012
View Replies!

HTML Drop-Down Menus

I'm looking to create a drop-down menu with rather long option titles. The problem is that I want to restrict the boxes size otherwise the size changes to the length of the longest entry. When I use the length attribute, it forces the drop-down to be a certain length, but it also cuts the sentences in half when I drop the options due to the option box being the same length as what I set the drop-down menu's length to be. Is there any way to set the drop-down menu's size, but have a different size on the option menu that is displayed when the drop-down menu is clicked
VIEWS ON THIS POST

45

Posted on:

Saturday 24th November 2012
View Replies!

sharing database variables with ajax

. I have a basic php page which displays rows of a mysql db, and when clicking on them will use ajax to display the remaining data. What I would like to do is pass the primary key from the row to the ajax function/php page, but I am usnure how to do this. The id is called article_no but is not selected as part of the query in the first page. This is my code: Ebay Auctions I am really quite stuck with this very simple thing, and would appreciate any help while I am trying to learn AJAX. many
VIEWS ON THIS POST

130

Posted on:

Saturday 24th November 2012
View Replies!

switch type menu

Hi , I need help in switch type menu. I have a code for switch type menu (when u click on link sub links will come), but same effect i need on mouse over its self (without clickng i need this effect). Plzzzzzzzzzzzzzzzzzzz, , thanq. Its working fine...
VIEWS ON THIS POST

78

Posted on:

Saturday 24th November 2012
View Replies!

Forcing Flash to Show below Javascript Hover Div

I have a website SNIP The website allows the customer to upload affilliate banners, the affilliate code is normally a js file piece of code which the client adds to the website, the client cannot modify that piece of code as the .js file sits on the affiliate companies website. The problem is that the .js file sometime contains .swf advertisements, on the website im implementing a hover over script which always seems to show below the flash file affilliate. I know the reason for this is the .js file wiith the affiliate code for a swf file does not have the wmode=transparent piece of code. is it possible to modify the code in the js file on the fly and add the wmode=transparent piece of code or is there a way to show the hover over feature on the website above the .swf affilliate please see picture of problem: http://i33.tinypic.com/1zya72x.jpg
VIEWS ON THIS POST

32

Posted on:

Saturday 24th November 2012
View Replies!

Easy? Image in Form content?

Hi Im trying to place images in this change content script but it refuses to co-operate. Is there some way to do it What is JavaScript Why learn JavaScript The difference between Java and JavaScript What is DHTML This free script provided by JavaScript Kit /* Drop down messages script By JavaScript Kit (http://javascriptkit.com) Over 400+ free scripts here! */ //change contents of message box, where the first one corresponds with the first drop down box, second with second box etc var thecontents=new Array() thecontents[0]='JavaScript is a scripting language developed by Netscape to add interactivity and power to web documents. Examples of JavaScript include live clocks, rollover effects, ' thecontents[1]='The first few words that come to mind are: "Freedom baby, freedom!" With html, you are restricted to creating static, non interactive webpages. This, in today\'s internet standards, is unacceptable. With JavaScript, you can change that. Imagine being able to break free and allow your creativity to dictate what you put on your webpage, instead of the other way round.' thecontents[2]='Java is completely different from JavaScript-It\'s a lot more powerful, more complex, and unfortunately, a lot harder to master. It belongs in the same league as C, C++, and other more complex languages. Also, you need to compile a Java program before you can run it, whereas with JavaScript, no compilation is needed-simply open up a text editor, type it, save it, and your browser is ready to run it!' thecontents[3]='DHTML, or Dynamic HTML, is a new web technology that enables elements inside your web page to be, well, dynamic. Things once considered unchangeable once the page has loaded, such as text, page styles (font color, size etc), element position, etc, can now all be changed dynamically, thanks to DHTML. It brings your web pages one step closer to how things look inside your television, where images appear and disappear, text flies in and out, and content move around freely inside the screen.' //don't edit pass this line function changecontent(which){ document.ddmessage.contentbox.value=thecontents[which.selectedIndex] } document.ddmessage.contentbox.value=thecontents[document.ddmessage.selectbox.selectedIndex]
VIEWS ON THIS POST

41

Posted on:

Sunday 25th November 2012
View Replies!

Firefox vs. IE-menu not working please help

; I hope an experienced person can help me. Our site: attotech.com has a top menu that currently works in Internet Explorer but does not in Firefox. I have used HTML Tidy for my index page and now it looks ok in Firefox but not IE. I have reverted back to the original index which works in IE. I have three CSS files, one Javascript and the index page. I am a bit new at this and really need someone to take a peek at the files and please tell me where the code needs to be modified so it will work in IE and Firefox. I am hoping a "guru" can share their wisdom and help me get this menu functioning. I have attached the files in Word because of the restrictions. The link to our site, attotech.com has the index page that is rendering correctly in IE but not Firefox. I really appreciate any and all help.. I great
VIEWS ON THIS POST

227

Posted on:

Sunday 25th November 2012
View Replies!

Ajax link, calls in form, forms doesnt submit?

Hi all, This is a about Ajax, PHP and form processing. When I submit the form further below, nothing happens! I didnt set the form-"action" to anything. I left it out, to make the form submit to the same page, so I can validate on the same page too (Which is not made yet, as youll see..) The form does work fine when I used in a "normal php script", but when I include it using Ajax, the form doesnt submit after it has been sent to the page. Anyone knows what is going on, and what I can do to make it work I guess it must be the action attribute of the form which is wrong, but I dont understand that since i made the form submit to itself, by leaving out the action attribute entirely. I have two links on a page, which calls a javascript function, opening a xmlhttprequest: I have only shown one of the forms, as they are almost similar, but there are two forms, in the real page, which displays depending on the link selected. 1) Opret Annonce For Jagt I Danmark 2) Opret Annonce For Jagt I Udlandet It calls this script: function makeRequestObject(){ var xmlhttp=false; try { xmlhttp = new ActiveXObject('Msxm12.XMLHTTP'); } catch (e) { try { xmlhttp = new ActiveXObejct('Microsoft.XMLHTTP'); } catch (E) { xmlhttp = false; } } if(!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp = new XMLHttpRequest (); } return xmlhttp; } function vis_jagt_annonce_form(region) { var xmlhttp=makeRequestObject(); var file = 'ajax/jagt_annonce_form.phpregion='; xmlhttp.open('GET', file+region, true); xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState==4) { document.getElementById('dansk_annonce').innerHTML = xmlhttp.responseText; } } xmlhttp.send(null); return; } Then opening the PHP script, which checks to see which form to send back to the page for display: This is rather long, but really simple - its just the table layout that makes it a mile, sorry for that :-/ $annonce_type = $_GET['region']; if($annonce_type == 'danmark') // S vises formen til oprettelse af dansk jagt annonce { if(isset($_POST['opret_annonce_dk'])){ // Hent data via post: $region = mysqli_real_escape_string($connection, $_POST['region']); $postnr = mysqli_real_escape_string($connection, $_POST['postnr']); $by = mysqli_real_escape_string($connection, $_POST['by']); $strrelse = mysqli_real_escape_string($connection, $_POST['strrelse']); $strrelse_vrdi = mysqli_real_escape_string($connection, $_POST['strrelse_vrdi']); $pris = mysqli_real_escape_string($connection, $_POST['pris']); $jagthytte = mysqli_real_escape_string($connection, $_POST['jagthytte']); $vildt = mysqli_real_escape_string($connection, $_POST['vildt']); $vandhul = mysqli_real_escape_string($connection, $_POST['vandhul']); $telefon = mysqli_real_escape_string($connection, $_POST['telefon']); $email = mysqli_real_escape_string($connection, $_POST['email']); $beskrivelse = mysqli_real_escape_string($connection, $_POST['beskrivelse']); // Validate data her: // Indst annoncen databasen: $sql = "INSERT INTO jagt (region, postnr, city, strrelse, pris, jagthytte, vildt, vandhuller, img1, img2, img3, tlf, email, beskrivelse) VALUES ('$region', '$postnr', '$by', CONCAT('$strrelse $strrelse_vrdi'), '$pris', '$jagthytte', '$vildt', '$vandhul', 'styles/test-img1.gif', 'styles/test-img2.gif', 'styles/test-img3.gif', '$telefon', '$email', '$beskrivelse')"; $result = mysqli_query($connection, $sql); // Hvis formen er indsendt og alle data er valideret: if($result) { echo $annonce_oprettet = 'Mange tak for at du har oprettet en annonce p jagt-leje.dk! Vi nsker dig det bedste held og lykke med at f udlejet jagten hurtigst muligt! Husk, at hvis der er noget der skal laves om eller et billede der skal skiftes ud, s kan du altid logge ind p din profil og foretage ndringerne! Med Venlig Hilsen jagt-leje.dk'; } } if(empty($annonce_oprettet)){ echo ' Skal Udfyldes * Region: * Postnummer: * By: * Jylland Sjlland Fyn Strrelse: * Pris: * Tnder land Hektarer Km2 Ekstra Information Jagthytte: Vandhuller:  Ja       Nej  0     1     2+ Billede 1: "Husk at med billeder fr en mulig lejer den bedste mulighed for at f et godt indtryk af jagt-annoncen! Billede 2: Derudover bliver ekstra information vist i annnocen allerede nr der er valgt en region! Billede 3: Det vil sige at jo mere der udfyldes, jo bedre indtryk fr en mulig lejer nr han/hun bladrer igennem alle annoncerne!" Skal Udfyldes * Beskrivelse: * '; } } Anyone :-)
VIEWS ON THIS POST

100

Posted on:

Sunday 25th November 2012
View Replies!

need ajax help

, I have a button that counts the number of clicks. when it is clicked, number goes up, and the image disappears. but I want it to show the image again when it is clicked, but can't be clicked after the first time is clicked. I already have this script but I tried adding some codes in but doesn't work. I was wondering if someone can help me out Thank you $(function(){ $("a.product_ratings").click(function(){ //get the id the_id = $(this).attr('id'); thumbsUp = $(this).attr('id'); // show the spinner $(this).parent().html(""); //show the thumbsup $(this).parent().html(""); //fadeout the vote-count $("span#votes_count"+the_id).fadeOut("fast"); //the main ajax request $.ajax({ type: "POST", data: "action=product_ratings&id="+$(this).attr("id"), url: "votes2.php", success: function(msg) { $("span#votes_count"+the_id).html(msg); //fadein the vote count $("span#votes_count"+the_id).fadeIn(); //remove the spinner $("span#vote_buttons"+the_id).remove(); //fadein the thumbsup $("span#votes_count"+thumbsUp).fadeIn(); } }); });
VIEWS ON THIS POST

164

Posted on:

Sunday 25th November 2012
View Replies!

Simple errors in code for font details

I'm having some trouble with some code, I found a script that makes a countdown then sends you to another page, I like the script a lot, I tried editing it to change its look, in this case its font, does this look right to you, I notice its colour is black and not white, can you see errors there at the top in defining its font
VIEWS ON THIS POST

80

Posted on:

Sunday 25th November 2012
View Replies!

dynamically POSTing diffrent form values using javascript

I am making a small image annotation tool for research purpose. I have many images shown to a and the person has to click on the image to enter further information about the image. I would like to POST information about the which is same for all images and also some fields containing the image information to php page containing next level of processing (the page is again same for all image and takes the user and image information as POSTed information). So I was wondering if there could be a javascript function which i can put like onclick=submitform(imgname, imgA etc.) which submits a FORM with user information (same for all images hence not passed) and image information (strings containing info abt the images e.g. name, quality rating etc.) fields to another php page. I could put forms for each image but I am dealing with hundreds of images here. I hope I am clear in my question. Thank you for reading and
VIEWS ON THIS POST

105

Posted on:

Sunday 25th November 2012
View Replies!

Need some help with code

I am trying to create a personality test using javascript and I need help writing a javascript that calculates 4 columns of 12 rows. Each column will have it own total. So column 1 = total 1, column 2 = total 2 and so on. What I would like to do with the totals of each column is: 1st check to see if the sum of all columns equals 120. If not I would need some kind of error message. Secondly, I would like to have an option to email just the totals of each column to me. I have included what I have so far. Any help on this would be greatly appreciated. Disc Profile Instructions: Rank each horizontal row of words as either 4, 3, 2, or 1, with 4 being the word that best describes you and 1 being the least like you. Do not search for what you think is the best response. There are no right or wrong answers. Use all rankings in each line only once. The first row is an example. Dominant Influencing Steadfast Conscientious Forceful Lively Modest Tactful Aggressive Emotional Accommodating Consistant Direct Animated Agreeable Accurate Tough People-oriented Gentle Perfectionist Daring Impulsive Kind Cautious Competitve Expressive Supportive Precise Risk-taker Talkative Relaxed Factual Argumentative Fun-loving Patient Logical Bold Spontaneous Stable Organized Take Charge Optimistic Peaceful Conscientious Candid Cheerful Loyal Serious Independent Enthusiastic Good Listener High Standards D = I = S = C = Your Name: *Required Your Email: *Required  
VIEWS ON THIS POST

88

Posted on:

Sunday 25th November 2012
View Replies!

Whether it is possible to find the response url in?

I have a problem as following... # I have stored some value in session to reach a Page "A" # I have other pages "B", "C", "D". # If I am moving from Page "A" to "B", I should not clear my session value but If I am moving from "A" to "C" or "A" to "D", then I have clear some values in session. # I have clear it on body unload of "A" on condition. Is there any way to find the URL which I am landing via javascript Is there any other way or work around to solve this problem. Note: I have menu in my left frame and content in right frame. my links to move from "A" to "B", "C" and "D" are in menu.
VIEWS ON THIS POST

376

Posted on:

Sunday 25th November 2012
View Replies!

New Language combines: Asynchronous JavaScript+CSS+DOM+XMLHttpRequest

A9 Search Engine and Google are using what is becoming a new Language that combines several elements in a unique interactive way This is the newest evolution above DHTML Asynchronous JavaScript+CSS+DOM+XMLHttpRequest
VIEWS ON THIS POST

76

Posted on:

Sunday 25th November 2012
View Replies!

Different timezone conversions

I've noticed this type of question several times, but have yet to see a simplified solution... The question is usually about a radio station somewhere that specifies hours of operation. They want to let the visitor know if a particular program is currently playing or how long until it does come on. The visitor may be in a different time zone. I would think that as the programmer, I could determine the TimezoneOffset from UTC for my station location. I would think that as the user, my local time would have a different TimezoneOffset from UTC, unless I happened to be in the same time zone as the station. I would think I could somehow use this information in a script to determine when a program was or will be playing on a station if I am located in a different time zone. The confusing part for me starts when I try to see if daylight savings is a factor in the caluclations. Is there some sort of simplified function that would solve this problem This post has been edited by JMRKER: 29 April 2012 - 04:10 PM
VIEWS ON THIS POST

63

Posted on:

Monday 26th November 2012
View Replies!

Is that any maximum function on javascript?

hi, I have a problem with my javascript function.. this the code document.documentElement.className += " js"; $(document).ready(function(){ var tabs = $("#tabs1").accessibleTabs({ tabhead:'h2', fx:"fadeIn", syncheights:true }); $.get('ajax/high-score.php',{ id_topik: },function(data){ $('#highScore').html(data); }); }); ddsmoothmenu.init({ mainmenuid: "smoothmenu2", //Menu DIV id orientation: 'v', //Horizontal or vertical menu: Set to "h" or "v" classname: 'ddsmoothmenu-v', //class added to menu's outer DIV //customtheme: ["#804000", "#482400"], contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"] }); function commentPost_1(){ var comment=window.document.getElementById("txtComment").value; comment = comment.replace(/\n/g,""); comment = comment.replace("'","*"); comment = comment.replace('"','#'); if(comment!=""){ $.get('ajax/comment.php',{ username:'',email:($('#txtEmailComment').val()),comment:comment,id_topik:,author:'' },function(data){ $('#commentPost').html(data); }); } window.document.getElementById("txtComment").value=""; } function commentPost_2(){ alert('aaa'); } function deletePost(id_komentar){ if (confirm("Apakah Anda yakin untuk komentar ini")) { $.get('ajax/comment-delete.php',{ id_komentar:id_komentar,id_topik:,author:'' },function(data){ $('#commentPost').html(data); }); } } #Wrapper,#Container,#foorarea{ width:px; } Baca Topik - Kategori: Keywords: Author: Add New Comment
VIEWS ON THIS POST

75

Posted on:

Monday 26th November 2012
View Replies!

Need help with AJAX

I'm trying to do some code from class where the code pulls information from an Rss live feed and gives weather information. I know how to do that with a web service as you'll see in the code, but I have no idea where I should start in making it so that Ajax does all the work. Please put me on the right track. Montgomery Weather Report   var xmlHttpAjaxResponse = document.getElementById("xmlHttpResponse_Holder").innerHTML; function loadXmlHttpResponse() { document.getElementById("abs").innerHTML = xmlHttpAjaxResponse; } function getupdatedXmlHttpRequest() { location.reload(true); }
VIEWS ON THIS POST

98

Posted on:

Monday 26th November 2012
View Replies!

IRCBot Javascript

okay, here is the source code http://userscripts.o...ts/review/64978 The question is, under this code // -- Place Commands here -- // // if you want to do something when !example is scanned, name your function command['example'] // the first argument of the function is the text after the action, the second is the nickname of the user that called the command It is possible to create a command code that works like this QuoteUser A:!choose A B Bot: You may choose A
VIEWS ON THIS POST

55

Posted on:

Monday 26th November 2012
View Replies!

conversion of meters to centimeters using java

conversion of meters to centimeters using java
VIEWS ON THIS POST

89

Posted on:

Monday 26th November 2012
View Replies!

Java think dont work in IE

Hi. I am trying to develop a small webshop for some and I tought it was working very well until I accidentally tested it in IE (works fine in Chrome and Firefox). When someone clicks the "add to basket" there is an On-Click that triggers a function. That function sends the session ID and the product ID to a seperate file (.asp) that adds the values to a temporary table. Then the the function is supposed to fetch and summarize the basket content and update it in the browser. This works fine everywhere except in IE. Any ideas Here is some of the code: Legg til i handlekurv function AddToBasket(TmpVid,TmpLoggID) { $.ajax({ type:"POST", url: "/common/post_AddToBasket.asp", dataType: "application/x-www-form-urlencoded", data: "vid="+ TmpVid + "&sid=" + TmpLoggID, async: true }) setTimeout("$('#prebasket').load('/common/ajax_prebasket.aspsid=' + 897 + '&lang=no');", 350); }; Here is the link to where you can test it: http://hbs-product.com/no/m=p&i=5 (just don't go all the way to check-out to avoid ordering something) The "Add to Basket" is the gray box with the norwegian text "Legg til i...", the basket is on the right sidebar. I'm not really any good with java, but at least I got it working in some browsers.
VIEWS ON THIS POST

151

Posted on:

Monday 26th November 2012
View Replies!

Upload Button

Guys, I have an upload button (ajax) that allows users to upload multiple files to a temp directory. I am trying to figure out a way to have php/ajax count the amount of files and when it reaches say 5 images that the upload button disappears. I do not have a problem counting the files with PHP or counting it in the session. I can also do an if statement to hide the file upload button but I would have to refresh the page for that to work.. I was hoping you would give me some direction on this issue.. Here is how I am counting the files $subn = $_SESSION['fname'] . $_SESSION['lname'] ; $files = glob("temp_photo/$subn*.*"); $count = count($files); echo $count;
VIEWS ON THIS POST

69

Posted on:

Monday 26th November 2012
View Replies!

i want to learn javascript

i want to learn javascript, can anyone suggest me a book
VIEWS ON THIS POST

112

Posted on:

Monday 26th November 2012
View Replies!

DOM Node Manipulation

I've come across a bit of a conundrum. Firefox handles DOM manipulation based on the standard which (would'a'thunk-it) works. However, Internet Explorer does not. So here's the situation. I've got a select box and a remove button which, in Firefox, works as advertised, ie., removes the selected element from the list box and destroys the parent if the container optgroup becomes empty using the removeChild() method. Internet Exploer does not like this method for some reason so I must use the removeNode() method. This is all well and good except for the fact that when using removeNode() you may only remove thefirst child element. For example: Select Box: OptGroup 1: Option 1
VIEWS ON THIS POST

35

Posted on:

Tuesday 27th November 2012
View Replies!

Google PieChart - JavaScript Help

Im trying to create a pie chart on the fly with data retrieved from a xls spreadsheet. The spread sheet data I have pulling and forming inside of a JSON string currently and that works fine. My issue is somewhere with attempting to dynamicly form the data for the piechart to draw with. If I add the data staticly it works fine, if I do it through the loop I will show below it fails.. data.addColumn('string', 'Name'); data.addColumn('number', 'Count'); var myRows = '' for(x=0;x
VIEWS ON THIS POST

67

Posted on:

Tuesday 27th November 2012
View Replies!

appendChild not working in IE6 and IE7 - JavaScript Help

The following code is being used to add a div to the parent page from within an iframe and is working in Firefox, Chrome and Opera but not in IE6 or IE7 (the other IEs haven't been tested yet):parent.window.document.body.appendChild(newDiv);Can anyone suggest what the problem might be and whether there's a way round it
VIEWS ON THIS POST

61

Posted on:

Tuesday 27th November 2012
View Replies!

how to detect spams

, i was developing a blog and I came across may site have recaptures to prevent spams. but my opinion is using recaptures will avoid the number of users put comments in the site as an example you can consider myself that doesn't like that feature. problem is how to detect the spams Is there any mechanism to detect, if so I want to set it to my site. i think you can understand me. thx in advance, meunka
VIEWS ON THIS POST

73

Posted on:

Thursday 29th November 2012
View Replies!

ANNOUNCE: IE6 on Vista with IETester

I have just released IETester 0.1.2 which is a free web browser that embeds IE6 and IE5.5 and that works under Vista and XP. You can download it here : http://www.my-debugbar.com/wiki/IETester/HomePage Using IETester, it is possible to test web ...
VIEWS ON THIS POST

84

Posted on:

Friday 30th November 2012
View Replies!

Help! Going mad!

I'm a complete newbie to javascript. I downloaded the script http://javascript.internet.com/math-...d/calculate.js to use in a seminar registration form. It works fine in IE7, but in FF nothing happens. When I look at the error console it gives the error: ...
VIEWS ON THIS POST

84

Posted on:

Friday 30th November 2012
View Replies!

Prevent remembering scrollLeft after page reload

I have a div in which I set scrollLeft on click event. The problem is browser in some way remebers its value after page reloading (pressing F5). Is there any way to prevent it code:
...

VIEWS ON THIS POST

102

Posted on:

Friday 30th November 2012
View Replies!

JavaScript confirmation dialog

, I tried to use "javascript :return confirm();" function in following manner ( triggered by form onSubmit event ): **
** When I include Submit button ...

VIEWS ON THIS POST

56

Posted on:

Friday 30th November 2012
View Replies!

ANN: StringTemplate View and Transform Library for Maverick.NET now available

We have just released a beta version of Maverick.View.StringTemplate. This library adds a StringTemplate.NET View and Transform to the Maverick.NET MVC framework. It basically allows Maverick.NET views to be developed as StringTemplate.NET template files. Maverick.View.StringTemplate is developed in C#, it ...
VIEWS ON THIS POST

91

Posted on:

Friday 30th November 2012
View Replies!

mouseOver problem

Only the last button changes when I mouseOver, and the image does not even show. I am pretty sure I have jacked this up pretty bad, so any advice will be appreciated Untitled 1 function mouseOver() { document.getElementById("faq").src="faq2.gif"; } function mouseOut() { document.getElementById("faq").src="faq1.gif"; } function mouseOver() { document.getElementById("guest").src="guestbook2.gif"; } function mouseOut() { document.getElementById("guest").src="guestbook1.gif"; } function mouseOver() { document.getElementById("home").src="home2.gif"; } function mouseOut() { document.getElementById("home").src="home1.gif"; } function mouseOver() { document.getElementById("join").src="join2.gif"; } function mouseOut() { document.getElementById("join").src="join1.gif"; }  
VIEWS ON THIS POST

33

Posted on:

Sunday 23rd December 2012
View Replies!

Building a dynamic file for download

I have a website which displays routes on a map. The data behind this is held in a MySQL database. What I want to do is to be able to click a button and the current route information would be download in a gpx file (xml variant) for that route, built from the database. I'm using shtml, Javascript and perl. Is it possible The formatting of the data is not an issue. I am a real novice and have self taught enough to get where the site is today, so please be gentle. This is the site.
VIEWS ON THIS POST

58

Posted on:

Sunday 23rd December 2012
View Replies!

For ... in loop over array not working as expected

I created this page and script to experiment with Javascript's constructor and prototyping, as well as the for...in loop, which has caused me trouble before. I am having a problem with the for loop: for(var s in this.sArr). I would like it to iterate over every entry in sArr, which is what I thought it would do, but s just assumes the value of each array index. If there are three strings added to sArr in the strings object, 0 1 2 just gets printed out. What is the correct way to iterate over every element of an array string Test function stringStore() { this.sArr = []; } stringStore.prototype.addString = function(s) { alert(s); this.sArr.push(s); } stringStore.prototype.return = function() { sbuilder = ""; for(var s in this.sArr) { alert(s); sbuilder += s; sbuilder += "\n"; } return sbuilder; } strings = new stringStore(); function addString() { strings.addString(document.getElementById("input").value); } function print() { document.getElementById("output").value = strings.return(); } input: add output: print
VIEWS ON THIS POST

204

Posted on:

Sunday 23rd December 2012
View Replies!

How to toggle KML layers through checkboxes using Javascript.

I am trying to create a map in Google's API V3 with several kml polygon layers. I am able to render the layers all at once, but cannot figure out how to toggle them on and off via checkboxes. I have not created all the layers as I am trying to make sure I can toggle the one additional layer I have already created. I do not yet know enough about Javascript to understand the properties of checkboxes, so I am having difficulty coding it. I have searched for a resolution for over a week now, trying different methods to get the KML layer to toggle with no luck. I believe I need a conditional statement so that the KML selected can be rendered it checked and removed if unchecked, but at this point I can't even get the layer to render without a conditional. I have tried editing my code to include checkbox id's, various values as well as just trying a radio button and a form rather than a table and creating a checkbox object; therefore the code is my last attempt. I originally had a separate .js file, but for simplicity sake while I attempt to resolve this, I just added the javascript into the html file. html { height: 100% } body { height: 100%; margin: 0; padding: 0px } #map_canvas { height: 90%;} #header{background:#009900; padding:0; margin:0; height:50px; color:#fff;} function initialize() { var latlng = new google.maps.LatLng(34.995833, -81.968889); var myOptions = { zoom: 17, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); var generalMap = new google.maps.KmlLayer("http://www.uscupstate.edu/nick/library.kml",{preserveViewport:true}); generalMap.setMap(map); var parkingMap = new google.maps.KmlLayer("http://www.uscupstate.edu/nick/parking.kml",{preserveViewport:true}); function campusParking(){ parkingMap.setMap(map); } } USC Upstate Mobile map template may be used freely. Parking Map Else Something Else Thank for any assistance you can provide me. I have searched everywhere for any one simple solution and have been unsuccessful.
VIEWS ON THIS POST

32

Posted on:

Sunday 23rd December 2012
View Replies!

Change Div Background Colour Using a List box

How would I go about changing the colour of a div, using a list-box, as opposed to buttons I think I have figured out how to create the list box, but I am stumped as to what to do using Javascript. Looking on Google, there is no much help on what I am trying to do (e.g. there is only code on changing div colours via an image hover etc). Here is my CSS and HTML code. CSS: /// This the body table I want to change via Javascript div#main { width: 5%; background-color:#000; } HTML: /// This is the list-box that will change the dic background colour black white I would be very grateful for any help given.
VIEWS ON THIS POST

73

Posted on:

Sunday 23rd December 2012
View Replies!

Why does my code always return true?

function reportErrors(errors){ var msg = 'ERROR_ERROR_ERROR \n'; var numberOfErrors; for (var i=0; i max) { return false; } return true; } function validateForm(form){ var userName=form.user.value; var Emails=form.mailAtr.value; var pas1=form.passAtr.value; var pas2=form.cfrmPass.value; var apos=Emails.indexOf('@'); var dotpos=Emails.lastIndexOf('.'); var errors=[]; if(!checkLength(users)){ errors[errors.length]=('You forgot to enter your name!'); } if(!checkLength(Emails)){ errors[errors.length]=('Please enter an email'); } if (apos
VIEWS ON THIS POST

45

Posted on:

Sunday 23rd December 2012
View Replies!

checkbox counting number selected

how do you count the number of checkboxes that have been selected say I want more than 1 and less than 3 to be selected out of 5 if (document.formName.numberOfBlanks.checked >= 1 && document.formName.numberOfBlanks.checked
VIEWS ON THIS POST

39

Posted on:

Monday 24th December 2012
View Replies!

Hangman Game Troubles

I'm pretty new to Javascript so I don't really know exactly what I'm doing. I've been working on this Hangman game for a while now. My code is a bit of a mess. I can't seem to get a handle on the whole 'changing image' and 'check the letters' and 'reveal letters' bits. I've looked around but I can't really seem to be able to get where I want to be. Help would be much appreciated. var words; var randy; var ranword; var mask; var wordslong; var pics; var alpha; var alreadlet; var letter; var misses; var ipic; alpha = new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); alreadlet = new Array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); pics = new Array("hang1.jpg","hang2.jpg","hang3.jpg","hang4.jpg","hang5.jpg","hang6.jpg","hang7.jpg","hangwin.jpg"); words = new Array("bollywood", "chalo", "dekho", "pagal", "rangeela"); ipic=0; document.images["hangpic"].src = pics[ipic]; function pickword(word) { misses = 0; // Pick random word from 'words' Array. randy = Math.floor(Math.random()*words.length); ranword = words[randy]; // Create mask for 'ranword'. mask = ""; wordslong = ranword.length; for (i = 0; i < wordslong; i ++) { mask += "*"; } // Display 'ranword' in text box 'word'. document.hangman.word.value=mask; } function replaceChars(ranword, letter, guessletter) { var guessWord_array = guessletter.split(""); var index = ranword.indexOf(guessletter, index+1); if(index == -1) { return false; } while(index != -1) { index = ranword.indexOf(guessletter, index+1); guessWord_array[index] = guessletter; } letter = ""; for(var i = 0; i < guessWord_array.length; i++) { letter += guessWord_array[i]; } return letter; } function guesslet(){ var guessletter=document.hangman.letter.value; var resultFound = replaceChars(ranword, letter, guessletter); if(!resultFound) { } if (resultFound) { } }
VIEWS ON THIS POST

30

Posted on:

Monday 24th December 2012
View Replies!

Download from custom gallery - JavaScript Help

Okay so the script I have so far works great. It does the job I originally intended. However, I want to take this script to the next level.What my script does:I enter in URL's for images from around the web into the text area. I click the submit button named "Show Images" And thumbnails of all the images show up on that page. If I click an image it opens up in a new webpage. That's what I originally wanted. But now I want to adapt.Which is this... EffDub Image Loader input {background-color: red; } function showImages() { var urlListTxt = document.getElementById('urls').value; var urlListAry = urlListTxt.split('\n'); //Process inpur for valid urls var validURLsAry = new Array(); for(var idx=0; idx
VIEWS ON THIS POST

76

Posted on:

Friday 28th December 2012
View Replies!

Help with example off jsfiddle.net - JavaScript Help

Problem:I want to convert the enter key to a tab key, so when a user hits enter it acts like tab.Solution:I found the javascript to fix my problem but it's not work, I have very little experience with javascript :(Where I found the code: http://stackoverflow...bmission-to-tabDemo of the code online: http://jsfiddle.net/GRtQY/19/I know it uses Jquery and I do have that included in my script, I'm including the javascript in the head of my web page, I'm wondering if that's the problem. Right above the framework option on http://jsfiddle.net/GRtQY/19/ there's an option (I'm assuming) of how to include the script, if I use "no wrap (head)" the script won't work but if I use "onload" it does.On my webpage:(in between head tags)$("input").bind("keydown", function(event) { if (event.which === 13) { event.stopPropagation(); event.preventDefault(); $(this).next("input").eq(0).focus(); } });(in between body tags) asdadsa
VIEWS ON THIS POST

47

Posted on:

Friday 28th December 2012
View Replies!

Programming in ajax. - JavaScript Help

I am using zend framework and jQuery.I have a page with a list of users that can be individually deleted by clicking a link. A jQuery script is included on this page that adds an ajax call to each "delete user" link. Inside of the ajax call I use the jQuery load function to refresh the list of users. The problem is that inside of the "list of users" page (separate zend framework view with no layout) I have to reinclude the jquery script that assigns the ajax to each delete link.It works but it seems rather clunky. Is there a better way to do this\t
VIEWS ON THIS POST

37

Posted on:

Friday 28th December 2012
View Replies!

change the source of the javascript function? - JavaScript Help

Ok..this is kind of complicated. I wrote a php script that spits out a calendar in javascript. I use it as the source of a javascript function. heres the javascript code that will be placed in a html webpageas you can see the script uses the $_GET['m'] and $_GET['y'] to determine which month to display.Again it all works but i want to have the script produce Next and Previous month links. and then when clicked it would change the source of the script to have different m & y values.I kinda doubt this is possible but can anyone recommend a way to achieve this
VIEWS ON THIS POST

46

Posted on:

Monday 31st December 2012
View Replies!