GetElementById('desktop').onclick
Sep 10, 2010document.getElementById('desktop').onclick = "javascript:alert(1);";
Getting very very annoyed at javascript! Why doesn't this work!
document.getElementById('desktop').onclick = "javascript:alert(1);";
Getting very very annoyed at javascript! Why doesn't this work!
I am trying to tackle this problem: when I click on a link, the link show take me to another page and populate certain items (on the new page) in a form, such as a textbox and dropdown. I figured out how to populate the form using getElementById but I'm not sure how to open a link in the same window and bring those items to the new page. Below is the code I have so far:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
[code]....
The a href used to equal # previously as a test to make sure the function works (thats why I have the textbox on this page as well.The other page has the following code:
Code:
<form name="test"> <input id="info" type="text" /> </form>
i have this code below.
HTML Code:
<div id="container">
<div>Welcome here</div>
<div>Some content here</div>
[Code]....
It works fine in Firefox, chrome and safari but not on IE. I got a run time error Object doesn't support this property or method. I check the line number and the code is this document.getElementById('premiumoverlay').onclick();
I just downloaded safari on my desktop, but not able to open java appl.
View 3 Replies View RelatedNotice: This is a discussion thread for comments about the SitePoint article, Take Your CSS to the Desktop with Adobe AIR!.
The only book that covers Adobe AIR with AJAX (html, javascript) is Larry Ullman's Adobe AIR (Adobe Integrated Runtime) with Ajax: Visual QuickPro Guide
All the other books cover Flex (MXML) and Flash (Actionscript) and expect you to know those things first.
You'll see I'm a gamer as well as a web/desktop developer and I have built so many application in both technologies.
But yesterday I was amused by something I saw. I like to play this Combat Arms game from Nexon a very well developed FPS online action game, scince I downloaded the update I noticed that when I double click on the game icon it actually open a browser where I login (in the past I log in from the game itself) when I login I press a button IN THE SITE where it says "START GAME" and the game automatically starts.
now the question is "HOW THE HECK DID THEY DO THAT?" [code]...
How can I change Windows (or any other) desktop background in javascript ?
It is possible?
It's not something that's ever really come up before, but I'm re-creating a desktop application as a web-app and I'm coming across a number of places where:1. A select box may be pre-filled with data from a database, and2. Changing that select box affects the rest of the page.I'm looking for a neat way to perform an action that could happen when the page loads, and/or when the select changes. Knowing my luck it's something stupidly easy.For example, some code that is currently in progress:
switch($('option:selected',$transaction).text()){ // On Load
case 'Comparable': case 'For Sale / To Let':
$.each($priceFields, function(){
[code]....
jQuery isn't working on my desktop. After some debugging, this is the simplest example that I could come up with, that doesn't work.
<html>
<head>
<script language="javascript" src="jquery-1.6.2.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function myFunc(idx) {
[Code]...
i followed my first AJAX tutorial on the web: [URL]
the AJAX is working fine on the site itself, but when i download the source codes provided with the tutorial, it won't run from my machine. i checked this with several tutorials and all same. i.e. no results when run from the desktop machine.
i tried with IE7 and ff 4.0
I just came across following demo application: [URL] I have a few questions about this:What is the right approach to start a project, which have heavy use of JS? how to choose which library is best, or one should develop his own library specific to requirements to keep the file size smaller?
View 24 Replies View Relatedhow ca i save the content of textarea on computer desktop
View 3 Replies View RelatedI've been searching for a script that creates a desktop shortcut for a URL. The script must work for all versions of Windows and Mac. I haven't found anything useful in my research yet. I know it sounds pretty basic but I am not sure where the limitations are when jQuery and the clients' browser interact with the OS.
Does anybody know if there has been any groundbreaking on this subject with jQuery?
I am working on getting my tumblr blog on my web site and there's a feature in the template that I would like to use on my site but after going through lots of sites offering tools, I couldn't find one the same.
this is my blog [URL] when hovering over a photo, you see the zoom button, clicking it makes the picture bigger and fades the background out.
Anyone know where I can get a script to do this? Has anyone used one of these? Do they automatically work on all images on the page without extra code on each image?
I want to restrict getElementById to search children of a specific element instead of searching the entire document, in the same way that I can do getElementsByTagName using a specific element as the parent.
In this particular instance the parent is a table and the elements I'm interested in are all TDs, so I did the basic getElementsByTagName('TD') off the table and looped through this array checking the IDs. However, I'm suspecting that the browser can do getElementById faster than I can do a loop in javascript. Is there a neater way to do this? For now, I'll settle for IE-only solutions, though it would be nice to have things work in generic browsers.
is possible with JavaScript to drag and drop a .jpg from your desktop to a small square box on you website. On drop the picture has to upload the file and store it on the server.
View 2 Replies View RelatedI 'm working on a menu which imitates a desktop application menu toolbar (like this on your firefox ).Here's a demo[1] The menu is an <ul> containing <li> elements and <ul>s for sub-navigation.[2] User clicks the top-nav <li> with the arrow indicator and sub-menu pops out.[3] By clicking again the sub-menu hides.[4] Also by clicking outside the top-nav <ul>, a visible sub-menu hides (i used focusout event for this one).[5] Last one, a usability enhancement. Once a user clicks a top-nav <li> element with arrow indicator, he doesn't have to click again the rest <li>s with sub-nav. For instance, in the demo, if i click "Articles" and the menu pops out i shouldn't have to click "Games" in order to display it's own sub-nav.I'm having problems with [2]-[3], like arrow flickering as i click but before releasing the mouse button.umber [5] is a big mystery to me, i 'm not at this level right now.
View 1 Replies View RelatedI keep getting an error stating "getElementById("ballElement") is null, but I have a div with that exact id. I have looked at the JS script before that line, but found no errors there either. Please take a minute to see if you find something.
[Code]...
how do I change my html/javascript so that if I drag and drop a link from a webpage to
the desktop in such a way that the name of the shortcut created is not the URL of the link but the link itself?
e.g. if the link is
<a href="http://www.microsoft.com"> MS </a>
then the name of the desktop icon should be 'MS' and not
http://www.microsoft.com
I want to make it so that when I click on something, it changes what document.onclick does.
This is a simplified version of what I'm trying to do:
Code:
<div id="clickme" onclick="document.onclick = function(){ alert ('This should not be alerted on the first click'); }">Click here</div>
However, as you'll notice, the alert box shows up on the first click as well. The only way I have been able to get around this behaviour is to have the first onclick execute a timer that will then set the document.onclick after 1ms, however this seems very messy to me.
Should I use both name and id
<div name="abc" id="abc"> for using getElementById in NS?
I am trying to alter css using javascript as well as use the innerHTML
function. I have pasted below 3 forms that access getElementById in
slightly different ways (I wanted to rule out that it was the method.)
All 3 work fine on IE but only work momentarily on Firefox. For
example, one form has text that changes from red to black when the user
clicks the button. In IE it changes. In Firefox it changes for a
split second then goes back to black. Code:
I've been trying to follow the example from the sitepoint book on DHTML to change the href property of a link, but it doesn't work no matter what I try. Here's the code in the HTML file: Code:
View 1 Replies View RelatedI have this problem and when I came looking for help, I checked out the other thread like this but I couldn't get it to work. Here is the function -
PHP Code:
function newForm(focus, field)
{
if ( focus == 'no' )
{
if ( document.getElementById(field).innerText == '' )
{
document.getElementById(field).innerText = '____________'
}
}
if ( focus == 'yes' )
{
if ( document.getElementById(field).innerText == '____________' )
{
document.getElementById(field).innerText = ''
}
}
}
and here is the form -
PHP Code:
<b>Field 1:</b> <input type='text' name='field1' class='textbox' value='____________' onFocus="newForm('yes', 'field1')" onFocusOut="newForm('no', 'field1')" /><br /><br />
<b>Field 2:</b> <input type='text' name='field2' class='textbox' value='____________' onFocus="document.form.field2.innerText=''" onFocusOut="document.form.field2.innerText='____________'" /><br /><br />
field1 uses the function but field2 uses just onFocus and onFocusOut but as you can see, it won't work.
Works fine in FF, Safari . . . but not with IE. The error is "Object doesn't support this property or method".I have narrowed it down to this line (and a few like it)name = escape(document.getElementById('name').value);The escape() is not the issue, same with or without.I am trying to capture the text value from the field with id='name'. I have found discussions about this problem with IE, but not a solution. This must be easy, just trying to get a cross browser solution to load a JS variable with an <input> value.
View 7 Replies View RelatedMy document had the following nested DIV structure, with a possible
<SPAN> between the DIV and the <A> elements:
<div id="container">
<div id="D1">
<span>blah blah</span><br>
<A id="A1">item</a><br>