Hi,
i was wondering if i can add/append a javascript to an iframe which is loaded with an external web page that is not in my website. is it possible using jQuery or even simple javascript ?
<script>
// i need some code here
</script>
<iframe src="http://www.xxx.xxx/" id="myiframe" />
Note: i don't want to replace the content ...
Hello!
In this page there's a way to
dynamic add html (textbox,input button and radio elements with javascript
my questioon is how can i add an event to the button, imagine that i only want create the button, not the textbox or the radio element.
UPDATE
I'm having problems here... I have tried some of the solutions provided but it ca...
I would like to have a go at building a 'Wufoo' type form builder. I have seen a few, and understand the logic behind creating it with the aid of javascript. However saving those form preferences for a returning user seems more complex for me, I was wondering if anywone has seen any examples/turorials of this?
Thanks.
...
Hi there,
Does anyone know of a way to have a background image scale to the dimensions of the browser window it is in? I know CSS3 allows for background width, but I need something more compatible.
Many thanks,
Elliott
...
Hi!
I have a simple question - I use update panel with custom server control inside. I call __doPostBack from javascript and RaisePostBackEvent on the server fires (I implement IPostBackEventHandler).
This is client to server call. Could I return data back to the client (after this partial postback)? What is the best way to achieve thi...
I'm trying to create some kind of callback code which gets executed after an image has been preloaded.
My JS code is as follows:
<script type='text/javascript'>
d=document;
window.onload=function()
{
if (d.images)
{
d.getElementById('preload').style.display='block';
i1=new Image;
i1.src="http://link_to_image";
...
The Date constructor in JavaScript/ECMAScript/JScript allows passing the number of milliseconds since midnight, 1/1/1970. Nowhere can I find documentation whether this is midnight in the client machine's timezone, or midnight GMT. Which is it? Can it be relied on between different browsers and versions? Is this officially documented a...
I am reposting this question in a better format...
...
I am trying to create an option transfer plugin for jQuery.
I have the basic functionality working in opera, firefox, chrome & safari but IE7 is failing to co-operate.
The transfer functions in IE7 appear to operate very sporadically and incomprehensibly.
I have created an example page to illustrate my problem.
Can anyone see where ...
We use a DHTML calendar picker that only allows you to change the date, which is desired functionality. However, I need to figure out the javascript to change the date next to the calendar picker, as seen in the image below, and popup an "are you sure" message.
The above image is one row in a table, so the JS needs to be aware of whic...
Sorry I am new to javascript. I am trying to call an object from inside a function to allow me to get varible from a flash file at set intervals. For some reason the object is not working inside the timer function.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<h...
What I am trying to do is swap out any object references to YouTube videos, and replace them with their thumbnail reference along with a call to an internal method which passes the YouTube ID.
A sample body text may look like this:
This is a my test This is a my test This is a my test This is a my test This is a my test This is a my te...
I'm making a shopping mall website using Yahoo solution. I have multiple options for items and some items have different price dependent on the options. Yahoo doesn't support multiple price option and therefore I try to find a solution for this problem. One of my idea is to make multiple pages and redirect the page dependent on options. ...
I am trying to create a dynamic table that is being built based on the value of a search text box. The Table will have probably 6 columns of 20(max) rows.
My problem is I can't figure out how to return the data from the web-service to the JS function in a way that will allow me to extract the data that I need.
Here is the web-serv...
I have a very simple Python file:
f = open('C:\\Temp\\test.txt', 'w')
f.write('Succeeded')
f.close()
which I wish to execute from a JavaScript file, like so:
jQuery.ajax({
type: "POST",
url: "/cgi-bin/python1.py",
success: function (msg) {
alert("Data Saved: " + msg);
}
});
However, all that happens is that I get...
I'd be happy if you could explain to me why shout() keeps getting called, although it's supposedly "gone".
var myclass = new Class({
myid: "greatidea",
initialize: function(element) {
var shout = function() { alert(this.myid); };
shout.periodical(5000, this); // test debug
}
});
x = new myclass ();
alert(x);
x=null;
alert(...
I have a Google map that is showing a number of markers. When the user moves the map, the markers are redrawn for the new boundaries, using the code below:
GEvent.addListener(map, "moveend", function() {
var newBounds = map.getBounds();
for(var i = 0; i < places_json.places.length ; i++) {
// if marker is within the new...
Hello guys,
is it possible to listen for an iPhone (or any mobilephone with accelerometer) shake event with javascript? You know like shakin the iphone to shuffle the next song in itunes i want to call a js fuction on my website when the iphone got shaken.
thank you for your tips and help
...
So I've seen three ways to add html/DOM elements to a page. I'm curious what the pros and cons are for each of them.
1 - Traditional JavaScript
I beleive the strait JS way to do it is by constructing each element, setting attributes, and then appending them.
Example:
var myRow = document.createElement("tr");
myRow.class = "myClass...
We are going to be producing a RIA that will also be available using Adobe AIR for database management and manipulation with a php back end.
In an effort to speed up development we have decided on using YUI or EXT JS.
It appears that EXT JS out of the box will produce a better looking application than YUI but being essentially 100% JS...