Skip to main content
Participant
April 9, 2009
Question

Can you pass more than on variable with getURL in flash form

  • April 9, 2009
  • 1 reply
  • 1258 views

I needed to call another page from inside a form not with the submit button and fournd this piece of code

<cfinput type="button" id="btEdit" name="btEdit" value="View" onClick="getURL('../../forms/Program_populate.cfm?<cfoutput>#SESSION.URLToken#</cfoutput>&Reference='+data.dataProvider[data.selectedIndex]['ID'],'_blank')" >

"Reference" is passed in the URL, I have tried to tweek this to pass an additional field "ID" , Vendor_Number" , but have been unable to find the correct syntax.  If anyone can help that would be great.

Thanks,

Mike

    This topic has been closed for replies.

    1 reply

    Inspiring
    April 14, 2009

    url variables are passed as follows

    after the file name a question mark (?) then,

    name=value with an ampersand (&) between name value pair

    You may be having problems with escaping the action script code.

    If the value is a coldfusion value just cfoutput the value as in your example.

    If the value is from a form element then you need to escape it as in the example

    remove the comments from below

    getURL('../../forms/Program_populate.cfm?

    <cfoutput>#SESSION.URLToken#< /cfoutput>

    &Reference='+data.dataProvider[data.selectedIndex]['ID']

    // need to add more info so put in the plus and add the text of the url variable name (let's assume the id is from CF)

    + '&ID=<cfoutput>#queryName.ID#</cfoutput>&Vendor_Number='

    //we have add the url variable name above, but let's assume it is coming from a form field

    // then we need to close the string, done above and add the value

    + data.dataProvider[data.selectedIndex]['Vendor_Number']

    ,'_blank')

    Hope this helps.

    If you still have problems, assing all this to a cf variable and output it so you can read what it is to debug it.

    Ken