Results 1 to 9 of 9

Thread: Radio Button Redirects...

  1. #1
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Radio Button Redirects...

    Hi,

    I have been struggling for hours to try and solve this problem - please help me if you can!

    Basically, I am trying to create a .exe application to help diagnose users' PC's.

    On each page there are a choice of radio buttons...

    If the user clicks on radio button #1 and then clicks submit, I want them to redirect to a certain page.

    If they click on radio button #2 and then the submit button, I want them to redirect to another page.

    etc...

    I have got this working when i view it on my website (great!), but when i come to make a .exe application it comes up with errors...



    Here is the .exe file:

    http://www.spywareremoversolution.co...ediagnosis.exe

    If you click on a radio button and then next you will see the error.

    I think the problem is do with this: <form action="#" method="submit" onsubmit = "usePage(this, 'bob');return checktheform();">



    Here is the code for the page:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
    function usePage(frm,nm){
    for (var i_tem = 0, bobs=frm.elements; i_tem < bobs.length; i_tem++)
    if(bobs[i_tem].name==nm&&bobs[i_tem].checked)
    frm.action=bobs[i_tem].value;
    }
    </script>
    </head>
    <body bgcolor="#FFFFCC">

    &nbsp;<p align="center"><font size="4" color="#FF0000"><b>SPYWARE &amp; ADWARE
    DIAGNOSIS TOOL</b></font></p><hr>
    <p>&nbsp;</p>
    <p align="center"><b>Before we begin a scan of your PC for
    spyware &amp; adware threats, we need to pinpoint the exact problem(s) that you've
    been having with your PC. </b> <br>
    <br>
    &nbsp;</p>
    <p align="center"><font color="#000080"><b>Please Select One of The Following:</b></font></p>
    <p align="center"><br>
    </p>
    <div>
    <form action="#" method="submit" onsubmit = "usePage(this, 'bob');return checktheform();">
    <p align="center"><font color="#FF0000"><span style="background-color: #C0C0C0">
    <font color="#000080">
    <input type="radio" name="bob" value="http://www.spywareremoversolution.com/spywarediagnosis2.htm"></font></span></font>
    Currently, My Anti-Virus Program Finds No Security Threats or Problems</p>
    <p align="center">
    <span style="background-color: #C0C0C0">
    <input type="radio" name="bob" value="http://www.spywareremoversolution.com/spywarediagnosis2.htm"></span>
    Currently, My Anti-Virus Programs Finds At Least One Problem or Security Threat</p>
    <p align="center">
    <span style="background-color: #C0C0C0">
    <input type="radio" name="bob" value="http://www.spywareremoversolution.com/noantivirus.htm"></span>
    I Do Not Have An Anti-Virus Program</p>
    <p align="center">
    <input type="submit" value="Next">
    </p>
    <p align="center">
    </p>
    </form>
    </div>
    </body>
    </html>

    Thanks very much for your help, I can't wait to crack this!

    Many thanks,

    Alex

  2. #2
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh yeh, the error reads:

    An error has occured in the script on this page

    Line: 28
    Char: 22
    Error: Object Expected
    Code: 0
    URL: http://www.spywareremoversolution.co...ediagnosis.htm

    That line refers to the method="submit"

    This hurts my head

    Thanks guys,
    Alex

  3. #3
    Join Date
    Feb 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I just posted a thread with a very similar topic. Did you get it to work? No offense, but I just can't click on a URL with an .exe extension in it, or else I'd try to give you some feedback. I used to have a script that did this a couple of years ago but I can't find it. Ugh!

  4. #4
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by uppercanuck View Post
    I just posted a thread with a very similar topic. Did you get it to work? No offense, but I just can't click on a URL with an .exe extension in it, or else I'd try to give you some feedback. I used to have a script that did this a couple of years ago but I can't find it. Ugh!
    Lol, fair enough about the .exe link!

    Could you click on the .htm link instead on my second post? The weird thing is, is that it works fine when live on the internet, but as soon as i convert it to a .exe it creates problems....

    I'm so desperate for a solution now because I really want to distribute this little application....any ideas?

  5. #5
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    Code:
    method="submit"
    there is no method submit, it is either post or get. http://w3schools.com/tags/tag_form.asp
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Also, you do not have a javascript function named checktheform(). Either add that function in the head section of the document or get rid of the call to it in the form tag.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  7. #7
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi guys, thanks very much for your help but I don't understand how to implement the changes.
    All i know is the 'post' doesn't work....maybe I need to use 'get'....

    Would you at all be able to copy and paste that code with the changes in it, because I can't do it:

    Thanks very much - I really appreciate it.
    Alex

  8. #8
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Well, I'm not sure what checktheform() is supposed to do, so I'm taking it out of this code.

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript">
    function usePage(frm,nm){
    for (var i_tem = 0, bobs=frm.elements; i_tem < bobs.length; i_tem++)
    if(bobs[i_tem].name == nm&&bobs[i_tem].checked)
    frm.action=bobs[i_tem].value;
    }
    </script>
    </head>
    <body bgcolor="#FFFFCC">
    
    &nbsp;<p align="center"><font size="4" color="#FF0000"><b>SPYWARE &amp; ADWARE
    DIAGNOSIS TOOL</b></font></p><hr>
    <p>&nbsp;</p>
    <p align="center"><b>Before we begin a scan of your PC for
    spyware &amp; adware threats, we need to pinpoint the exact problem(s) that you've
    been having with your PC. </b> <br>
    <br>
    &nbsp;</p>
    <p align="center"><font color="#000080"><b>Please Select One of The Following:</b></font></p>
    <p align="center"><br>
    </p>
    <div>
    <form action="#" method="POST" onsubmit="usePage(this, 'bob');">
    <p align="center"><font color="#FF0000"><span style="background-color: #C0C0C0">
    <font color="#000080">
    <input type="radio" name="bob" value="http://www.spywareremoversolution.com/spywarediagnosis2.htm"></font></span></font>
    Currently, My Anti-Virus Program Finds No Security Threats or Problems</p>
    <p align="center">
    <span style="background-color: #C0C0C0">
    <input type="radio" name="bob" value="http://www.spywareremoversolution.com/spywarediagnosis2.htm"></span>
    Currently, My Anti-Virus Programs Finds At Least One Problem or Security Threat</p>
    <p align="center">
    <span style="background-color: #C0C0C0">
    <input type="radio" name="bob" value="http://www.spywareremoversolution.com/noantivirus.htm"></span>
    I Do Not Have An Anti-Virus Program</p>
    <p align="center">
    <input type="submit" value="Next">
    </p>
    <p align="center">
    </p>
    </form>
    </div>
    </body>
    </html>
    Looking at the html page you posted a link to, it seems to be working perfectly; however, you say it is something with the exe (which; like the other poster, I am not too found of downloading exe files from an untrusted source).

    Hope this helps nonetheless.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  9. #9
    Join Date
    Feb 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for posting a solution - unfortunately it didn't work.

    <method ="post"> has never worked on this, it seems that I have to go with submit, but someone told me not to!!

    The thing is, someone directed me to this link initally to get help with redirects, and said to change it for radio buttons - would you know how to?

    The link is:
    http://www.ftls.org/en/examples/cgi/Redirect.shtml

    If I can use that, then I know it will work - but again, I don't know how to!

    Thanks,
    Alex

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
  •