i accidentally set up my path variable instead of classpath and now my
computer can't find any of the executable files. it would be great if
anyone knew what really should stand by the path variable. i don't
suppose there's something like 'set all to default?
I am moving from a development environment to a production environment and would like to know the best way to handle javascript/jquery files on the production server. I have looked at Packer and also searched this forum for ideas but the only threads I came up with were a year old and I would prefer some comments more recent than that I think.
Obviously I would at the very least like to strip out comments, etc. and would also like to minimize them as much as possible if that makes a performance difference. Any input is welcome at this point.
Just wondering if anyone has any ideas on how to solve a particular problem. A client wants to print barcode labels from their (web/php based application). The barcode labels are very small, so I'm guessing that doing a screendump via a standard inkjet isn't going to work (i.e. might need somehow to print to a barcode printer!)
I am extremely frustrated with my current setup developing jquery as I am in Dreamweaver. I've installed the add ons but they dont help enough. My biggest beef is with something that auto-indents to make the structure of the code legible. That and decent colouring. Can anyone recommend something that does all that and potentially even reloads the page on save....and previews in browser...and debugs?
I have a page that's built using ASP.NET and using a master page.Page contents shows up for a moment then I get a blank page - when I run it. If I remove the jQuery code from my page - then I get the contents.
On this site [URL].. I have a JQuery powered search function (the lens button in the menu), when I click on it the search button opens but the close button does not work, how can I fix that?
function agregar_row(){ for (i=0; i<10; i++){ row="row/" . i; if (document.getElementById(row).style.display=='none'){ document.getElementById(row).style.display='' i=11; } }}
This function is intended to make visible a row, just one by each time the function is called. the way im invoking "(row)" is wrong, i think...
I'm trying to make my timeclock for work, and the Date object in Javascript is giving me wrong values. I made sure that the time on my computer is the actual time, day and year, yet I either get dates that are 2 week in the future, or set in the year 2403. I have no idea what's going on, even if I just alert out a new Date() with no variables, I get the same result. If there is something that I'm not declaring or anything, I'd love to hear what it is.
I am relatively new to js, but I did think I was starting to get the hang of it. Then this happened...
I have a form with an onsubmit event handler: <form id="uploadForm" method="post" action="..." onSubmit="checkDates()">
The event handler does some minor validation, then returns true or false:
function checkDates(y, m, d) {
if (endDate.getTime() >= startDate.getTime()) return true;
alert("Start date must precede end date"); return false; }
(The arguments to the function are used when it is called elsewhere, not as onsubmit.)
I also have a library class which needs to process the form submit, so it hooks onsubmit like this: MyClass.setOnSubmit = function(listId) { var list = document.getElementById(listId); var form = list.form;
var f = form.onsubmit; if (typeof f == "function") { form.oldOnSubmit = f; form.onsubmit = function(){ var ok = this.oldOnSubmit(); if (ok) return MyClass.onsubmit(listId); else return false; }; } else form.onsubmit = function(){MyClass.onsubmit(listId);}; }
My problem is that the value returned from oldOnSubmit and stored in ok appears as 'void'. This happens in IE 6 and in FireFox 1.07. Can anyone explain what's happening?
I got this (piece of) script from 'DHTML Utopia - Modern Webdesign - Using Javascript & DOM'.
function aKeyWasPressed(e) { if (window.event) { var key = window.event.keyCode; } else { var key = e.keyCode; } alert('You pressed the key: ' + String.fromCharCode(key)); }
It is example of adding an eventlistener to a textarea. The events works alright, but when I press 'a' the alert gives me 'A', when I press Ǝ' I get 'h', when I press Ɔ' I get ''', when I press 'ŕ' I get Ɔ', .... Has probably something to do with the fact that I don't live in the UK or USA. But it shouldn't matter; a key is a key.
I have a function for totalling decimal values provided in textboxes that form a column on a webpage. This script should total the values in the textboxes, displaying the result in the final 'optotalprogtime' text box formatted as a decimal.
Here is what I've got so far, but I'm getting annoying "object expected" errors on the line where I attempt to format the number (as indicated by the comment below)
//realtime calculation formating as minutes (decimals) function opprogtotalcol() { alert("in opprogtotalcol"); document.getElementById('optotalprogtime').value = 0; for (var rowNumber =1; rowNumber <= 12; rowNumber++){ document.getElementById('optotalprogtime').value = parseFloat(document.getElementById('optotalprogtim e').value) + parseFloat(document.getElementById('opprogmin' + rowNumber ).value); } if(!isNaN(document.getElementById('optotalprogtime ').value)){ //only works for numbers document.getElementById('optotalprogtime').value = formatNumber(document.getElementById('optotalprogt ime').value, 2);//format number here } }
Any insight would be appreciated.
To head off concerns about wrapping code correctly, my code is wrapping pretty bad in this form, but in the acutal page I have long lines that do not wrap.
I have tried to write a wait function but it seems like it will not brake the while loop. I tried two different solutions. Can anyone tell me what I am doing wrong, and come with another suggestion? If I call the function like this: wait(500); it should wait 500ms right?
function wait(time) { while(1){ setTimeout("break;",time); } }
function wait(time) { var flag=0; while(flag=0){ setTimeout("flag=1;",time); } }
I am new to jQuery and I am reading this book as an introduction. I find it very good, but I came across an example today that doesn't make sense to me. It is an example of the prev() method and is like this: $("h1").prev() // Sibling elements of <h1> tags Is this correct? I thought prev() just picked one element so it should be "element" instead of "elements" in the comment. Alsoa sibling of <h1> tags would have to be another <h1> tag wouldn't it? And there are no <h1> tag before all <h1> tags?
So im basically using a link, to scroll through a series of divs to select the correct one.Ie click on happy, and scrolls to 'happy' div, However, the scroll seems to not go to what its linked to, but scrolls to the third div in the list.
The problem? On a computer with 1280x1024 resolution, IE detects it to be 1024 (thus sending the user to the wrong page). It works perfectly in all other browsers (that I have tried).
I am using the same java script to help add shipping costs for paypal in my html.I have worked very long and hard to get to this point.I have saved and named each java script for it's form.However, when there are more then one on the html page it always calculates the last form giving me the wrong price per quantity on the first.I have not found a way to differentiate or id and separate.
I'm trying to build a slideshow for wordpress. On a static page everything works as expected.In Wordpress however, the same script*1* behaves differently. The activeSlide is hidden behind the "default anchor image". I think it's because activeSlide gets assigned to li instead of the a -tag. You can see that with Google Chrome. The activeSlide class is advancing, it's just assigned to the wrong element. I'd like to target the link (a) again, so the green box appears in front of the red box.
I set up a function in JQuery to do .load() to a DIV. (This function appears to work only in IE.) This works fine if I am loading an html document to the DIV, but if I load a .pdf file, it looks like it doesn't use the right mime type for interpretation. It looks like it just streams the binary code into the div. Is there a way use JQuery to load a PDF file into a DIV and have it render correctly?
Here is my source: <html><head> <title>jQuery test page</title> <script src="jquery-1.3.2.min.js" type="text/javascript"></script> <script type="text/javascript"> function loadContent(elementSelector, sourceUrl) { $(""+elementSelector).load(sourceUrl); } </script></head><body> <div id="top" style="position:absolute;top:0px;left:0px" > <a href="javascript:loadContent('#content', '[URL]');">I work</a> <p><a href="javascript:loadContent('#content', '[URL]');">I don't work</a> <p>Here's the stuff!</div> <div id="content" style="position:absolute;top:200px;left:0px">content will be loaded here</div></body> </html>
If you click the link that doesn't work you get: %PDF-1.6 % 37 0 obj <> endobj xref 37 34 0000000016 00000 n 0000001386 00000 n 0000001522 00000 n 0000001787 00000 n 0000002250 00000 n 0000002274 00000 n 0000002423 00000 n 0000002844 00000 n 0000002888 00000 n 0000002932 00000 n 0000004113 00000 n 0000004147 00000 n 0000004211 00000 n 0000006880 00000 n 0000007023 00000 n 0000007172 00000 n 0000007312 00000 n 0000007455 00000 n 0000008176 00000 n 0000008566 00000 n 0000009066 00000 n 0000012518 00000 n 0000012667 00000 n 0000012803 00000 n 0000012939 00000 n 0000013072 00000 n 0000013208 00000 n 0000013344 00000 n 0000013480 00000 n 0000013632 00000 n 0000013818 00000 n 0000014039 00000 n 0000001220 00000 n 0000001005 00000 n trailer <<15349106D985DA44991099F9C0CBF004>]>> startxref 0 %%EOF 70 0 obj<>stream 0>esf"$ 44}2 Y,(A-$ea,