So I would like to run the following Javascript on an open webpage in a UIWebView:
- (IBAction)pushDownoad {
[webView stringByEvaluatingJavaScriptFromString:
var myWin=window.open("","myWin","width=800,height=600,scrollbars,resizable,menubar");
var myStr=document.documentElement.innerHTML.toLowerCase();
myStr=myStr.re...
I have a page called "k.html" which is in domain A.
This page will be used as an iframe by pages "a.html" in domain B, domain C, domain D, domain E.
I want to set the parent location in this "k.html":
Domain B's "a.html" page to Domain B's "b.html" page
Domain C's "a.html" page to Domain C's "b.html" page
Domain D's "a.html" page to Dom...
I have the following repeating pattern of tables and buttons
----------------------
table 1 .inventory class
----------------------
[button 1 .add-row]
----------------------
table 2 .inventory class
----------------------
[button 2 .add-row]
----------------------
table 3 .inventory class
----------------------
[button 3 .add-row]
...
I'm trying to implement a generic function for a form with several fields in the following format.
<label id="LblTextCount"></label>
<textarea name="text" onKeyPress="checkLength(this, 512, LblTextCount)">
</textarea>
And the following JavaScript:
function checkLength(object, maxlength, label) {
charsleft = (maxlength - object.va...
alert(window.open('http://www.google.com'));
i tried this on firefox, and i get null, no prob in ie. any idea why?
...
Hi All,
I am dealing with a problem where I need to do few thing at the SERVER SIDE using JAVASCRIPT (I am using php + apache combination )-
read source of url using curl
run it through some server side JavaScript and get DOM out of it
traverse and parse the DOM using pre-existing java script code.This code works fine in a browser.
...
I wrote a light http server in C which can handle simple requests. So I totally control the server side and its future evolution.
Now on my Web Application written in Javascript/ExtJS, I need to upload a file on my server.
Am I forced to use multipart/form-data to upload a file?
Is it bad to directly send the file binary contained in a...
Hi,
Can someone suggest good learning materials or websites to learn JavaScript and jQuery? Am pretty new to this and want to learn right from basics.
Thanks in advance,
Geetha
...
A couple of questions actually,
Given that the following two will return the same result set
$("#MyTable tr");
$("tr", "#MyTable");
is there any difference in performance between using the Parent-Child CSS selector convention or specifying a context to the selector instead?
Also, given that I can guarantee a tr will be an immediate ...
I've got the following piece of code that shows a popup and then hides it after a short period of time:
div.stop()
.animate({top:'0px'},{queue:true,duration:this._speed})
.animate({opacity: 1.0}, {queue:true,duration:this._delay})
.animate({top:'-' + outer + 'px'},{queue:true,duration:this._speed,complete:this._myFunction});
Whe...
Can anybody explain why this works:
var sayHello = function (name) {
alert("Hello there " + name + "!");
}("Mike");
While this does not:
function sayHello (name) {
alert("Hello there " + name + "!");
}("Mike");
Mike Peat
...
var num = rez.data.length;
for(var key=0;key<num;key++)
{
var marker = [];
var point = new GLatLng(rez.data[key].latitude, rez.data[key].longitude);
marker[key] = new GMarker(point, {icon: iconS});
GEvent.addListener(marker[key], "click", function()
{
marker[key].openInfoWindowHtml('xxxxxx');
});
map.getMap().addOver...
I am using Large fonts in my website at a few places and they don't appear anti-aliased or smooth... I was wondering if their is any way to show large anti-aliased fonts for browsers on windows OS which has anti-aliasing switched off as default... Similar to something they have on this website here
...
I have an anoying problem with a page. If I have a textarea or textbox with its value (set on serverside) to eg. "alert('hello');" that script is executed upon load of the page.
Well why dont you encode the string before you set it as value to the textbox you ask? Then special characters like åäö will also be encoded and thats a solutio...
Hey, I am trying to further my knowledge of javascript and was wondering if anyone could explain to me what exactly is happening in the script below:
<– Begin Google Adsense code –>
<script type=”text/javascript”>
google_ad_client = “ad-client-code-goes-here”;
google_ad_slot = “ad-slot-code-goes-here”;
google_ad_width = 300;
google_ad_h...
Does anyone know how to stop a page from reloading or navigating away?
jQuery(function($) {
/* global on unload notification */
warning = true;
if(warning) {
$(window).bind("unload", function() {
if (confirm("Do you want to leave this page") == true) {
//they pressed OK
alert('ok');
} else ...
I'm using ASP.NET with a master page containing a script manager. I want to add a javascript file to only one page, but all pages inherit from the master. What is the proper way to accomplish this?
thanks in advance
...
What options do I have preventing the user from just closing the browser or navigating to another site? (of course I can't prevent him pulling the plug on the computer, etc.: I just want to show him a warning)
...
Hi,
I need to launch serveral ajax requests.
For some reasons, I want do this synchroneous. That is to say that before launching an ajax request I have to know if the prior request has been finished.
The 'asynchronous : false" property of prototype's Updater object seems not work.
// A loop to launch one after each other the reques...
in a html page, i have
<html>
<script>
var cnt=''+document.documentElement.innerHTML+'';
cnt=cnt.replace(......);
</script>
<body> something else</body>
</html>
how to use replace function above, so that my 'cnt' var content is like below
<html>
<body> something else</body>
</html>
...