I have a pic saved on my computer and I cant get my script to point to it.even if i put the whole path in. am i not understanding how to point to an image.
This is the classic flying starfield script that i am playing with. how to change image
my relative wanted this star trail effect on the site: URL...I did similar effect below but I couldn't make smaller stars on trail, how can I achieve this?
I'm new here, and I'm a programming newb but am very interested in learning and possibly pursuing programming in the future. As such, I'm taking an intro to Javascript class at my university, and our homework is to make a function that when called upon makes a diamond out of *'s. It is supposed to do so by prompting a user for an int and then makes a diamond shaped object with the inputted number of stars in the middle of the diamond. an example of what this would look like (if a user entered in "5" to the prompt):
I downloaded a code for image mouse over effects. It works exactly how it's supposed to except when you first load the page, the images are not there. They do not appear and function until you actually roll the mouse over them.
1 - the pics wont show in the slideshow. Only the text follows through to the next window. Why?2 - when you click the button "markera alla bilder" (mark all pics) only half of the pics get checked. why?Heres the code:
/.../ <script type="text/javascript" language="javascript"> var checked = new Array();
i want to get rid of the "cancel rating" button that appears next to the 5 stars when enabled. I need to force the users to enter a rating,so i need to take the cancel rating button off (makes value = 0).I can't find how to change this!
Im currently working on a project for class and have been directed to use Javascript for what im looking to do. Im a beginner when it comes to coding w/ javascript. Over the last couple days I've spent good time reading and practicing tutorials but have yet to do something I imagine is very basic for what I want to do.
At the moment, im looking to insert text into a webpage, that links to images. The images, ideally will layer on top of each other (Multiple images can be shown based on the "text" which activates it) Images shown, if done what im looking for, will have a transparent background to view images set behind one another. I've spent a couple hours looking up code through google, found similiar code which i've tried to manipulate to do what I want. I have yet to put something successful together. Was hoping I could look upon experience programmers to help me out by pointing me in the right direction. Im willing to do the work, just looking for that guidance
Does anybody know of any simple, stable plugin that does that ? been looking around and most of them bring slideshows, carousels, etc All i want is to put them into a static grid but not having to resize manually every pic that is uploaded.
I am a new designer trying to slog my way into using some of the neat tools available out there. I want to use a image slider I found called InnerFade. [URL]. I am using a ul with <a> and <img> in them and I want it to scroll from pic to pic.. this all seemed so easy when I started but I cannot see where I went wrong..
I'm trying to attach a colorbox to all the links on a page exceptones within a div having the class 'stars'. Shouldn't I be able to do thisusingjQuery(":not(.stars) a")? This seems to completely fail to exclude the stars (which happens also with div:not(.stars) and other classes), it's just as if the :not clause wasn't there at all.
I'm trying to create a photo gallery that has a mouseover on a "next" and "previous" to scroll through the pics. I have the mouseover part figured out, but can't seem to get the scrolling through the pics. Here is my code below. I will have 5 pics to scroll through.
[code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Townhouse</title> [Code]....
I currently have a normal link like Code:<a href="http://sitepoint.com" class="link">sitepoint</a> and when a user clicks on it I want to be able to change the "link" class to a different class. However, I don't want to add anything to the actual link html. Is it possible to do this using javascript without modifying the original link code?
I am trying to dynamically clear the value of a form input field and then submit the form.When I used $('#my_field').val('') to clear the field, it was cleared on the screen but when the form was submitted the original value of the input field was posted.My browser is FireFox and I can see using FireBug that when the field is cleared, firebug is still showing the html code with the old value. E.G. <input type="text" value="old_value" />The same situation occurred if I used $('#my_field').attr('value', '') to clear the field.The same situation occurred if I actually changed the value of the field rather than just clearing it.To work around this problem I ended up using the $('#my_field').removeAttr('value') to clear the field before it was submitted.
I am a complete novice when it come to Javascript. I copied the script for displaying random images at a specific interval (from javascriptkit.com). I would appreciate knowing whether the following is possible:
The pages are based on tables, so the parts that change are all cells.
1. Can I define text instead of an image in the array? i.e. can I have the image change to say an apple in one cell and the next cell have text explaining what an apple is?
2. Would it be possible to put a countdown timer for when the image/text is going to change?
Ive got a small image of a power button and when pressed the inner section on the button changes to yellow, but when its pressed down Im also trying to get part of my H1 (main header logo title) to change to yellow.
Ive created a span with an id surrounding the letters of the H1 that I want to change, the id being : "power";
The javascript that I have come up with so far and works is as follows:
<img id="poweron" src="http://www.sitepoint.com/forums/images/power.png" alt="Power on button" onmousedown="this.src='images/poweron.png';" onmouseup="this.src='images/power.png';"/>
I understand Im not really supposed to be using inline JS, and I know Ive got to create a function for the onmousedown event to trigger changing the H1 text, so am I under the right impression that the JS so far written is redundant and will have to be re-written so thats contained within a script placed just before the closing </body> and an external script for invoking the main function ?
Has anyone ever had problems with changing the src of an embed after the page has loaded?.
I have had this problem 2 times now and in result have had to actually reinitialise the embed on the page with its new src. Is there not a way round this which will save alot less time and alot less coding.
I am working on a Windows application (in C#) that displays some HTML. In one place the HTML is a status window. What happens is the static HTML page is embedded into the application. The static page displayed and then the C# code gets a hold of the HTML DOM from the web browser and updates what pieces need to be updated.
What I need to do now is change the colors of everything on the static page. At present there is an embedded CSS style in the HTML and all the colors are defined there. Using the DOM, via C# code, how do I change the colors of everything?
1: Can I simply update the CSS and it will auto magically happen? If so, how does one update the CSS via the DOM?
2: Do I need to go to each individual item and change the color there?
3: Is there a better way to do this all the way around?
I have a few radio boxes where a user can choose different options and I want to show an explanation of each option after it's clicked. Here's what I have:
'function describetype(){ ' if (window.event.srcElement.value == "starter") typedesc.innerHTML="A Starter request is for a new employee who's never worked for cadbury or the Bottling Group before."; ' if (window.event.srcElement.value == "leaver") typedesc.innerHTML="A Leaver request is for an existing employee who's permanently leaving the company."; '}
'function starter(){ 'typedesc.innerHTML="A Starter request is for a new employee who's never worked for cadbury or the Bottling Group before."; '}
'function leaver(){ 'typedesc.innerHTML="A Leaver request is for an existing employee who's permanently leaving the company."; '}
function describetype(o){ if (o == "starter"){ typedesc.innerHTML="Starters are...etc."; } if (o == "leaver"){ typedesc.innerHTML="Leavers are...etc."; } }
</script>
The first "toggle" function works fine but the "describetype" won't work. Here's the HTML:
The error keeps saying that "starter" or "leaver" is undefined. I'm not much of a javascript guy (mostly the cut and paste variety myself) but everything I've seen says this should work. No?
for IE 5+ I need to be able to change certain TD tags� background colors, and can�t figure out how to do it...
For instance, in a table with 25 cells, somewhere between 5 or 10 will need the bgcolor to change at the same time when a user clicks a button. Right now only one changes when I use something like this...
document.getElementById(�cellchange�).style.backgr oundColor = "FFFFFF" ** (Note, this is not the EXACT code, I am typing from memory... but it is SOMEthing like thw above...)
where a few td cells have an "id=cellchange" in there tag. I need ALL of the ones with that ID to change!
Is there a getElementByClass, for multiple similar elements?
having a small bit of trouble with some javascript trying to change the background color of a div. The div is id=break and the function to change it is:
function changeBG(){ document.break.background-color = 'ffffff#'}
However that does not work, no colour changes. There is no obvious errors that I can see. Have I misundertsood?
Whats the best way to change text using the DOM? innerHTML makes it easy - for example, I can change the text of a div by indexing the div by its id and then setting its innerHTML.
With the DOM, its easy to get to an element becuase you can use its id. But to get to the insides of an element, you have to delve into the children.
Can I be garaunteed that the first child of a div will be the textnode I want?
I feel as if I'm groping blindly in the dark after I get my div and start changing the children. I can get things to work that way, but I don't feel comfortable about it.