Help with hiding ‘channel’, but not ‘category’ in Upload Form

This web script’s Upload Form allows the user/uploader to choose ‘channel’ and ‘sub-category’ to upload to. I tried hiding the channel like so:

<input type="hidden" name="channel" value="1"/> 

so that the channel is essentially pre-chosen, which works successfully on it’s own, but there is no drop-down choices for sub categories showing.

But, if I revert back to the Form script that doesn’t hide the channel, and makes you choose a channel, then the sub-categories will show. Here’s that code:

[code]

  • [var.lang_select_channel]:


  •  [var.fields_all;htmlconv=no] ([var.lang_select_one])
  • [var.lang_sub_categories]
  • [var.lang_sub_cat]: 
  •  ([var.lang_optional])
  • [/code]

    I’m wondering if there is a way/tweak to hide the channel, AND allow the sub-categories to be shown. Any ideas/help will be appreciated.

    That “onchange” event in the select element, give you the choices for the sub-groups. If you want to use the sub without the channel, run that function when the page loads.

    Thank you for that helpful reply. Much appreciated.

    However, I don’t know what to change to accomplish “run that function when the page loads”.
    Any additional help will be appreciated.

    look up javascript onload

    Thanks for your reply.
    Followed your suggestion, but still don’t know what to change to accomplish “run that function when the page loads”.
    Any other help will be appreciated.

    And what did you find out when you researched ‘javascript onload’? You need to be able to help yourself as well.

    In a php video-web-script I’m using, in the (video)Upload Form I tried hiding the select-a-channel drop-down choices, essentially like this:

     <li><input type="hidden" name="channel" value="1"/></li>

    (so, that the Channel is pre-determined for the uploader/user).

    But, when the Channel is hidden like that, the next field box(sub-categories) in the Form, shows no choices. Apparently, in this Upload Form a Channel choice is required in order to see the sub-category choices.

    So, I’m trying to figure out a way to name the channel, and somehow let the Form know that Channel has been chosen/named, so that the sub-category drop-down choices are available for choosing, and proceeding.

    Here’s the code with the Channel not hidden:

    [CODE]

  • [var.lang_select_channel]:
  •  [var.fields_all;htmlconv=no] ([var.lang_select_one])
  •  
  • [var.lang_sub_categories]
  • [var.lang_sub_cat]: 
  •  ([var.lang_optional])
  • [/CODE]

    I tried adding this to uploader.php (which corresponds with the upload Form):

    if(isset($_SESSION['channel_id'])) { echo '<input type="hidden" name="channel" value="1">'; } else { echo "<select class='upload-video-form-input' name='channel' onchange='javascript:ahahscript.ahah('[var.base_url]/uploader.php?sub_cat='+ document.form_upload.channel.value, 'sub_change', '', 'GET', '', this);'> &nbsp;[var.fields_all;htmlconv=no]</select>"; }

    which may work successfully, but, I’m not sure how to tie it in with the Form. Any help will be appreciated.

    Sponsor our Newsletter | Privacy Policy | Terms of Service