Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Dec 2001
    Thanked 0 Times in 0 Posts

    Pass a domain to a hidden html value

    I want to pass the location.hostname with a local path in front of it i.e. "crogram filesdtsearch" in front of it to the value of a hidden input field. I've built a javascript function with the location.hostname but I'm not sure if this is working right yet.

    This is what I've done so far:

    The script:
    <script language= "javascript">
    function go(loc) {
    location.hostname = loc;

    The html form:
    <input type=hidden name='index' size=1 onload="go('url:C:Program FilesdtsearchUserData')" value=loc>

    Thanks for your help.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Pass a domain to a hidden html value

    Issue #1: Input Type="Hidden" does not have any event handlers, so the onLoad should not fire. You might instead use inline <SCRIPT> tags in the form body to create the entire <INPUT> tag.

    Issue #2: Revealing server paths will upset your security consultants.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts