Results 1 to 6 of 6

Thread: formatting - forcing a javascript element to load last

  1. #1
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default formatting - forcing a javascript element to load last

    Hello,

    I have this page, which doesn't always display correctly: http://www.iopener.co.uk/happinessqu...ire/step1.html

    It has numerous javascript 'sliders' on the page. The javascript file for these sliders is located here: http://www.iopener.co.uk/happinessqu...aire/slider.js

    I need some way to ensure that the sliders are correctly aligned on the page.

    Often, when I load the page, particularly in Safari, the sliders each appear about 50px above where they should be. (Refreshing the page normally makes them align as they should be aligned). I think a possible solution would be to make sure the sliders load after the rest of the page, but I've already linked to the javascript file in the header of the html so I don't know what else I can do to force this to happen.

    Any help greatly appreciated.
    Thanks,
    Ian

  2. #2
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    maybe this is your problem?

    Code:
    <table width="630" border="0" cellspacing="0" cellpadding="0"
    <tr>
      <td style="text-align:right; padding:20px 0 40 0px; border:0px;">
    		<input type="hidden" name="step_completed" value="1" />
    						<br>
    			<div align="right"><input type="button" value="Analyze me!" class="button"  onclick="javascript:valida()"/></div>
    
    			<br>&nbsp;
    			</td>
    </tr>
    </table>

  3. #3
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry but I don't understand. Could you elaborate please? Thanks for your help.

  4. #4
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    iopener: you haven't closed the tag.

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Closing the tag means to add the "/>" shachi, I think you mean ending the tag:
    Code:
    <table width="630" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td style="text-align:right; padding:20px 0 40 0px; border:0px;">
    		<input type="hidden" name="step_completed" value="1" />
    						<br>
    			<div align="right"><input type="button" value="Analyze me!" class="button"  onclick="javascript:valida()"/></div>
    
    			<br>&nbsp;
    			</td>
    </tr>
    </table>
    - Mike

  6. #6
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for pointing that out mburt.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •