cmushaun
asked on
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=48 5&width=42 0&inlineId =blurp_rem ove" class="thickbox" >About us</a>
Any Ideas? Thanks!
my existing URL that works:
<a href="#TB_inline?height=48
Any Ideas? Thanks!
ASKER
Hello,
I tried this, did not launch the popup as is. Do I need to define tb_show method?
Thanks,
Mike
I tried this, did not launch the popup as is. Do I need to define tb_show method?
Thanks,
Mike
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/thi ckbox/ then in the address/URL box of the browser type the following
javascript:tb_show("", "#TB_inline?height=155&wid th=300&inl ineId=hidd enModalCon tent&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 ?
Are you using ThickBox for jquery?
To validate that it should work, open http://jquery.com/demo/thi
javascript:tb_show("", "#TB_inline?height=155&wid
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 ?
ASKER
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.
ASKER
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
ASKER
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&wid th=690&inl ineId=blur p_respond' , '');
}
function getReply(var1) {
if (var1 > 0) {
tb_show('', '#TB_inline?height=485&wid
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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!
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!
ASKER
Thanks, Got it with this!
Try
tb_show("", "#TB_inline?height=485&wid