Skip to main content
Participating Frequently
July 19, 2018
Question

i need ask about generating random sting after url, like url parameter

  • July 19, 2018
  • 9 replies
  • 774 views

Hii,

anyone know how to generate random string or number , after url link? i was try like this :

var lower = 0; var upper = 100000000;

var url = "http://www.mypage.com/index.php?"+(Math.floor(Math.random()*(upper-lower))+lower)

windows.open("url");

but the button can't open my url.

thanks

This topic has been closed for replies.

9 replies

Participating Frequently
July 20, 2018

can i use window.open function?

try67
Community Expert
Community Expert
July 20, 2018

Not from within the PDF file.

Legend
July 20, 2018

Yes you need to use an Adobe product. Download and open in Reader.

Participating Frequently
July 20, 2018

do you have any soution?Test Screen Name

Legend
July 20, 2018

Sure, you need to use an Adobe product.

Participating Frequently
July 20, 2018

it works, but must open adobe acrobat first, when im open in browser or in email attachment it not work

Participating Frequently
July 20, 2018

it show errors like this:

ReferenceError: window is not defined

1:Link:Mouse Up

SyntaxError: syntax error

1:Console:Exec

undefined

SyntaxError: syntax error

1:Console:Exec

undefined

SyntaxError: syntax error

1:Console:Exec

undefined

SyntaxError: syntax error

4:

SyntaxError: syntax error

4:

SyntaxError: missing ; before statement

1:Console:Exec

undefined

SyntaxError: missing ; before statement

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Link:Mouse Up

ReferenceError: upper is not defined

1:Link:Mouse Up

try67
Community Expert
Community Expert
July 20, 2018

You need to select the entire code before running it.

Participating Frequently
July 20, 2018

ReferenceError: window is not defined

1:Link:Mouse Up

SyntaxError: syntax error

1:Console:Exec

undefined

SyntaxError: syntax error

1:Console:Exec

undefined

SyntaxError: syntax error

1:Console:Exec

undefined

SyntaxError: syntax error

4:

SyntaxError: syntax error

4:

SyntaxError: missing ; before statement

1:Console:Exec

undefined

SyntaxError: missing ; before statement

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Console:Exec

undefined

ReferenceError: upper is not defined

1:Link:Mouse Up

ReferenceError: upper is not defined

1:Link:Mouse Up

Legend
July 20, 2018

What is windows.open expected to do? I do not recognise this.

Also, I think you retyped your code. Please copy and paste the actual code (but change URL only)

Participating Frequently
July 20, 2018

adobe acrobat 18.011

Bernd Alheit
Community Expert
Community Expert
July 20, 2018

Open the console with ctrl-j and look for error messages.

Bernd Alheit
Community Expert
Community Expert
July 19, 2018

Post the question only once.

Participating Frequently
July 20, 2018

im sorry..

Bernd Alheit
Community Expert
Community Expert
July 20, 2018

What version of Adobe Acrobat do you use?