Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to assign IP address to Textfield

Avatar

24-06-2008

I want to assign the client's (person who is filling in the form) IP Address to a textfield called IPAddress. I know that I have to use a javascript command but I am not sure how to assign a value to the textfield.

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

25-06-2008

I do not believe that you can access the IP address of the client programmatically, but assuming that you did to ssign a value to a field you would use the follow syntax:



fieldname.rawValue = "assigned value";



Note that the fieldname and method/properties are case sensitive.

Avatar

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct Reply

0 solutions
View profile

Avatar
Level 3
_James_J_Gallag
Level 3

Likes

0 likes

Total Posts

54 posts

Correct Reply

0 solutions
View profile
_James_J_Gallag
Level 3

03-10-2008

Has anyone been able to access the IP address of the client by using JavaScript??

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

03-10-2008

You cannot get access to that information from javascript insode of the PDF.

Avatar

Avatar
Boost 1
Level 2
Luigi_247_365
Level 2

Likes

2 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 2
Luigi_247_365
Level 2

Likes

2 likes

Total Posts

26 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
Luigi_247_365
Level 2

08-10-2008

Most probably

PDFs "limited" javascript for designer doesn't allow access outside the PDF for security purposes.



Work Around:

Assuming your displaying your PDF on a website --> if you can, pass the IP address as a parameter to the PDF document.



Example:

http://localhost/yourPDF.pdf?ip=193.65.23.84



In your PDF document javascript:

event.target.URL

// cut your URL parameters up to get what you need



then: fieldname.rawValue = ipExtractedFromURL



Associated methods that will be needed to help you out.

decodeURI(decodeURIComponent(%20) will result in a blank space