Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> How To Create A Popup Window With Javascript?
soleimanian
post Sep 5 2004, 06:28 PM
Post #1


End Of Computer
Group Icon

Group: Members
Posts: 346
Joined: 1-September 04
From: .:: MARS ::.
Member No.: 28



Please help me!
I want to in popup massage suggest to visitors of my site to make my site their home page .
Please note that I have some script code that visitors most click on a text to make my site their home page .

Every one that can help me please send an email to soleimanian@noavar.com
Go to the top of the page
 
+Quote Post
jcguy
post Sep 6 2004, 07:46 AM
Post #2


Premium Member
Group Icon

Group: Members
Posts: 382
Joined: 5-September 04
Member No.: 255



You can try this free online pop-up maker:
http://www.berm.co.nz/popupmaker/.

Or you may want to download this free software that can help you make pop-ups:
http://www.codelifter.com/pop5index.html.

Either way simply follow the instructions and you can get your pop-up very quickly.
Go to the top of the page
 
+Quote Post
wappi
post Sep 6 2004, 11:28 AM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 2
Joined: 6-September 04
Member No.: 304



I recomand you to use a javascript. You can find free scripts at http://javascript.internet.com
or you can use a the <body onload="..."> event.
Go to the top of the page
 
+Quote Post
overture
post Sep 7 2004, 01:36 PM
Post #4


Premium Member
Group Icon

Group: Members
Posts: 208
Joined: 6-September 04
From: England
Member No.: 315



as wappi suggested you can use the onload="" in the BODY tag and then call the function from the javascript file to load, something like this:

CODE
<body onload="popup()">


The above code calls the function from the Javascript file or if you have it embedded in the webpages. The below code is what you need to open the page in the popup, this can be pasted into an external file which contains all the javascript or embedded as i said previously.

CODE
function popup() {
window.open("popuppage.html","Homepage","resizable=no,status=yes,scrollbars=yes,width=260,height=500");
}


If you require any help or do not understand then ask biggrin.gif.
Go to the top of the page
 
+Quote Post
dissipate
post Sep 12 2004, 02:41 PM
Post #5


Advanced Member
Group Icon

Group: [HOSTED]
Posts: 120
Joined: 2-September 04
Member No.: 100



sorry, i'd actually recommend not using popups to display your welcome message because nowadays everyone is using some sort of popup blocker or have installed SP2.
Go to the top of the page
 
+Quote Post
overture
post Sep 12 2004, 03:12 PM
Post #6


Premium Member
Group Icon

Group: Members
Posts: 208
Joined: 6-September 04
From: England
Member No.: 315



i have to agree but some people have to learn these things by trial and error. People have to try new things and then get feed back on what is good or what might drive people away from their site. And having a pop-up which instantly loads the moment the page is opened is not a good idea, only for the reason that everyone will instantly close it, whether it contained important information or not. It is best to just have a text link saying 'make this your homepage'.
Go to the top of the page
 
+Quote Post
currahee
post Sep 12 2004, 04:47 PM
Post #7


Member - Active Contributor
Group Icon

Group: [HOSTED]
Posts: 82
Joined: 9-September 04
From: At my computer desk
Member No.: 434



I'll have to agree with dissipate and overture. It does not make a site very attractive to the user if you do that. Why? its annoying and most other websites that are ... not so good sites like they promote spyware and adware use those kinds of schemes.
I would rahter just make a link that says "add this page to your favorites list!" or something like that.
Go to the top of the page
 
+Quote Post
OrbitPoints
post Sep 13 2004, 02:12 AM
Post #8


Member [ Level 1 ]
Group Icon

Group: [HOSTED]
Posts: 31
Joined: 9-September 04
Member No.: 402



I think he wants to know the code to pop up the yes/no dialog box asking the user if he would like to set his page as there start/home page.

I will dig for the js code to do it.
Go to the top of the page
 
+Quote Post
OrbitPoints
post Sep 13 2004, 02:32 AM
Post #9


Member [ Level 1 ]
Group Icon

Group: [HOSTED]
Posts: 31
Joined: 9-September 04
Member No.: 402



<body STYLE="behavior:url('#default#homePage')" ID=sID onLoad="sID.setHomePage('http://www.yoursitehere.com')">

Will pop up dialog box asking if you would like to set http://www.yoursitehere.com as your homepage.

There is no standard so there are very few browsers it will work in.
I don't think NS has ever had support.
IE5 supported it but I am not sure if the syntax was the same.
Go to the top of the page
 
+Quote Post
OrbitPoints
post Sep 13 2004, 02:39 AM
Post #10


Member [ Level 1 ]
Group Icon

Group: [HOSTED]
Posts: 31
Joined: 9-September 04
Member No.: 402



Here is code to make a link to add current page to favorites:
<a href="javascript:" onClick="window.external.AddFavorite(location.href, document.title);">add to favorites</a>
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Getting Screen Resolution using Javascript.(8)
  2. javascript vs java(12)
  3. Javascript: Disable Mouse Right-click In Browser(16)
  4. Best Way To Learn Javascript(9)
  5. Javascript: Text To Texbox And Back To Text(2)
  6. Unobtrusive Javascript Image Rollovers(0)
  7. Dynamicdrive: Good Site For JavaScript Codes(5)
  8. Downloads With Javascript?(7)
  9. Javascript: Simple Slidedown Menu(2)
  10. JavaScript: Simple Dropdown Menu(1)
  11. Calling Of Functions Between Mulitple External Javascript Files(2)
  12. Javascript: Browser Detection Script(0)
  13. JavaScript: Hide And Show Any Element With CSS(5)
  14. Ever Needs To Find Out A Table Height Or With With JavaScript(2)
  15. Create And Import JavaScript Modules For A Large Script(2)
  1. Vertical Marquee Using JavaScript(0)
  2. JavaScript Frames & Querystring(4)
  3. JavaScript Off Redirect Script(2)
  4. I Need Help With Javascript.(7)
  5. Problems With Dynamically Loading Javascript(2)
  6. Add Text To Textarea(6)
  7. Javascript Question(4)
  8. Javascript: How Do I Create Embedded Pop-up Windows?(7)
  9. Problem With Javascript Alert();(9)
  10. Include Function For Javascript(7)
  11. Fun With Javascript And Forms(2)
  12. Javascript Help Needed : Alert(z) Works Fine But Document.write Not(2)
  13. Javascript Changes Aren't Working.(6)


 



- Lo-Fi Version Time is now: 6th September 2008 - 06:08 PM