Hi All,
an anyone tell how can i make a button on page onload.As i have a login page and i want to make the login button selected onload and when i press eneter the onclick of button should be called.
I want to do this in chorme.
Thanks
...
i'm using jquery to output the results of a json string created by php from a database,
the only problem is, that some of the data is on multiple lines... how would i get around this causing a unterminated string literal error in javascript?
...
I have a modal box window (pop-up) that contains an iframe,
and inside that iframe there's a div that is scrollable.
When I scroll the iframe's inner DIV, and it has reached its top or bottom limit, the window of the browser itself starts to scroll. this is an unwanted behavior.
I've tried something like this, which kills the main win...
I was wondering, how does the $. in $.ajax({...}); work? it doesnt make sense to me. Sure .ajax as a member make sense but $ isnt a variable name? or is it? How is it defined?
...
I'm trying to load a flash file using 'AC_FL_RunContent' like below. But the file will only load if I hardcode the param into the 'src'. It doesn't work if I try to dynamically concatonate using a javascript variable as below..
I have tried..
.. Constructing the src path outside the call to AC_FL_RunContent, including trying the .Repla...
I am using Javascript and trying to break out query string variables from their values. I made a regex that works just fine IF there are no other ampersands except for denoting variables, otherwise the data cuts off at the ampersand.
example: ajax=10&a=test&b=cats & dogs returns a = "test", b = "cats "
I cannot encode the ampersands b...
function Person(name){
this.name = name;
}
p = new Person('John');
log(typeof p.constructor);
var f = {};
log(typeof f.constructor);
var f2 = new Object();
log(typeof f2.constructor);
All three log statements show 'function'.
Is there a case when the constructor of an object will NOT be 'function' ?
...
I need to build a control that allows content managers to change 3 level menu. Anyone know any javascript navigation menu managers that i can use?
...
Hi,
I have a regex problem that I need some advice on. I am using a jquery plugin that validates input fields on a JSP. I am using the date validation. It all works fine but this field is not required and is not marked as required. When the user hits submit it shows a warning on the date input field since the empty string does not m...
I'm creating an array in javascript using item id's from the database whenever a corresponding button is clicked on the page. Each array entry will store a custom object.
The id's from the database for a specific can start from any number like 80123 to 80223, for that specific page of data.
so the first entry in the array will be like ...
I would like to add isBlack method to Car only if this method is not already present. At the bottom of the page I have done that by checking for both in prototype and in the Car object itself. I was wondering if there is a better way to handle the case. I don't like the double check.
Note that isBlack method might come to Car from Car i...
I'm using Django's render_to_response to write data out to an html page, but I'd also like that render_ to _response call to load a python dictionary into a javascript associative array. What's the best way to do this?
...
I have a drop down menu which I found a tutorial for.
In Firefox and Opera the drop down menu works fine. But in Internet Explorer it doesn't work. The sub menues are misaligned. They aren't placed under their parent item but a bit more to the right.
Why doesn't it work in IE? Is there a mistake in the JavaScript code which should make...
In my demos, I'd like to avoid using traditional DBs and store all the data on the client side, e.g. information submitted via a form.
What alternatives do I have for that. I've heard about Gears but I don't have any practical experience.
Can I also store binary information besides strings, e.g. an image?
...
How can I get the selected item's value and text in JavaScript?
This is my combobox:
<select size="1" id="fTerminalType" name="fTerminalType">
<option value="AP">Airport</option>
<option value="PT">Port</option>
<option value="BS">Bus</option>
<option value="TR">Train</option>
</select>
My JavaScript is like this:
v...
Hello ,
I am looking for an efficient way to cut floating number at Javascript which are long. I need this because my output for taking percentage of two numbers can be sometimes like 99.4444444 while I am only interested in the first 2 digits after "." such as 99.44
My current percentage taking function for 2 numbers:
function takePe...
Can I store binary files in the Google Gears DB?
For example an image file from the users hard drive.
...
We faced an XSS attack in an iframe which we ship to our customers. Owing to senstivity of iframes we decided to go for Window.open method. Below is a sample attached JS which sits in customer's space. Can anyone enlighten on how it is vulnerable to XSS
<p>
<script type="text/javascript">
function invokeVidteqPopup() {
window.open('htt...
Hi,
Is there a way to get the bounding rect of a text node?
The getBoundingClientRect() method is defined on elements only, and the parent element is bigger then the actual text node.
10x!
...
I am building a file upload web page that has the capability to process multiple upload files. Ideally I would like to allow the user to select a folder and have the web page enumerate the files in the folder client-side, but I don't think that's possible without a browser plugin.
Alternatively, would it be possible to allow the user t...