I want to change the default margins of Browser through JavaScript because I want to print the displayed document on page but the margins are different on different browser??? plz help me to change default margins of browser. if you have any solution tell me.
I have 2 pages-- Parent n child.
In the parent page i have an iframe whose value i want to ftech in the javascript of child page. Is there any way?....Please suggest.
When we open plain swf in browser, we are able to control the swf file by right clicking, the available control are: zoom in, zoom out, quality, rewind (previous frame), forward (next frame), and print. Is it possible to trigger those control using javascript especially jquery?
Thanks.
I'd like to use Javascript to replace all instances of \u009 in a string
This doesn't seem to be working: .replace(/\u0009/g,'');
Do I need to escape something?
I have a custom control and I am trying to validate a hidden field. The validation works fine but I am getting the following Javascript error every time (output from Firebug):
Error: element is null
Code: var currentClassName = ' ' + WebForm_TrimString(element.className) + ' ';
URL: http://localhost:58462/WebResource.axd?d=...
I have this method for downloading a script:
var script = document.createElement('script');
script.setAttribute("src", url);
document.getElementsByTagName("head")[0].appendChild(script);
This gives me a GET like this:
GET http://127.0.0.1:17315/Scripts/abc.js HTTP/1.1
However I need to add a header:
Authorization: Bearer Ipnsfm9h1MWYIM0n1ng
Can anyone tell me how I can add a header when I am using Javascript to perform the GET?
Given a javascript array and one of its members, how to retrieve the member index without having to compare the contents of the member against every other member in the array?
I am making websites I refer to from my site load up in a frame (similar to google images). But I also want to give users the ability to break out of that frame. Like with google image's "Remove Frame" link at the bottom right corner of their frame. How can I do this possiblyusing Javascript?
The following does not work:
var js_str= '<?php echo $str_from_server; ?>';
The problem is that, $str_from_server can contain any characters. If it contains single quotes or line breaks or others, the above code will break. And I do not have access to the server-side code. What's the easiest way to "escape" the contents of $str_from_server into a javascript string, and then it can be restored later?
hi,
is there any javascript library for resizing the images according to browser window sizes ?
I need to consider all cases (vertical / horizonal image, vertical / horizonal browser window)
N.B. The image scale has to be the same! (no distorsions)
thanks
Modifying a SnapPages theme, meaning I only have access to the CSS stylesheet. I would like to insert some javascript in the header of the site in order to use TypeKit for styling typography. Is there anyway to do that from CSS?
Hi guys,
about Validations,
are Javascript and ASP.NET validation used for the same purpose?
if yes, which one do u recommend?and simple explanation please,
thanks
How to find all files in directory? I have HTML page in some directory. Using JavaScript I want to get all existing files in some subdirectory (get file names or relative links to them)
i am using googleBar on my gmap application, after i manipulate the results of the search i want to clear the results of the search, but without using the clear results button.
i want to clear the results with from my JavaScript function.
how can i do that?
SO i totally understand why we should namespace in javascript, but is it mainly for organizational purposes and to keep the global namespace uncluttered?. Does namepacing actually help in performance of the browser/JS engine.
Just wondering what your thoughts were.
Thanks
Can I share javascript libraries I've loaded in part of my website, with other components ?
For example, I'm loading a node of my drupal website into a lightbox (rel="lightmodal"), so it is not a frame.
I would like to have access from the content of the lightbox to qtip.js library (at the moment I'm using its functions but it doesn't find the library, so it doesn't work..)
thanks
I am trying to create a table of 100 random numbers, the random numbers are from 0 to 100. I need to display the 100 random numbers as a 10 by 10 matrix in HTML, using JS and jQuery. The code that I have been working on displays the last array 10 times. Here is the code:
<html>
<head>
<title>My Web Page</title>
<script type = "text/javascript" src = "http://code.jquery.com/jquery-1.8.2.min.js" />
</script>
</head>
<body>
<h1 id = "randData">Randomize Data</h1>
<button id = "myRandomizeBtn">Randomize</button>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</body>
<script type="text/javascript">
$("#myRandomizeBtn").bind("click",randomizeHandler);
function randomizeHandler(evt)
{
var n = 10;
var data = new Array();
for (var i = 0; i < n; i++)
{
for (var j = 0; j < n; j++)
{
data[i,j] = Math.floor(100*Math.random());
$("p").text(data);
}
$("br").text(data);
}
}
</script>
</html>