SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <script language="question"> can i alter variables not defined in the headers?

    <div onMouseover="alert(\"lol\");delay=9999999999;" onMouseout="delay=10000;" id="fscroller" style="display:block;border:0px;width:'+fwidth+';height:'+fheight+'; margin:30px;"></div>

    this is kinda of a scroller i found, and he has a variable called 'delay'.
    but the script is not in the headers, so i dunno if that causes any problem when i try to edit that variable using mouse events on other parts of the site.

    that events dont work, my mouse crosses over the div but i see no alert( lol ), and IE tells me there's an error but doesnt tell me what error.

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,598
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    What version of IE are you running? I thought all IE versions tell you what the error is when you click on the status bar where it tells you there is an error (unless you turn error reporting on so that the error message pops up straight away).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Strange, i change nothing now he doesn't tell that are errors... but still it doesnt detect when my mouse is over that div.

  4. #4
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What i'm trying to do is this:

    <div onMouseOver="alert('hi mouse!');" onMouseOut="alert('bye mouse');" style="display:block;">things and other things</div>

    But when i put the mouse over the DIV i dont get those alerts...

    anyone?

  5. #5
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok this last one works, but the one i putted in the 1st post doesnt

  6. #6
    SitePoint Addict Mr Jojo's Avatar
    Join Date
    May 2007
    Posts
    322
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    anyone?

  7. #7
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On the IE error message, there is a Details button. When you click it, the dialog box gets larger and displays a detailed error message in an inset box.

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Don't try to escape the double quotes. Use single quotes instead.

    onmouseover="alert('lol');delay=9999999999;"
    Last edited by paul_wilkins; Jul 22, 2008 at 16:08.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #9
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,598
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Try spelling onmouseover correctly. JavaScript event handlers do not have capital letters in them.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •