Skip to main content
Participating Frequently
Jul 19, 2018 8:14 PM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

19 replies

Participating Frequently
Jul 20, 2018 6:38 PM UTC

can i use window.open function?

Translate
try67
Community Expert
Community Expert
Jul 20, 2018 6:48 PM UTC

Not from within the PDF file.

Translate
Legend
Jul 20, 2018 6:24 PM UTC

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

Translate
Participating Frequently
Jul 20, 2018 5:44 PM UTC

do you have any soution?Test Screen Name​

Translate
Legend
Jul 20, 2018 5:39 PM UTC

Sure, you need to use an Adobe product.

Translate
Participating Frequently
Jul 20, 2018 5:02 PM UTC

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

Translate
Participating Frequently
Jul 20, 2018 4:33 PM UTC

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

Translate
try67
Community Expert
Community Expert
Jul 20, 2018 4:36 PM UTC

You need to select the entire code before running it.

Translate
Participating Frequently
Jul 20, 2018 7:12 AM UTC

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

Translate
Legend
Jul 20, 2018 7:39 AM UTC

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)

Translate
Participating Frequently
Jul 20, 2018 5:57 AM UTC

adobe acrobat 18.011

Translate
Bernd Alheit
Community Expert
Community Expert
Jul 20, 2018 6:02 AM UTC

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

Translate
Bernd Alheit
Community Expert
Community Expert
Jul 19, 2018 8:30 PM UTC

Post the question only once.

Translate
Participating Frequently
Jul 20, 2018 4:38 AM UTC

im sorry..

Translate
Bernd Alheit
Community Expert
Community Expert
Jul 20, 2018 5:09 AM UTC

What version of Adobe Acrobat do you use?

Translate