So firstly this is likely not in the right place at all, as it's a bit OT but I figured it's the best place to ask. I have to document 4 different tests to my code; what structure should I take when doing this?
I was thinking:
* State the aim of the test
* State the inputs, and what I believe the output should be.
* State the actual output, and whether this positively or negatively affect my code.
Does anyone know of a tool or method for documenting javascript classes automatically? I have used JSDoc in the past however it requires us to tag our classes first. If you have a lot of classes to document that weren't already formatted correctly, this process is not desirable.
Basically I am trying to find a way to create a dictionary for multiple javascript classes and what public methods/properties they have.[code]...
I'm sure this is probably the wrong place to ask, but is there a way to execute an SSI script in javascript?
I'm using an SSI script to read a memory address, and I'd like to be able to update the value every few seconds without having to refresh the entire page. Does anyone know a possible way to do this, or am I stuck with refreshing the entire page every 4 seconds?
I am using jQuery.get to make an AJAX request to the server which should return a JSON object, but it is interpretated by jQuery as a string, not an object.[code]I do not use getJSON because I want to make one request which could return in a JSON object, or just a string, depending on some conditions.
Very new using jQuery. Anyway, I have the following few lines which create a component on a web page.[code]...
Upon some analysis, I can see that the css does contain the styles used by my div. So now, I would like to change the colors of the component, but I am not sure what is the best practice. Can one override in the div tag the colors, or should one duplicate the .css and change it?
Seeking the best way to perform this that other in the group use.
This is my first jQuery code so I am noob at that case. I have created page with 4 tabs based on that tutorial:Each tab has form to fill out and submit. Starting on first tab, then if passed validation goes to next, etc. But when will not pass a validation I want to keep open that tab where the error occurred. My PHP code for the second tab looks like:
I have some code that attempts to save a user's preference settings. It first tries to use "localStorage", and if that fails (only old versions of MSIE), then a cookie is used instead.For example, if I intentionally misspell "localStorage" by instead using "localStor" (simulating a browser that doesn't understand the object name), the code simply does not run.unfortunately, that doesn't work.
So I have the following form field: Code HTML4Strict: <input type="text" size="9" style="width: auto"> I do this, because in CSS I set all my input fields to 'width:200px;' (looks better), but also require some fields to be shorter (which I do by setting 'width:auto' and attribute size="x"). The problem with this is that I need to get the precise width of all inputs with jQuery!
But if I do the following: Code JavaScript: alert( $( "input" ).css( 'width' ) ); It outputs: 'auto' How do I make it return the element's actual width?
I m trying to put a button's value (e.g. a button putting a special character in a form ) in the "selected" form input that the curson is in it and typing characters.. The concept is the following . A form is created and has some input text fields and the user can write the appropiate data in these input fields. Also some buttons are created each one representing a special character and the user can click them in order to put the special character that the button has in the text field he is writing. I'm wondering how after a buttons is click it's value to appear only in the text field that someone's writing.
I have to create a table using javascript. Firefox displays the expected result but for IE, the column width is screwed >"< I have to use the col tag to set width because sometimes the first row maybe merged. All I need is to create a table that strictly displays according to the inputted column widths from my program. In below I have setup very short example that construct table in a similar way to my original javascript function. I also draw a ruler to help showing the proper width of 400px on the screen. column 1 should be 100px width and column 2 should be 300px.
<?xml version='1.0' encoding='UTF-8'?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <body onload="init()"> Hard Coded: <DIV style="WIDTH: 400px; HEIGHT: 25px;overflow:hidden;"> [Code]....
I'm trying to create a list, to which you can: 1. Add and remove items. 2. According to what's in this list, there should be dynamic content loaded on to the page.
I've accomplished 1 with the code below. I'm not sure about how to accomplish 2. <script language="javascript"> var listItems = new Array(); var currentList = new String(); function listManager(task, id, name) { //$("#debug").append(" ##### List manager. ("+listItems.length+" items) ##### "); if(task == "add") { refreshList(); // refresh the list .....
Now that we're switching to feature detection rather than browser detection, how does/should one detect for a webkit browser?Is there a known feature that we can check for that would Identify Safari and Chrome?We're running into some (rather minor) layout issues with some jquery plug-in rendered content in Chrome and Safari and it'd be really easy to just do a 'if a webkit browser, tweak this' type of logic.
The webpage doesn't display the proper times when I load it up.The GMT variable deals with the Greenwich timezone, which that time is used with offset variables in order to get the right times from each respective time zone in the branch offices.So far it seems only houston and new york display the right times or close to it all the other ones are way off.
I'm using Walter Zorn's Drag & Drop script on my page: [URL]. The script works just fine. But there is a problem when the visitors are trying to print out their design. All "draggble" elements are getting shifted in relation to the rest of the page (try to move "draggble" elements, and then go to Print Preview to see what happens). The page layout is centered on the screen: #maincontainer{margin: 0 auto; /*Center container on page*/}
Drag & Drop script recalculates positions of elements from the Top Left corner. If I change margin to left, than everything prints out just fine, without shifting. I'd like to keep my page layout centered on the screen and I know nothing about Java programming. How to make necessary changes to the Drag & Drop script to achieve proper page printing? Drag & Drop script path: [URL] CCS path: [URL]
I'm trying to force jQuery UI Tabs to work with browser locations (as in direct-linking or bookmarking), but having very little luck doing so. It feels like I've seen this question at least 50 times around the net, and the answer mostly consists of one of the following 5:
[Code]...
Hierarchically based tabs (hopefully something better than "level1-level2-level3") As I said, I know it has been asked before, but apparently I am now the only one struggling with this. So if anyone could give some suggestion on how to use jQuery Address, jQuery BBQ or any other method to accomplish this,
What is happening is when I try to submit the form, I receive an error that says I need to input all data in the proper format. <html><head> <title>Conference Registration Form</title> <link href="conf.css" rel="stylesheet" type="text/css" /> <script type = "text/javascript">
Calculate total registration fee Retrieve the value of the selected index property from guests selection lists Multiply the selected index by 30 and add this to the cost variable If the first member radio button is checked subtract 25 from the value of the cost variable Set the value of the total field equal to the value of the cost variable
Is there any way to test for the presence of the Adobe Acrobat plug-in in Internet Explorer? It's doable in Netscape but so far I cannot get it to work in MSIE.
function shout() { if (isNaN(document.form1.entry.value)==true) { alert("please only enter numbers for an answer")} else { alert("the new number is: "+(+document.form1.entry.value+5))} }
also what would be the correct structure as to make the script more legible to regular and proficient writers of JS?
I'm trying to develop a tree structure using javascript. The node values of the tree are generating from a mysql table depending on login. The tree structure contains 3 sub levels.
I developed static HTML tree using http://www.treeview.net. now i need to generate this tree dynamically.
I have a nested listview in my app which creates table inside table at runtimei need to get value of td from second tables tr where i have row number of first tables tr?
Is it possible to change a document structure definitely using JQuery ? I used .html() but after refreshing the page the changes I've done disappeared and were replaced by the default contents
I am trying to do the following without html frames.
-Let's say i a html file which contains the structure of a calendar (table, rows, cells, etc)
-Have javascript load the contents of the html file into the page without frames and without disturbing the previous content.
So the advantage is that i would not have to use javascript to create the structure of the calendar but instead to load it so that javascript only have to fill the contents of the calendar.