![]() |
Quick question about Javascript without SSI that one of you may have a quick answer for
I'm trying to help someone be able to capture a visitor's IP address hidden in an order form without the ability to use server-side includes (it's a hosted form and the limitations seem to prevent SSI or languages like PHP). I found a nice short JavaScript code that returns IP without SSI:
Code:
<script type="text/javascript" src="http://l2.io/ip.js"></script> Is there ANY way to put in code that will work inside form input value quotes to make the input value the visitor's IP in this case? |
Something like this should work..
Code:
<html> |
Quote:
I think if needbe they may be able to switch to a page that can be fully coded. Though in that case, I believe PHP can be used. So I was more trying to see if there was a solution workable within those limitations since changing to a fully coded page AFAIK means changing the URL of the page which presents a whole other set of other things to fix within their order flow. Could this be made workable somehow in the scenario I mentioned? It felt like there should be a way - using the Javascript code I mentioned in their system did return the IP, so it's just a matter of somehow getting that into the value of a form input. |
Yeah pretty simple with some reworking..
Obviously just change the textbox to a hidden form item when using in production Code:
<body> |
Quote:
Here is what the source code on the page shows: Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
Did you change "(nolinks)" to "http"?
|
Quote:
|
All times are GMT -7. The time now is 05:49 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123