I have this javascript line
<script type="text/javascript">document.write(top.location);</script>
and this code
<form action="rating.php" method="post">
<input type="hidden" name="url" value="xxxx" />
<input type="submit" />
</form>
<?
echo $_POST["url"];
?>
Please, How i can add the value of javascript (xxx) in the hidden field?
Also does it possible to let <input type="submit" />have automatic submit ?
Thanks
Do you mean this, in order to feed the hidden field?
Regarding submit, you can use javascript to handle the submit event:
If you add the attribute
name="FORMNAME"inside the<form ... >tag, you can use:for submitting the form, without using the submit button.
In order to feed a hidden field through javascript, use: