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 8421847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:15:50+00:00 2026-06-10T03:15:50+00:00

Like i’ve said in the question… Is there a way to click the checkbox

  • 0

Like i’ve said in the question… Is there a way to click the checkbox and that link will change to http://youtu.be/kffacxfA7G4?

enter image description here

Example of code:

<div class="embed-code">
        <textarea rows="" cols="">http://www.youtube.com/watch?v=kffacxfA7G4</textarea>
        <label>
          <input type="checkbox" />
          Short URL</label>
      </div>

I am thinking this can be done with javascript/jquery…

Is anybody using this? Thanks in advance…

EDIT :

I’ve managed to do it like this: http://jsfiddle.net/tpLfS/

$('#myCheckBox').click(function(){ var myLink = $('#myTextarea');

if ($('#myCheckBox:checked').val() !== undefined){ //checked
myLink.val(myLink.val().replace('http://www.youtube.com/watch?v=kffacxfA7G4','http://youtu.be/kffacxfA7G4'));}

else { //not checked    
myLink.val(myLink.val().replace('http://youtu.be/kffacxfA7G4','http://www.youtube.com/watch?v=kffacxfA7G4'));}

})

Can it be done easily?

  • 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-06-10T03:15:51+00:00Added an answer on June 10, 2026 at 3:15 am

    In query its pretty simple: first you need to give your checkbox and textarea an id:

    <textarea rows="" cols="" id="myTextarea">...</textarea>
    <input id="myCheckBox" type="checkbox" />
    

    then you add the javascript part (in my example with jQuery):
    Im not sure how you want to change it. I think you just want to remove the “watch?v=”

    $('#myCheckBox').click(function(){
      var myLink = $('#myTextarea');
    
      myLink.val(myLink.val().replace('watch?v=',''));
    })​
    

    Example: http://jsfiddle.net/E3f9M/

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

Sidebar

Related Questions

Like the title says, how do I redirect every url that starts with http://example.com/shop
like the title said it there are some space before and after an image
Like setFont(QFont(Helvetica,16,1)) ,I want to summerize these fonts.However,I dont't know how many fonts there
Like i sayed in the title, i need to build an array and change
Like the question says. Converting to / from the (truncated) string representations can affect
Like the author of this question I'm trying to understand the reasoning for user-visible
Like others, I'm having an issue with a simple console application that reads records
I've got a string that has curly quotes in it. I'd like to replace
Like I said, the application has to call the default Blackberry media player.Does anybody
like in http://www.online-photoshoptutorials.com/2008/08/folding-corners.html

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.