Hi there,
I have a jQuery select which works in most browsers axcept IE. The code is as follows;
<script type="text/javascript">
function parseCatSelect()
{
$('#d_cat select:empty').parent().html('<p><span class="placeholder">No categories available</span></p>');
$('#d_cat select').attr('name', '...
I have a JavaScript function which is quite long and performs a number of tasks, I would like to report progress to the user by updating the contents of a SPAN element with a message as I go. I tried adding document.getElementById('spnProgress').innerText = ... statements throughout the function code.
However, whilst the function is ex...
I want to read the file path from html input type="file"
(the entry selected in the file dialog by the user)
<script>
function OpenFileDialog(form) {
var a = document.getElementById("inputfile").click();
SampleForm.filePath.value = //set the path here
document.SampleForm.submit();
}
</script>
...
Hi,
I found several solutions for creating Flash LSOs from JavaScript (for example: http://www.nuff-respec.com/technology/cross-browser-cookies-with-flash )
If Page (www.hostA.com/index.html) and the .swf file are from the same site, everything works fine.
No I'm trying to load the page form www.hostA.com/index.html, which includes www....
Hello,
Is there a way to know that the user is closing the navigator, and/or the tab in Safari for iPhone, so that I can save data to localStorage, or do I need to do it for every input ?
...
Hi,
I am getting Unknown Runtime Error When Using innerHTML for setting html form text field value in Line2
//Line1
var topicName = msgXML.getElementsByTagName("tname")[0].childNodes[0].nodeValue;
//Line2
document.editDataForm.editTopic.innerHTML = topicName
...
Hello,
Suppose I have this html markup:
<div id="wrapper">
<pre class="highlight">
$(function(){
// hide all links except for the first
$('ul.child:not(:first)').hide();
$("a.slide:first").css("background-color","#FF9900");
$('ul.parent a.slide').click(function(){
$('ul.parent a.slide').css("background-col...
i've tried using this code and this to make a random quote generator, but it doesn't display anything. my questions are:
what is wrong with my code?
in the above tut, the quote is generated on a button click, i'd like
a random quote to be displayed every
30 mins automatically. how do i do
this?
////////////////////////
quote.html:
...
I'm writing a web app for the iPad (not a regular App Store app - it's written using HTML, CSS and JavaScript). Since the keyboard fills up a huge part of the screen, it would make sense to change the app's layout to fit the remaining space when the keyboard is shown. However, I have found no way to detect when or whether the keyboard is...
I have a div tag and I want to hold the scroll position even if the page is refreshed.How do i implement in JavaScript. Any help would be appreciated. Need just In IE.
Thanks
...
Everytime I test the email is send correctly. (I have tested in PC: IE6, IE7, IE8, Safari, Firefox, Chrome. MAC: Safari, Firefox, Chrome.)
The _POST done in jquery (javascript). Then when I turn off javascript in my browser nothing happens, because nothing is _POSTed.
Nome: Jon Doe
Empresa: Star
Cargo: Developer
Email: [email protected]...
I want to ignore counting the length of characters in the text if there are special codes inside in textarea. I mean not to count the special codes characters in the text. I use special codes to define inputing smileys in the text. I want to count only the length of the text ignoring special code.
Here is my approximate code I tried to ...
My codes is like
pattern = 'arrayname[1]'; // fetch from dom, make literal here just for example
reg = new RegExp(RegExp.quote(pattern), 'g');
mystring.replace(reg, 'arrayname[2]');
But it just cannot get running with error message says: "RegExp.quote is not a function", am i missing something simple?
...
I created this code for a conference website that I had been tasked to do. It is a simple fade in and out loop using window.setInterval. I've tested it on firefox, safari and google Chrome. The first 2 just stop responding after awhile, while google chrome gives me a note saying that the script uses too much memory. Which part of my scr...
Good day,
I've been trying to make this CSS code work:
table.mytable {
margin: 0;
padding: 0;
border: 0;
font-size: 0.8em;
border-collapse: collapse;
}
table.mytable td, table.mytable th {
width: auto;
padding: 2px 4px;
vertical-align: top;
}
table.mytable th {
color: #fff;
background:url(images...
I'm refactoring a website using MVC. What was a set of huge pages with javascript, php, html etc etc is becoming a series of controllers and views. I'm trying to do it in a modular way so views are split in 'modules' that I can reuse in other pages when needed
eg.
"view/searchform displays only one div with the searchform
"view/display_...
Hi,
I'm trying to interpolate between two colours in HSV colour space to produce a smooth colour gradient.
I'm using a linear interpolation, eg:
h = (1 - p) * h1 + p * h2
s = (1 - p) * s1 + p * s2
v = (1 - p) * v1 + p * v2
(where p is the percentage, and h1, h2, s1, s2, v1, v2 are the hue, saturation and value components of the two ...
I need something like this
http://jonraasch.com/blog/a-simple-jquery-slideshow
but w/o the absolute positioning.
Is it possible?
If not, how do I deal with the absolute positioning - if I make it centered for one screen res, it won't be for another. Any tips?
...
I really like how Trulia.com has created their custom Google Map InfoWindows.
What I like in particular about Trulia's implementation of the InfoWindow is:
Extends beyond the map border: Google Maps InfoWindows are contained within the map border whereas Trulia's seems to be able to float on-top of the map
Always displays InfoWindow n...
Hi,
I am using Youtube's JavaScript API to embed Youtube player into my site. The problem is that it appears on the top of all elements. I have read couple previous answers about setting "wmode" to "transparent" or "opaque", but it doesn't seem to work or it's either me doing something wrong, anyways here is my code:
var params = { all...