Hello,
I have the following code in a project for the main navigation. It is essentially a css-sprite that is overlayed once the user hovers over the menu. This is working perfectly in every browser except IE7 (ie6 not tested). I have tried debugging my css and feel this is coming from jQuery / JS code specifically. Is there some jQ...
I want the link to appear in the tab beneath resulting in the popup going away.
Currently have this:
//Open links in tab from popup
if (document.location.search == '?popup')
$('a').attr('target', '_blank');
But the _blanks opens in a new tab. Any help would be greatly appreciated - thanks!
...
I need to escape a double quote in inline c# within javascript. Code is below:
if ("<%= TempData["Message"]%>" == "") {
// code
};
Normally, I would just use single quotes like so:
if ('<%= TempData["Message"]%>' == "") {
// code
};
However, TempData["Message"] has single quotes within it (when it contains a link generated ...
I am trying to inject an external html file into the current DOM using javascript. This is on the same domain so Single Origin Policy is not an issue.
var body = document.getElementsByTagName('body')[0];
var script= document.createElement('p');
script.innerHTML = 'http://samedomain.com/my.html';
body.appendChild(script);
any ideas ?
...
I have a list of allowed file extensions that can be uploaded to my site.
I check them with jQuery Validation plugin.
I'm displaying an error message if they choose a non supported extension.
It looks like
var msg = 'You may only upload files of type ' + allowedExt.join(', ');
Obviously the list doesn't look too flash. I'd like it ...
Hi,
I am doing my head in trying to get the ckeip jquery plugin to parse the id of my textarea to my php file.
The plugin is activated by the class name of my textarea:
$('.ckeip_edit').ckeip({
And then data is passed to my php file with an object literal:
data: {
name1 : 'value1',
name2 : 'value2'
},
I need to use the ...
Ok so my question title may have been a little confusing.
Here's my example:
www.WebsiteA.com is hosting MyFile.js at http://www.WebsiteA.com/MyFile.js. This file makes an AJAX request for http://www.WebsiteA.com/location/file
When this Javascript file is included on WebsiteB through the script tag, will the Javascript run into cross-...
I normally use this pattern to iterate over object properties:
for(var property in object) {
if(object.hasOwnProperty(property)) {
...
}
}
I don't like this excessive indentation and recently it was pointed out to me that I could get rid of it by doing this:
for(var property in object) {
if(!object.hasOwnProperty(prope...
What is the highest number this javascript expression can evaluate to? What is the lowest number? Why?
+(''+Math.random()).substring(2)
Extra credit: How many different values can the expression evaluate to? Can it be every value from the minimum to the maximum, or are some intermediate values not obtainable due to rounding issues?
...
Here is my javascript code for a cursor focus function to go to username if it is blank on a form call "login".
<script type = "text/javascript">
if (document.forms.login.user.value == "")
(
document.forms.login.user.focus();
)
else
(
document.forms.login.password.focus();
)
Do I need to add anything to my form? Here it is...
Hello World!
Is there a Microsoft Word (or Word-Like) Component for the Web - Specifically, Classic ASP?
Something that can attach to multiple instances of HTML textareas...
The platform is a homegrown, in-house corporate-type app, so it really limits our maneuverability. That said, we just need it to work in plain old web pages using ...
Hi All,
I have a JSON source that sends its data that I display on my web page. Problem is, the
Date part that it is returning is some sort of a javascript object.
Please look at the sample response.
dteInstallDate
date 16
day 4
hours 0
minutes 0
month 8
nanos 0
seconds 0
time 1284566400000
timezoneOffset -4...
Hi i have my database
table question:
id question
1 myquestion1
2 myquestion2
3 myquestion3
4 myquestion4
5 myquestion5
table answer:
id qid userid answer
1 1 1 myanswer
2 2 1 myanswer
3 3 1 myanswer
4 4 1 myanswer
5 5 1 myanswer
My problem is how ca...
I want to step through a javascript as it happens, but skipping the steps where the functions are in jQuery.
Is there any way this can be done?
...
I'm evaluating http://github.com/janl/mustache.js
and I'm thinking about how it will work in general over time with a time. If I just build a giant object, is mustache sufficient to transform it into any form of HTML?
So, my question is. Is there anything that mustache can't do?
(My thought is that it is just tree transformation from ...
Suppose I have a script that pulls in a Twitter username with PHP without a call to the Twitter API and I send this value over to Javascript where the user on their client machine makes a call to the twitter API and gets some public Twitter data in XML and then sends it over to a page where I continue to parse it in PHP. Suppose I dont t...
I'm trying to use the piroBox (http://www.pirolab.it/pirobox/index.php) jQuery plug-in to make a gallery. I'm also using <!DOCTYPE html>. With this DOCTYPE, the images that are supposed to appear in a modal dialog appear at the bottom of the page. Removing the DOCTYPE makes it perform as expected.
Is there any way to make the plug-in an...
This should be a quickie, but I'm scratching my head as to why this bit of JavaScript isn't working for me. The goal is to take the value of an input box (string of words separated by spaces), list these words as items in an array, and remove those which are fewer than 3 characters:
var typed = $('input').val();
var query = typed.split(...
Hi,
I can't find a title for this because it's a complicated issue.
Let's say i have this:
<div style="color:red;width:900px;height:250px;">
I Can Control This DIV
</div>
<div style="position:absolute;top:0px;color:green;width:40px;height:40px">
I CANNOT control this DIV
</div>
Is there any way for the first div to reserve it's area...
This was interesting. In a select dropdown, trying not to use jQuery (with the exception of easing some of my pain on recreation), I ran into an issue that doesn't properly let any current browsers catch the proper selected option. Here is my code, for the page that recreates the issue (remember, no jQuery to necessarily solve issue, b...