Please help!!






















Posted On: Sunday 25th of November 2012 09:59:27 PM Total Views:  173
View Complete with Replies

RELATED TOPICS OF JavaScript PROGRAMMING LANGUAGE




at a state of desperation please help

I am trying to sign off a website but have one final obstacle to overcome and then all good. the problem I have is I have private chat on a dating website. the site is in russian and english. the php page for the chat needs headers so that it can recognise the russian charset. if i have no header in the php page then the chat works fine but with silly characters instead of russian text. If i add the headers required the chat does not work. But if I get the chat working then edit the php page adding the headers and then upload that page, the chat works with russian characters. I tried adding an if statement to push the headers if a message was sent but to no avail. any help would be fantastic. I can add the code if required but theres reams of it to go through many
VIEWS ON THIS POST

112

Posted on:

Saturday 24th November 2012
View Replies!

Display nothing - please help...

In my asp page I successfully extracted records from my database. The records are written in Hebrew. I used and
VIEWS ON THIS POST

278

Posted on:

Saturday 24th November 2012
View Replies!

dynamic form with dynamic table...please help

hi there if you look at the output of my first code or "instance". once a option is selected in the checkbox, the cell next to that cell changes and presents a form to the user, or input field based on the selected option... so in essence this is ONE instance of a Question.. the problem is that i want to ADD another question below that, I can add another row with a dropdownbox, BUT i do not know how to go further and let it act onchange and generate form like above mentioned...please help Untitled Document function addRowToTable() { var tbl = document.getElementById('tblSample'); var lastRow = tbl.rows.length; // if there's no header row in the table, then iteration = lastRow + 1 var iteration = lastRow; var row = tbl.insertRow(lastRow); // left cell var cellLeft = row.insertCell(0); var textNode = document.createTextNode("Question " + iteration); cellLeft.appendChild(textNode); // middle cell var cellMiddle = row.insertCell(1); var oSelect=document.createElement("select"); oSelect.setAttribute('name','numflowers' + iteration); oSelect.setAttribute('id', 'numflowers' + iteration); var oOption4 = document.createElement("OPTION"); var t = document.createTextNode(""); oOption4.setAttribute("value", "4"); oOption4.setAttribute("id", "divColor4"); oOption4.appendChild(t); oSelect.appendChild(oOption4); var oOption = document.createElement("OPTION"); var t = document.createTextNode("Short Question"); oOption.setAttribute("value", "1"); oOption.setAttribute("id", "divColor1"); oOption.appendChild(t); oSelect.appendChild(oOption); var oOption1 = document.createElement("OPTION"); var t = document.createTextNode("Long Question"); oOption1.setAttribute("value", "2"); oOption1.setAttribute("id", "divColor2"); oOption1.appendChild(t); oSelect.appendChild(oOption1); var oOption2 = document.createElement("OPTION"); var t = document.createTextNode("Multiple Question"); oOption2.setAttribute("value", "3"); oOption2.setAttribute("id", "divColor3"); oOption2.appendChild(t); oSelect.appendChild(oOption2); var oOption3 = document.createElement("OPTION"); var t = document.createTextNode("True / False"); oOption3.setAttribute("value", "TF"); oOption3.setAttribute("id", "divColor1"); oOption3.appendChild(t); oSelect.appendChild(oOption3); cellMiddle.appendChild(oSelect); //cell Right var cellRight = row.insertCell(2); var textNode1 = document.createTextNode(); cellRight.appendChild(textNode1); } function keyPressTest(e, obj) { var validateChkb = document.getElementById('chkValidateOnKeyPress'); if (validateChkb.checked) { var displayObj = document.getElementById('spanOutput'); var key; if(window.event) { key = window.event.keyCode; } else if(e.which) { key = e.which; } var objId; if (obj != null) { objId = obj.id; } else { objId = this.id; } displayObj.innerHTML = objId + ' : ' + String.fromCharCode(key); } } function removeRowFromTable() { var tbl = document.getElementById('tblSample'); var lastRow = tbl.rows.length; if (lastRow > 2) tbl.deleteRow(lastRow - 1); } function ShowMenu(num, menu, max) { //num is selected value, menu is the name of the div, max is the number of divs for(i = 1; i
VIEWS ON THIS POST

267

Posted on:

Saturday 24th November 2012
View Replies!

Help please with form validation & dynamic date?

Hi all. :icon_smile:I am having problems with my form validation and getting it to run. I also have been unable to get the last page update to display at the bottom of the screen:icon_redface:. Is anyone able to help me to get these things to work - I am getting very frustrated with this:icon_cry:. Produce at Joe's - Order Form //Used to check to see if any of the fields are empty that are necessary information. onload = function validationComplete(Order) { if(emptyField(Order.Name)) alert("Please enter your name."); else if(emptyField(Order.Address)) alert("Please enter your address."); else if(emptyField(Order.Suburb)) alert("Please enter your suburb or town."); else if(emptyField(Order.State)) alert("Please enter your state."); else if(emptyField(Order.Postcode)) alert("Please enter your postcode."); else if(emptyField(Order.Homeph)) alert("Please enter your home phone number."); else if(emptyField(Order.CCNumber)) alert("Please enter your Credit Card number."); else if(emptyField(Order.Type)) alert("Please enter your Credit Card type."); else if(emptyField(Order.Expiry)) alert("Please enter your Credit Card expiry month."); else if(emptyField(Order.Year)) alert("Please enter your Credit Card expiry year."); else if(emptyField(Order.Basket)) alert("Please enter your basket choice."); else if(emptyField(Order.Quantity)) alert("Please enter your basket quantity."); else if(emptyField(Order.Street)) alert("Please enter your delivery street."); else if(emptyField(Order.Town)) alert("Please enter your delivery town or suburb."); else if(emptyField(Order.Pcode)) alert("Please enter your delivery postcode."); else if(emptyField(Order.Ddr)) alert("Please enter your delivery date."); else if(emptyField(Order.month)) alert("Please enter your delivery date."); else if(emptyField(Order.yr)) alert("Please enter your delivery date."); else if(emptyField(Order.Yes.value)) alert("Please enter your card message."); else return true; return false; } //Check to see if field is empty. onload = function emptyField(Order) { if(textObj.value.length == 0) return true; for (var i=0; i
VIEWS ON THIS POST

161

Posted on:

Saturday 24th November 2012
View Replies!

New to javaScript and need help, please!

, I'm learning JavaScript programming and I have a test to do. Will it be possible for someone to check what I've already written and let me know if I'm on the right track In green are the questions asked and in red are my answers. I also put the original code in black. Thank you in advance for your time and guidance. Open M150_TMA05_2009B_Q1_task1.html in the text editor and read through the code to see how Math.random() is used. Run the program, observing the output in the alert dialogue. When you close the alert dialogue box a Display Random Number button is visible in the browser window: ignore this for now. M150 TMA 5 : Programming : Task 1 - Testing Math.random() //generate a random number greater than or equal to 0.0 and less than 1.0 //and display it in an alert dialogue window.alert("Random number returned is: " + Math.random()); A test of the random number functions Edit M150_TMA05_2009B_Q1_task1.html so that the alert dialogue box will display numbers greater than or equal to 0.0 and less than 50.0. Remember to make appropriate changes to the code comment. M150 TMA 5 : Programming : Task 1 - Testing Math.random() //generate a random number greater than or equal to 0.0 and less than 50.00 //and display it in an alert dialogue window.alert("Random number returned is: " + Math.random()*50); A test of the random number functions Edit M150_TMA05_2009B_Q1_task1.html replacing the existing JavaScript with the function getRoundedRandomNumber(aNumber). This function should return whole numbers between 0 and aNumber, using Math.round() as outlined above. Write a comment to document what this function does, using an extended comment (that is, one between /* and */). Also provide appropriate single-line comments (the ones starting with //) in the code, describing how it works. Paste a copy of the getRoundedRandomNumber() function into your Solution Document. M150 TMA 5 : Programming : Task 1 - Testing Math.random() /*Generate a random number greater than equal to 0.0 and less than aNumber. Create a function to round the random number generated and display it using the event handler Onclick.*/ var aNumber = parseFloat((window.alert("hello" + Math.random()*50))) ; //create the function getRoundedRandomNumber( ) to be called when Onclick is pressed function getRoundedRandomNumber(aNumber) // round the number generated by the random { var aRoundedNumber = Math.round(Math.random() * (aNumber)) ; // show the result of the number return aRoundedNumber ; } A test of the random number functions
VIEWS ON THIS POST

211

Posted on:

Saturday 24th November 2012
View Replies!

new to JS need help please! :-D

I have been HTML'ng for many many years, however am new to the Java side of it. I'm using a script that works well on another site. Trying to customize it, and having issues. The previous menu's were to 2 levels, I don't need that, that's what I'm trying to get away from. Logic says just delete the 2 tier and all will be fine, however that just seems to make the whole script not work: function mmLoadMenus() { if (window.mm_menu_0028104603_0) return; window.mm_menu_0028104603_0_1 = new Menu("Sales",95,16,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#ffffff","#ffffff","#00007d","left","middle",3,1,300,-10,5,true,true,true,2,true,true); mm_menu_0028104603_0_1.addMenuItem("Fence","window.open('residential.htm', '_parent');"); mm_menu_0028104603_0_1.addMenuItem("Testing","window.open('commercial.htm', '_parent');"); mm_menu_0028104603_0_1.addMenuItem("Retail","window.open('retail.htm', '_parent');"); mm_menu_0028104603_0_1.fontWeight="bold"; mm_menu_0028104603_0_1.hideOnMouseOut=true; mm_menu_0028104603_0_1.menuBorder=1; mm_menu_0028104603_0_1.menuLiteBgColor='#cc9933'; mm_menu_0028104603_0_1.menuBorderBgColor='#33cc33'; mm_menu_0028104603_0_1.bgColor='#33cc33'; window.mm_menu_0028104603_0 = new Menu("root",118,16,"Verdana, Arial, Helvetica, sans-serif",11,"#000000","#cc9933","#cc9933","#00007d","left","middle",3,1,300,-10,5,true,true,true,2,true,true); mm_menu_0028104603_0.addMenuItem("Free Estimates","window.open('free_estimates.htm', '_parent');");
VIEWS ON THIS POST

142

Posted on:

Saturday 24th November 2012
View Replies!

please help ,simple js not working

It doesn't work because you don't need to surround the link with script tags for that inline javascript to work. The click this link will work just fine on its own.
VIEWS ON THIS POST

267

Posted on:

Saturday 24th November 2012
View Replies!

i need it please

can somone have timekill script for rapidshare the anti-waiting one please do answer
VIEWS ON THIS POST

262

Posted on:

Saturday 24th November 2012
View Replies!

Tech help with script please.

Help required please. I am using the following Multi image script: http://www.javascriptkit.com/script/script2/multishow.shtml Is it possible to make clicked slides that link to a unique url open in new window Many
VIEWS ON THIS POST

128

Posted on:

Saturday 24th November 2012
View Replies!

Javascript help please

I`m writing a mod for a forum but I`m getting an error with a piece of Javascript which checks the length of text typed into a text area. The error only happens in IE and not firefox/mozilla This is the JS function check_length( l_max , textBox ) { item = eval( "document.theForm." + textBox ); if( !item ) { return false; } if( l_max < item.value.length ) { alert( "{ipb.lang['l_over']}" + l_max + " {ipb.lang['l_characters']}." ); } if( l_max == item.value.length ) { alert( "{ipb.lang['l_equal']}" + l_max + " {ipb.lang['l_characters']}." ); } if( l_max > item.value.length ) { alert( "{ipb.lang['max_is']}" + l_max + " {ipb.lang['l_characters']}. {ipb.lang['youve_used']}" + item.value.length + " {ipb.lang['l_characters']}." ); } } Anyone see a problem with it
VIEWS ON THIS POST

143

Posted on:

Saturday 24th 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

231

Posted on:

Sunday 25th November 2012
View Replies!

my html code isnt working please help


VIEWS ON THIS POST

366

Posted on:

Sunday 25th November 2012
View Replies!

Can anyone please help my problem...?

I'm not sure what JavaScript/DHTML programming help we could give that would address the issue. "Java" and "JavaScript" are different things. You might try asking Yahoo! for help. You use the term "nth", which I understand to mean the last term in an indefinite series. I don't see how that makes sense in your message. Could you clarify, please
VIEWS ON THIS POST

168

Posted on:

Sunday 25th November 2012
View Replies!

Tree View in a Web Page, please Help

Anyone who can provide a code that I can put in a web page. I'm creating a page with a Tree View that I can navigate to see all the contents of the web page. Please post a simple code that I can understand easily, because I a newbie and I might not understand if it's complicated. Thank you, please help. Help,
VIEWS ON THIS POST

91

Posted on:

Sunday 25th November 2012
View Replies!

code works in IE but not in firefox.. please help

What's new MEA ICCR GOI Directory Registration List of Holidays Embassy Personnel India-Mexico Relations At glance Bilateral relations Programme Indai-Belize relations Commerce & Trade India Doing Business Visit Study Mexico Doing Business Tourism Visit Culture Centre Know India Know Mexico Know Belize Photo Gallery Publications Press release Publications India news India perspective Links Useful Govt links of India Useful Govt links of Mexico mid right
VIEWS ON THIS POST

141

Posted on:

Sunday 25th November 2012
View Replies!

please help..

I am tryin to embed youtube in my webpage. I am a starter so i might be doing something wrong here. can any please help me on this. I have included the swobject. You need Flash player 8+ and JavaScript enabled to view this video. var params = { allowScriptAccess: "always" }; var atts = { id: "myytplayer" }; swfobject.embedSWF("http://www.youtube.com/v/VIDEO_IDenablejsapi=1&playerapiid=ytplayer", "ytapiplayer", "425", "356", "8", null, null, params, atts); function onYouTubePlayerReady(playerId) { ytplayer = document.getElementById("myytplayer"); } Play
VIEWS ON THIS POST

136

Posted on:

Sunday 25th November 2012
View Replies!

Help please with Listbox total and average

. I have a problem with the JavaScript code for my aggregates workings for my course. I have worked out with some help how to input a number, click a button and get the number to appear in a listbox. I also had to get the Reset button to clear all fields including the listbox which I managed to work out. I am now having problems getting it to total all the numbers in the list box. I have managed to get it to do something but get 'undefined' in the Total Sum box. I also need to average it but haven't really done much with sorting it out yet as it doesn't work either. Would someone be so kind as to tell me where I am going wrong with this as I am still learning JavaScript Below is the code that I have so far function testAdd() { var formObject = document.aggregate if (formObject.input.value!="") addOption(formObject.List,formObject.input.value) } function addOption(selectObject,input) { var optionObject = new Option(input) var optionRank = selectObject.options.length selectObject.options[optionRank]=optionObject } function GetTotal() { var list = eval(document.getElementById('List').value) document.getElementById('Total Sum').value = list ; } function average() { document.getElementById("Average").value = select.Avg("List"); } function ListBoxClear() { document.getElementById('List').options.length = 0; } Aggregates Add as many numbers as you like to the list, then click Calculate. Total (Sum): Average:
VIEWS ON THIS POST

116

Posted on:

Sunday 25th November 2012
View Replies!

My two constructors are not working any help please

, my task was to make two constructors for the code that I also posted and they are not working. Can somebody help me figure out why they are not working. I posted them right below. here are my constructors for course and Faculty course.js: function Course (name, times, instructorName, instructorDept ) { this.name = name ||"unknown course name"; this.times = times||"unknown time"; this.instructor = new Faculty(instructorName, instructorDept); this.getname = function(); this.setname = function( name ); this.gettimes = function(); this.settimes = function( dept ); this.getinstructor() = function(); this.setinstructor(Faculty); this.name.toString = function(); } faculty.js: function Faculty(name, dept) { this.name = name || "unknown"; this.dept = dept || "unknown"; this.getname = function(); this.setname = function( name ); this.getdata = function(); this.setdata = function( dept ); this.name.toString = function(); this.dept.toString = function(); } Here is the test file testprob1.js: var fac1 = new Faculty( "Dr. Smith", "Math" ); document.writeln( "New faculty: " + fac1.getname() + ", " + fac1.getdept() + "" ); document.writeln( "Again: " + fac1 + "" ); var fac2 = new Faculty(); document.writeln( "New faculty: " + fac2.getname() + ", " + fac2.getdept() + "" ); fac2.setname( "Dr. Jones" ); fac2.setdept( "CS" ); document.writeln( "Updated: " + fac2.getname() + " " + fac2.getdept() + "" ); var crs1 = new Course( "COMP322", "MWF 1:00-1:50", "Dr. Green", "CS" ); document.writeln( "New course: " + crs1.getname() + ", " + crs1.gettimes() + ", " + crs1.getinstructor() + "" ); document.writeln( "Again: " + crs1 + "" ); var crs2 = new Course(); document.writeln( "New course: " + crs2.getname() + ", " + crs2.gettimes() + ", " + crs2.getinstructor() + "" ); crs2.setname( "COMP590" ); crs2.settimes( "TR 1:00-2:15" ); crs2.setinstructor( fac2 ); document.writeln( "Updated: " + crs2.getname() + ", " + crs2.gettimes() + ", " + crs2.getinstructor() ); The HTML drivers to run the code: Assignment 3, Problem 3
VIEWS ON THIS POST

221

Posted on:

Sunday 25th November 2012
View Replies!

please to to solve this problem

I have implemented tree structure where I get the following error :'( Error: document.getElementById(treeid) has no properties Iam not able to correct. Without correcting the error the code works fine, but i have to execure under jquery. And jquery will not accept any error codes. Please help to resolve this problem. thanka in advance, devi, You are trying to access an object called treeid - and it is not initialized - or is null. You could have a problem with the scope of the variable - where treeid was defined in a scope that this part of your code cannot see. Only way you can get better help on this is if you paste more of your code to be evaluated. jQuery should have nothing to do with this - and you can have errors in your code and jQuery is not affected in any way. The statement jQuery will not accept any error codes really does not make much sense.
VIEWS ON THIS POST

134

Posted on:

Sunday 25th November 2012
View Replies!

Google Maps HELP please.

all, I'm trying to get Google Maps on my website and I'm not exactly sure what todo. I got an API key from Google and then some coding but I don't know what todo with it. The reason I want Google Maps on my website is because I want my customers to know how to get to the store from all over florida. If anyone could help that would be awesome. Thank you.
VIEWS ON THIS POST

126

Posted on:

Sunday 25th November 2012
View Replies!