Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript is passing URL Paramaters i dont want :(

    Hiya, i better say first of all, that i am a total beginner with javascript, and programming,

    i have made a page, with a bit of script to say, if 4 checkboxes are ticked, enbale the 'Continue' Button, else disabled. ::

    <SCRIPT LANGUAGE="javascript">
    document.frm.cbox.checked = false
    function Disab() {
    frm=document.forms['Form1']
    if(frm.cbox.checked && frm.cbox2.checked && frm.cbox3.checked && frm.cbox4.checked)
    {frm.Submit1.disabled=false}
    else {frm.Submit1.disabled=true}
    }

    this works!! YIPPEE!

    BUT......... Drumroll

    the problem is that Javascript is passing variables through the URL, and as this is a ColdFusion Page, there are coldfusion variables being passed through the URL as well, with information required to proceed to the next page.


    is there anyway of hiding the javascript variables in the URL?
    here is the code i have for the checkboxes.

    <cfoutput> <input type="checkbox" name="cbox" id="cbox" onClick="Disab();"></cfoutput>
    <cfoutput> <input type="checkbox" name="cbox2" id="cbox2" onClick="Disab();"></cfoutput>
    <cfoutput> <input type="checkbox" name="cbox3" id="cbox3" onClick="Disab();"></cfoutput>
    <cfoutput> <input type="checkbox" name="cbox4" id="cbox4" onClick="Disab();"></cfoutput>



    thanks for any help
    Rishi Patel

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,042
    Thanks
    0
    Thanked 251 Times in 247 Posts
    Quote Originally Posted by RishiPatel900
    the problem is that Javascript is passing variables through the URL, and as this is a ColdFusion Page, there are coldfusion variables being passed through the URL as well, with information required to proceed to the next page.
    Can you elaborate on this a bit as I don't get it given the script you posted?
    My guess is you're using GET as form method and when the submit button is clicked, the form data are appended in the URL.


  •  

    Posting Permissions

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