Jump to content

Pop up


williamZanelli

Recommended Posts

Hi guys,

 

I was jsut wondering if someone could tell how I could code a popup when someone clicks on a hyperlink.

 

I have terms and conditions on mywebsite.. when a user accepts I want a pop-up-link to the terms

 

The following code does the job, however I want to customise the new window, as in size, scroll, toolbar etc.

<a href="terms.html" target="_blank">

 

Any ideas..? is this a Javascript issue?

 

Thanks in advance

 

William.

Link to comment
Share on other sites

 

I did using the folliwing code. I agree your appraoch is better, its something I'll look into the future,

 

I have read the  < a on click="window.open('http://www.somesite.com/terms.html', 'BBCWorldNewsWindowName', 'left=100,screenX=200,resizable,scrollbars,status'); return false;" target="_blank" > terms  and I agree to them.

 

 

Thanks for the tips.

 

William

Link to comment
Share on other sites

You need to use a javascript function:

 

function popitup(url) {
newwindow=window.open(url,'terms','height=650,width=700,resizable=yes');
if (window.focus) {newwindow.focus()}
return false;
}

 

Then call your hyperlink like this:

 

Terms

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.