JavaScript - Simple Javascript Not Running
Hi,
I have just started to learn Javascript which when loaded into a safari web browser of Firefox browser just simply displays the code. I am currently using a MacBook Leopard operating system I have saved the code (corrected for mistakes, many many times) to my desktop Run my usual browser safari (and tried same with Firefox) loaded the file and all I get is a copy of the code displayed in the browser window. Javascript is enabled for both Please can you suggest some options for me to try and get the code working. All I am doing in this example is copied from a book to turn the background colour of the browser RED Thanks Tom Similar TutorialsHello Firstly, this is the full pastebin code of my admin page because i failed adding full code here correctly: http://pastebin.com/tQAaQjYC and the screenshot of the slide manager page: http://img36.imageshack.us/img36/4830/slidemanager.jpg Well, I have a Slide Manager as an admin menu page in Wordpress. When i click "Add new slide" button, as you see in the screenshot above, it adds a new "slide field" in which that dropdown list shows all titles of posts. (Ignore other parts as they work as expected) What i would like to do is, when i choose a post title, the text box which is next to dropdown to be populated automatically by the post's url adress. I want it to be worked for every "slide field" added via "Add new slide" button. I actually made it work that way outside the foreach: PHP Code: <script language="JavaScript"><!-- function onChange() { var Current = document.myform.link.selectedIndex; document.myform.currentText3.value = document.myform.link.options[Current].value; } //--> </script> <select name="link" onChange="onChange(this.value);"> <?php if($_POST['action'] == save ) { $selected = "selected"; } else{ $selected = ""; } echo '<option value="">...... Choose One ...... </option>'; $args = array( 'post_type' => 'post', 'nopaging' => true ); $the_query = new WP_Query( $args ); while ( $the_query->have_posts() ) : $the_query->the_post(); echo '<option '.$selected.' value="'.get_permalink( $post->ID ).'">'; the_title(); echo '</option>'; endwhile; ?> </select> <input name="currentText3" type="text" value=""> But when i add this after the opening code of foreach, i.e: PHP Code: <?php foreach($nivoslides as $k => $slide) : ?> Each slide field shows the dropdown and text box properly as you see in screenshot BUT none of them work. I tried to add brackets but it didn't work either: Code: <select name="link[]" onChange="onChange(this.value);"> I guess it's the javascript code that should be edited or entirely changed but i have no idea how to do it. I would be grateful for any help. Thanks in advance. I am trying to run javascript within Iframe and its not running. (The bigger pictu The final target is to do a file upload without refreshing the page, and the original code is using the iframe as the target of the form, and the return from the server is a javascript code that should update some status field on the page. However the code return from the server is not running, so I just paste it in the iframe and it is still not running. ) Code: Content-type: text/html\n\n <html> <script type="text/javascript"> alert("this is running") </script> <iframe id="upload_target" name="upload_target" src="#" style="width:100;height:100;border:0px solid #fff;"> <script type="text/javascript"> alert("this not running") </script> </iframe> </html> Hello I am setting up a Javascript function in a page called functions.php function onAddBookmarkPressed() { <? mail("XXXXXXX", "Mail","Bookmark"); ?> } And calling it from another place within the page <div class="barstepimg"><img src="http://staggan.com/my_dir/images/progress_bar/fb_buttons/add_bookmark.gif" onclick="onAddBookmarkPressed();"/></div> I include functions.php in my index.php page... When I run the index.php page the function above runs and emails me... Any idea why? I was debugging my code looking for a loop. So in the process I added a confirm request and if the user clicked cancel I coded location.replace("Kill.html"). Problem was that the JAVASCRIPT continued to run until either it finished or I used the Task Manager to end the session. There3 was a small difference in browsers: Firefox put up the new screen while continuing to run the JAVASCRIPT while IE didn't put up the new screen until after the JAVASCRIPT was finished. I could tell the JAVASCRIPT was still running because the confirm messages kept popping up.
Hi all, I sincerely apologise for the noob question. I have search and searched for an answer but to no avail, so I hope someone on here can help. I'm trying to get a fisheye verticle menu working. I've found somethin which fits the requirement he http://zendold.lojcomm.com.br/ifisheye/ and tried to make it work. It just doesn't. I've tried different versions of mootools etc but I think I'm missing something really stupidky simple. I'd really appreciate it if someone could have a look at my temp page (http://www.parkerbs.com/home1.htm) and point me in the right direction. Many thanks in advance. Paul Is it possible to set onmouseover only in js file without running the function on html code? P.S. I found a coding thread here but I don't understand it and it's too old (2005 archive). Thank you very much So I wrote a script to slide various divs horizontally. It takes 2 seconds to start and then begins, sliding, then stops, then slides, until all four slides are shown, and the slides back to the first one. My issue is I have two buttons that should take over and kill the auto sliding. Also the script is giving me errors. That mastertimer, and loopertimer is not defined... Why is that? Here is the code Code: <script type="text/javascript">// <![CDATA[ function restartSlide(item){ item.style.left = parseInt(item.style.left) + 60 +'px'; var resetLooperSl = setTimeout(function(){restartSlide(item)},15); if(parseInt(item.style.left) >= 0){clearTimeout(resetLooperSl);return;} } function stopSlide(){ clearTimeout(loopTimer); } function animateSlide(element,limit,transition){ if(transition == "stop" && parseInt(element.style.left) > -2460){ limit = limit - 820; } else if(transition == "stop" && parseInt(element.style.left) <= -2460){ limit = limit + 820; stopSlide(); } element.style.left = parseInt(element.style.left) -20 + 'px'; if(parseInt(element.style.left)<= limit){ setTimeout(function(){animateSlide(element,limit,"stop")},4000); clearTimeout(MasterTimer); } var loopTimer = setTimeout(function(){animateSlide(element,limit,"flow")},15); } function autoSlide(){ var MasterTimer; var RestarterTime; var adContainer = document.getElementById('adwrap'); adContainer.style.left = '0px'; MasterTimer = setTimeout(function(){animateSlide(adContainer,0,"stop")},3000); RestarterTimer = setTimeout(function(){restartSlide(adContainer)},25000); } addEvent(window, 'load', autoSlide); function btnSlideNow(elem, incremental){ elem.style.left = parseInt(elem.style.left) + incremental + 'px'; setTimeout(function(){btnSlideNow(elem, incremental)},30) } function btnActions(elem){ var incremental; if(elem.id == 'btnAdLeft'){incremental = 30} else if(elem.id == 'btnAdRight'){incremental = -30} btnSlideNow(elem, incremental); } function adButtons(){ document.getElementById('btnAdLeft').onclick = function(){btnActions(this)} document.getElementById('btnAdRight').onclick = function(){btnActions(this)} } addEvent(window, 'load', adButtons); // ]]></script> Also I'd like to see how you experienced scripters would write this cleaner. I'd like to see that, as I am new to js. It would help me learn. thanks Hello I am relatively new to java script. The code I have behaves differently when I debug it and when I just run is straight. There are three functions that one another in a particular sequence. When I debug it they get called in the correct sequence but otherwise they get called in a constant but random pattern. I know I am missing basic understanding of javascript Can some body help please. Thanks in advance Output when I open the page in a browser without debug. Code: Firebug's log limit has been reached. 0 entries not shown. Preferences readJSON2 There are no child objects inside parseJSON: There are no child objects GET http://10.208.137.92/js/v1/External/JSON/sample.json GET http://10.208.137.92/js/v1/External/JSON/sample.json 304 Not Modified 64ms jquery-1.6.2.js (line 7869) readJSON1 alerts [Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}] Console Output when I debug Code: Firebug's log limit has been reached. 0 entries not shown. Preferences Firebug's log limit has been reached. 0 entries not shown. Preferences GET http://10.208.137.92/js/v1/External/JSON/sample.json GET http://10.208.137.92/js/v1/External/JSON/sample.json 304 Not Modified 111ms jquery-1.6.2.js (line 7869) readJSON1 alerts [Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}] readJSON2 alerts [Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}] inside parseJSON: alerts [Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}, Object { alertPartnerDefinedInfos=[1], name="100 S.Ct. 1", more...}] Javascript code Code: function populateSearchResults(alert){ var listOfAlertsDiv = document.getElementById('listOfAlertsDiv'); //var x = document.getElementById('rowTable').insertRow(0); //TODO: Replace the above code to remove Table declaration in above HTML. Instead use JQuery scrollbar and populate scroll area with the content below. // Create a new table. Add a row to it and then add the below cell to it. //TODO: Create a div // Create a table // Add the above created div to div1 var rowDiv = document.createElement('div'); rowDiv.className="scroll-content-item"; var rowContentTable = document.createElement('table'); rowContentTable.width="100%"; rowContentTable.border="0"; rowContentTable.cellpadding="0"; rowContentTable.cellspacing="0"; rowContentTable.summary="Row Content Table"; var rowContentTableFirstRow = rowContentTable.insertRow(0); var checkBoxCell = rowContentTableFirstRow.insertCell(0); checkBoxCell.width = "1%"; //x.valign = "top" //var checkBoxCell = x.insertCell(0); //checkBoxCell.width = "1%"; var checkBox = document.createElement('input'); checkBox.type = "checkbox"; checkBox.name = "checbox"; checkBox.value = "true"; checkBoxCell.appendChild(checkBox); var contentCell = rowContentTableFirstRow.insertCell(1); contentCell.width = "99%"; var contentTable = document.createElement('table'); contentTable.style.border = '1'; contentTable.cellPadding = '0'; contentTable.cellSpacing = '0'; contentTable.width = "100%" var titleRow = contentTable.insertRow(0); var titleCell = titleRow.insertCell(0); titleCell.width = "70%"; titleCell.id = "alertTile" var title = document.createElement('a'); title.href = "http://www.google.com"; title.id = "AlertResultNameLink"; titleText = document.createTextNode(alert.name); title.appendChild(titleText); titleCell.appendChild(title); var moveToFolderCell = titleRow.insertCell(1); moveToFolderCell.width = "5%"; moveToFolderCell.id = "moveToFolder"; var moveToFolderCellImage = document.createElement('img'); moveToFolderCellImage.alt = "Move To Folder"; //TODO: Change the hardcoding of the image location to symbolic links moveToFolderCellImage.src = "/js/v1/Alerts/images/co_documentFooterArrowFirst_inactive.png" moveToFolderCellImage.border = 0; moveToFolderCellImage.className = "moveToFolder"; moveToFolderCell.appendChild(moveToFolderCellImage); var editAlertCell = titleRow.insertCell(2); editAlertCell.width = "10%"; var editAlertButton = document.createElement('a'); editAlertButton.href = "http://www.google.com"; editAlertButton.className = "EditAlertButton"; var editAlertButtonImage = document.createElement('img'); editAlertButtonImage.alt = "Edit Alert"; //TODO: Change the hardcoding of the image location to symbolic links editAlertButtonImage.src = "/js/v1/Alerts/images/co_overlayBox_closebutton.png"; editAlertButtonImage.border = 0; editAlertButtonImage.className = "EditAlert"; editAlertButton.appendChild(editAlertButtonImage); var editAlertButtonText = document.createTextNode(' Edit Alert '); editAlertButton.appendChild(editAlertButtonText); //editAlertButton.innerHTML = " Edit Alert " editAlertCell.appendChild(editAlertButton); var alertMetaDataRow = contentTable.insertRow(1); var alertMetaDataCell = alertMetaDataRow.insertCell(0); var alertMetaDataTable = document.createElement('table'); alertMetaDataTable.width = "100%" var alertMetaDataTableRow = alertMetaDataTable.insertRow(0); alertMetaDataTableRow.width = "100%" var lastUpdateCell = alertMetaDataTableRow.insertCell(0); lastUpdateCell.width = "25%" //var lastUpdateCellText = document.createTextNode("Last Update:"); var lastUpdateCellText = document.createTextNode("Last Update: " +alert.lastRunDate); lastUpdateCell.appendChild(lastUpdateCellText); var nextUpdateCell = alertMetaDataTableRow.insertCell(1); nextUpdateCell.width = "25%" var nextUpdateCellText = document.createTextNode("Next Update:"); nextUpdateCell.appendChild(nextUpdateCellText); var clientIdCell = alertMetaDataTableRow.insertCell(2); clientIdCell.width = "50%" var clientIdCellText = document.createTextNode("Client ID: ") clientIdCell.appendChild(clientIdCellText); alertMetaDataCell.appendChild(alertMetaDataTable); var descriptionRow = contentTable.insertRow(2); var descriptionCell = descriptionRow.insertCell(0); var descriptionTitle = document.createTextNode("Description: "); descriptionCell.appendChild(descriptionTitle); var activeDeliveryRow = contentTable.insertRow(3); var activeDeliveryCell = activeDeliveryRow.insertCell(0); var activeDeliveryTitle = document.createTextNode("Active Delivery"); activeDeliveryCell.appendChild(activeDeliveryTitle); var rss1 = document.createElement('img'); rss1.style.border = "0"; rss1.src = "images/rssIcon.png"; rss1.hspace = "4"; activeDeliveryCell.appendChild(rss1); var rss2 = document.createElement('img'); rss2.style.border = "0"; rss2.src = "images/rssIcon.png"; rss2.hspace = "4"; activeDeliveryCell.appendChild(rss2); var rss3 = document.createElement('img'); rss3.style.border = "0"; rss3.src = "images/rssIcon.png"; rss3.hspace = "4"; activeDeliveryCell.appendChild(rss3); var rss4 = document.createElement('img'); rss4.style.border = "0"; rss4.src = "images/rssIcon.png"; rss4.hspace = "4"; activeDeliveryCell.appendChild(rss4); contentCell.appendChild(contentTable); rowDiv.appendChild(rowContentTable); listOfAlertsDiv.appendChild(rowDiv); contentCell.appendChild(document.createElement('br')); contentCell.appendChild(document.createElement('hr')); contentCell.appendChild(document.createElement('br')); } function readJSON(){ var json = ""; //$(document).ready(function(){ $.getJSON("/js/v1/External/JSON/sample.json", function(data){ json = data; console.log("readJSON1"); console.dir(data); }); //}); console.log("readJSON2"); console.dir(json); return json; } function parseJSON(){ var alerts = []; var json = readJSON(); console.log("inside parseJSON:"); console.dir(json); //TODO: Check if JSON is not null. for(var i in json.alerts){ var createdDate = new Date(json.alerts[i].createdDate); var alert = new Cobalt.Alerts.DataTypes.Alert(); var AlertPartnerDefinedInfos = []; alert.name = json.alerts[i].name; alert.lastRunDate = $.format.date(new Date(json.alerts[i].lastRunDate),"MM/dd/yyyy hh:mma"); alerts.push(alert); } //console.log("fillRows: " +alerts.length); return alerts; } $(document).ready(fillRows=function(){ var alerts = parseJSON(); //console.log("fillRows: " +alerts.length); for(i=0;i<alerts.length;i++){ var alert = alerts[i]; populateSearchResults(alert); } }); I imagine this would be very simple for someone who knows javascript. I want to have three fields. First field is "posted speed limit", second field is "actual speed" and third field will be the output field. All the script needs to do it subtract the posted speed from the actual speed and add a ZERO to the end; which is the amount of the speeding ticket. The minimum fine is $100, however. So, 5 miles over the speed limit would be $100 (minimum value) 15 miles over the speed limit would be $150 (add a zero) 35 miles over the speed limit would be $350. etc. I know very little Javascript, if anyone could help me out with this, I'd appreciate it. Thanks, Sean I am pretty novice. I do not know much about the compilers or how these things run. I do however have a good eye for trends and can figure just about anything out by looking at it. With that; I have a game that uses a exe launcher with a built in patcher. I have found the code for the launcher. There are several "jquery" scripts for basic components like scroll wheel. There are also things like "downloader.js", "inputs.js". I am interested in seeing what (and more precisely how many) ip addresses are being retrieved. I fear this patcher is using a hidden bittorrent like download system. The code for "downloader" is pretty basic. It clearly uses some other script, but I am wondering if you can point me in the direction of a utility to monitor running JS so that I can see what is being returned. Code: _Downloader = function() { this.downloadStatusCallback = null; } _Downloader.prototype = { setDownloadStatusCallback: function(callback) { this.downloadStatusCallback = callback; }, addDownload: function(downloadName, metaUrl, outputPath, authorizationURL) // returns bool { return document.SSNLauncher.SSNLauncher_ReturnBool('addDownload', 'string:' + downloadName + '|' + 'string:' + metaUrl + '|' + 'string:' + outputPath + '|' + 'string:' + authorizationURL + '|'); }, removeDownload: function(downloadName) // returns bool { return document.SSNLauncher.SSNLauncher_ReturnBool('removeDownload', 'string:' + downloadName + '|'); }, getDownloadOption: function(downloadName, optionName) // returns string { return document.SSNLauncher.SSNLauncher_ReturnString('getDownloadOption', 'string:' + downloadName + '|' + 'string:' + optionName + '|'); }, setDownloadOptions: function(downloadName, enableBitSources, enableWebSources) // returns bool { return document.SSNLauncher.SSNLauncher_ReturnBool('setDownloadOptions', 'string:' + downloadName + '|' + 'bool:' + enableBitSources + '|' + 'bool:' + enableWebSources + '|'); }, getDownloadActive: function(downloadName) // returns bool { return document.SSNLauncher.SSNLauncher_ReturnBool('getDownloadActive', 'string:' + downloadName + '|'); }, setDownloadActive: function(downloadName, active) // returns bool { return document.SSNLauncher.SSNLauncher_ReturnBool('setDownloadActive', 'string:' + downloadName + '|' + 'bool:' + active + '|'); } } function __Downloader_reportdownloadStatus(downloadName, state, active, totalBytes, bytesLeft, maxIncoming, averageIncoming, currentIncoming, maxOutgoing, averageOutgoing, currentOutgoing, bytesRead, bytesSent, scanBytesLeft) { if (SSN.Downloader.downloadStatusCallback != null) { SSN.Downloader.downloadStatusCallback(downloadName, state, active, totalBytes, bytesLeft, maxIncoming, averageIncoming, currentIncoming, maxOutgoing, averageOutgoing, currentOutgoing, bytesRead, bytesSent, scanBytesLeft); } } I have tried on several occasions to teach myself programing. I can get the commands and syntax fairly easily, and I am pretty good at 'coming up' with ways to get something done. I just don't have experience in this field (I'm in medical school) so I do not know about the tools and utilities programers use and scouring the internet has been less than fruitful. Anybody capable of pointing me in the direction of finding a utility to monitor running js (if that is even possible =/). I use dreamweaver CS5 to explore js code. Can anyone help me with doing this? I'm kinda new to JavaScript! Create an Array (list) containing 10 words. For every half second going word by word appears in a <span> element. When all the words in the list are gone through, the interval shall stop and printing "The End". I'm trying to code a set of buttons that upon being pressed, change an image on the other side of the table in which they're located (not themselves). Is there a way to do this and if so, what would it be? So far I've been trying to use onMouseDown and changeImage with object id tags to get the effect but it's not working. Hi, I have some Javascript, what I want to hapen is, when the variables hour and randomhour are the same, the message hello is displayed. What actually happens is the message will display all the time, and dissapear when randomhour is 0. Here is my script: Code: <script type="text/javascript"> //Gets hour and minute of day var d = new Date(); var hour = d.getHours(); var minute = d.getMinutes(); //Generates a random hour and minute var randomhour=Math.floor(Math.random()*24) var randomminute=Math.floor(Math.random()*60) document.write(hour); document.write(minute); document.write("----"); document.write(randomhour); document.write(randomminute); if (hour = randomhour) { document.write("<b>Hello</b>"); } </script> I'm brand new to javascript and have a simple assignment that I'm stuck on. I would appreciate any help. Here's what I want: 0:0 1:1 2:3 3:6 4:10 5:15 As you can see, I want the numbers after the colon to be a sum of the number to the left and the number above it. I can easily get the number before the colon, but not sure how to get the sum (the number after the semicolon). Here's my code so far: <html> <body> <script type="text/javascript"> N=0; while (N<=5) { document.write(+ N); N++; document.write(":"); document.write("<br />"); } </script> </body> </html> I need to use a loop, hence the "while" loop. But not sure how to set up variables to do the addition. Thanks much for any help - as you can see, I'm not a programmer. i have this simple js example to click Delete Post and then give the user two options. If they click yes then they go that page...but how do i set it to where when they click cancel it goes back to "Delete Post" ??? i suck at javascript Code: <html> <body> <p><b>Delete Post</b></p> <script type="text/javascript"> window.onclick=function(){ document.getElementsByTagName("p")[0].innerHTML="<b><a href='#'>Delete</a> || Cancel</b>" } </script> </body> </html> Hi guys, I have this piece of php code: PHP Code: <?php $file = 'counter.txt'; $data = @file($file); $data = $data[0]; if($handle = @fopen($file, 'w')){ $data = intval($data); $data++; fwrite($handle, $data); fclose($handle); } ?> What I need to know is, can javascript activate this piece of php code with an onclick function to make it write to the txt file? I have a link that downloads a file and would like to add a little javascript onclick function to write to the text file (as in the php code above) at the same time as they download the file. I was not sure if this was possible in the same way you would do something like: window.location.href='http://www.yoursite.com'; Any help is hugly appreciated. Kind regards, paffley Hello! This is my first post here. I am not a programmer and I thought you guys would be able to help me. I have this script in one of my pages. It was written by a former coworker. It worked perfectly in Firefox 3.6 but stopped working after browser upgrades. It may be a simple fix... I just don't know. Any help would be GREATLY appreciated. Here is the code in the HEAD: Code: <script type="text/javascript"> function generateAnswer() { //alert("answersheet"); window.open("answerSheet.html" + window.location.search); } </script> And here is the code in the BODY, where the script is called: Code: <p>Generate the answer sheet for the tests you have selected: <a href="javascript:generateAnswer()">Generate</a></p> When the page runs, I can see the "Generate" link, but it takes me nowhere. Hello! I have a few simple questions and I'm not having any luck with my Google searches. Any information is appreciated! Pardon my pseudo-coding... It's the simplest way to describe what I'm looking for. 1. I have a two dimentional array called List. I want to write a for loop to loop through the first dimension of the array. How is this done? Code: for (Line in List[][]) { write ( List[Line][1] + " = " + List[Line][2] + "<br/>"); } 2. Is there a simple example of how to create and use an object with multiple properties, functions, etc? For example, the following "person" object: Code: Person as object - property FirstName as string - property LastName as string - function Name = property FirstName + " - " + property LastName - property Children[] as array of Person objects - property Gender as string - property Mate as Person object - property DOB as date 3. Can enumeration be done easily in Javascript? Code: enum StatusFlags blank as 0 new as 1 free as 2 reserved as 4 sold as 8 endedum enum StatusDecoration new as "bold" old as "normal" free as "green" notfree as "red" reserved as strikethrough"" unreserved as "no-strikethrough" sold as "italics" unsold as "no-italics" endenum Thanks! Hey guys, I'm new to javascript and I'm trying to get this code to work. It's a pretty basic system to start with, just wanting to calculate the total pay for employees and using the array so that I can key multiple employees at a time. Can anyone help me adjust my code so that this system works? Thanks for your help in advance, it's greatly appreciated. Code: var NoEmps var PayRate= new Array(); var HrsWorked= new Array(); var EmpName= new Array(); var GrossPay= new Array(); var i var j NoEmps=prompt("Enter Number of Employees to process","") i = 0; while (i<NoEmps) { EmpName[i]= prompt("Enter employee name","") PayRate[i]=prompt("Enter employee pay rate","") HrsWorked[i]= prompt ("Enter hours worked","") if ((isNaN(PayRate[i]))||(isNaN(HrsWorked[i]))) { alert("Please enter numbers") flag = "false" break } if PayRate[i]>25 { alert ("Pay rate can only b $25 or less per hour") flag == "false" break } //i = i +1 } if (flag = "true") { for (j in EmpName) { GrossPay[j]=PayRate[j] * HrsWorked[j] } for (counter; counter<EmpName.length; counter++) { document.write ("Gross Pay for " + EmpName[counter] + " is $" + GrossPay[counter] + "<br>") } } |