SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot jstraathof's Avatar
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    document.writeln question/problem

    I'm including a javascript .js file in my page
    It keeps nagging on the following line

    document.writeln("</td><td><input type='radio' name='v' value='2' OnClick='createWindow('http://www.domain.com/v2/?id=18&invoc=js&v=\'this.value\');'>");

    It must not use the function createWindow in this print, but when
    someone clicks the radio button it must use that function. Anyone
    got an idea how to fix this?

    Regards,

    Jeroen

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is the this.value in that line referring to? window, or a custom object?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Zealot jstraathof's Avatar
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This.value returns the value of the radio button !

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay...

    document.writeln('</td><td><input type="radio" name="v" value="2" OnClick="createWindow(\'http://www.domain.com/v2/?id=18&invoc=js&v=\' + this.value);">' );

    That should do it
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  5. #5
    SitePoint Zealot jstraathof's Avatar
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    155
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man, you're the best !


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
  •