I'm developing a pet project with jQuery. Now the application requires some variable value is transferred to client javascript when the page is loaded. I'm wondering what's the best practice to ...
I am trying to simplify some of the bookmarklets that I have created over the past few days and make them easier for people to use. One of my bookmarklets ...
I am quite new to Javascript. I am trying to use the ajaxupload plugin to make an upload work within a form. I figured out how to use the form with ...
Visual Studio 2010 shows '{...}' in the debugger as the value for a Javascript variable. The type is object. How can I view the contents of the variable? There's no expansion ...
I am interested in knowing if its even possible.
One example is the variable already exists.
foo = 1;
var bar = 'foo';
if('foo' == 1)? Is there a way to ...
I'd like to refer to a variable ("special") in field later in the same script. I've gotten the variable to display with alert boxes and document.write, but don't now how to ...
I am calling a a javascript function in c# code behind using ScriptManager. I need to change a variable's(used as default height of a div) value just before the call to ...
Is it possible to store a value returned by a controller method into a javascript variable?
i need to pass a date and sales qty from salesforce into flot library javascript to ...
I would like to display a string (let's say 'blabla') on the OpenLayers map such that the string's position stays constant relative to the viewfram - i.e. it does not move ...
I have a (hopefully quite simple) Javascript problem. I've search but found nothing that is really relevant to the problem.
Basically I have a function (addToGlobe) that calls two other functions (codeAddressLat ...
I stored a global string variable in JavaScript in page named "parent.aspx". I called a JavaScript function on button click event of the same page which opens another page ...
I need to compare a current integer with a previous integar within a method. It seems like something like this should work, but it doesn't. Can someone tell me where the ...
I have a variable and I would like to add a link for its value. This below example only returns the html. How can I make this a clickable link when ...
HI i got 4 flash clocks, that show the different city times, and i am getting the different 4 city times from my php file. after i get new time and ...
I currently have 2 JavaScript variables in which I need to retrieve values from. The HTML consists of a series of nested DIVs with no id/name attributes. Is it ...
I'm doing a JS tutorial and long story short, we have to get certain amounts of numbers and pass them to HTML table/cells with ids of "square". the code works but ...
I would like to show on my website some data, which should be changing every 30 seconds.
However, when someone open my website and there is 18 seconds left to change, JS ...
I have a variable in a JavaScript constructor that appears to be set to the correct value when stepped through using breakpoints. However, when run without breakpoints, the variable (supposed ...
I got a script that searches a string in a javascript script located at an external (cross domain) HTML code (not as a .JS file, but written directly inside the HTML ...
Is there a way for me to get and set the values of JavaScript variables in a win form web browser so it can communicate with my application.
The only way I ...
I have a variable myVariable which is continuously changing. At some point I want to capture the value of myVariable (not a reference to myVariable) into another variable myVariableAtSomePoint.
Example code:
Similar to other questions here, like this one.
Is there a way to break on the change of a variable value in any javascript debugger? (like IE Developer tools, Visual Studio, ...
I have three pages utilizing the same code and on one of the pages this variable doesn't exist, on the other two the variable ticketType has a value of 1 or ...
I am creating a slider and I want the buttons to dissapear when it gets to the ends. They currently do that but if I quickly click a button multiple times the slider will keep going. The problem is the variables are getting their values before the div moves. I want the move_animate function to completely finish before getting the values. ...
Hello, I am new here, and I will probably break some of the forum rules on accident and I apologize ahead of time, but please go easy on me. I have a problem with a question in a Javascript class I am taking currently. The book explains how to detect the smallest values the user inputs but does not explain how ...
I used the brackets only to separate code from reply text. As to the != operator, here is what I've done, but couldn't make it work: Code: if (oObjVisible.allOverlays===true) { // oObjVisible.allOverlays is logical data type. //tried to change it to: if (oObjVisible.allOverlays != false) { But that never worked. Later on, I read in Wikipedia that there is the !== ...
I am fairly new to coding HTML with Javascript. I am hitting my head onto the table because i cannot figure out how to pull the variable value out in a document.write statement. Basically, I am calling a function to give me a random number between 1-4. I use that randomNumber to attach to different .jpg, descriptions, and URL's. So far, ...
JSP, like ASP & PHP, all run on the server - the client never sees or knows about it. There is no way to use only Javascript to pass variables between pages. You could use Javascript to change some form values & submit a form to get around between pages. You can also use Javascript to access cookies, which might be ...
if($_GET['do']=='rate'){ // do rate rate($show, $_GET['id']); } else if($_GET['do']=='getrate'){ // get rating getRating($show, $_GET['id']); } // function to retrieve function getRating($show, $url){ $rs=@mysql_fetch_array($result); // set width of star $rating = (@round($rs[value] / $rs[counter],1)) * 20; echo $rating; } // function to insert rating function rate($show, $url){ global $dbh; $text = strip_tags($_GET['']); $update = "update `" . $show . "_episodes` set counter ...
I have a html form. i have the fields like username,password,firstname,address. I have placed the username inside another form because onblur event this textfiels value should b recieved by the js. But js is not recieving the value.Gives the error'document.usercheck.username is null or nota an object. My code is function stamp() { document.write("
adding an attribute's value to a variable i have the following script: Code: var iteration = 0; function AddToIngList (form, iteration) { var it = iteration; var Ingredient = form.ingredienttoadd.value; form.ingredients_added.value += Ingredient + "\n"; var objHTML, objText, objinput, objLink; objHTML = document.createElement('P'); objHTML.setAttribute('NAME', 'txtTest'+1); objHTML.setAttribute('ID', 'txtTest'+1); var strTest = form.ingredienttoadd.value; objText = document.createTextNode(strTest); objinput = document.createElement ('INPUT'); objinput.setAttribute('TYPE', 'text'); objinput.setAttribute('NAME', ...
Hi all, I am a little confused and am wondering how to get around this problem... Bascailly I want to detect the users resolution so and store a value to determine what style sheet they use. e.g If (screen.width <="800") { $var="style1.css; }else{ $var ="style2.css" } Any ideas, I'm not too strong on javascript at the mo, so any advice accepted. ...
Hi vgarcia, Thanks for your help... After my original post i tackled the problem again in the same way you suggested.. . I came up with the following solution.. what do you think?? Is there a better way?? // parse the elements width and height returning only an integer value var widthUnit = parseInt(eSelected.style.width); var heightUnit = parseInt(eSelected.style.height); // create regexp ...
Using a variable instead of a concrete value! Hello Everyone, I am currently developing a small script that will open a "Help Dialog". The "Help Dialog" is created using the handy 'window.open()' function. Simply opening a window which has been provided with concrete attribute values is easy, e.g.: window.open('helpdialog.htm','Help','height=200, width=200'); However I am interested in setting the height, width, screenX and ...