JavaScript - Please: Need Help With Js For My Website (newbie)
I'm new to wordpress, I've just made a website and I want to make small modification: I want to remove the buttons in red.
I thought it was CSS. But I've discovered that JS can't be overwritten by CSS so here I am. In firebug, I can see this: element.style { display: block; } When I change it to "display: none" buttons do disappear but I don't know in which file to find this sentence. A JS file is attached as txt. Can anybody give me a hand? This is the site: http://franciscourrea.com/sitio/ buttons by panchoskywalker, on Flickr Similar TutorialsHi! I'm as new as they come when it deals with website development but forums have been useful to me in the past and I'm hoping I can get some kind of direction from all the wonderful people on this forum! I have an idea for a website that I'd like to pursue, and it would need functions such as: -Live news feed -Member logins, profiles, ability to rate/leave feedback for members -Mobile phone friendly -Comment on postings -Create an intro video (maybe even with animated stick figures to explain how the site works) -Accept paypal or other payment method -And basically, need to understand the monthly maintenance cost of all these functions, how to minimize expenses, etc. I know it seems far fetched for a newbie! But I need to know if this is possible.. how would I begin implementing a site like this.. Do I need to find a programmer to code it from scratch? Are there pre-written scripts available for all the functions I listed? What can I expect the costs to be? What's the best way to move forward? ok i need a bit of advice.. I have a webpage and i want to put a section of another website on to my own website.. The Section i want to put on my website is on this page www.bebo.com/thegaadiscos and i only want to put the section with the comments on it... What i want is a bit like the face book section of this website http://www.alexandraburkeofficial.com/ How would this be done does anyone know.. Hello I am new and need some help if possible please. I have a site of which i am putting together for a bit of fun and to teach myself but i need a little help from the masters of script if i may. I have a line of text but need it hidden but whatever i do i cant get it to work. It is on my contact page with HTML & a recaptcha & also a php file. What you see on my site is the following. name then empty field box email address then empty field box subject then field box prefilled with WEB SITE ENQUIRY comments then empty field box. What i would like is for the complete line in BOLD above to be hidden so it cant be seen on the website BUT i can see it when the email is received by me. I am having a bad day by not being able to complete this small task. Any help would be nice if somebody could edit the script for me. Many thanks </script> <div class="email"> <table> </tr> <tr> <td align="justify"> <p align="justify"><label for="name"><b>Name</b> *</label> </td> <td valign="top" align="justify"> <p align="justify"> <input type="text" name="name" maxlength="50" size="40"> </td> <tr> <td valign="top" align="justify"> <p align="justify"><label for="email"><b>Email Address</b> *</label> </td> <td valign="top" align="justify"> <p align="justify"> <input type="text" name="email" maxlength="100" size="40"> </td> <tr> <td valign="top" align="justify"> <p align="justify"><label for="subject"><b>Subject</b> *</label> </td> <td valign="top" align="justify"> <p align="justify"> <input type="text" name="subject" value="WEB SITE ENQUIRY" maxlength="50" size="40"> </td> </tr> <tr> <td valign="top" align="justify"> <p align="justify"><label for="comments"><b>Comments</b> *</label> </td> <td valign="top" align="justify"> <p align="justify"> <textarea name="comments" maxlength="2000" cols="40" rows="6"></textarea> </td> </tr> </table><input class="reset" type="reset" value="Reset All"> Hi - can you please tell me the correct syntax for this please? Both scripts 'CalculateBasic' and 'CalculateTape' both happily return the correct amount - all I want to do is add them up to give me a form.price.value I just can't seem to get the right syntax. <script type="text/javascript"> function CalculateTot(form) { form.price.value = CalculateBasic(form) + CalculateTape(form); } </script> Please can you help Thanx I am trying to create a personal webpage within Frames. The problem is, when I start the left frame, the main frame does what it's supposed to do, but if I click into the mainframe, it opens in an entirely new window, therefore losing my Frameset. I want to be able to visit webpages I have in an Array and be able to use the webpages (surf them, click on links and such). Please forgive the sloppy coding, I am a beginner. This is what I have so far: Frameset: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <frameset cols="220,*" border=5> <frame src="leftFrame.html" name="side" sideborder=1 Scrolling="no" marginwidth="5" marginheight="5" noresize> <frame src="mainFrame.html" name="main" sideborder=1 Scrolling="yes" marginwidth="5" marginheight="5" noresize> </frameset><noframes></noframes> </frameset> <body> </body> </html> Left Frame: Code: <html> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin var page = new Array( "http://google.com" "http://ebay.com" "http://facebook.com" ); var endpage = "/the-end.html"; var slidenum = 0; var slidecount = page.length; var timerID = 0; var show_is_on = 0; var timedelay; var iteration; function showSlideShow() { slidenum++; if (slidenum < slidecount+1) { parent.main.location.href = page[slidenum-1]; document.getElementById('slnum').innerHTML = slidenum } if (slidenum == slidecount+1) { parent.main.location.href = endpage; } else timerID = setTimeout('showSlideShow()', timedelay); } function doShow() { if (!show_is_on) { show_is_on = 1; iteration = document.getElementById('startfrom').value if (iteration > 0) { slidenum = iteration-1 } setTimer(document.getElementById('interval').value); showSlideShow(); } } function stopShow() { clearTimeout(timerID); show_is_on = 0; } function setTimer(milliseconds) { timedelay = milliseconds; } // End --> </script> </HEAD> <P> <form name="form1"> Time delay: <input type="text" size="4" name="interval" id="interval" value="7000" /> <br>(In milliseconds) <P><input type="button" value="Start process" onClick="doShow()" /> <P><input type="button" value="Pause process" onClick="stopShow()" /> <P>Jump to:<input type="text" size="4" name="startfrom" id="startfrom" value="0" /> <P>Progress: <b id="slnum">0</b> of <b id="slcount">0</b> </form> <SCRIPT LANGUAGE="JavaScript"> document.getElementById('slcount').innerHTML = slidecount </SCRIPT> </HEAD> <BODY> </BODY> </html> Main Frame: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> </body> </html> Thanks in advance! Hi what i'm trying to do is have it when once a user clicks on a banner the join raffle button will show after clicking on the banner, along with opening up a new window to the link the banner had. I've been trying to set up a onclick event to do this but haven't had success any help would be appreciated. This is the code ive tried using. <div class="moduletable"> <a onclick="{AUP::RAFFLE=4}" href="http://godaddy.com" target="_blank" mce_href="http://godaddy.com"><img src="/images/stories/godaddy%20image.jpg" alt=""></a> </div> Here is the code for the raffle <tr> <td valign="top" colspan="2"> <form action="" method="post" name="RaffleForm"> <input type="hidden" name="aupraffleid" id="aupraffleid" value="4" /> <input type="hidden" name="aupraffleuserid" id="aupraffleuserid" value="63" /> <input type="hidden" name="auprafflepoints" id="auprafflepoints" value="1" /> <input type="hidden" name="auprafflepointsremove" id="auprafflepointsremove" value="1" /> <input class="button" type="submit" name="Submit" value="Sign up for this raffle now!" /> </form> </td> </tr> Hi guys, i am trying to work with google maps api my issue is with creating an array of markers count the number of marker, and then if it equal two, issue an error msg. i wrote some code, but that doesn't work obviously. and my question is how do i write that code in javascript ? GEvent.addListener(map, 'click', function (overlay, latlng) { if (placeMarker.length < 2) { pendingLatLng = latlng; setTimeout("settleClick()", 225) } else { message("You can only select 2 points."); } }); a sample click event which looks like the line below does work. what am i doing wrong ?: google.maps.event.addListener(map, 'click', function (event) {placeMarker(event.latLng); }) Hi, I am brand new to any sort of programming and am taking an HTML class this quarter. We just started javascript and I am working on an assignment where we make a number guessing game. I have been working on this code for a few days and simply cannot figure out what is wrong. It simply doesn't work and at times locks up my browser (Mozilla Firefox). I don't want anyone to write the code for me, I just need a push to begin to understand what I'm doing wrong. Here is what I have so far: <code> <script type="text/javascript"> function guessingGame(){ var secretNumber=Math.floor(Math.random()*100)+1; var numberOfGuesses=0; var guessNumber=parse.Int(document.getElementById('guessNumberValue').value); document.getElementById("guessNumber").value=guessNumber; while (guessNumber!=secretNumber) { if (guessNumber<secretNumber) document.EricaGuess.response.value="Number too low"; if (guessNumber>secretNumber) document.EricaGuess.response.value="Number too high"; if (guessNumber==secretNumber) document.EricaGuess.response.value="You guessed the correct number!";} numberOfGuesses++; document.EricaGuess.numberOfGuessesValue.value=numberOfGuesses; } </script> </head> <body> <form name="EricaGuess"> <div id="Welcome"> <h2> Welcome to Ericas Guessing Game</h2> <p> Enter a number between 1 and 100. See how quickly you can figure out the magic number</p> <input type="button" value="Guess" onclick="guessingGame()"/> <input type="button" value="Reset" onclick="reset"/> <input type="text" id="guessNumber" name="guessNumberValue"/> <input type="text" id="response" name="response" size="75"/> <input type="text" id="numberOfGuessesValue" name="numberOfGuessesValue"/> </code> This is minus the opening and closing tags. Like I said, I am not asking for anyone to code this for me, just some help to understand what the problems are (I'm sure there are many). Thanks for any help you can give. Hi, I am trying to learn how to use radio buttons in javascript without using functions. This is what I did but it does not work: <script language="javascript"> var season3pointer = "Ray Allen" if (season3pointer == Ray Allen) { alert("Good Answer"); } else { alert("You don't know anything about the Celtics") } document.write("<form action='http://www.nba.com/celtics/' method='post'>"+"<p>"+"Who has the record for most 3 points made in a game?"+ "<br/>"+"<input type='radio' name='game-3-pointer' value='bestrecord'>"+season3pointer+ "Antoine Walker"+"<br />"); </script> I know it should be very easy, but so far I have only found how to do it using functions, any help truly appreciated. Hi guys. Noob at Javascrip and html and this is semi-impossible to me currently. I am working on an assignment where I have 10 image files of 10 different countries. the instruction is to create a page that contains a table with 2 columns in a single row. In the first column, create a list of radio buttons that contains the names of the 10 countries. In the second column, display the flag of the country selected in an ?anchor? element. I am required to use the "onclick" event handler. I have been battling with this for hours, as this book I'm learning from makes assumptions as to the syntax I understand, without explaining it... Would someone please be as kind as to set me on the right path. I have included the sorry piece of code I came up with, that I gathered from other sites and tutorials. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Flags</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> </head> <body> <script type="text/javascript"> var cuba = "cuba.jpg"; var argentina="argentina.jpg"; </script> <form name="flagList" action="" method="get"> <p>Click on the country name to view its flag.</p> <p> <input type="radio" name="flag" onclick=document.flagList.flagJpg.value=cuba"/> Cuba<br/> <input type="radio" name="flag" onclick=document.flagList.flagJpg.value=argentina"/> Argentina<br/> </p> <p> <textarea name="flagJpg" cols="75" rows="20" style="background-color: blue; border: none; overflow :hidden; font: 10px tohoma; color:#3F3F3F:></textarea> </P> </form> </body> Hi everyone! I want to delete all nodes, but leave one div in my html. var p = document.getElementById('container'); var leave= document.getElementById('leave_this'); while (p.hasChildNodes()) { if(leave != p.childNodes){ p.removeChild(p.firstChild); } } Please help. Cheers I have a js file to clean up a textarea when someone copies from a MS Word. I would like to be able to have this remove all the MS Word on submit rather than select a button in an editor. The cleanup.js in located in an includes folder and here is the submit form. How do I include the cleanup.js in this. Any help would be greatly appreciated! Code: <script language='javascript'> function saveChanges(saveDel) { //set the value based on save,delete, or edit document.editDelete.saveDel.value=saveDel; var retVal=true; document.editDelete.saveDel.onsubmit(); document.editDelete.saveDel.value=saveDel; if(saveDel=='delete') { //bring up a confirm if the user clicks delete retVal=confirm("Permanently delete the current record?"); } if(retVal) { //we can active the submit of the form document.editDelete.saveDel.onsubmit(); document.editDelete.submit(); } } </script> I created a new website for documentation on the product we sell. It can be found at www.predatorgames.info. On the main page is this nice looking jquery photobox. When you click on the smaller pictures it will reload the main one. My problem is how do I make it so that when you click on the large image it will link to another site. Moreover, when they click on the small image it will load a new large image and I would want that to go to a different site if clicked. Dynamic. I was hoping someone could look at the source and tell me where I need to make the change. Please be specific as this is new to me. Thanks ahead of time for the help! Hi Everyone I'm learning Javascript with varying degree's of success but am very much in the early phase. My question/problem is this: [ICODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <script language="javascript" type="text/javascript"> var degFahren = new Array(212, "string data", -459.67); var degCent = new Array(); var loopCounter; for(loopcounter =0; loopCounter <= 2; loopCounter++){ if(isNaN(degFahren[loopCounter])){ alert("Data " + degFahren[loopCounter] + " at array index " + loopCounter + " is invalid"); continue; } degcent[loopCounter] = 5/9 * (degFahren[loopCounter] -32); } for (loopCounter =2; loopCounter >=0; loopCounter --){ document.write("Value " + loopCounter + " was " + degFahren[loopCounter] + " degrees Fahrenheit"); document.write(" which is " + degCent[loopCounter] + " degrees centigrade<br />"); } </script> </body> </html> /ICODE] The following code does not return any errors in my browser but I'm confused since I'm sure I should be seeing an alert box telling me that there is invalid data entered bu this doesn't happen, also as far as I can make out I should only be receiving an error for the 2nd loop but there seem to be an error message returned for all 3 loops?? This is all possibly correct but I'm learning from a book and I have no-one to ask these mundane questions to. Any help would be greatly received. Sara heelo people im hoping someone can help me with this for some reason my code isnt working can anyone help me fiind a solution thanks Code: <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Activity 14 question 1 </title> </head> <body> <h1>Comparing Height</h1> <p>Click on the button to compare heights</p> <script type="text/javascript"> <!-- function height() { var height; var DispWin; DispWin = window.open("","NewWin", " width=400,height=200"); if(height <178); { DispWin.document.write("Your height is less than or equal to the average"); } else { DispWin.document.write("Your height is more than or equal to the average"); } } --> </script> <form name="calch"> <p>height: <input type="text" size="10" name="compare height" /></p> <p><input type="button" value="Compare Height" onClick="height(document.calch.height.value;" /> </p> </form> </body> </html> thanks Hi everyone, I'm currently stuck with a transition problem in my javascript (actually it's not mine) but since it's a little tricky to explain I've uploaded the page to a friend website so you can take a look at it. http://www.tanzstelle.net/simon/coel...red/index.html So when you hover between the link "car1" and "car2" the fading animation is absolutely correct but as soon as you hover lets say between "car2" and "car3" you'll see how during the transition "car1" shows up for a second - which is imho very annoying. Does anyone know how to tell js not to use "car1" between other transitions? I'm absolutely open to any new ideas but please remember I'm really a javascript/css newbie. Thank you. simon I'm in a computer coding class, and I'm having a bit of trouble with Javascript. I'm not looking for anyone to do my homework for me, but any hints you could give me as to why this code isn't working would be greatly appreciated. Basically, I need an empty text box where the user enters their guess as to my age. The user enters their guess, and then gets an answer as to whether their guess is right, too high, or too low. The page looks right, but I can't get the function to work. Thank you... <html> <head> <script> function howoldami(age) if(age=23) { alert("You guessed right!"); } else if { (age>23) alert("I'm not that old."); } else { alert("I'm not that young."); } </script> </head> <body> <form> Guess My Age!<input name="age"><br> <input type=button value=Guess! onclick="howoldami(age.value)"> </form> </body> </html> I have been told that what I want to accomplish can be done with javascript. I have never used it, so I am at this forums mercy. I basically have to HTML inputs, the first are simple radio buttons, Yes and No. If no is checked (which is selected by default), then I want the 2nd input to be invisible to the user. Unfortunately I am not the original developer of the code. I have been asked to complete this in a very short amount of time. From the looks of the code, it looks like the condition will have to hide the entire table row with the id of 'voiceintrorow' if radio button 'playintro' with the value of 0 is checked. Here is my code. <tr id="playIntroRow"> <td class="editLabel"><span>*</span>Play Intro:</td> <td>Yes<input type="radio" name="playintro" value="1" /> No<input type="radio" name="playintro" value="0" checked /></td> </tr> //Hide this table row if the above radio button is checked NO <tr id="voiceIntroRow"> <td class="editLabel"><span>*</span>Intro Message:</td> <td><cfscript>voiceIntroRenderer.Render();</cfscript></td> </tr> Iguess javascript can accomplish this, but I don't know. I hope I posted this question correctly. Im creating an applet that adds two digits. Pretty simple, I have the layout as it needs to be, but I guess I dont know where to put the method or what the actual method is so that it adds the two digits and then puts them in the results textfield. Code: /* document segment filename: ActionApplet author: sullivan date: october.2010 */ import java.awt.*; import javax.swing.*; import java.awt.event.*; public class addNumbers extends JApplet implements ActionListener { /* ----------------------------- declarations */ // color objects Color white = new Color(255, 255, 255); Color black = new Color(0, 0, 0); // components JLabel inputLabelJLabel; JTextField inputLabelJTextField; JLabel outputLabelJLabel; JTextField outputLabelJTextField; JLabel finalLabelJLabel; JTextField finalLabelTextField; JButton enterJButton; JButton clearJButton; // variables String inputName; String outputName; public void init() { setLayout(null); setSize(400, 400); /* ------------------- initialization */ inputLabelJLabel = new JLabel(); inputLabelJLabel.setBounds(100, 50, 150, 20); inputLabelJLabel.setFont(new Font("Default", Font.PLAIN, 12)); inputLabelJLabel.setText("Enter First Integer"); inputLabelJLabel.setForeground(black); inputLabelJLabel.setHorizontalAlignment(JLabel.LEFT); add(inputLabelJLabel); inputLabelJTextField = new JTextField(); inputLabelJTextField.setBounds(230, 50, 150, 20); inputLabelJTextField.setFont(new Font("Default", Font.PLAIN, 12)); inputLabelJTextField.setHorizontalAlignment(JTextField.CENTER); inputLabelJTextField.setForeground(black); inputLabelJTextField.setBackground(white); inputLabelJTextField.setEditable(true); add(inputLabelJTextField); outputLabelJLabel = new JLabel(); outputLabelJLabel.setBounds(100, 80, 150, 20); outputLabelJLabel.setFont(new Font("Default", Font.PLAIN, 12)); outputLabelJLabel.setText("Enter Second Interger"); outputLabelJLabel.setForeground(black); outputLabelJLabel.setHorizontalAlignment(JLabel.LEFT); add(outputLabelJLabel); outputLabelJTextField = new JTextField(); outputLabelJTextField.setBounds(230, 80, 150, 20); outputLabelJTextField.setFont(new Font("Default", Font.PLAIN, 12)); outputLabelJTextField.setHorizontalAlignment(JTextField.CENTER); outputLabelJTextField.setForeground(black); outputLabelJTextField.setBackground(white); outputLabelJTextField.setEditable(true); add(outputLabelJTextField); finalLabelJLabel = new JLabel(); finalLabelJLabel.setBounds(100, 110, 150, 20); finalLabelJLabel.setFont(new Font("Default", Font.PLAIN, 12)); finalLabelJLabel.setText("Addition Results"); finalLabelJLabel.setForeground(black); finalLabelJLabel.setHorizontalAlignment(JLabel.LEFT); add(finalLabelJLabel); finalLabelTextField = new JTextField(); finalLabelTextField.setBounds(230, 110, 150, 20); finalLabelTextField.setFont(new Font("Default", Font.PLAIN, 12)); finalLabelTextField.setHorizontalAlignment(JTextField.CENTER); finalLabelTextField.setForeground(black); finalLabelTextField.setBackground(white); finalLabelTextField.setEditable(false); add(finalLabelTextField); enterJButton = new JButton(); enterJButton.setBounds(100, 300, 100, 20); enterJButton.setFont(new Font("Default", Font.PLAIN, 12)); enterJButton.setText("Enter"); enterJButton.setForeground(black); enterJButton.setBackground(white); add(enterJButton); enterJButton.addActionListener(this); clearJButton = new JButton(); clearJButton.setBounds(210, 300, 100, 20); clearJButton.setFont(new Font("Default", Font.PLAIN, 12)); clearJButton.setText("Clear"); clearJButton.setForeground(black); clearJButton.setBackground(white); add(clearJButton); clearJButton.addActionListener(this); } public void actionPerformed(ActionEvent event) { Object obj = event.getSource(); /* the following lines of code are commented out, remove the // to un-comment after the components are initialized */ if(obj == enterJButton) { getFirstMethod(); } else if(obj == clearJButton) { clearAll(); } } public void getFirstMethod() { inputName = Double.parseDouble(inputLabelJTextField.getText()); outputName = Double.parseDouble(outputLabelJTextField.getText()); if (e.getSource() == addButton) { answer.setText(String.valueOf(x + y)); symbol.setText(enterJButton); } { public void getOutput() { outputLabelJTextField.setText("" + inputName); } public void clearAll() { inputLabelJTextField.setText(""); inputLabelJTextField.requestFocusInWindow(); outputLabelJTextField.setText(""); } } i am trying to create a simple counter that will start with a fixed number, say 5,000,000 and count up in increments of 1 every ten seconds with no end value set (infinitely).. This is for the non-profit I work for, and it is to show the number of bars of soap we have recycled to distribute to third world countries. Any help is greatly appreciated.
|