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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:25:56+00:00 2026-06-16T02:25:56+00:00

$(document).ready(function () { var Href = ‘http://www.apple.com’; $(#fancybox-manual-b).click(function () { $.fancybox.open({ href: Href, type:

  • 0
 $(document).ready(function () {
            var Href = 'http://www.apple.com';
            $("#fancybox-manual-b").click(function () {
                $.fancybox.open({
                    href: Href,
                    type: 'iframe',
                    padding: 5
                });
            });

        });

    <ul>
        <li><a id="fancybox-manual-b" href="javascript:;">Open Window</a></li>
    </ul>

I need to get the ‘Href’ value from a textbox and when ever someone puts a website in the textbox it should get that instead of apple.com

  • 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-16T02:25:57+00:00Added an answer on June 16, 2026 at 2:25 am

    If you have some html like:

    <input type="text" id="target">
    

    Then you can use jQuery’s val function to get the value of the textbox by its id:

    var href = $('#target').val();
    

    Which you’ll obviously need to do every time someone clicks your fancybox link, so that you get the most up to date value from the textbox:

    $(function () {
        $("#fancybox-manual-b").click(function () {
            var href = $('#target').val();
            $.fancybox.open({
                href: href,
                type: 'iframe',
                padding: 5
            });
        });
    });
    

    It’s worth noting that if a user puts some text in the input that doesn’t resolve to an existing url you’re going to get an error.

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

Sidebar

Related Questions

Why is this not working? $(document).ready(function(){ var content = '<a href=http://example.com/index.php><b>Some text!</b></a> - <a
<script type=text/javascript> $(document).ready(function() { $('a.menuitem').click(function() { var link = $(this), url = link.attr(href); var
$(document).ready(function() { $('a.menuitem').click(function() { var arr = 0; var link = $( this ),
I have an website with URL`s like example.com/index.php?p=home An this script $(document).ready(function() { var
There is a tutorial here: http://perishablepress.com/slide-fade-content/ and the code it provides is: $(document).ready(function(){ //
i am trying like this: $(document).ready(function(){ $('#muestraMotor').bind('mousedown',function(){ var cssLink = document.createElement(link); cssLink.href = ../estilo/css/datepicker.css;
Please check the below code $(document).ready(function(){ var href; if(href!=null) { setContainerHtml($.cookie(activeElementHref)); }; $('nav ul
$(document).ready(function(){ var page = window.location.hash; if(page != ){ $('a[href='+ page +']').addclass('selected'); pageload(page.replace('#/page/', 'pages/?load=')); }
jQuery(document).ready(function(){ $(#button).submit(function() { { var email_id=document.getElementById('textfield').value; var password=document.getElementById('textfield2').value; var utype=document.getElementById(utype).value; var url=login_check.jsp?&email_id=+encodeURIComponent(email_id)+&password=+encodeURIComponent(password)+&utype=+encodeURIComponent(utype); $('form').get(0).setAttribute('action',url); alert(document.form1.action);
This works great: $(document).ready(function() { var previewwidth = ($(window).width() - ( $('.aside').width() + $('.results').width()

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.