Hi everyone,
I have my own simple equal heights code in jQuery to make two columns the same height:
var content = $("#content");
var sidebar = $("#sidebar");
var maxHeight = Math.max(content.height(), sidebar.height());
content.height(maxHeight);
sidebar.height(maxHeight);
This JS file is included in my header file. I have a print st...
Can someone explain to me why I cannot use document.getElementById('id').value inside of a function?
I was trying to make a simple multiplication script (im learning JS, its actually kinda fun) and realized quickly how annoying typing that whole line of code just to return a value is, so I wrote a small function:
<script type="text/jav...
I'm a person that learns best from example. Currently, I'm diving into the field of Web Development after fifteen years of developing desktop apps. I'm still getting used to all the web technologies used for developing modern web sites and everywhere I look, I see cool little UI elements and have no idea how they're implemented. So I ...
<div class="item">
<p><img src="images/photos_sample1.jpg"
border="0" rel="images/google_map.jpg"></p>
<p>Dining Area</p>
</div>
<div class="item">
<p><img src="images/photos_sample2.jpg"
border="0" rel="images/sample_photo.jpg"></p>
<p>Pool Area</p>
</div>
I have this html code, and I want to get the rel ...
I'm using the Google Map API to retrieve city + state/region information from a postal code lookup. The issue is that in some cases a postal code lookup won't retrieve a city name. An example is 92625 (U.S).
var g = new GClientGeocoder();
g.setBaseCountryCode('US');
g.getLocations('92625', function(response){
if (response) {
va...
Say I have an array of JS objects:
var objs = [ { first_nom: 'Lazslo',last_nom: 'Jamf' },
{ first_nom: 'Pig', last_nom: 'Bodine' },
{ first_nom: 'Pirate', last_nom: 'Prentice' }
];
How can I sort them by the value of last_nom in JavaScript. I know about sort(a,b) but that only seems to work on stri...
I have a menu div to put the menu list inside
<!--menu-->
<a href="#"><div id="menu-tab">Menu</div></a>
<div id="menu">
<ul>
<li><a href="#">a</a></li>
<li><a href="#">b</a></li>
<li><a href="#">c</li>
</ul>
</div>
for the css
#menu {
width: 220px;
border: 2px solid #004990;
float: right;
margin-right: 15px;
margin-t...
The following HTML object represents an ActiveX control that has a property named SubSystemA:
<object id="MainObject"
CLASSID="CLSID:2C327457-D12F-4FC4-BFC2-D7C029003D07"
width="0px" height="0px"
>
<embed name="MainObject"></embed>
</object>
SubSystemA is a COM object implementing some interface with methods, propertie...
Back in college I wrote a game where the computer would sleep for 1 second, wake up and check to see if anything needed to be processed.
Of course, if the user entered a single character command, it would respond immediately.
Is there a way to do that with JavaScript?
...
I have 2 divs, one positioned absolutely right: 0 and the other relatively positioned center screen. When the window's width is too small, they overlap. How can I invoke a javascript function when this happens?
Thanks.
Mike
Edited to make clearer.
...
I want to pull a number out the middle of a string in JavaScript. In Ruby (my main language) I would do this:
Ruby:
name = "users[107][teacher_type]"
num = name.scan(/\d+/).first
But in JavaScript I have to do this, which seems a bit clunky.
JavaScript:
var name = "users[107][teacher_type]"
var regexp = new RegExp(/\d+/)
var num...
Hi there
I'm curious about how www.cakephp.org menu has made. I'm talking about: "Get It Now/Hot Features/Learn/Interact/Features"
Do you have any idea?
...
Hi,
How do I check a file exists or not in Javascript?
I know a way which is through XMLHTTP component and checking ".status" will tell is it exists or not.
Is there any other preferred way?
Thanks.
EDIT The file will be on server.
...
I recently found this RSA JavaScript library: http://www.ohdave.com/rsa/. However, it requires that the key be pre-generated. Here are my questions/issues:
I'd like to generate an RSA keypair in the JavaScript (so that I don't have to change the code every time I want a new keypair.)
While I understand how this can be used to send secu...
EDIT: After waited a while and didn't get anything yet, I've decided
to do shortcut disable thingy only for
IE now. Is there a possibility to disable
IE shortcut keys to access menus/print
etc. via vbscript?
Is it possible to disable browser shortkeys?
Because many of them are using in application. For instance, "ctrl+p" i...
Hi,
I am having a Html LInk created using
<?php
echo $html->link(
'Save Form',
array('action'=>'/homepage', $userid),
array('class'=>'button','id'=>'saveForm'),
'really save the Form ?',
false
);
?>
And i want this link to append it to #save using JQuery
How could i append this Link to ...
I have the following declaration in my code:
<object id="myObject" name="myObject"
data="data:application/x-oleobject;base64,ab9qcMENN0WE41oij7hs8764yu+YEwAA2BMABB=="
classid="clsid:83A04F76-85DF-4f36-A94E-BA3465007CDA" viewastext
codebase="someAssembly.dll#version=UNKNOWN">
</object>
I want to create an instance of this...
I have this HTML dropdown:
<form>
<input type="text" id="realtxt" onkeyup="searchSel()">
<select id="select" name="basic-combo" size="1">
<option value="2821">Something </option>
<option value="2825"> Something </option>
<option value="2842"> &n...
Hi,
I want to automate the archiving of the data on this page http://energywatch.natgrid.co.uk/EDP-PublicUI/Public/InstantaneousFlowsIntoNTS.aspx, and upload into a database.
I have been using python and win32com (behind a corporate proxy, so no direct net access, hence I am using IE to do so) on other pages to do this. My question is...
I need a javascript on a page that could catch an event whenever i click something and that click could lead to redirect, open in a new window, etc.
As links sometimes are not directly open a new window, they call a javascript function (window.open, document.location.href). Is it possible that I can catch them and edit the url.
Thanks...