does anyone knows how to resize image proportionaly using javascript?, i have tried to modify the DOM adding attributes height & Width on the fly, but seems did not work on IE6
I have a asp.net textbox(textarea which is in a repeater have single texarea for each record which are read only) I have button (open in new window) when i click on it the content of the text area needs to be rendered in a new window using javascript .
For server side generated content, i18n support is usually pretty easy, for example, Java provides extensive i18n support.
But, these rich server side libraries are not available within the browser, which causes a problem when trying to format data client side (AJAX style.)
What javascript libraries and techniques are recommended for performing client side formatting and time-zone calculations? Also - beyond simple client side formatting, how can consistency be achieved when performing both server side and client side formatting?
I am not familiar with javascript and I have had some exposure to java but I found a web application that fits the goals of my app perfectly. The owner has provided the source by viewing the source in the html and I was wondering how hard it would be to reuse the code to deploy a similar app.
How can i handle a link which doesn't have a id, it just has a classname like "classbeauty".
Now i need to know if a user has clicked the link.
If the link is clicked i just need to call the alert("yes link clicked");
I don't know how to handle events in Javascript.
How can i do that?
How do I test to see if links are external or internal? Please note:
I cannot hard code the local domain.
I cannot test for "http". I could just as easily be linking to my own site with an http absolute link.
I want to use jQuery / javascript, not css.
I suspect the answer lies somewhere in location.href, but the solution evades me.
Thanks!
Hello,
I'm trying to update values from a xml file into textboxes. I have this javascript being called in the Page_Load event
this.Page.ClientScript.RegisterStartupScript(this.GetType(), "Script", sb.ToString(), true);
I click the continue button which does a post back but the values are not updated until I refresh the page again which makes me think the js isn't being run until after the page is returned. I'm wondering how to have the values updated when the page is refreshed after the button postback.
thanks
I have this small JavaScript code which I need some help with:
function doFocus(text) {
if (text.value == "Enter Name") {
text.value = "Student Name -";
}
}
All I need here is when someone clicks on my textbox, the text "Student Name -" should change its color, and should text-align = left. I am looking for the appropriate syntax for something like text.color and text.align.
Hello,
I'm generating some content through an API, accessed by javascript, and I cannot grab the source code of what is plainly displayed, post-load, on the browser. I can highlight the text and view the source of selected text (which is a firefox feature), but I will be using CURL to capture the data automatically with php... How can I capture the data? Is there a way to update the source(maybe through a DOM update) so it displays some how? Any help is appreciated.
I want to make sure I understand callbacks properly, and javascript timing etc. in general.
Say my code looks like this, is it gauranteed to execute in order?
SetList(); // initilizes the var _list
Some.Code(_list, function(data) {
// update list
});
DoSomething(_list); // operates on _list
Hi, i'm pretty new to Javascript and PHP so please bear with me if i'm asking some really dumbed down questions.
Ok, say i need to use values stored in a PHP $_GET or $_SESSION, is it advisable to just do something like
var something = PHP echo $_SESSION or $_GET
How expensive are local variables (var v), global variables (window.v) and cross-global variables (parent.v) in JavaScript, in the major browsers? Has anyone performed any good tests on this one?
I'm new to Java and I'm doing a project with Ext JS and Java. I'm using Eclipse Java EE IDE for Web Developers (Build id: 20100218-1602). Can anyone suggest any Javascript debugging plugin for this build? Links appreciated
is there any local file manipulation that's been done with javascript? i'm looking for a solution that can be accomplished with no install footprint like requiring AIR.
specifically, i'd like to read the contents from a file and write those contents to another file. at this point i'm not worried about gaining permissions, just assuming i already have full permissions to these files.
I am looking for the best way to augment multiple javascript associative arrays.
For example the following code
a = { "one" : 1, "two" : 2 };
b = { "three" : 3 };
c = { "four" : 4, "five" : 5 };
d = Collect(a,b,c)
Should result in value of d being:
{ "one" : 1, "two" : 2, "three" : 3, "four" : 4, "five" : 5 };
What is the best way to do this?
I have an HTML table which may contain thousands of rows (number of columns is not a problem here).
I would like to be able to browse this table easily and be able to do the following:
Decide how many rows will be presented
Jump to the next/previous X number of rows
Scroll the table using the scroll bars to any desired line
Be able to customize/extend easily this Javascript/jQuery code
Has anyone seen something similar ?
Thank you very much !
What is the difference (if any) between the javascript strings defined below?
var str1 = "Somestring";
var str2 = 'Somestring';
"" and '' mean two very different things to me predominantly writing code in C++ :-)
EDIT: If there is no difference why are there two ways of achieving the same thing and which is considered better practice to use and why. Thanks!
Hello all,
I have a JavaScript variable that I echo out using PHP which is shown like this in the page source:
var db_1 = 'C:\this\path';
When I set the value of a text field with that variable like so:
$('#myinput').val(db_1);
The slashes have disappeared and only the other characters are left!
Why is this and how can I put the slashes back in??
Thanks all
So I'm searching for a good crash course on localstorage and interacting with it in Javascript. I want to build a to-do list webapp with some extra functionality but it would be just for 1 user. I don't want to mess with php/mysql and have the server doing anything. Links to tutorials would be best :-D
Hello,
Is there a simpler way to rewrite the following condition in JavaScript ?
Thanks !
if ((x == 1) || (x == 3) || (x == 4) || (x == 17) || (x == 80)) {...}
Do you have experience with a Javascript templating engine, one that is stable, easy to use and has good performance?
I need to do apply the same template many times for different data. I prefer to download the template itself once (and have it cached) rather than processing the template on the server. Also, this way the template itself would be a static resource more easily cached in the server side too.
Hello,
I have added html controls through javascript, but when the page postback, all of the added controls are lost. Is there a way to retrieve it?
Thanks,
JV
To reduce http request i want to mix multiple jquery plugin's javascript filesa and main jquery file into one.
What things should be considered?
Do we just need to place code from all files into new file one bye one or need to do something more. ?