In my web application, a popup page is called using window.open javascript. There is a Print button on the page that has an onclick event that calls a printchecks() function. The code in the printchecks() function is
function printchecks(){
window.print();
window.close();
}
Issue is that the window.print brings up the prin...
Hey guys,
Now I know this question has been asked similarly a lot of times but I'm really struggling here.
Its a simple thing I need to do:
I would like to post a message onto a users wall saying "I scored 8/10 on objects game" then a URL
Thats it. I don't mind if facebook needs to authenticate and then post the message. and I really ...
There's a convoluted backstory involving how I came across this, but why is the self property not exactly equal to the window itself?
In Safari and Firefox and friends, the results are as I'd expect:
> window == window.self
true
> window === window.self
true
The same isn't true in Internet Explorer, though:
>> window == window.s...
I'm using jquery-ui's draggable for drag-and-drop, and jeditable for inline editing.
When I drag and drop an element that's also editable, right after it's dropped jeditable kicks in and pops into 'edit mode'.
How can I disable this behavior?
Edit - the problem happens because of netsting - see this example. I also added draggable to ...
I am adding an external CSS file and an external JS file to my headers and footers.
When loading an HTTPS page, some browsers complain that I am loading unsecured content.
Is there an easy way to make the browser load the external content via HTTPS when the page itself is HTTPS?
...
I have a classic ASP page which is loading an ASP.net page through an iframe inside the ASP page. This is working great except for the fact that it takes a while to load the ASP.net page. The user is left here with unfavorable experience because all they say is an empty blank page until the page is finish loading.
What I would like ...
During a normal browsing session I want to edit a specific javascript file before the browser receives since once it gets there it's impossible to edit. Is there are any tool for this? For what I need it I can't just save it and edit it on my disk.
I'm ready to learn how to program it myself but if anyone can point out more or less what...
I've got this table:
<table id="correctness" style="overflow: hidden;">
<tr><td style="overflow: hidden;">
<div id="correctness-message"></div>
<span class="hide">
<button type="button" class="hide" onclick="new DisplayEffect('correctness').Hide(500);">Hide</button>
</span>
</td>
</tr>
</table>
and a function for resizing the tabl...
There is a panel on my page with no default background-image css. On load it is set with jquery to an initial image, waits for 10 seconds then loads a random image out of some predetermined images. There are previous and next buttons which allow you to cycle through the images. In ie6 the initial image loads and then a random image also ...
Should each page have its own .js, with reusable features (live search, drop-down menus) being included in some kind of all.js for each page? Not sure what the best way to structure this is. Thanks for your input!
...
I have a text area and the problem is people are typing a large amount of text and I have it clearing out the value and forcing an N/A so I can force something to be entered. How can I make the script below validate someone has already typed something (and not clear it out) but still clear out the N/A by default?
<textarea name="req_Wh...
I have a message display field on my website that I'd like to change the value of via JS.
I've been using just a textfield, disabling it, and modifying the value via a JS function (after using a little CSS to make it not look like a text field):
<input type="text" id="message" style="background: white; color: black" size="50" disabled>...
Hi,
I am trying to create a small facebook app and associate it to a fan page in a tab. I am trying to include an external javascript file in my page and call a method on a button click event.
Below is a part of the code
<script language="Javascript" src="http://mysite.com/fb.js"></script>
<input type="button" value="Click......
I have an external *.js file that contains Javascript. How do I get teh same intellisense and color highlighting as I do in an ASPX page?
Here's my options for the js extension (set to 'Script Editor')
And here's what it looks like in an ASPX page (How I would like it to look.)
BTW, I did a full reset my Settings, setting them to V...
Hi All,
I'm having a bit of an odd issue. Really too odd to type out, but here goes. Basically I have a controller that refuses to "respond_to" using javascript unless I assign my "chart.generate_xml" to a variable before the "respond_to" block like so:
@xml = @chart.generate_xml(@begin_date,@end_date,1.hour)
respond_to do |forma...
All frameworks aside, what are some of the common helper functions/prototype methods you use on a daily basis?
Please note I am not arguing against frameworks. I've simply found that the majority of what I do on a daily basis can, most often, be done with a few dozen Array, String and Element.prototype methods. With the addition of a fe...
Hi,
I'm a .NET programmer who've just started to learn more about client side scripting, and I was wondering sometimes you use $get('value') and $find('value') and I've discovered that these are just shortcuts for document.getElementById('value') and Sys.Application.findComponent('value'), respectively.
However, I still don't understa...
I am working on a rails application that uses big javascript libraries (e.g. jquery UI), and I also have a handful of my own javascript files. I'm using asset packager to package up my own javascript. I'm considering two ways of serving these files:
Link to the jQuery libraries from Google Code as described at http://code.google.com/...
I have a form with an ever-growing amount of associated javascript. At present this javascript lives in my form view which is fine, but it's getting larger and starting to overwhelm the form making it difficult to work on the form.
I want to put this in a separate file in my /public/javascripts directory but a lot of the javascript is g...
I have a JS function that processes XML I GET from a server to dynamically create a table as below
// Generate table of services by parsing the returned XML service list.
function convertServiceXmlDataToTable(xml) {
var tbodyElem = document.getElementById("myTbody");
var trElem, tdElem;
var j = 0;
$(xml).find("Service")....