Expand my Community achievements bar.

SOLVED

Passing dynamic parameter with the URL while submitting the form

Avatar

Level 4

Hi ,

I am submitting the form data in xml format to a servlet using the submit button . I also need to pass one parameter with the URL . But the value of that parameter changes at runtime depending on the value of a particular field on the form . Please help me out with it .

Thanks .

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Here is a sample that shows what I think you want. The code is on th epreSubmit event of the button. I put messages out showing what the button thinks the submit URL is......before and after we change it. You can remove those messages when you get it working the way you want.

Hope that helps

Paul

View solution in original post

4 Replies

Avatar

Former Community Member

Then you woudl have to programatically set the submit URL. To get access to the submit URL use:

SubmitButtonName.event_click.submit.target = "Your submit URL"

This will accept a string so you can construct the URL whatever way you want. Of course this would need to be done before the user pressed the submit button .....I woudl use the preSubmit event.

Paul

Avatar

Level 4

Please mind my ignorance but i am not able to implement it . I am a little confused with the type of button and events . Also i needed the form  to be submitted in xml data format. Can you help me with the sample of it .  Thanks .

Avatar

Correct answer by
Former Community Member

Here is a sample that shows what I think you want. The code is on th epreSubmit event of the button. I put messages out showing what the button thinks the submit URL is......before and after we change it. You can remove those messages when you get it working the way you want.

Hope that helps

Paul

Avatar

Former Community Member

Thanks so much pguerett.

It's really helpful for me.

BTW, i would like to ask additional question related on it.

Suppose the client side have a html page with a url, when the user click on the link, how the adobe livecycle directly receive the link that clicked from the user? is it possible to do that? Please advise.

Thanks a lot.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----