Display Div with Javascript

I have a hyperlink in my html that displays a div popup on the same page I'm already on. see hyperlink below.  What I want to do is remove this from being displayed when the link is clicked, but display the div popup instead when a javascript function is called.

my existing URL that works:
<a href="#TB_inline?height=485&width=420&inlineId=blurp_remove" class="thickbox" >About us</a>

Any Ideas?  Thanks!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi cmushaun,

tb_show("", "#TB_inline?height=485&width=420&inlineId=blurp_remove", "");

cmushaunAuthor Commented:

I tried this, did not launch the popup as is.  Do I need to define tb_show method?

No it should work since it's the show method that already exists in the script
Are you using ThickBox for jquery?

To validate that it should work, open http://jquery.com/demo/thickbox/ then in the address/URL box of the browser type the following

javascript:tb_show("", "#TB_inline?height=155&width=300&inlineId=hiddenModalContent&modal=true", "");

it should launch the third example on the page for the inline content.

So maybe you're missing something?

Also are you troubleshooting with FireBug and getting any error messages ?

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

cmushaunAuthor Commented:
That does launch the popup on the jquery site, and I am using thickbox. I will install firebug now and check for errors.  Thanks! will post back with my results.
cmushaunAuthor Commented:
I think my problem is coming from calling this function call after a postback. ..Still digging in
I see, postback sometimes causes issues, you should still be able to get this working after a postback, hope you get it working
cmushaunAuthor Commented:
Can you think of any reason this would display correctly if I use "onclientclick", enter this in the URL, but does not work when it is embedded in a JS function below:

        function getReply(var1) {

            if (var1 > 0) {
                tb_show('', '#TB_inline?height=485&width=690&inlineId=blurp_respond', '');
The function you have is missing a closing } at the end

it should be
function getReply(var1) {
            if (var1 > 0) {
                tb_show('', '#TB_inline?height=485&width=690&inlineId=blurp_respond', '');

Otherwise there should be no reason for it not to work, I've also attached an example for you below calling your function on the "onchange" event of the dropdown, try selecting a different option from the dropdown list and it should work

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <link rel="stylesheet" type="text/css" href="centerpointstyle.css" />
    <script type="text/javascript" src="http://jquery.com/src/jquery-latest.pack.js"></script>
    <script type="text/javascript" src="http://jquery.com/demo/thickbox/thickbox-code/thickbox-compressed.js"></script>
    <link rel="stylesheet" href="http://jquery.com/demo/thickbox/thickbox-code/thickbox.css" type="text/css" media="screen" />
    <script type="text/javascript">
        function getReply(var1) {
            if (var1 > 0) {
                tb_show('', '#TB_inline?height=300&width=400&inlineId=myOnPageContent', '');
    <input alt="#TB_inline?height=300&width=400&inlineId=myOnPageContent" title="add a caption to title attribute / or leave blank" class="thickbox" type="button" value="Show" />  
    <a href="#TB_inline?height=155&width=300&inlineId=hiddenModalContent&modal=true"
        class="thickbox">Show hidden modal content.</a>
    <div id="myOnPageContent">
            Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
            euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
            minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip
            ex ea commodo consequat.</p>
            <select name="" onchange="getReply(1);">
                <option>test 2</option>
                <option>test 3</option>

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cmushaunAuthor Commented:
Thanks for all your help so far.  I think I know why it is still not working for me.

I am trying to call this popup during a postback, but that is throwing it off somehow. I am trying to come up with a way to call it after the page is loaded again... Thanks for everything so far!
cmushaunAuthor Commented:
Thanks, Got it with this!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.