I need to be able to pass a variable to a CSS argument after computing the size of the viewers window height. I am using an alert function to test it, but so far it won't populate.
$(document).ready(function() {
var winHeight = $(window).height();
var winWidth = $(window).width();
So in the Tutorials:How jQuery Works, I've noticed that you can make a call to .get like this : $.get('myhtmlpage.html', myCallBack);
I've also noticed that in the docs jQuery.get() is described as jQuery.get( url, [data,] [success(data, textStatus, jqXHR),] [dataType] ). My question is, in the above example, the callback function is the second argument, whereas in the docs the second argument is data, and the third is the callback function. How does this work? Also, what does it mean when the arguments are laid out in an array-like fashion with commas in the square brackets? i.e. arg1, [arg2,]...
I would like to display few calendar fields on the same page with different days disabled. I guess that the easiest way to do that would be to let thenoWeekendsOrHolidaysfunction take care of it but in order to do that I need to pass some values to it. How can I do that?
I am able to run below code in IE but not in FireFox. Script : var prodElement = document.getElementById('moveattrribseq '); var value = " "; prodElement .add(new Option(value,value)); : This not working in FireFox
I haven't come across an exampe that would enable me to pass data to my event handler.For example, if I click a button I want it to pass the value of an adjacent text input to my handler.
Is it possible to access the data arguments that are sent with the ajax function? Example:
$('#mycheckbox').click( function() { $.get( '/ajax.php', { nr: this.id }, function( data, textStatus ) { // Here I want to access the arguments I just sent with ajax.php
[Code]....
I could easily do $('#mycheckbox').attr('checked', 'checked'); but that is not what I want. Also I don't want to send the arguments with the response. Anyone knows a solution? I can't find it in the documentation of jQuery and not in the discussions here.
<div>I have a bunch of ajax events that are fired one after an other to fill different spots on the page.Hence it's important that I know which dom element each on of the resulting data is supposed to belong to.</div> <div> </div><div>I was wondering if there is a way I can pass the id of each element into the call so that it gets returned automagically without any intervention by the server?</div><div> </div><div>In YUI I can pass any number of arguments to an axax call and these areguments are available as part of the response.</div>
I embedded a javascript in HTML and tried to open the file using mozilla 1.4 it gave me the following exception in the script on clicking the Submit/Next button. IE was able to execute the script
Function defination function evaluate(form)
Line making the call : <INPUT onclick="if (validate(this.form)) evaluate(this.form);" type=button value=Submit/Next name=B1>
I am using AWM menu and there is functon awmCreateMenu() which creates a menu, but exactly not getting the different arguments to this function. How to get meanings of these parameters? Actually I want to activate or open this menu using an short key like shift+MenuName first alphabet eg Shift + A or Alt + A will also do.
Is there anyway to call an executable on a local disk (W2K) with arguments from javascript? Or from any other language for that matter?
We are trying to create a simple 'portal' page to a group of our c++ applications via a webbrowser. To open the applications however you must pass them command line options.
I am a newbie and am writing a function. I want the function to refer to an arrays elements to get the biggest, but I dont know how to do this.
Here is the code:
what I am trying to do, is get the array elements to be called and give me an answer. Will I need to add the array to the function? It is further down the code after the function at the moment. Or will I need to add the array elements to the function?
I know in different languages (VB.Net,C++,C#) how to pass an argument to function in this code: <html> <head> <script language="Javascript"> <!-- hide function openNewWindow() { popupWin = window.open('[URL]', 'open_window', 'menubar, toolbar, location, directories, status, scrollbars, resizable, dependent, width=640, height=480, left=0, top=0') } done hiding --> </script></head><body> <a href="javascript:openNewWindow();">return to front page</a> </body></html>
I need to add several links in my page, so I need to pass indexes from links to main function, so I can open images in specific folder with indexes filenames. For example in vb Subname("text_to_pass_to_SubName") Public Sub SubName(ByVal function_text as string) End Sub
I have a setup where I need to get the function calling a function, which works fine, I just use arguments.callee.caller.Now I need to take it a step further and get the object that the function belongs too. For example in a onclick="parentObj.someFunction()" parentObj.someFunction calls some other function. I need a way to know that parentObj was involved, just getting someFunction isn't enough because parentObj has properties that are used in someFunction. To make it more interesting lets say I can't pass any more parameters to someFunction, so I can't pass parentObj into it as an argument.
I'm trying to replace an element's style on the fly like this
Code:
var sc = document.getElementById("someElement").innerHTML; scorecard = sc.replace("class="thisclass"","style="width:"+width+"px;float:left;margin-top:"+topmargin+"px;"");
where width and topmargin are values that I calculated earlier.This works fine in all browsers except IE. The trouble, I'm quite sure, is with the escaped quotes " in the arguments of the replace() function.What this seems to be doing (in IE) is just just returning the same string sc, but with the quotes stripped off of "thisclass".
I have a main page that opens a pop up window when the user clicks a link. The pop up window is a menu and when the user clicks the item, it populates a form input element on the 'parent' window.
My question is: this new populated form element is the value that I use to change a style.
onchange does not watch this form element because of getelementbyid, so it doesn't trigger the function needed to change the style. onchange works fine if I just manually input a value into the text box.
Any other way to fire the function off when the user picks their selection from the pop-up window? I was thinking I could use window.opener.function()? But how do I pass the form from the parent window? From the pop up window, I don't use this.form, what do I use?something like window.opener.form[0] ?
I'm calling `setInterval(myfunc, 100);`. That function receives one parameter which seems to be -3, 0, 3, 6 or 9. This isn't a problem, but I'm wondering what it is. Does someone know?
Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
I'm a PHP developer that needs to user javascript to open a window prior to a _POST call.
PHP Code: <title>test</title> <SCRIPT language="JavaScript"> function newwindow() { var myForm = document.header; var txtValue = myForm.txtUsername.value; var txtFileName = "lost_logon.php"; [Code]....
I need the window.open to open a new window with arguments attached. For example is the username is bigbob the call should be lost_login.php&user=bigbob. How do I pass the argument?
I'm use prototype quite a lot for ajax calls, but have always used inline onclicks. I'm trying to be less obtrusive by creating event handlers/listeners.I used to do this with the aid of pHp to place arguments into the function (usually via 'while loop'):
What I want is a loop that will call the same function until it reaches a certain number (let's say 10). Then I want the function to take the parameter passed (the number) and use it in the function where ever you see a 1 below. Basically I want it to run on each element of the pub_name array and from the info gathered define a variable based on the number (example: display_pub_name_*). I have run some tests .....