Alternative to javascript in those examples.... please help!!!

javascript , alternative , example Alcobendas, Spain
  • 8 years ago
    Hello, I would like to put an alternative in the following examples incase a browser has js swiched off.... but I have no idea how to do it.... could you help please? * . First, when the page is being loaded I have a loading progress bar shown... By default, the page is hidden, when the page is loaded, there is a js function that shows the different parts and hides the loading gif.. window.onload = bodyOnload; function bodyOnload() { $('loading').hide(); $('part1').show(); $('part2').show(); $('fp').show(); } * I have a popup effect window that uses a area (image mapping) as follows * For this one, I suppose it is easier. var so = new SWFObject("flash_v0/playerMultipleList.swf", "temas", "255", "200", "7", "#FFFFFF"); so.addVariable("autoPlay","no") so.addVariable("playlistPath","playlist.xml") so.write("flashPlayer"); I should only add something like; OR Can I do something else? Thank you very much for your help....
  • 8 years ago
    The code I posted cannot be seen.... so I repost the examples: 1. =================== ===================== 2. ======================= ====================== 3. ======================= ============================ Adding something like should be enough?
  • 8 years ago
    OK... the code cannot be seen so I will have to explain the examples..... The first one is "window.onload=bodyOnload" and then the bodyOnload function that will hide the loading gif and show the rest of the page.... I have no idea what the alternative could be 2. In a image map, I have an area with href="javascript:void(0)" and an onClick event that show and hide elements..... like document.getElementById....("foo").style.display.... 3. The script stuff is used for the flash music player (new SWFObject...... ). I don't really know what to put in the noscript part.... Should I put that the flash music player cannot be played because the browser does not support js.... or is there an alternative to this? Many thanks
  • 8 years ago
    OK. I manage to get rid of the javascript stuff with the progress bar..... The main problema I am having is with the href="javascript:void(0)"....
  • 8 years ago
    I was wondering..... would "href='javascript:void(0)' have the same effect than "href='#'" ?. In this case the problem 1 would be solved! Please, tell me something
  • 8 years ago
    Sorry, not sure why your code is failing to display - will look into it for you! In terms of the examples you describe 1. The only solution I can see on this would be to include a meta refresh in the page that triggers an automatic reload after a certain number of seconds - you could then re-render the page with the appropriate progress displayed 2. Popup windows... you'll have to fallback to using a standard hyperlink with a href to the URL you display... and your javascript can attach itself to the click event and disable the default action when the javascript is enabled. 3. You won't be able to use SWFObject, but you can still include a combination of embed and object tags (just google flash embed object and you should find the code). Note that your page won't validate though - that's why most people use javascript based solutions these days... anyone with javascript disabled is likely a search engine or a disabled user... who are more likely to want an accessible non-flash alternative if at all possible. Hope that helps!
  • 8 years ago
    Custom software and games development in Ukraine. www.xitexsoftware.com
  • 8 years ago
    Thanks for your answer.... for the case number 2, could I replace the javascript:void(0) by # .. ? Could you explain what you mean in case number 3? Actually, if the user has js switched off, I would only like to have "No flash music player available"!!!!

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only 3 numbers of interest to a computer scientist: 1, 0 and infinity”