Randomiser Not Working In FireFox, Works In Chrome And Safari
Jun 29, 2011
we've got some pretty simple javascript that calls a random html file into a div on a very simple page. The called file contains a vimeo embed in an iframe.
This script works perfectly in Safari and Chrome, but not FF. in FF the first html file to be called remains, no matter how many times you refresh the page.
Is this due to FF handling iframes differently, or do I need to modify the script to work within FF as well as the others due to a nuance I'm not aware of? Perhaps the randomising part of the script is incorrecT?
$(document).ready(function(){
// each video's html filename needs to be added to this array
vids=['assets/jerkit.html','assets/ponytail.html','assets/goldenprize.html','assets/thedrug.html','assets/slipperyslope.html','assets/leavingtrails.html','assets/tooinsistent.html','assets/sisterwife.html','assets/senior.html','assets
I think it has something to do with the ID of the frame, (from Googling the error and reading some other posts,) but can't figure out where to put the tag.
If you select a Training Event from the menu - "Submit This Record" will appear - click on it. Three alerts should come up - the first two showing data elements (normally not there but I needed to replace some code for this demonstration as the "real" page interacts with my live database), and the last saying "data submitted". In Safari, Firefox and Chrome these all work fine but in IE8 (Explorer) it gives an error on page error ...
If you click on the Volunteer Events radio button, an alert show ups that shows some more data elements (again normally not there), then select a Volunteer Event from the drop down list, make selections from any drop down lists that then appear after that until finally several other form items appear. You must enter a date, and at least one entry from the "Volunteer Activity Itemized Times" drop down menus before you click on "Submit This Record" - the same three alerts should come up - and like the Training Event, everything works except on IE8. (could be that this is also a problem in versions lower than IE8 but I don't have access to a machine that runs Windows (I am a MAC user).So if anyone out there is running IE8, I would appreciate if you could put this app thru it's paces and when you get the error - shed some light as to what is not right in the Explorer world that the rest of the world is OK with
Having issues with the video plugin for jQuery. This works great for Chrome but not Safari or Firefox. In Firefox it just shows up as a grey box with a light grey 'X' in the middle, and in Safari as nothing. I'm guessing it's something about the MIME but I have no idea what to do about that.
I am using javascript to change the buttons on my website so that they load up a different image when hot spots on the buttons are hovered over.
Everything has been working great, but this morning I tried checking out my site and for some reason the javascript wasn't working in Chrome, or on my iphone using Safari. I tried it in IE and everything still works.
Any ideas on why it would stop working for those two browsers?
Here is the javascript:
I'm not sure if seeing the html the js is referencing will help at all, but here it is just in case:
I have two select lists that have option lists that are created from external XML lists that contain course offerings available at different locations. Each location has a different set of course offerings. When a user selects a location, the javascript code will hide / show the option entries that correspond to the course offerings for that location. If a user selects a course offering, the javascript code will show / hide the locations that offer those courses.
Click events are attached to each of the Option entries with the code below. The code works correctly with Firefox and Opera, but the click events are never triggered in IE, Safari or Chrome. The Chrome debugger seems to indicate that the click events get set up in Chrome (although I am not sure where JQuery saves event handler data). Each option entry has a unique ID tag.
$(".locn_option_select").click(function (locnevent) { // Set up click action on the option entries locnevent.preventDefault;[code].......
Yhe button I am using working perfecting in FireFox and Chrome but not in Internet explorer. (Yes I know someone that actually uses IE that pointed this out to me) The rest of the code works fine but just not the reset button I have. Something I have been needing to do is make the code call my images differently by putting them in an array so I don't mess this the sources of my images like I sloppily am here, but I am not sure if that will actually fix the problem I am have. The checkbox should both uncheck the box(if checked) AND change the picture but it only unchecks the box. Here is the relevant code let me know if you want me to post the whole thing.
I've placed this on pages where a ^ top of page link at the bottom is present which animates a scroll back to the top of page, however it only seems to work in IE...
I've written some Javascript to do a few small things on a page, and was excited that it actually worked, even in IE! until I tested in Safari-for-Windows and Chrome on Windows and Linux. I'm going to assume Safari on a Mac also won't run then.
I have a page with some forms. I need to grab the ones with an id starting with "formMaat" (may have a number after it), hide the submit button, and add an onchange event to the lone dropdown select in the form.
Safari and Chrome are removing the submit fine, so they are finding the forms ok.
The onchange event is just supposed to submit the form... I had to imitate the behaviour of the old site but make it accessible to those without JS.
I ended up using a closure to get the "form" passed to the select element because otherwise "form" was unknown... and I can't tell if that's maybe what's tripping up Saffy-Chrome or not. I set a breakpoint in Chrome's developer thingie but I can't figure out how to see the script run when I click on the select.
One of the pages currently: [URL]
The forms in question are on the right/main part of the page, where it says "maat:".
Code: <form action="http://ishtml5readyyet.com/" method="get" id="formMaat"> <fieldset> <legend><span>Kies een maat en krijg de juiste prijs en voorraadstatus</span></legend>
[Code]....
Do I really need that closure? When I didn't have it, optie.form.submit() or this.form.submit() did not run and I thought it should have, since "optie" was known... I thought ".form" would have just looked for that element's form anyway, but it didn't. *edit tried a simpler way, but still no love from Saffy-Chrome.
I know I don't need to really separate that function over to outside init, except who knows if later more events will need to trigger more weird stuff... so I'm trying to write safely.
I thought Safari and Chrome now have different Javascript engines?
I created a drop down menu (i think i followed a tutorial but it was so long ago i can't remember) which works 100% perfectly in firefox and internet explorer but not opera, safari and chrome. I really want to get it working in all of them though.The Jquery Code:
var $j= jQuery.noConflict(); $j(document).ready(function(){ $j(".message_body").hide();
The following link when viewed with Chrome (Windows XP) the contents of the iframe take up the remainder of the window and looks fine. When viewed with IE8 (Windows XP) or Firefox (Windows XP) the contents of the iframe shows up in a much smaller scroll box window that is only using a small percentage of the available window.
Safari (Mac OSX) also renders the iframe the same way as Chrome.
Firefox (Max OSX) has the same rendering problem as Firefox (XP).
What coding changes do I need to make so that IE8 and Firefox act like Chrome and Safari and use the rest of the window for the iframe contents.
The following link when viewed with Chrome (Windows XP) the contents of the iframe take up the remainder of the window and looks fine. When viewed with IE8 (Windows XP) or Firefox (Windows XP) the contents of the iframe shows up in a much smaller scroll box window that is only using a small percentage of the available window.
[URL]
Safari (Mac OSX) also renders the iframe the same way as Chrome.Firefox (Max OSX) has the same rendering problem as Firefox (XP).What do I need to do to make IE8 and Firefox act like Chrome and Safari and use the rest of the window for the iframe contents.
I have a jQuery based gallery [URL] that will load thumbnails to the bottom of a page, however for some reason these images only load on Firefox and IE (Not Chrome or Safari). I'm not sure this is due to jQuery completely.
It does NOT work fine in IE8 or Safari. In both these browsers the height of the DIV that's being set is usually shorter than the other DIV it's being aligned with.Here's the code I'm using to resize the problematic DIV:
Function resize(height) { $(document).ready(function(){ var div = $( "#annoucement-area-243" );
When a user visits index.html on my site, they input their email address. The form redirects them to "confirmed.html", the form also writes a cookie with their email address.When the user gets to confirmed.html, I use an "if/else" statement. If there is a cookie (email address), I append ("#"+user_email) to the window location. I do this so that when the user shares with "addthis" tool, I will know who is sharing. Unfortunately addthis only shares the current page, so I want new users to the site to be redirected to index.html My code works in firefox, but not safari. In safari it just seems to redirect to index nomatter what. The user never even sees confirmed.html.
var user_email = unescape(document.cookie); if (document.cookie) {
I'm using a nice little script which replaces the usual file upload input with whatever image you want and then with JS makes sure that an invisible 'browse' button is underneath the mouse pointer whenever the mouse is moved over the image you want to use.
It works on every browser ie7 ie8 ie9 FF safari chrome but not on opera. On Opera the regular file input appears.
I've had a good hoke round the 'net and I know there's loads of scripts which do similar things. But either they are too complicated for me to figure out how to use them eg uploadify (bit of a newbie) or they do similar things but just not as well - like making the custom image the same size as the file input would be (there's issues with that too).
Here's the script I'm using - there's not much to it
How come it doesn't work in Opera grrrr... Is there anyway to fix it? This is perfect for what I want apart from not working in Opera.
Ok, So check out [URL].. The index jquery works fine on all three browsers (last I checked) Now go to [URL]..php or any other secondary page. The jquery has gone loopy and is not working! It seems my CSS partially works, my jquery does not work at all... totally lost on why my jquery is not activating.
The white my notes section on the bottom left is a div area that is loaded with an Jquery Ajax call just like 2 other areas on the page. This works fine in IE, Safari (PC), Chrome but not in Firefox. It just shows blank white.
The following script grabs a string (*.abc.org, e.g. from &sid=xyz.abc.org) from the current URL and changes it (to ABC:abc.org). Everything works perfectly in IE, but Firefox and Chrome appear to get themselves into an endless loop. When I check the URL, xyz.abc.org has successfully been changed to ABC:abc.org, but the page just seems to keep refreshing over and over.
var tomatch = /abc.org/i; var usrString = document.referrer; var is_a_match = tomatch.test(usrString); var newString = document.URL.replace(/[a-z]*.abc.org/, "ABC:abc.org"); if (is_a_match) { window.location.replace(newString); }