NetTalk Central

Author Topic: Call URL out of embeded point  (Read 2478 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Call URL out of embeded point
« on: April 26, 2013, 01:09:57 AM »
Hi Bruce

I add a progress bar on the form with a start button, that is working fine.

How do I add in embed code to call a URL that was in a button previously 'ServeDocument?Value=1'.

I try to run this URL out of the start button embed point. Can you call a URL out of a embed point?

Regards
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Call URL out of embeded point
« Reply #1 on: April 26, 2013, 03:07:46 AM »
Hi Johan,

I'm not sure I understand the question.

When the user clicks on the start button, that runs a procedure.
That procedure is not a "page" or anything - it's a simple procedure with no interface. Usually something like a report, or export, or something that creates a file.

 As the procedure runs the progress bar is updated. When the procedure finishes a link is (typically displayed.)

Can you explain a bit more where "serve document" fits into this process?

cheers
Bruce


johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Call URL out of embeded point
« Reply #2 on: April 26, 2013, 03:42:17 AM »
Hi Bruce,

In the button field on the "On Click" tab in the URL field I use 'ServeDocument?Value=1' to call the procedure.

How do I add in embed code to call a URL that was in a button previously 'ServeDocument?Value=1'. I want to call the URL procedure out of embed from an other procedure.

Regards
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11239
    • View Profile
Re: Call URL out of embeded point
« Reply #3 on: April 26, 2013, 05:44:34 AM »
>> In the button field on the "On Click" tab in the URL field I use 'ServeDocument?Value=1' to call the procedure.

excellent. so when the user clicks on the button, the browser will call that procedure.

>> How do I add in embed code to call a URL that was in a button previously 'ServeDocument?Value=1'.

you can't do that.

>> I want to call the URL procedure out of embed from an other procedure.

you can't do that. The browser makes the requests.
what you could do is your code, then pass back an instruction to the browser to make the request.

ie set the button not to call a procedure. Then in the client-side tab, server code button, do whatever you want plus

p_web.script('some javascript')

in this case some javascript to open a new tab;

p_web.script('window.location('something.pdf','_blank')')

Cheers
Bruce