SEARCH YOUR SOLUTION HERE  

Decrementation Not Working

Please see the comment on code below to see the problem. Sequence: x ^ n -1 var sqn; var pow=1; var pans=1; do { sqn = prompt("Enter Sequence: "); }while(sqn0){ document.write("9 --- "); for (x=1;x

Posted On: Sunday 25th of November 2012 09:21:55 PM Total Views:  238
View Complete with Replies




Related Messages:

Javascript is not working in IE6   (66 Views)
I have created a web page with javascript, its successfully working in firefox but not in internet explorer version 6 and 7. I am not good in scripting and I have done this page with the help of my friend. I have uploaded the zip file. It contain two directories one is for web page (php_files) other for support file (Support_Files). Please unzip the file and test the page. I have also uploaded my browser output for Firefox and Internet explorer. My apologize I have not shared my original page, this is the test page. Please help me and also let me know if you need any more information regarding the same.
resize not working   (75 Views)
i am trying to resize a button using the following code and it has had no effect on the button it has remained the same size.
JavaScript not working in Internet Explorer 7   (65 Views)
Try
Firefox vs. IE-menu not working please help   (123 Views)
; 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
my html code isnt working please help   (155 Views)
overlay not working in IE's   (70 Views)
HI there, I have runt into an issue with the overlay I have on the website I am working on http://antobbo.webspace.virginmedia.com/petras/test/egypt.htm The problems seem to be with Internet explorer 7, 8 and 9. Say you click on the first thumbnail, then the big pix comes up and behind it the overlay. Then close this picture and click on the next one: the overlay is now solid black. Basically it works fine with the first image but then any subsequent image seems to throw it. I am aware of IE's not being able to handle the opacity therefore in my css I have this: .overlay { display:none; background-color:black; position:fixed; opacity:0.75; filter:alpha(opacity=75); /* For IE8 and earlier */ top:0; bottom:0; right:0; left:0; width:100%; z-index:100; } But despite this it doesn't work. I thought that maybe, it isn't the css but the script that handles the big images but still I couldn't find anything wrong with it...maybe you can Here's the script: var $full_images; var $close_button; var $overlay; $(function(){ $full_images = $(".full_images"); $close_button = $(".close_button"); $overlay = $(".overlay"); $the_pic = $(".image_div"); }); function change_images(image, text){ var $images = $("#" + image); var $description = $("#" + text); $overlay.hide().show(); $the_pic.hide().show("slow"); $full_images.hide().show("slow"); $images.hide().fadeIn(1000); $description.hide().fadeIn(1000); $close_button.hide().show(); $close_button.unbind('click').click(function(){ $(this).hide(); $images.fadeOut("fast"); $description.fadeOut("fast"); $full_images.hide("slow"); $overlay.hide("slow"); $the_pic.hide("fast"); }); } A note on the script: the variable $the_pic is there in error it hasn't actually been declared, but I doubt this can be the problem because the overlay isn't working in previous versions of the script without the variable ANy idea at all what could cause that
jScrollPane not working   (72 Views)
I am trying to use jScrollPane vertically, but it is not working. http://jscrollpane.kelvinluck.com/ I want simple styleable scrollbar alternative for above link or need help to make code work ( Vertical only :- http://jscrollpane.kelvinluck.com/arrows.html )
options and buttons not quite working correctly in?   (79 Views)
In my jsfiddle I have an application where the user can select an option and their answers and then display it in a new row. I have one slight problem though, I think it will be easier to explain if you follow the steps below in my [fiddle][1]: 1. Open the grid and select option "3". "3" would be displayed in the textbox and buttons "A" to "C" would appear 3. Click on "Add Question" button. This would create a new row showing the details you have submitted. 4. Now click on the "Open Grid" WITHIN THE ROW you have justmcreated and select option "5". Now the textbox within the row changes the value from "3" to "5" but if you look at the top where you first chose your options and answers, it displays 5 buttons from "A" to "E". This should not happen. This should stay to what it was previously which was buttons "A" to "C". it should only change if the option is chosen from the Option Type at the top and not within the row. So how can this be fixed Please use the fiddle to test your ideas if it helps you. Thank you [1]: http://jsfiddle.net/YUZuE/22/
click function not working   (145 Views)
why isn't this working $('body').find(".overcolor").click(function(){ alert("hi"); });
jquery ajax not working   (129 Views)
ok so i am using jquery ajax to send post data to the php page to get processed. since im using a textarea with an editor on it i have to call the content like so var content = $('#pagecontent').val(); then post it through to the php page. which works but it seems to have a problem with a an & symbol in the post data. it cuts off the rest of the code after an & symbol. when get the contents of the textarea with console.log($("#pagecontent").val()) it grabs all the content. Even the content after the & symbol. then i post it through and have php output the contents that is submitted and then i see that the rest of the content after the & is gone. So the problem that i am having is why is the ajax posting cutting off my content after an & symbol. it seems to grab the content fine before the submitting.
Selecting at least one field is not working   (83 Views)
Hi to all i have done validation on single fields but i have to apply validation on 3 text field that at least one of thre is filled .i make a code but that logic doesnot work .. html code ID Technologies First Name: Last Name : Organization Name: Email: Contact Number: Duration in years: Extend Read Only Download link MAC ID: CPU ID: MotherBoard ID: js code function validate_required(field,alerttxt) { with (field) { if (value==null||value=="") { alert(alerttxt); return false; } else { return true; } } } function validate_email(field,alerttxt) { with (field) { apos=value.indexOf("@") dotpos=value.lastIndexOf(".") if (apos
deleteRow() not working   (82 Views)
I have two scripts. The first script creates a row in a table: function addRow(tblId) { if(counter == limit) { alert("You cannot add more than " + limit + " passages!"); } else { var tblBody = document.getElementById(tblId).tBodies[0]; var newNode = tblBody.rows[0].cloneNode(true); tblBody.appendChild(newNode); counter++; } } ... the second is supposed to delete the last row created (and subtract from the max rows count): function deleteRow(tblId) { var tblBody = document.getElementById(tblId).tBodies[0]; var lastRow = document.getElementById(tblId).rows.length; if(lastRow == 1) { alert("Cannot delete first row!"); } else { tblBody.deleteRow(lastRow); counter = counter - 1; } } However the deleteRow function is NOT deleting rows (when I push the button with the onclick=deleteRow('scripturetable') ). I know the function is being called, as, when there's only one row, the alert pops up, but that's it.
window.alert not working. Please help!   (85 Views)
I am trying to get the total of the checkboxes selected when the user clicks the "calculate total" button. It isn't working though. What am I doing wrong function calculate(f) { var nums = f.num; var ntext = f.numtext; var nitem = f.numitem; var result = 0; var items = ''; for(var i=0;i
Multiple AJAX requests at the same time not working   (73 Views)
, I'm encountering an AJAX problem when I try to execute multiple AJAX requests at the same time. What I want to do is delete a message and display the status (succes or failure) of that in div1, and refresh the messages on the page in div2. This needs (for as far as my knowledge reaches) two AJAX actions from which I both need the responseText. The problem What happens when I execute my script is that the second action (refresh a part of the page) happens before the deletion is executed. The result of this is that when the deletion has been executed, the page is already updated, and the deleted message is still there. The script What I now have is: function doAjax(url, element_id, img_url) { var ajaxObject = createAjaxObject(); ajaxObject.open('GET', url, true); ajaxObject.onreadystatechange = function() { if(ajaxObject.readyState==4 && ajaxObject.status==200) { document.getElementById(element_id).innerHTML = ajaxObject.responseText; delete ajaxObject; } else { if(img_url) document.getElementById(element_id).innerHTML = ''; } }; ajaxObject.send(); } to execute the actions, and function createAjaxObject() { var ajaxObject; try { ajaxObject = new XMLHttpRequest(); } catch (e) { try { ajaxObject = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { ajaxObject = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { return; } } } return ajaxObject; } to create the AJAX object.
onsubmit is not working in form   (95 Views)
Ok, let's roll up the sleeves. Remove the jquery files that you are not using. jQuery is grabbing control. I suspect the jquery form script. Start with it and keep going. the thing should function without jquery. Other stuff may not.
onclick in firefox not working   (142 Views)
hi ! i've a mapped image and jquery in the following code, works fine with Chrome and Safari, but Firefox doesn't recognize the onclick function and I'm wondering why!
javascript image check not working   (93 Views)
Maybe the cam depends on http://ip.benellis.info being available. If so then the cam will go down in sympathy with the site. I don't know what the mechanism might be but maybe something to do with the way the stream/snapshots are uploaded
Ajax code not working other pc   (63 Views)
I hav done Ajax code for dynamically select destination city according to user selected source city. My issue is this code work properly on my pc but whenever copied on other pc its not working. I can't understand so please help me. Ajax code is //window.onload="hideReturn()" function hideReturn() { document.getElementById("noPaengersRe").style.display="none" document.getElementById("listNumOfPersonRe").style.display="none" } function ListOfDest(selectedCity) { // alert("function load") xmlHttp = GetXmlHttpObject(); // alert("xml obj is "+xmlHttp) if(xmlHttp == null) { alert("Browser does not support HTTP Request") return } var url = "DestinationRe" url = url+"cityFrom="+selectedCity // alert("step url is "+url) xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true) // alert("step 2") xmlHttp.send() // alert("step 3") } function stateChanged() { // alert("state is load") document.getElementById("listTo").options.length=0; AddItemlistTo("----Select City----","----Select City----") // if (xmlhttp.readyState==4 && xmlhttp.status==200) if(xmlHttp.readyState == 4 && xmlHttp.status==200) { //alert("step 4") var strCity = xmlHttp.responseText; //alert("str city is "+strCity) var listCity = strCity.split(":"); //var listCity = strCity.split(":"); // alert("list city is "+listCity) if(listCity.length == 1) { AddItemlistTo(strCity,strCity) document.getElementById("listTo").focus() }else{ var len = listCity.length; for(var i = 0;i
Dynamic iFrame height, not working in ie without refresh.   (153 Views)
When i try to dynamically change the height of an iframe in ie through a java-script to match its content (a html page containing a flash movie), it doesn't resize the iframe at first, but when i reload the same page into the iFrame it resizes as planned, how come Any ideas This script works well in firefox, safari and netscape, but i cant get it to work in ie(8, 7). And i get the same problems with every resizing script i've tried. This is the script i use: The iframes: IFRAME> I have a flash menu in the first iframe, the buttons on the menu uses getURL(siteToLoad, "contents") to load another html-page into the iframe "contents". Is it possible to make the iFrame refresh automatically though javascript so that i just refreshes the iframe once Everytime ive tried that it just ends up in a never ending refresh-loop... How can i make this work Is there any better script for resizing (and refreshing after resize) the iframe height so that it matches to its content Please, i've been stuck with this problem for some days now... // Max
div not working on success   (71 Views)
hi i am hoping that i can explain my predicement properly. i have a form on a page that is working the jquery form plugin. if i use the form in a normal html environment then the form works and the success is placed in the correct div '#f1'. however, if i call the form from any modal window or box environments such as facebox or facy box etc then instead of the success being echoed to the '#f1' div it goes to the php page that does the processing and shows the response there. i hope i have made it clear and have posted my code in the hope that someone can offer some advice. many thanks form --------------------------------------------- Enter a File Select a Box Select a Box File Number: Authorised By: