Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: need script go to web page depending on checkbox selected

  1. #1
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default need script go to web page depending on checkbox selected

    Hi

    I am looking for help on a script that has a row of checkboxes, A user can then select 1 or more checkboxes, and then have a button, when clicked allows the user to go the the web page, depending on which checkbox was
    selected.

    Thanks Dave

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    What are you expecting to happen? Open in the same page or open in a new window?

    If it's the earlier, then impossible. If it's the later, there's possibility.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  4. The Following User Says Thank You to rangana For This Useful Post:

    cwebmaster (06-14-2008)

  5. #4
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    This was not resolved, please do not reply with out knowing if it can be done, you say it can not be done, when it can, I have seen it, you can too.

    see for yourself.

    http://www.horizonindustriesltd.com/s/QwikReport.asp

  6. #5
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    As I say, it can't be done! Or you're not making yourself clear.

    You never answered my query on post#2, as well as the message you've sent to me.
    If you could answer the question on post#2, I'll be glad to hand a code for you.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  7. #6
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default re

    I do not know why you keep saying it is not possible, Please have a look at
    http://www.horizonindustriesltd.com/s/QwikReport.asp

    They have done what i want done. You will be taken to a web page, depending on which checkbox...or checkboxes are selected. You can check more than 1 checkbox, and if you check 4 of those checkboxes, you will be taken to a page with the 4 articles. etc (and opens in same page)

    Thanks dave

  8. #7
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Then, this means we're not riding on the same boat.
    What I'm I going to do next upon checking the checkbox?
    I can't reproduce what you're trying to achieve. Sorry if I'm giving you a hard time.
    Last edited by rangana; 06-14-2008 at 11:42 AM. Reason: I mean boat not walk.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  9. #8
    Join Date
    Jun 2008
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default hi no hard time

    I want the viewer to check in a box, if they only choose 1 checkbox, they go to that page, if they check 2 checkboxes, then they go to another page and so on.

    Did you see the example i posted?
    http://www.horizonindustriesltd.com/s/QwikReport.asp

    If they check one box, they go to a page with that 1 article, if they check two checkboxes, then they go to the page, with both those checked articles in it, and so on.

    Thanks dave

  10. #9
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by cwebmaster View Post
    I want the viewer to check in a box, if they only choose 1 checkbox, they go to that page, if they check 2 checkboxes, then they go to another page and so on.

    Did you see the example i posted?
    http://www.horizonindustriesltd.com/s/QwikReport.asp

    If they check one box, they go to a page with that 1 article, if they check two checkboxes, then they go to the page, with both those checked articles in it, and so on.

    Thanks dave
    I think you're highly underestimating or misunderstanding what's being done here. The second page you're taken to, the "results" page, is generated dynamically based on what you selected on the first page.

    The contents of the second page are all saved to a database (could be text files etc.. as well, it's hard to say), and called on demand.

    It's not just a matter of going to one page if option A is selected and going to another page if option B is selected. Doing it that way would be a complete waste of time/resources. Depending on your setup, there could be tens or hundreds of permutations.

    So, if you want to replicate the functionality of the page you posted, you'll have to rethink your setup and develop some sort of dynamic way of doing this. You'll need some sort of server-side language available on your server (PHP, ASP and the like). A database (MS SQL, MySQL, etc...) is optional.

  11. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This could all be done with AJAX and javascript. The script might be a bit complex, and it would depend upon the client having javascript enabled. Because of that (client requirement), and the fact that AJAX requires server resources anyway, a 100% server side solution as hinted at by Medyman would be better. Do you have PHP or asp available on your host?

    Here's a demo of the javascript/AJAX method:

    Attachment 1838

    or:

    http://home.comcast.net/~jscheuer1/s...tch/sender.htm
    Last edited by jscheuer1; 06-16-2008 at 04:53 AM. Reason: add demo
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •