Hi I'm looking to access @font-face with Javascript. I assume it's somewhere in the DOM but where?
I want to do this for @font-face feature detection.
Thanks!
if I put a div in the head and display:none, than use javascript to display it, will this work?
Edit:
I have stuff loaded in ajax. And as my ajax changes the "main" portion of the site, I want to change the meta-tags as well.
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.
I have recorded a macro in Excel, but I want to run this code in Google spreadsheets. I do not know how to program in either code. How do I convert them? I tried an online VB to Javascript converter, but this does not work with VBA.
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.
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