Magento Forum

How can I implement a popup
 
Phrost
Jr. Member
 
Total Posts:  16
Joined:  2008-11-06
 

Nothing overly fancy I just am curious with prototype being used if it was possible (and if so how) I could go about making a popup.

Basically I have an ad on my index page that I would like to be able to click and then have a tooltip or popup come up.  Is this possible?  If so can someone give some guidance on how I can accomplish it.

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
mikejonesey
Jr. Member
 
Total Posts:  25
Joined:  2009-03-03
 

you need to know javascript;

in:

page.xml

add:

<action method="addJs"><script>we_hate_pop_ups.js</script></action>

and on you’re link:

<a href="[removed] void(0);” onclick="domysmellypopup();">pop up link</a>

then make your function:

http://javascript.internet.com/generators/popup-window.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
iiNTENSE
Guru
 
Avatar
Total Posts:  432
Joined:  2008-11-06
Lansing, MI
 

Here is another way:

<script language="javascript\" type="text/javascript\">
<!--
function popitup(url) {
newwindow=window.open(url,’name’,’height=200,width=150’);
if (window.focus) {newwindow.focus()}
return false;
}

// -->
</script>

****************
Then, you link to it by:
****************

<a href="popupex.html" onclick="return popitup(’popupex.html’)” >Text link should say here</a>

 
Magento Community Magento Community
Magento Community
Magento Community
 
Phrost
Jr. Member
 
Total Posts:  16
Joined:  2008-11-06
 

I understand using Javascript but read Magento is powered on the Prototype framework and was wondering how (if its possible) to make something similar to a popup like these jquery ones (http://www.ericmmartin.com/simplemodal/).  Forgive my stupidity if this doesn’t make sense, Im relatively new to all this stuff.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iiNTENSE
Guru
 
Avatar
Total Posts:  432
Joined:  2008-11-06
Lansing, MI
 

You are able to program with JQuery in Magento, many have done it.

I’ll look into the popups and get back with you soon.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Phrost
Jr. Member
 
Total Posts:  16
Joined:  2008-11-06
 

Oh Ok, must of read an old thread last night saying jquery wouldnt work or caused problems, Ill try and give some of these jquery tooltips/popups a go

 
Magento Community Magento Community
Magento Community
Magento Community
 
iiNTENSE
Guru
 
Avatar
Total Posts:  432
Joined:  2008-11-06
Lansing, MI
 

JQuery works....Mootools doesn’t.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top