Pop-Up Box with button?

  • 2
  • Question
  • Updated 9 years ago
  • Answered
Currently, I have a button which links to a page. I would like this page to become a pop-up window, with scrollbars. I thought I figured out the code.. but since it doesn't work, I am obviously missing something here! =P Can someone please help?

<!--<div align=right><a href="#" onclick="window.open('http://dejavuapparel.synthasite.com/p..., null,
'height=310, width=680, toolbar=0, location=0, status=1,
scrollbars=1'); return false"><img style="border:0px;" src="resources/cooltext419416871.png" onmouseover="this.src='resources/cooltext419416871MouseOver.png';" onmouseout="this.src='resources/cooltext419416871.png';" /></a></div>-->
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
  • muddled

Posted 9 years ago

  • 2
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Would someone be able to take a look at this? I'd really appreciate it.
Photo of Peter

Peter

  • 2569 Posts
  • 113 Reply Likes
L. Do you mean that a popup doesn't appear or that something is not working in the popup?
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
The pop up doesn't appear when I click on my button. I must be missing a step somewhere.
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
it works fine for littleus. (from notepad) (yolas offline)
<!--
<div align=right><a href="#" onclick="window.open('http://dejavuapparel.synthasite.com/p..., null,'height=310, width=680, toolbar=0, location=0, status=1, scrollbars=1'); return false">
<img style="border:0px;" src="resources/cooltext419416871.png" onmouseover="this.src='resources/cooltext419416871MouseOver.png';" onmouseout="this.src='resources/cooltext419416871.png';" /></a></div>

-->
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
It doesn't seem to work for me at all.

Here's my testpage with the product list button which I want to see pop up into a new window.

http://dejavuapparel.synthasite.com/s...#
Photo of Boomer

Boomer, Champion

  • 2055 Posts
  • 84 Reply Likes
Hey Littleus,

Can I have a look see where you got that code from ??
The link to your site is password protected btw.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
OH.. oops... I thought I unlocked it. It's unlocked now.
Photo of Boomer

Boomer, Champion

  • 2055 Posts
  • 84 Reply Likes
P.S. Have you tried this generator:
http://javascript.internet.com/genera...
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
It worked!!! I even figured out how to use my own button image too! Thanks Boomer.
Photo of Boomer

Boomer, Champion

  • 2055 Posts
  • 84 Reply Likes
I see that.....way to go!
Now we still have one more problem don't we.... the iframe ?
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Yah.... dunno if there's an answer for that one though.
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
Hi
Is it possible you could give the code you used for the image link. I am trying but is still not working.
Thanks
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
Hi

If possible can you please let me know the code you used for the image link. I have been trying but cannot get it to work
Thanks
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Bob

Are you trying to just create an image with a link or is this image being used inside a form and when you click on it, it pops up to another window?
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
Hi
Trying to create an image outside a form that when you click it opens new window with set size etc
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Bob

Do you think you could give me an example? From what I understand, you simply want to create an image whereby the user clicks on it and a new smaller window pops up? What's in the window pop-up?
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
Hi

Yes your understanding is correct .... the problem i have is trying to get the image included. I try to install the image in a text widget then apply a url link and then try to add the window.open code but does not work. I notice on your website you have some links at the bottom that open new windows and this is what i wanted to do.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Oh.. I see now! The code is as follows:

<a style="text-decoration: none" href="YOUR LINK URL" target="_blank"><img src="YOUR IMAGE PATH/img.jpg></a>

Please let me know if this answers your question or if you need further help.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Sorry.. please disregard the code. I didn't put it in properly. Use this code:

<a href="YOUR LINK URL" target="_blank"><img src="YOUR IMAGE PATH/img.jpg" border="0"></a>
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
Thanks for that .... do you know how to add the window.open code to this so that the new window can be set to size etc
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Try this:

<a href="javascript:window.open('YOUR LINK URL', 'WinName', 'width=600,height=600');"><img src="YOUR IMAGE PATH/img.jpg" border="0"></a>
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
Thanks Liitleus for help me :-)..... this worked fine for me but just had to make a little ateration as follows :



many thanks for your help
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
I'm curious.. what did you change? I'm always trying to learn new things. =)
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
" "
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
Hi .... tyring to paste the html into the reponse but not showing ... how do we show html in here
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
<!-- CODE GOES HERE -->

has to wraped in those things you see above
Photo of Bob

Bob

  • 9 Posts
  • 0 Reply Likes
ok thanks ... here is the code :

<!-- <A onclick="window.open('http', 'Directory', 'width=350, height=550')" href="#"><IMG src=".jpg?timestamp=1244544682218" border=0> </A> -->
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Hi Bob

Thanks for sharing. Umm... have you checked to see if it worked? I tried it and a pop-up does come up but the an error code 404 comes up in the pop-up and then the link opens up in the browser window behind. Unless I'm missing something in this code. I put the link url where the # sign is.. is that the right spot?