if i have this code: <form><input type=text name="id1"></form> then with javascript i can reference this with this.form.id1, how can i reference something like this:
I have a table which I would like to be highlighted with the click of a button, but I can't seem to reference it correctly. I can make the <td> clickable and function, but when I try to apply it to the button I can't make it reference the td cell, rather than change the background color of the button.The function is:
I have created an object called list. the object has a method called load and a method called setSelected (it has more, but they arn't impotant here).
The load method prints out table rows like this:
str+="<tr>"+data+"</tr>";
and in the end, inserting str as the body of a table.
what I want to do now, is have an onclick event for each of these table rows, that calls the setSelected method of the current object. so for example, if I'd write this on my page:
mylist = new list(args...); mylist.load(); <div id='associated-div'></div>
that if someone clicks a row in the table that is created in the div, the setSelected method of my list oject will be called.
I'm trying to build a simple "where's the meeting room" page for my work. This consists of a background image of the map, and (right now), a red block absolutely positioned on the map to show where the room is.I'm using an object to keep track of x/y positions for the rooms, i.e.
Code: var rooms = { a123: { x: 100,[code]....
This works, but uses eval() a lot, which doesn't seem like best practice. What's the appropriate way to get the info?Here's the whole page code:
This has really got me stuck. Below is a distillation of my problem:
This is my function:
function Clear(form) { ???.checked = false; } <form name="myform">
[Code]....
How do I execute the function to clear the checkbox the moment it is clicked? How do I reference that specific checkbox, when there are multiple checkboxes with the same "name"?
The rules (the above is a simplified version of my actual problem. There is much more to my script, which means other possible solutions cannot be considered):
1. I am aware of onclick="this.checked=false", but I cannot use it.
2. The ID for the checkbox is dynamically generated, whereas the entire onclick command must be the same for all checkboxes.
3. All checkboxes must have the same name, and the name must have square brackets.
4. "this.form" must be in the onClick, as it is used by the rest of the function.
I have a Flash movie on a web page and I want to send parameters to it with JavaScript to have it go to a selected frame. The AS3 code receives its information via an ExternalInterface API. The following code parses the URL argument (?page=x) and I want to send the value (x) to Flash. Unfortunately, when creating the objMovie variable, it is always undefined, therefore getFlashMovie is undefined and Flash never receives the callback. Thinking that it was because the flash movie is not loaded yet, I created a button to call callToActionscript, and when I click the button, I get the same error. (getFlashMovie("myFlashMovie") is undefined)
Also, if (params) always returns true, whether there are parameters or not. I don't understand that, either.
The code follows: <script > $(document).ready(function() { var params=getQueryParameters(); if(params) { callToActionscript(params[0]); }}); function getFlashMovie(movieName) { var isIE = navigator.appName.indexOf("Microsoft") != -1; var objMovie = (isIE) ? window[movieName] : document[movieName]; alert(objMovie); //Always return undefined return objMovie; } function callToActionscript(page) { var myMovie=getFlashMovie("myFlashMovie").sentToActionscript(page); } function getQueryParameters() { var query = window.location.href.split('?')[1]; //query won't be set if ? isn't in the URL if(!query) { return { }; } else{ var param = query.split('='); } return param[1]; } </script>
By default when my site loads the flash file gets the value of currentItem from Flashvars and does what it needs to do with this value. The flash file in question is just a basic video player and the id of the video to be played is retrieved from flashvars.
However I want users to now be able to click the button in my form and then the value of flashvars in my videoPlayer object will change to the value passed in the changeVideo() function i.e. in the above example value="currentVideo=1" will become value="currentVideo=2".
That's the easy part I think but what I then need to do is get the flash file itself to load this video without a page refresh but I have no idea how to get the flash file to recognise this value once it has already loaded. What exactly are my best options here?:-
1. Reload the flash component via ajax every time a user selects a new video i.e. every time changeVideo() is fired?
Is this possible? Basically I need to grab all the flash objects on the page (done) and then set the wmode to transparent so it doesn't mess up my DHTML menu.
I'm trying to make a quick and dirty mp3 player that plays whatever mp3 is in the URL, for example [url] would open the SWF mp3 player (I chose this one for its simplicity[url]) and play that song. However, nothing I've tried works. Could someone take a look at my code ? Please note that downloading the mp3 through newwindow() works perfectly.
This works on FIREFOX but IE keeps playing the same file instead of playing a new one ! I have tried to add the no-cache meta-tags in the header but it still doesn't work.
Probably covering well trodden ground here but so far I haven't found any reliable solution and "it can't be done" seems crazy. Here goes:I have some Flash and non-flash banners that are to be embedded into my page - all managed by a simple CMS. The Flash movies are not created by me as they are for 3rd Party advertisors, and I do not want to be doing any Flash programming myself as it's not my thing and I don't have the resource to do it. As with the JPEG/GIF files - I just want to be given the file and then embed it.
What I want to do is produce some MI based upon when the various banners are clicked - things like how many clicks and who clicked them (users are logged into the web site so I can track them). Simple enough for JPEG/GIF banners capturing the onclick event but for Flash it seems that the Flash movie prevents (or overrides) the onclick event from registering.This seems crazy! I want my application logic (in this case logging user activity) to be independant of the media content - especially as I am not in control of the media content.Googling and experimentation shows that for IE I can seemingly use "onfocus" but this is not very satisfactory and of course I need a cross browser solution.This seems like such a simple concept that at the time of specifying the requirements it didn't occur to me that this might not be possible.... but it seems that I may be wrong!
i am using the object flash embed instead of the swfobject or flashobject because I am embedding using js innerHTML. Is there a way to loose the dotted border in IE that swfobject fixes? The movie needs no interactivity its just a swf animation.
is it possibile to detect and prevent through javascript the opening of a new window caused by a embedded flash object? In the html code this embedded object resides within a given div with id.
I would want to know about it because every time I open the page, the flash embedded object opens another window, and it is a little bit noisy.
Doing my own fitness bootcamp site and want to fancy up my front page. My front page loads a picture and I want it to load like flash. What could I do? I have all the Adobe Software, just don't know how to use it.
I need a simple javascript that I can use in my HOME page.index.html has a flash animationnoflash.html is a page without flash animationKindle does not support Flash and therefore i want to redirect my index.html to noflash.html page.
I work for a company called Best of the Best (www.botb.com). We use Flash countdown clocks to mark the end of our competitions. The issue we now have is that our clients are using mobile platforms more and more and as bloody Apple wont support flash (not fully anyway) we need the option to detect whether our users have flash and if not then replace the current <OBJECT>Blah Blah Parameters etc</OBJECT> with <DIVCLASS="NON_FLASH_CONTAINER">All other bits in middle</DIV>Is this at all possible?
I'm trying to put some code together to create an image-swapping system, that when you click on the image it'll hide the image and replace it with a given iframe vimeo/youtube code...The swapping part works fine, however when the iframe loads up, it hides all other flash objects in the page, and I can't figure out why.Here's the JS
Code: function swapvideo(w,h,url) { document.getElementById('video_pholder').style.display='none';
I have created no flash pages and flash pages, but instead of creating a portal at the front of the site that leads you to a flash site and a no flash site id like to do it so the page detects flash or not, and redirects to whichever URL.
Is this possible, or do multiple browsers cause problems ?
I have created a transparent flash video (virtual spokesperson) for my website. For demoing purposes, I would like to have this appear on any desired website.
This is what I am trying to produce - here a virtual spokesperson appears on the [url]website: [url]
Have a look at other sites which enable one to type in a URL and their demo virtual spokesperson appears on the given site: [url] [url]
I believe they do this within an iframe to display the underlying website.
I'm trying to get a value from a link that a user click on in a pop up window and send it back to the parent window. It's working fine in mozilla and some IE but i'm having problem in IE 5 and some IE 6.
whenever I run the below code I am unable to hide my <DIV>. I have posted a previous post regarding hiding DIVs however as this is slightly different I thought I would create a new topic here to allow for easier searching for other users.
The below code works if the DIV is outside of the form however if I enter it within the form nothing happens.
Is there a way in the Javascript to reference the dom of another page that is online. An example would be if www.cnet.com has an element with an id = money can I reference that page with an object that and get a value from the money element and display it on my page. I know this sounds confusing but really i just want to be able to save a xhtml page that is not on my website. Create a input filestream from that page and use data from the filestream to make data on my own page.