HTML/ Javascript IE Help - JavaScript Help


So I basically been using my Firefox browser as the browser for my website but when my buddy loaded the website, IE has many flaws on it.


Using this code works on Firefox but on IE it just sits there and looks pretty. Can anyone help me
Posted On: Wednesday 2nd of January 2013 12:08:58 AM Total Views:  58
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




Inserting XML in IE8

Is there a way to do this easily I found out that for Internet Explorer, html and xml elements are incompatible as far as the DOM goes. The following code only works with DOM-compliant browsers: var xml = ajax.http.responseXML.documentElement; document.getElementById('someId').appendChild(xml); //IE Error: No such interface supported Is there a IE workaround for this that DOES NOT involve recreating the xml
VIEWS ON THIS POST

67

Posted on:

Wednesday 21st November 2012
View Replies!

How can I keep track on how many times an option has been clicked?

So I made a small Paper-Rock-Scissors game but I need to keep track how many times say "rock" has been clicked, what function should I use for that (For example, if the user has clicked rock 4 times, the computer will automatically assume that the user will continue with rock and says paper so it'll win the game.)
VIEWS ON THIS POST

238

Posted on:

Wednesday 21st November 2012
View Replies!

Fast Way To Read A Large XML File

, I have some code that I use to read an XML file: function loadXML() { try //Internet Explorer { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); } catch(e) { try //Firefox, Mozilla, Opera, etc. { xmlDoc=document.implementation.createDocument("","",null); } catch(e) { alert(e.message); return; } } xmlDoc.async=false; xmlDoc.load("a.xml"); } function searchXML() { var found = 0; var headNodes = xmlDoc.getElementsByTagName("ac"); var srchArea = document.getElementById("txtArea").value; var srchTerms = document.getElementById("txtFirst").value + document.getElementById("txtSecond").value; for(var i = 0; i < headNodes.length; i++) //loop through nodes to look for matching area code { if(headNodes[i].getAttribute("val") == srchArea) //if its found then do this... { for(var x = 0; x < headNodes[i].childNodes.length; x++) //loop through child nodes of this block to see if there is a matching number { if(headNodes[i].childNodes[x].getAttribute("val") == srchTerms) //if there is a matching number then... { if(!document.getElementById("resultImg")) //check if image exists already and if it doesnt create one, otherwise just swap them { var result = document.getElementById("result") var img = document.createElement("img"); img.src = "donotcall.bmp"; img.id = "resultImg"; result.appendChild(img); } else { document.getElementById("resultImg").src = "donotcall.bmp"; } found = 1; //set found to true if the number matches break; //break out of the loop when done } else { found = 0; //set found to false if there is not a match and then outside the loop do same image swap as above } } } } if(found == 0) { if(!document.getElementById("resultImg")) { var result = document.getElementById("result") var img = document.createElement("img"); img.src = "oktocall.bmp"; img.id = "resultImg"; result.appendChild(img); } else { document.getElementById("resultImg").src = "oktocall.bmp"; } } } This code works great for small XML documents, but the one I just received that I need to search is like 26MB and that would take forever. I was wondering if there is a faster way to do this with either JS or if not then maybe PHP The only thing I could tyhink of so far is to just separate the large file into multiple smaller files... Hope someone can help, and
VIEWS ON THIS POST

42

Posted on:

Wednesday 21st November 2012
View Replies!

Cant get my form to calculate an display result

The problem, as you're probably aware, is the line document.gas.total.value=(miles*gas_price);. If you didn't know this, go and get firefox and install the web developer toolbar. When you see a red circle in the right of the toolbar there's a javascript error, and clicking the red circle tells you what it is. In this case, document.gas.total isn't defined. You can't refer to total via gas, because gas is the name of your form, and the total element is outside of the form. The easiest way around this is to use getElementById instead. Then you can accurately target the total field: document.getElementById('total').value=(miles*gas_price);
VIEWS ON THIS POST

132

Posted on:

Wednesday 21st November 2012
View Replies!

Random Banner Ads

I have 5 jpg images with URLs that need to randomly display after the page is refreshed each time. This is what I have so far. I have inserted two script elements to access the functions. The problem I'm having is the number of the image shows up on the website and beside the number a box with an x in it where the image should go. I hope that makes sense. The part I'm having trouble with is in the div element under the id = ads. If I haven't given enough info let me know. The Ridgewood Herald Tribune Contents Main Home Subscriptions Contact Us News Sources News Local National International Sports Baseball Basketball Football Golf Hockey Miscellaneous Opinion Editorials Columnists Letters Classifieds Employment For Sale Personals Real Estate Wanted Other Business Weather Entertainment var rNumber=randInt(5); // generate a random integer from 1 to 5 var rAd=adDescription(rNumber); // description of the random ad var rLink=adLink(rNumber); // URL of the random ad document.write(''); document.write(rNumber); document.write(''); document.write(""); Contact us today to place your ad Park Opens The Adventure Island theme park opened its doors on Monday near Ridgewood. The park, one of the biggest in the Midwest, drew large crowds, but the long lines didn't deter anyone. "I've been watching them put up the rides over the last year, it's really exciting to finally get inside the gates!" said Ridgewood resident, Denise Brooks. story continues on page 2... Ridgewood Herald Tribune \t 10010 Atwood Ave. \t Ridgewood, Iowa 80135 Phone: (606)555-1101 \t Fax: (606)555-1102
VIEWS ON THIS POST

94

Posted on:

Wednesday 21st November 2012
View Replies!

OnMouseOver Trouble

, im creating a image map in which im trying to get the status bar to change when the cursor rolls over the image but it isnt working for some reason, someone told me today it might be the browser but i dont think it would br cause i have tried it in various diffrent browsers. please help! as you can see i have 2 diffrent codes that i tried out but they both dont work under "N.S.W" & "Q.L.D" here is my code. function a(txt) { self.status = txt } function b() { self.status = "" } Randall. This post has been edited by Randall: 01 April 2008 - 05:05 AM
VIEWS ON THIS POST

144

Posted on:

Wednesday 21st November 2012
View Replies!

amount is not raised when adding the same article

Hi. I'm trying to make a shopping cart for a dvd shop but I have a problem adding the same dvd multiple times to the shopping cart. It should increase the amount by 1 each time but it doesn't. The amount stays at 1 all the time. var products = new Array(); loadPage(); function loadPage(){ getCookie(); } function getCookie(){ var elements = document.cookie.split('='); var products_cookie = elements[1].split('%'); for(var i=0;i < products_cookie.length-1;i++) { var tmp = products_cookie[i].split('$'); addProduct(tmp[0], tmp[1], tmp[2]); } } function setCookie(){ var date = new Date(); date.setTime(date.getTime()+(2592000)); //expire time = 30 dagen nadat cookie aangemaakt is var expires = "; expires="+date.toGMTString() var text = ""; for (var i = 0; i < products.length; i++){ text+= products[i][0] + "$" + products[i][1] + "$" + products[i][2] +"%"; // slaat naam $ aantal $ prijs op } document.cookie = "cinematics="+text+expires; } function addProduct(pName, pAmount, pPrice){ var i = 0; if (products.length != 0){ while (products[i][0] != pName && i != products.length-1){ i++; } if (products[i][0] == pName){ alert("verhogen"); var tmp = parseInt(products[i][2]); products[i][2] += parseInt(pAmount); } else{ alert("nieuw"); var product = new Array(pName, parseInt(pAmount), pPrice); products[products.length] = product; } } else{ alert("eerste"); var product = new Array(pName, parseInt(pAmount), pPrice); products[products.length] = product; } setCookie(); } function removeProduct(pName){ for(var i = 0; i 1)){ products[i][1]--; } else if(products[i][0]==pName){ if(i==products.length-1){ products.length--; } else{ for(var j = i; j
VIEWS ON THIS POST

143

Posted on:

Thursday 22nd November 2012
View Replies!

Detect commiting REFRESH on web browsers

Hi! I am coding a shopping system... On the cart payment page of my system, when a user proceed to pay his cart/order using online payment, the page takes time to process the payment. I made a pop-up for it to show that it is processing saying that "Do not refresh, your payment may take upto 2 minutes to process." But I am thinking for this solution of disabling the refresh... Or this alternate way: detecting the refresh committed by the user on my back end... If I detected it, Ill just make a function that will terminate the process and will inform the user for unsuccessful payment. Please help!
VIEWS ON THIS POST

121

Posted on:

Thursday 22nd November 2012
View Replies!

URL to open in maximized window state within current window

I need help please! I have a link on a page, where i wont it open in maximized window state. the "_parent" allows to open in current window, but the maindow is never at maxmize state. I want the url to open in current window which it does but also force to open in maxize window state: height="127">
VIEWS ON THIS POST

130

Posted on:

Friday 23rd November 2012
View Replies!

Combining 2 queries in Google Fusion javascript

am new at querying, I wanted to change the code below to query my data for the "Date" column, "population", and "education". In the continuation of my code, I have 3 checkboxes to filter out the data pertaining to the date, and the selector to select which color coding and data i want to represent. Live example of current code: http://4vec.com/test/2.html So in a perfect scenario, when I deselect all the checkboxes nothing should appear, and when i select 2006 only the polygons that has 2006 should appear. function initialize() { var map = new google.maps.Map(document.getElementById('map-canvas'), { center: new google.maps.LatLng(30.64804,31.5023868333333), zoom: 5, mapTypeId: google.maps.MapTypeId.ROADMAP }); var layer = new google.maps.FusionTablesLayer({ query: { select: 'geo', from: '1c-imTqDv8SfoEG_dkw41TjpquihqELzTIrs9F88' } }); layer.setMap(map); initSelectmenu(); for (column in COLUMN_STYLES) { break; } applyStyle(map, layer, column); addLegend(map); google.maps.event.addDomListener(document.getElementById('selector'), 'change', function() { var selectedColumn = this.value; applyStyle(map, layer, selectedColumn); updateLegend(selectedColumn); }); google.maps.event.addDomListener(document.getElementById('2006'), 'click', function() { filterMap(layer, tableId, map); }); google.maps.event.addDomListener(document.getElementById('2007'), 'click', function() { filterMap(layer, tableId, map); }); google.maps.event.addDomListener(document.getElementById('2008'), 'click', function() { filterMap(layer, tableId, map); }); } // Filter the map based on checkbox selection. function filterMap(layer, tableId, map) { var where = generateWhere(); if (where) { if (!layer.getMap()) { layer.setMap(map); } layer.setOptions({ query: { select: 'geo', from: tableId, where: where } }); } else { layer.setMap(null); } } // Generate a where clause from the checkboxes. If no boxes // are checked, return an empty string. function generateWhere() { var filter = []; var stores = document.getElementsByName('store'); for (var i = 0, store; store = stores[i]; i++) { if (store.checked) { var storeName = store.value.replace(/'/g, '\\\''); filter.push("'" + storeName + "'"); } } var where = ''; if (filter.length) { where = "'Date' IN (" + filter.join(',') + ')'; } return where; } google.maps.event.addDomListener(window, 'load', initialize); // Initialize the drop-down menu function initSelectmenu() { var selectMenu = document.getElementById('selector'); for (column in COLUMN_STYLES) { var option = document.createElement('option'); option.setAttribute('value', column); option.innerHTML = column; selectMenu.appendChild(option); } } // Apply the style to the layer & generate corresponding legend function applyStyle(map, layer, column) { var columnStyle = COLUMN_STYLES[column]; var styles = []; for (var i in columnStyle) { var style = columnStyle[i]; styles.push({ where: generateWhere(column, style.min, style.max), polygonOptions: { fillColor: style.color, fillOpacity: style.opacity style.opacity : 0.8 } }); } layer.set('styles', styles); } // Create the where clause function generateWhere(columnName, low, high) { var whereClause = []; whereClause.push("'"); whereClause.push(columnName); whereClause.push("' >= "); whereClause.push(low); whereClause.push(" AND '"); whereClause.push(columnName); whereClause.push("' < "); whereClause.push(high); return whereClause.join(''); } // Initialize the legend function addLegend(map) { var legendWrapper = document.createElement('div'); legendWrapper.id = 'legendWrapper'; legendWrapper.index = 1; map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push( legendWrapper); legendContent(legendWrapper, column); } // Update the legend content function updateLegend(column) { var legendWrapper = document.getElementById('legendWrapper'); var legend = document.getElementById('legend'); legendWrapper.removeChild(legend); legendContent(legendWrapper, column); } // Generate the content for the legend function legendContent(legendWrapper, column) { var legend = document.createElement('div'); legend.id = 'legend'; var title = document.createElement('p'); title.innerHTML = column; legend.appendChild(title); var columnStyle = COLUMN_STYLES[column]; for (var i in columnStyle) { var style = columnStyle[i]; var legendItem = document.createElement('div'); var color = document.createElement('span'); color.setAttribute('class', 'color'); color.style.backgroundColor = style.color; legendItem.appendChild(color); var minMax = document.createElement('span'); minMax.innerHTML = style.min + ' - ' + style.max; legendItem.appendChild(minMax); legend.appendChild(legendItem); } legendWrapper.appendChild(legend); } google.maps.event.addDomListener(window, 'load', initialize);
VIEWS ON THIS POST

174

Posted on:

Saturday 24th November 2012
View Replies!

Iframe Interaction

When you assign an element of a window to a variable with getElementById() or getElementByName(), that variable is referring to an Element Object that is a property of the Window Object. This behavior is not true for frames, however; the value of the name or ID of a frame element refer to a Window Object as opposed to an Element Object. This means that you can treat that frame in your code as if it were its own Window Object using the Name or ID that you have assigned to that frame. I provide an example below. The id fone given to this iframe Element does not refer to an Element Object, it refers to a Window Object. Click Me fone is treated as a Window Object. This Window Object has an Element Object with the id "iframewrap" that will be assigned a backgroundColor value of #444. function chngFrameStyle() { fone.document.getElementById("iframewrap").style.backgroundColor = "#444"; }
VIEWS ON THIS POST

121

Posted on:

Saturday 24th November 2012
View Replies!

xmlhttp.responseText = 1

this is my code in php: this is my code in javascript: alert(xmlhttp.responseText); now, my problem is that the output displays: "1Hi!"; even though i will not display an output in php, still a "1" appends in the beginning of the alert box. What could be the problem
VIEWS ON THIS POST

135

Posted on:

Saturday 24th November 2012
View Replies!

lavalamp navbar with ease scrolling to different parts?

ok so, I have a webpage that I am making for me and there is a link that is interfering with the hover part of the nav bar to show..it's this link "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" that's at the bottom of the html page that I have set up..when I take it away..the hover shows with the easing of the nav bar..but I want to have both the lavalamp feature and the ease scrolling effect when I click on the nav bar to slide down to the specifide part of the page..how do I go about this here is the index.html - ***** ********* Home Page - $(function() { $("#1, #2, #3").lavaLamp({ fx: "backout", speed: 700, click: function(event, menuItem) { return false; } }); }); "The man who has no imagination has no wings" - Muhammad Ali Portfolio About me Contact My Portfolio Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer luctus quam quis nibh fringilla sit amet consectetur lectus malesuada. Sed nec libero erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer luctus quam quis nibh fringilla sit amet consectetur lectus malesuada. Sed nec libero erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc mi nisi, rhoncus ut vestibulum ac, sollicitudin quis lorem. Duis felis dui, vulputate nec adipiscing nec, interdum vel tortor. Sed gravida, erat nec rutrum tincidunt, metus mauris imperdiet nunc, et elementum tortor nunc at eros. Donec malesuada congue molestie. Suspendisse potenti. Vestibulum cursus congue sem et feugiat. Morbi quis elit odio. Go Up My About Me Section Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer luctus quam quis nibh fringilla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer luctus quam quis nibh fringilla sit amet consectetur lectus malesuada. Sed nec libero erat. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc mi nisi, rhoncus ut vestibulum ac, sollicitudin quis lorem. Duis felis dui, vulputate nec adipiscing nec, interdum vel tortor. Sed gravida, erat nec rutrum tincidunt, metus mauris imperdiet nunc, et elementum tortor nunc at eros. Donec malesuada congue molestie. Suspendisse potenti. Vestibulum cursus congue sem et feugiat. Morbi quis elit odio. Go Up Contact Me Please feel free to contact me through a message Fill in all fields with labeled with "*" First Name:* Last Name:* Email:* Message:* Copyright 2012 Go Up Web Design by **** *******
VIEWS ON THIS POST

260

Posted on:

Saturday 24th November 2012
View Replies!

No page header and footer when printing a web page

hihi, is there a way to rid of the page header (usually it's the page title and url) and the page footer (usually it's the page number and date) without having user to change from the web browser's the page setup Can this be done using javascript or just html meta tags Also we control the contents of what is printed from a web page without having to redirect the page Example, I have three paragraphs on a web page and I don't want the middle paragraph to be printed.
VIEWS ON THIS POST

230

Posted on:

Saturday 24th November 2012
View Replies!

Menu

How would i go about creating a menu like the one that this website has http://oas.com.au
VIEWS ON THIS POST

50

Posted on:

Saturday 24th November 2012
View Replies!

jquery problem

hi i have a problem i am searching for it but couldnt find that code right.can any one fix it.i want to change my text field colour to red while it is left empty or doesnt specify the condition applied on this...here is my code below $(document).ready(function(){ $("#register").validate({ rules:{ name:{ required: true, minlength: 6, }, email:{ required: true, email: true, }, password:{ required: true, minlength: 6, }, } }); }); label { width: 150px; display: inline-block; } Name Email Password
VIEWS ON THIS POST

169

Posted on:

Saturday 24th November 2012
View Replies!

window.location

Unable to redirect to the page using window.location of javascript for the code given below function confirmation() { var answer = confirm("Do you want to add more Bussess") if (answer){ } else{ alert(
VIEWS ON THIS POST

119

Posted on:

Saturday 24th November 2012
View Replies!

javascript in mozilla firefox

why does the event.clientX and event.clientY is working in IE but not work in firefox clientX and clientY shows the coordinate of the cursor relative to the screen
VIEWS ON THIS POST

87

Posted on:

Saturday 24th November 2012
View Replies!

Browser Script Conflicts.(FIREFOX)

Hi all, I have just created a template for my website and then have put in my GOOGLE Adsense script in it. When i open it with Internet Explorer. The page gets displayed nicely. But when i open it with Mozialla Firefox it doesnt display any Adsense ads. Secodnly the error log shows an unknown character error. "http://sim.byethost4.com/Golf.html " This is that Page. I am basically a C++ Programmer and donot have much knowledge on Javascript (currently). Here is the clicky of that link CLICK ME The page was actaully created by my c++ program and not by my editor so could that be a problem and how do i make firefox show ads
VIEWS ON THIS POST

67

Posted on:

Saturday 24th November 2012
View Replies!

html form with javascript

Hi i am not so good with javascript so i really dont know the best way do do what i want to do. want to make a form that allows people to add and delete rows with javascript but it just doesn't work the way i would like. javascript is not passing the variables to php. here is the code i have so far. can anyone tell me where the problem is function doSubmit(Mode){ document.forms[0].Submit.value = Mode; document.forms[0].submit(); } function addVariant(mode, language){ document.forms[0].Submit.value = mode; document.forms[0].Submit.lang = language; document.forms[0].lang.value = language; //var url= "index.phpSubmit="+mode+"&lang="+language; document.forms[0].submit(); //alert(language); } function deleteVariant(mode, language){ document.forms[0].Submit.value = mode; document.forms[0].Submit.lang = language; document.forms[0].lang.value = language; //var url= "index.phpSubmit="+mode+"&lang="+language; document.forms[0].submit(); //alert(language); } Add Resource Resource ID: Note for developer: if in edit mode, this value cannot be changed. Resource Type: () Project ID:  (Optional) Resource: This is the item (English) that will be translated Description: Description of translable item goes here French(0): French translation here French(): ):
VIEWS ON THIS POST

155

Posted on:

Saturday 24th November 2012
View Replies!

for loop

Hi , I am using the for loop function. I feel that my code is correct but something is wrong. I check for brackets and semicolon and they are in the right places and the right amount. Can someone look at my code and let me know why it is not displaying/functioning. I am using the decrement operator with the for loop. This code should make my code look like 0 1 2 etc function ForTest() { var OutPut=""; FillArray() for (var i=Numbers.length; i >= 0; i--) { OuPut = OutPut + Numbers[i] + "\r"; } document.frmMain.txtaOutput.value = OutPut; }
VIEWS ON THIS POST

72

Posted on:

Saturday 24th November 2012
View Replies!

what is wrong with this?

I have 3 textboxes names myTextBox1 myTextBox2 myTextBox3 onblur i want to check if the value of the checkbox is true. I have a function in my js file. function isNumeric(myString) {.......} In my JSP file i write; onblur="isNumeric(X)" I wrote everything and it does not work. What must i have write instead of X. The id of the checkbox The name I also use onchange for my textboxes...
VIEWS ON THIS POST

66

Posted on:

Saturday 24th November 2012
View Replies!

Toggle in jquery

there, I'm just having a tiny problem with this function. the toggle function works fine but what I want to do is to display the date whenever particular buttons are clicked or active. function showDate(element){ if(element == "#selection3" || element == "#selection4"){ document.getElementById("dateinput").style.visibility = "visible"; }else{ document.getElementById("dateinput").style.visibility = "hidden"; } } function toggle_element(element){s $(element).toggle(); } Start Date: End Date: I want to display the date whenever selection 3 is active only. I'd appreciate quick help with this
VIEWS ON THIS POST

263

Posted on:

Sunday 25th November 2012
View Replies!

start-date end-date Validation

Friends , I m new in Javascript i m trying to validate two date coming in the format 'DD-MON-YYYY' coming through PopUP-Calendar in two textboxes but unable to get required result I musing following function : Thank In Advance
VIEWS ON THIS POST

67

Posted on:

Sunday 25th November 2012
View Replies!

Basic coding question on how to insrt a variable in?

I want to insert a array variable in a another variable. I know how to get it done in php but not in JavaScript. Please advice how should I code the syntax for variable statement var name[0][0]="tom"; name[0][1]=12; statement="My name is".name[0][0]."and my age is".name[0][1]"; I searched the net and found articles on strings but could not find anything which just shows how to do this.
VIEWS ON THIS POST

135

Posted on:

Sunday 25th November 2012
View Replies!

cells Hide/show in each of the rows of a table using?

I have a query regarding the hide/show of the cells in a table. The first column is 'Yes and No' options using combo box, 2nd option is 'input field', 3rd column is also 'Yes and No' option using combo box, and 4th option is also 'input field'. What I want is to make a table using JAVASCRIPT, in which if i select 'No' from the first row first column, i want to hide the remaining 3 cells of the first row. Otherwise if i select 'yes' from the first row first column i want to show all the 3 other options of the first row. Also in between if I select 'No' from the first row third column i want to hide the first row fourth column cell. Selecting 'yes' from the first row third column will show the first row fourth column. I want apply the same setting of hide and show cells into the remaining columns also. By selecting 'no' from first column -> hide other corresponding cells of the row by selecting 'yes' from the first column -> show other corresponding cells of the row AND ALSO By selecting 'no' from third column -> hide fourth cell of the corresponding/same row by selecting 'yes' from the third column -> show fourth cell of the corresponding/same row I have posted this question in the tablular form, but it is now showing in the proper format. Anyone in the forum please help me to make this table using JAVASCRIPT. I need this table within a day or two. Waiting for someone's reply. Amarjit
VIEWS ON THIS POST

204

Posted on:

Sunday 25th November 2012
View Replies!

Expand script with more menu's

, I am trying to build a combo menu that contains 5 drop down lists and when sombody selects an item from the first drop down menu, new options appear in the second one. People choose an option there, and more options appear in the third one, and so on. I've got the following code so far: var num_of_cats = 3; var open_in_newwindow=0; var option_array = new Array(num_of_cats); option_array[0] = new Array("Select product"); option_array[1] = new Array("-- Select --", "8,5 x 5,5 cm", "Round", "Standing", "Flat"); option_array[2] = new Array("-- Select --", "A4: 29,7 x 21 cm", "A5: 21 x 14,8 cm"); var text_array = new Array(num_of_cats); text_array[0] = new Array("Here comes the text before somebody chose an option"); text_array[1] = new Array("This is the text for the first menu", "Second menu text", "third menu text"); text_array[2] = new Array("These days, it's important to keep up on the news. These sites will help you do that.", "What list of news sites would be complete without it", "Here, you can get links to World News Tonight, or see video clips."); text_array[3] = new Array("If you can't find it via other means, you'll need to find it with a search engine. These are some of the best.", "Undoubtedly, the best search engine out there.", "Their natural-language search sometimes comes up with results you won't get with other engines."); var url_array = new Array(num_of_cats); url_array[0] = new Array("#"); url_array[1] = new Array("#", "http://javascriptkit.com/", "http://www.news.com/", "http://www.wired.com/"); url_array[2] = new Array("#", "http://www.cnn.com/", "http://abcnews.go.com/"); url_array[3] = new Array("#", "http://www.google.com/", "http://www.aj.com/"); function switch_select() { for (loop = window.document.form_1.select_2.options.length-1; loop > 0; loop--) { window.document.form_1.select_2.options[loop] = null; } for (loop = 0; loop < option_array[window.document.form_1.select_1.selectedIndex].length; loop++) { window.document.form_1.select_2.options[loop] = new Option(option_array[window.document.form_1.select_1.selectedIndex][loop]); } window.document.form_1.select_2.selectedIndex = 0; } function switch_text() { window.document.form_1.textarea_1.value = text_array[window.document.form_1.select_1.selectedIndex][window.document.form_1.select_2.selectedIndex]; } function box() { if (window.document.form_1.select_2.selectedIndex == 0) { alert("Where do you think you're going"); } else { if (open_in_newwindow==1) window.open(url_array[window.document.form_1.select_1.selectedIndex][window.document.form_1.select_2.selectedIndex],"_blank"); else window.location=url_array[window.document.form_1.select_1.selectedIndex][window.document.form_1.select_2.selectedIndex] } } function set_orig() { window.document.form_1.select_1.selectedIndex = 0; window.document.form_1.select_2.selectedIndex = 0; } window.onload=set_orig // --> Select product -- Select Product -- Product 1 Product 2 Select Size -- Select Size Here comes the description text. However, as I stated before, I need 5 boxes. But whatever I do, I cannot add in another menu. Everytime I try something, the first menu box doesn't even work anymore. Can somebody please help me out It doesn't have to be this code exactly. As long as there's room for a description and 5 of those combo menu boxes. The description can also appear underneath every menu box (so not in a textarea box). And it doesn't have to appear after every menu box, as long as it appears after the last one. Also, only the last items have to be linked. Thank you very much for helping me out! I'm lost!
VIEWS ON THIS POST

133

Posted on:

Sunday 25th November 2012
View Replies!

hi iam fresher plz tell urls of code

hi iam fresher where can i find code of php & javascript codes,plz tell url of websites
VIEWS ON THIS POST

232

Posted on:

Sunday 25th November 2012
View Replies!

Looking for code in ajax for dropdownlist date.

I need to build an ajax dropdownlist date selector. Can someone help me.
VIEWS ON THIS POST

229

Posted on:

Sunday 25th November 2012
View Replies!

keydown listener for div element and "event forwarding"

I'm trying to "detect" a keydown event in a DIV. The idea have a keydown listener attached to document and forward the event to the div. (I've searched the web, but it was impossible to handle the noise on this ...
VIEWS ON THIS POST

100

Posted on:

Sunday 25th November 2012
View Replies!

how to get index of a string from a list?

I have a list like _Value1 = "'apple','ball','cat'....so on"; If I know that apple exists in above list.How to get index of whole string from the list.Like apple should have the index 1, ball should have 2 and so on. What is the javascript code for this stuff
VIEWS ON THIS POST

101

Posted on:

Monday 26th November 2012
View Replies!

how to make this popup page

Hi I have seen this popup in a registration form. I think it's using jquery but I don't know how can I make some thing like this . I want to put a registration form in it ( ajax registration ) when the popup appear , around it will became dark how can I do so
VIEWS ON THIS POST

189

Posted on:

Monday 26th November 2012
View Replies!

Reload Ajax div tag after set amount of time

, I don't know if there is already a solution for this but I'm having a lot of problems with re-loading the Ajax div tags. At the moment I have two div tags in my main index.php file, called "flowchartDiv" and "buttondataDiv". Now what I'm trying to do is when ever a image is clicked, "Image of a button", it is added to the database and the "flowchartDiv" must reload in-order to reflex the new button added to the database. I will settle for the "flowchartDiv" reloading after a set time but I actually want the "flowchartDiv" to reload every time I click on the image buttons in the "buttondataDiv". here is my code for index.php file: window.onload=function(){ setTimeout('getXMLHttp()',2000); PHP AJAX Example getFlowButtons("popUp", "1") Here is my ajax.js file: function getXMLHttp() { var xmlHttp try { //Firefox, Opera 8.0+, Safari xmlHttp = new XMLHttpRequest(); } catch(e) { //Internet Explorer try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { alert("Your browser does not support AJAX!") return false; } } } return xmlHttp; } function getFlowButtons(popUp, flow_button_id) { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); } } xmlHttp.open("GET", 'ajax.phpaction=getFlowButtons& value='+flow_button_id, true); xmlHttp.send(null); } function removeButtons(edit, button_id) { var xmlHttp = getXMLHttp(); var edit_Yes_No = edit; xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); } } xmlHttp.open("GET", 'ajax.phpaction=RemoveButton& value='+button_id+'&value1='+edit_Yes_No, true); xmlHttp.send(null); } function loadButtons() { var xmlHttp = getXMLHttp(); var loadButton = "loadButton"; xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleButtonDataResponse(xmlHttp.responseText); } } xmlHttp.open('GET', 'ajax.phpaction='+loadButton, true); xmlHttp.send(null); } function addTo(popUp, button_id, button_url) { var xmlHttp = getXMLHttp(); xmlHttp.onreadystatechange = function() { if(xmlHttp.readyState == 4) { HandleResponse(xmlHttp.responseText); setTimeout('getXMLHttp()',1000); } } xmlHttp.open("GET", 'ajax.phpaction=addButton& value='+button_id+'&value1='+button_url, true); xmlHttp.send(null); } function HandleResponse(response) { document.getElementById('flowchartDiv').innerHTML += response; setTimeout('getXMLHttp()',1000); } function HandleButtonDataResponse(response) { document.getElementById('buttondataDiv').innerHTML += response; } Now in the function HandleResponse(response) function you can see I have already tried to in corporate the timer but nothing is working at the moment. Hope someone can help me Take care
VIEWS ON THIS POST

265

Posted on:

Monday 26th November 2012
View Replies!

Displaying all object properties

Sometimes, you need to see what properties does that object have and what values are assigned to them. This snippet does that.
VIEWS ON THIS POST

113

Posted on:

Monday 26th November 2012
View Replies!

please help about Dojo grid

I want a sample about Dojo grid. Who can give me
VIEWS ON THIS POST

96

Posted on:

Monday 26th November 2012
View Replies!

Can javascript do session variables?

I've been searching around the web since I don't have my library of books available right now -- but here's my question... can I do a purely javascript session variable without the use of PHP, ASP, or anything else Any good resource pages on that I just need to do simple setting, reading, and removing. The intent was to use Javascript so that I don't have to change any file extensions - other suggestions are welcome though.
VIEWS ON THIS POST

86

Posted on:

Tuesday 27th November 2012
View Replies!

where the code comes from?

Sorry, I don't understand the question.
VIEWS ON THIS POST

147

Posted on:

Tuesday 27th November 2012
View Replies!

JQuery slideDown() after Ajax not working - JavaScript Help

Strangely it works if the div is set to display:none. What you could do as a bit of a work around is wrap the response data in a hidden div and apply the .slideDown() to that
VIEWS ON THIS POST

214

Posted on:

Tuesday 27th November 2012
View Replies!

can I output php variables with javascript? - JavaScript Help

I'm trying to do a battle rpg and I need to update the messages when the attack button is pressed, I was wondering, can you output php variables with javascript My code doesn't work. Any help greatly appreciated.
VIEWS ON THIS POST

94

Posted on:

Tuesday 27th November 2012
View Replies!

Javascript Slideshow + MS Acess

I have a very simple javascript slideshow. It is extremely basic (see small sample below):