Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3360836
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:03:03+00:00 2026-05-18T03:03:03+00:00

I am creating a form which allows people to enter a video url. Standard

  • 0

I am creating a form which allows people to enter a video url. Standard input form, to accept a URL like:

http://video.google.com/videoplay?docid=1299927595688205543

I would like to add a button (within the form, which says something like [preview video]). Basically that button/link appends the link they entered into the input field, to this code:

<a href="http://video.google.com/videoplay?docid=1299927595688205543&lightbox[width]=610&lightbox[height]=360" class="lightbox">google video</a >

This is to be available prior to form submission.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:03:04+00:00Added an answer on May 18, 2026 at 3:03 am
    <form id="video_upload_form" action="">
        <label for="video_input_box">Video URL</label>
        <input type="text" id="video_input_box" value="" />
    
        <input type="submit" value="Add Video" />
    </form>
    
    <p><a href="#" id="video_preview" class="lightbox">Preview Video</a></p>
    
    <script type="text/javascript">
    $().ready(function(){
        $('#video_upload_form').submit(function(){
            var video_url_params = '&lightbox[width]=610&lightbox[height]=360';
            var video_url = $('#video_input_box').val() + video_url_params;
            $('#video_preview').attr('href', video_url);
            return false;
        });
    });
    </script>
    

    Also here it is as a JSFiddle: http://jsfiddle.net/Treffynnon/CEMpT/

    You will need to do some validation on the URL supplied by the user before putting it into the preview link, but I will leave that part up to you as you have not asked for help with it in your question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a multi-part form in the style that Ryan Bates describes here: http://railscasts.com/episodes/217-multistep-forms
I am creating a form which allows the user to choose an email cover
I am creating a registration form which contains two submit buttons. I need to
I am creating a form designer. It will generate PHP code which will produce
I frequently find myself creating classes which use this form (A): abstract class Animal
I am creating an user registration form using jsp,in which there is an option
I have a jQuery Model windows which contains a form. On creating of the
I've got a form which allows me to add/edit categories and sub categories within
I'm creating a Zend Form which includes a Zend Form Element File to allow
I am creating a jquery function which allows users to create rules and append

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.