Can the parent's Javascript variables and functions (essentially the entire runtime instance) be acessed from a child iFrame?
Examples:
Parent
function foo()
Child IFrame
:function bar(){
alert(foo);
}
$(document).ready(function(){
$("a").click(function(event){
alert("Thanks for visiting!");
});
});
Questions
1)Can ...
I have an input field where a user can paste a link. I would like to have a div appear as soon as the user adds a URL to the input field.
Until now I used .blur and .onfocus, but the div only appears once I click outside the input field after pasting the URL.
It's like on Facebook: as soon as you paste a link it will load a box without...
Hi.
I'm not sure if I'm doing this the right way. I have table which I fill with rows that each represent a song in a playlist. Right now, I assign a unique ID per row, and also assign som jQuery.data() to each ID.
html += '\
<tr id="track-' + i + '" class="tracks-row"> \
<td class="track"><a id="pla...
On the home page of my site I want to display a lot of products which have images which are quite large. Currently the page is taking so long to load that it is actually timing out and the page fails to display!
In MVC, or just ASP.NET in general, how can I load an image asynchronously? Basically what I want to do is display the detail...
Hey all,
I'm trying to create a feed using jquery ajax and requesting data from facebooks social graph using json method.
Can someone please tell me why it isn't working? i've tried $.getJSON(); to no luck!
This is the code I have just tested and still no luck:
$(document).ready(function(){
var url = "http://graph.facebook.co...
I have a modal box with a defined height. Inside of this box there is an accordion box that expands when a user clicks a link. The height of the accordion box when it is toggled exceeds the height of the modal box and thus a scrollbar appears.
I would like to automatically scroll the bars down to its lowest point to display the new con...
Hello, I am trying to send link id's to a sql query in order to filter data.
When I click a link like the ones below, I want to send the id of the link to the sql query as shown below:
Example:
Links (clicked):
<p>Fitler Results</p>
<a href="#" class="category" id="marketing">Marketing</a>
<a href="#" class="category" id="automotive"...
Sometimes, it just doesn't do what I told it to do. It works perfectly in firefox and IE, but chrome just ignore the instructions. Even something as simple as:
$(window).load( function(){
alert( 'hello world!' );
});
I think the problem is when I try to use 2 $(window).load()
Is anyone else experiencing this problem or is just me...
I have a DOM element similar to Facebook's "View friends" popup. I have a table with a list of rows, on which I can add tags to those rows:
<tr id="124"></tr>
When the row is clicked there's a modal popup that is created and lets the user choose tags they want associated with that row, sort of like this:
<div class="popup">
<div cl...
I have a list of checkboxes.
If the page is refreshed before the user submits the form, I want the state of the checkboxes (checked or not checked) to be preserved.
Ie: user selects option 1, option 4 and option 5. The page refreshes and option 1, option 4 and option 5 remain checked.
I have looked into serialising then storing a cook...
Hi,
I have the next code to work on ASP.Net controls.
I'm trying to add some javascript code to "onclick" event on a button when the result variable(res) is equals to "NO". The issue is that the first time it assigns the value to "onclick" it works fine, but when the removeAttr is executed and again the function is call and the res is ...
I want to alert the user whenever there's an AJAX error. You can do this via $.ajaxSetup:
$.ajaxSetup({
error: function() {
alert("OOPS!")
}
});
But the jQuery docs recommend against this:
Note: Global callback functions should
be set with their respective global
Ajax event handler
methods-.ajaxStart(), .ajaxStop(),...
I am working on a large site that has a lot of custom (page specific js). There is one main.js and page-specific.js files. Is there a better approach that can use the following pattern?
How can I re-factor multiple methods that use ajax?
I currently assign all onclick events inline such as onclick="MYSITE.message.send... - it there a be...
hi,
i got this jGrowl notification on my site, when the notifications box its poped jGrowl popup doesnt looks well styled.
this is how i call jgrowl files
<link rel="stylesheet" type="text/css" href="./include/jgrowl/jquery.jgrowl.css" />
this is the notification box
...
I am doing an ajax call using jquery to get data in json format. the success callback function is called but the data is empty.
$(document).ready(function () {
$.ajax({
url: "http://apps.sungardhe.com/StudentResearch/public/Research.svc/Schools",
type: "GET",
contentType: "application/json; charset=utf-8",
...
I'm currently working on a portal using jquery portlets/sortable/draggable that also includes a content management system, all in MVC2. Only administrators are able to change the layout/content of the site currently.
Each view gets the personalization for a page (from the base controller) based on Controller and Action. Then the view lo...
i have found this one: http://www.prismstudio.co.uk/2009/05/jquery-plugin-stylish-select-unobstrusive-select-box-replacement/
the problem i'm having is that i have 3 gifs: 1 for the left side rounded corner. 1 for the 2 paralel lines (i don't know the length of the dynamic select box). 1 for the select arrow
how can i have that in this...
I am trying to use a tooltip jQuery plugin. This is what I have in <head> of index.html:
<head>
<title>Index</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="js/simpletip-1.3.1.min.js" type="text/javascript"></script>
...
I have an input box: input type="text" class="rulerInputText" id="rulerInputBox" readonly
I have Javascript code to detect the selected text and play around with it.
The issue comes when I am allowing the user to actually select text. The text is basic with spaces. When the user begins selecting, there is no issue, but when a space is ...
I have flowplayer tabs with a form inside. Basically i want to recreate the flowplayer scrollable wizard demo and the way it's validation works but with tabs instead.
I've tried simply replacing the scrollable parts of the js with tabs but it's not working, it's not erroring either.
If anyone can help i would be massively grateful!
Be...