SPECIAL OFFER: Only $59 for access to everything in OSTraining for 1 year! You save $85!  1
Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!

Popup window with image on website load

3 years 8 months ago #119799 by cesaralex
Popup window with image on website load was created by cesaralex
Hi there,

i'm trying to insert a popup window on the load of a website, but i'm not sure how to make it work.

The idea is to use an image with promotional information on the front of the website, with the option "close" and link to a subpage when clicking on it.

The solution i've tried, is using css and javascript.

Any help will be apreciated. Thanks in advance.

Please Log in to join the conversation.

3 years 8 months ago #119816 by Nick
Replied by Nick on topic Popup window with image on website load
Hi cesaralex,

Are you using a CMS such as WordPress, Joomla, or Drupal?

Looking forward to helping.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago - 3 years 8 months ago #119826 by cesaralex
Replied by cesaralex on topic Popup window with image on website load
Hi Nick,

no, i think the website doesn't use any CMS. I've tried to change the index.html, and adding a folder with pre-coded files to the website root, where i've placed the image and the css and js files, but nothing happened.

The homepage of the website is: www.imexmoto.com/retail/ , so i'm not sure if the index.html file is the one i should change.

Please Log in to join the conversation.

3 years 8 months ago #119831 by Valentin
Replied by Valentin on topic Popup window with image on website load
Hi cesaralex,

i'm trying to insert a popup window on the load of a website, but i'm not sure how to make it work.

The idea is to use an image with promotional information on the front of the website, with the option "close" and link to a subpage when clicking on it.

The solution i've tried, is using css and javascript.

Do you have an example of this from other site, so I can understand better what do you need, please

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #119840 by cesaralex
Replied by cesaralex on topic Popup window with image on website load
Hi Valentin,

what i want is something like this: www.benimoto.pt/index.php/pt/

thanks.

Please Log in to join the conversation.

3 years 8 months ago #119846 by Valentin
Replied by Valentin on topic Popup window with image on website load
I can create a tutorial for you explaining how to create a similar result.
Is that something may work for you?

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago - 3 years 8 months ago #119851 by cesaralex
Replied by cesaralex on topic Popup window with image on website load
Hi Valentin,

yes, that would be very useful.

Thanks.

Please Log in to join the conversation.

3 years 8 months ago #119913 by Valentin
Replied by Valentin on topic Popup window with image on website load
Hi cesaralex,
The tutorial is published: www.ostraining.com/blog/coding/jquery-bpopup/

Let us know if worked as you expected

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #119930 by cesaralex
Replied by cesaralex on topic Popup window with image on website load
Hi Valentin,

thank you very much for the tutorial. I'm going to give it a try!

There are only two things missing, i woul like to use a picture and add a link on it.

And the html code, must be placed on the index.html file?

Thanks again!

Please Log in to join the conversation.

3 years 8 months ago #119937 by Valentin
Replied by Valentin on topic Popup window with image on website load
You're welcome!

In the tutorial "Step #2. The HTML" Replace h3 and p tags with your own content:
<h3>A nice ad goes here!</h3>
<p>Nulla at nunc posuere, dictum sem sed, tristique mi.</p>
To insert an image and links, use the <img /> and <a> tags then.
<a href="http://www.link-to-some.com/where/"><img src="path/to/image.jpg" /></a>

Place the code in your index.html and anybody that visit your homepage will see the pop-up.

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago - 3 years 8 months ago #119979 by cesaralex
Replied by cesaralex on topic Popup window with image on website load
Hi Valentin,

i have created a folder to place the .js file and add the link into the html code. The css code i have placed it on the style.css file.
And i have made the necessary changes on the index.html file, with the link to the image as you explained, but nothing happened.

Could it be related with the fact that the website is using the /retail in the homepage url?

Thanks,

Please Log in to join the conversation.

3 years 8 months ago #119995 by Valentin
Replied by Valentin on topic Popup window with image on website load
Hi cesaralex,

It's possible you to upload the changes to the site here www.imexmoto.com/retail/ - so I can see what's going on?

About your question, the plugin should work in any page, not only home.

Kind regards,
valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago - 3 years 8 months ago #119997 by cesaralex
Replied by cesaralex on topic Popup window with image on website load
Hi Valentin,

i've placed the files by ftp in the main folder imexmoto.com/public/httpdocs, where the index.html is placed. I've created a folder with the name "popup" where i've placed the .js file. And the image, i've placed it on the "imgs" folder, with the name natal_popup.jpg.
The css code i've added to the style.css file, on css folder.

The idea is to display the popup only at the homepage.

Thanks,

Please Log in to join the conversation.

3 years 8 months ago #120001 by Valentin
Replied by Valentin on topic Popup window with image on website load
This is your homepage, right? www.imexmoto.com/retail/

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 8 months ago #120019 by cesaralex
Replied by cesaralex on topic Popup window with image on website load
Hi Valentin,

problem solved. The developer of the website has given me a hand.

No it's ok.

Thanks for your support!

Best regards,

Please Log in to join the conversation.

3 years 8 months ago #120022 by Valentin
Replied by Valentin on topic Popup window with image on website load
Wonderful!
Congrats for trying hard, Cesar :)

Let us know if we can help you in something else

Kind regards,
Valentín

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

3 years 7 months ago #121119 by samantha32
Replied by samantha32 on topic Popup window with image on website load
I just wanted to say, you could also use Bootstrap like this:

www.hongkiat.com/blog/bootstrap-plugin-modal-window/

But my queston Valentin, is where do you go to insert the content in that case.

I will be reviewing your tutorial.

Please Log in to join the conversation.

3 years 7 months ago #121150 by Nick
Replied by Nick on topic Popup window with image on website load
Hi Sam,

Are you using a specific CMS or a custom developed site?

Looking forward to helping.

Kind regards,
Nick

Follow us on Twitter - twitter.com/OSTraining
Like us on Facebook - facebook.com/ostraining

Please Log in to join the conversation.

Join today and get access to 1,000's of books and videos. Learn WordPress, Drupal, Magento, Joomla and more! Sign up today!