JavaScript - Upjs, A New Javascript Library
Hello,
UPJS is an open source JavaScript Library that caters needs and requirements of web developers. It is currently under development, we encourage you to use this Library. For any bug, we will be glad to help you. Please follow upjs on facebook, http://www.facebook.com/pages/upjs/239536299419136 http://www.upjs.org Have a nice day! Similar TutorialsHey guys! Was wondering if anyone knew a simpel javascript library? With things like alert ,displayDate() and other basic things. Im pretty new to JS so I think that a lib like jquery would be to hard for me right now. Thx // Kiwo Hi im in the middle of creating my own javascript library but got stuck I can do everything for this library I just got stuck on how to make it flow through a list of strings like jQuery does. For example jQuery allows you to write a string like this: $('li').add('p').css('background-color', 'red'); Which they can select all li tags add a p tag inside then change the background color of that tag, What im asking is how can I go about doing this where I can create a similar system which allows me to flow through my class functions. Right now its a very small code because I started again to allow better overview of where things are but this is it so far. This allows the use of both SDK and $ at the start of the function for example. $.Display({'file':'index.php','id':'divid'}); And SDK.Display({'file':'index.php','id':'divid'}); Code: (function(window) { var $ = { Display: function(info) { this.call(info.file,info.id,'file='+info.file); }, call: function(file,id,parameters) { if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(id).innerHTML=xmlhttp.responseText; } } xmlhttp.open("POST",file,true) xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded") xmlhttp.send(parameters) }, Flash: function(params) { if(params.file){alert(params.file);} if(params.id){alert(params.id);} } }; // Expose SDK to the global object window.SDK = window.$ = $; })(window); Hi all, can anyone recommend me nice tooltip script which is javascript library independent, meaning no help/code from any of libraries such as (jquery, prototype,scriptalicious, mootools,extjs etc.). Here is the one I particularly like but it uses protoype and that is not option for me now, because I'm just integrating something else into already existing huge script and I don't wanna mess up old functionality or bring some additional unnecessary overhead. Or even better if you can give me some guidelines / pointers , how to make one from scratch that would be acceptable for me also. The most important thing is that it points from above downwards, because I found like dozen of good ones but pointing from below. Here is an example what I mean when I say from pointing from above. Thank you I read the posting guidelines but I still have questions that I would love to be answered by anyone willing to tolerate me. I started studying javascript when I decided that I wanted to create a dynamic webpage after viewing some books that were made to pageflip with Javascript and after viewing a ton of animations. So I figured since everyone keeps saying Javascript is simple that if all I wanted to do was to make a book extend outwards on mouseover and then open up on click and flip pages which they already have a code for that it wouldn't be so difficult. I've read everything I could practiced a little bit, I'm not fluent but I do have a goal and a time. The problem for me comes up with figuring out what I need to do in order to make it appear as if the book is coming out of a book shelf. There is a lot of information on animations where flat objects rise above clouds. I am thinking that I would have to use some sort of sprite of a row of books both sorta sideways where you can see the side of the book as well as the edge, and both a row of books on a shelf, or perhaps a row of books with some of the books being pulled out and then on mouse over animate the scene so that it looks like the book is being pulled out. Would that work? Or is there a simpler way? Another way or I don't know. Is there a code that can make it look like a book is extending outwards without an animation or would I need to create an animation for that? Thank you. I am trying to use a javascript plugin for jQuery library that transforms a regular select html element into a dropdown checkbox list (Dropdown Check List, see http://code.google.com/p/dropdown-check-list/), however I believe that the prototype library that I am loading immediately after the jquery library is still conflicting with it somehow even though I modified my code to reflect the following changes (which is supposed to allow the use of prototype with jquery): http://docs.jquery.com/Using_jQuery_...ther_Libraries (Including jQuery before Other Libraries) My code (in a cold fusion environment, which should be irrelevant) looks like this: Code: <html> <head> <SCRIPT LANGUAGE="JavaScript" SRC="js/jQuery/jquery.js" TYPE="text/javascript"></SCRIPT> <SCRIPT LANGUAGE="JavaScript" SRC="js/prototype.js" TYPE="text/javascript"></SCRIPT> <script language="javascript" type="text/javascript" src="js/jQuery/ui.core.js"></script> <script language="javascript" type="text/javascript" src="js/jQuery/ui.dropdownchecklist.js"></script> <script language="javascript" type="text/javascript"> jQuery(document).ready(function() { jQuery("#cbo_status").dropdownchecklist({ width: 200, maxDropHeight: 120 }); }); </script> </head> <body> <select id="cbo_status" name="cbo_status" multiple="multiple"> <option value="-1">All</option> <option value="1" SELECTED>Assigned</option> <option value="2" SELECTED>In Progress</option> <option value="3" SELECTED>Complete</option> <option value="4" SELECTED>Verified Resolved</option> <option value="5" SELECTED>Will not be addressed</option> <option value="6" SELECTED>Wishlist</option> </select> </body> </html> When I run the debugger, here's the error I'm still receiving: Error: Object doesn't support this property or method (pointing to the line below, character 3) jQuery("#cbo_status").dropdownchecklist({ width: 200, maxDropHeight: 120 }); Does anyone have any idea why this might still be failing? Qatrix is a new kind of JavaScript library for easily building up high performance web application with less code. And now is released today. The features of Qatrix a Hardware Accelerated Animation Qatrix will use the native CSS3 transition to process the animation as possible. And this kind of native basic process operation will enable hardware acceleration by browser. The animation of Qatrix will be more faster and more smoother. High performance code Qatrix is using more native code and special design to increase the performance. Web application will run much more faster and more efficient. Easy-to-learn The name of functions on Qatrix is familiar with the most popular JavaScript jQuery. It will be much more easy to use without re-learn other new concept and knowledge. Cache system Qatrix included a simple cache system to storage and fetch data with high speed. Incredible size Only 6KB compressed and gzipped file size with 60+ functions. Load script instantly without expectation. Read more and download: http://qatrix.com Hello. I have a few String prototypes such as Code: String.prototype.EscapeReg = function () { return this.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); }; // Escapes characters for use with a regular expression I also have my own class/ library which is used like this Code: var adg = new AndyG_ns.ADG_Utils(); adg.StartClock('AndyClock','dd mmm yy hh:nn'); // etc. What I would like to do is to only add the prototype to my library (not to the global namespace). The end result I'm looking for is to use code such as: Code: var adg = new AndyG_ns.ADG_Utils(); var myString = new adg.AString(); var parsed = myString.EscapeReg(); In addition, I want to be able to also use/create my special string sub-class within my library. I suppose I'm saying that I would like to extend or super-class the native String object. Any guidance would be appreciated hello .. can I use som function from c++ library in my java script file ? thanks .. Greetings, I am using the javascript scriptaculous library. On my Green Products webpage, if the user clicks "Subcategory", "Maximum Price", "Business Name", or "Search For", a green dialogue box should appear giving the user a tooltip. This works great for browsers other than IE. I am getting the following error: Quote: Message: Object doesn't support this property or method Line: 543 Char: 3 Code: 0 URI: http://www.green-watch.org/scriptaculous/src/effects.js Message: Object doesn't support this property or method Line: 529 Char: 3 Code: 0 URI: http://www.green-watch.org/scriptaculous/src/effects.js This is a fairly common library. What is the solution to this problem? Always seems to be problems with IE... Thanks in advance for any solutions or suggestions. Sincerely, Travis Walters First off I'm incredibly new to JavaScript and its likely I am going about this completely the wrong way. But gotta start somewhere. Also my apologise if I am posting in the wrong area. Here's my problem. I have setup a site in CSS3/XHTML that I will use to display some of my photography (im a keen photographer) The way my Gallery will work will be using Submenu's then there will be a table of Thumbnails which I have setup. The part I am stuck on is that I want people to be able to click the thumbnails and then the corresponding picture held in the next folder to be displayed in a CSS defined container in the center of the page. So clicking _Images/Thumbnails/1.gif will bring up _/Images/1.gif in the CSS container For the life of me I cannot work out how to do it though. Here is my code so far. HTML -> <td> <a onclick="newImage" href="nogoto"> <img src="_images/Thumbnails/1.png" align="left" width="47px" height="33px" alt="1" id="1"/> </a> </td> CSS -> #mainpage { color:#FFF; text-align:right; font-size:.7em; height:365px; width:529px; position:relative; top:25px; left:35px; } JavaScript -> window.onload = newImage(); function newImage() { document.getElementById(mainpage).innerHTML = "<script>background-image:_images/1.png;</script>" } Obviously I want to expand on this once it works but for now I would just like to get the images to appear correctly when clicked. Thank you so much in Advance if anyone can help. [delete]
I encountered an error when my table had only one or zero records when using the filtertable library from javascriptkit.com Here is the solution to fixing it for anyone else who encountered it. Perhaps the library could be updated with the fix? The error is in the function getChildElms() when the variable 'n' is undefined. Working backwards, I found that there was a problem with some logic in the setFilterGrid() function where the value of 'ref_row' is changed if undefined to a value of '2'. In fact, that value is needed in the line to set the value of tbl.tf_ref_row, but accidentally caused a problem in the call to getCellsNb() where at some point it tries to get at row 2 (offset 3) which doesn't exist in my case. I fixed it by creating a new variable and leaving it as 'undefined' unless ref_row contained a number (passed into the function). This is a section of the function with the fix: Code: var _row; if(ref_row == undefined){ ref_row=2; } else { ref_row=(ref_row+2); _row = ref_row; } var ncells = getCellsNb(id,_row); tbl.tf_ncells = ncells; if(tbl.tf_ref_row==undefined) tbl.tf_ref_row = ref_row; tbl.tf_Obj = fObj; if( !hasGrid(id) ) AddGrid(id); However, if you have zero rows, you still get an error since there are no tr elements. I fixed this by having the code use the th elements instead when zero tr elements are found. This code is in the function 'getCellsNb()' below: Code: { var t = grabEBI(id); var tr; if(nrow == undefined){ tr = grabTag(t,"tr")[0]; } else { tr = grabTag(t,"tr")[nrow]; } var n = getChildElms(tr); if (!n){ n = getChildElms(th); // Check for 'th' elements instead. return n.childNodes.length; } return n.childNodes.length; } If you have no data rows and no header row, then you're on your own :) Hi, I Have been working on a archive/library for our animators here, with images of old and useful models/3d work. to help them out and save them some time, I wanted to add the ability to click on a jpeg and open the folder where the files are stored for the desired character/set. Being a animator myself, and working for a small company (who have no javascript programmers) we have little to no knowledge of the code and would appreciate any help possible. this is what i have come up with so far Code: <HEAD> <SCRIPT LANGUAGE="JavaScript"> function DriveList() { var folder=document.Drive.Name.options[document.Drive.Name.selectedIndex].value; document.frames['MyComputer'].location.href = folder; } function FolderChoose() { var location=document.UserLocation.FolderLocation.value; document.frames['MyComputer'].location.href = location; } </script> </HEAD> <BODY> <FORM NAME="UserLocation"> <P><font size="2">Type in a Folder Location: </font> <INPUT TYPE="text" name="FolderLocation" length="25" size="20"> <INPUT TYPE="button" value="Open Folder" onClick="FolderChoose();"></P> </FORM> <IFRAME NAME="MyComputer" SRC="about:blank" WIDTH="50%" HEIGHT="20%"></IFRAME> </CENTER> however this only allows the user to manually search for the files. Is it possible and what would be the best approach to achieving this. I have been using DreamWeaver to create the library if that is of any help. Thanks in advance! Matt Hello! I am trying to find a script that allows you to open multiple browser tabs and then close each of those tabs, either one by one or all at once. Does anyone know how to do this please? Thanks so much for your help. I want to have another go at Javascript. I have several books on the subject but I find that my eyesight is a major problem. Therefore I want to try an on-line solution, preferably free. I have Googled, but there are so many that I am almost dizzy with the choices. Perhaps someone could recommend one. Not too fussy visually. My knowledge is VERY basic. Frank Does anyone know how to make URL links that use Javascript still work when users have Javascript disabled on their browser? The only reason I'm using JS on a URL is because my link opens a PDF file, and I'm forcing it not to cache so users have the latest version. I tried the <script><noscript> tags, but I'm not sure if I'm using it correctly, as my URL completely disappears. Below is my HTML/Javascript code: <p class="download"> <script type="text/javascript">document.write("<span style=\"text-decoration: underline;\"><a href=\"javascript:void(0);\" onclick=\"window.open( 'http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf?nocache='+ Math.floor( Math.random()*11 ) );\" >The Child Magazines Media Kit</a></span> (PDF 1 MB) ");</script> <noscript><span style="text-decoration: underline;"><a href="http://www.webchild.com.au/mediakit/Direct_Media_Kit_Web.pdf" >The Child Magazines Media Kit</a></span> (PDF 1 MB)</noscript> </p> Thanks for any help, Michael Hi, I have the following code snippet: test.html ====== <script language="javascript" type="text/javascript"> var testVariable = "test"; </script> <script language="javascript" type="text/javascript" src="test.js"> </script> test.js ===== var testVariable = window.top.testVariable; In firefox, I'm able to access testvariable defined within test.html in test.js. But in chrome, test.js couldnot get the window.top.testVariable field defined in test.html. Can any one please let me know how i can make it work in chrome?. Am i missing something here?. Hi Guys, I am new at JavaScript and start to do some tutorials.What I am trying to do here is prompting user to input a name and if the name was valid the page(document) will display with all objects like the button.But if user enter a wrong name then the button will be disabled! I create the following code but it did not work <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>New Web Project</title> <script language="JavaScript" type=""> function changeColor(){ document.bgColor = "Gray"; } </script> </head> <body> <script language="JavaScript" type="text/javascript"> var person = ""; person = prompt('What is Your Name:'); if (person == "Foo") { document.write("<h1 />Welcome " + person); document.bgColor = "Yellow"; } else { document.write("<h1 />Access Denied!!!!"); document.bgColor = "Red"; document.getElementById("gree").disabled = true; } </script> <div> <p/><input id="gree" type="button" value="Gray " onClick="changeColor();"> </div> </body> </html> as you can see I used the: document.getElementById("gree").disabled = true; but it did not work , could you please give an idea how I can solve this problem? Thanks I got an index.php Code: <html> <form action="bacakomik.php" method='post'> <select name="kodekomik"> <option value='../komik1/|23'>Judul Komik1</option> <option value="../komik2/|20">Judul Komik2</option> <option value="../komik3/|10">Juduk Komik3</option> <option value="../komik4/|20">Judul Komik4</option> </select> <input type="submit" /> </form> <?php echo ('<select>'); echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); echo ('</select>'); ?> </html> As you can see, each of the option brings specific value "../komik1/|23" komik1 is a directory | is a delimiter 23 is the pages in one chapter and can be considered also as how many images are there on a specific directory This is my bacakomik.php Code: <?php $dirkomik = $_POST['kodekomik']; $exploded = explode("|", $dirkomik); echo ($exploded[0]); //picture directory echo ("<br>"); echo ($exploded[1]); //total page in the comic $pagecount = (int)$exploded[1]; //Take last posted value, process it right away echo ('<FORM name="guideform"> '); echo ('<select name="guidelinks">'); $i=1; do { echo ('<option value= "'.$i.'">'.'Page '.$i.'</option>'); $i= $i+1; }while($i <= $pagecount); //Printing option and select echo ("</select>"); ?> <input type="button" name="go" value="Go!" onClick="document.getElementById('im').src=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value+'.png';"> </FORM> <img src="img0.jpg" id="im"> With the current code on bacakomik.php, I only can change the img src of id "im" in the same directory only. What I want is that the Javascript could "add" the "$exploded[0]" variable so that the picture can be loaded from different directory. Anyone can do this? I believe that the fix should be somewhere on input tag inside OnClick, or do you know where? Anyway, I found this on the net http://p2p.wrox.com/php-faqs/11606-q...avascript.html Please help me to those who can... Hey, I've got to make the values of some textboxes change the co-ordinates of my sprite on a canvas and havent a clue on how to do it, Here is my form with the two textboxes and submit button: <form> x: <input type="text" name="x" /><br /> y: <input type="text" name:"y" /><br /> <input type="submit" value="Submit"/><br /> </form> And i need it so that they change the values of these: //this shows where my sprite will start on the canvas var block_x; var block_y; searched the internet for hours and cant really find anything i understand or works. any help is much appreciated |