JavaScrip alert windows. HELP!

This is a discussion on "JavaScrip alert windows. HELP!" within the JavaScript Forum section. This forum, and the thread "JavaScrip alert windows. HELP! are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 17th, 2005, 21:43
New Member
Join Date: Mar 2005
Location: Southampton
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to webezine
JavaScrip alert windows. HELP!

Hello all I need a little help with some JavaScript. I need to know if it is possible to change something on an error message alert box. Currently i have a error alert box and the title is internet explorer. I need to know if I can change this to something else for example South coast escapes. I fyou have any ideas can you post it please! Thanks.

Also I'm looking on how to identify what browser someone is using ans have it open a pop up and say for example hello you are using internet explorer this site is best viewed at 8660 * 4000 etc....

Any ideas?

  #2 (permalink)  
Old Mar 17th, 2005, 23:17
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
I don't believe it is possible to change the title of an alert window, but more importantly, why are you showing one in the first place? I can think of no valid reason for such a message to appear and be of any use to a visitor.

I also see no point in telling someone what browser they are using and what resolution the site is best viewed at. Your site should work in all common resolutions - Everything from 800x600 and up and if it doesn't then you may need to rethink your design. I don't believe many users would change their resolution just to view your website properly.
  #3 (permalink)  
Old Mar 18th, 2005, 04:36
New Member
Join Date: Mar 2005
Location: Southampton
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to webezine
I understand what your saying. Its not a real site its for an assignment. I have to show certain things for example java validation of a form which i have done in some sorts, hence the use of an alert window. and i want to create a pop up window.
  #4 (permalink)  
Old Mar 18th, 2005, 06:59
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,620
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
if you really need to change the title, and if you're allowed to, you can use VBScript which lets you specify the messages's title:

Code: Select all
<SCRIPT language="VBScript">
Function Show_Alert_With_Title(strTitle, strMessage)
 MsgBox(strMessage, vbOkOnly & vbInformation, strTitle)
End Function
</SCRIPT>
<SCRIPT language="JSCript">
function my_alert(strTitle, strMessage){
 Show_Alert_With_Title(strTitle, strMessage)
}
</SCRIPT>
Then on your code, instead of this:
Code: Select all
alert('this is my message');
you can use this:
Code: Select all
my_alert('this is my message', 'this is the title of the message');
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
  #5 (permalink)  
Old Mar 18th, 2005, 07:04
New Member
Join Date: Mar 2005
Location: Southampton
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to webezine
Yeah i know vb code like the back of my hand but it has to be in JavaScript! thanks anyway!
  #6 (permalink)  
Old Mar 18th, 2005, 07:24
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
It's not possible in Javascript (the alert title change).

For the other you'll just use any of the many browser detection scripts out on the web. There's several different methods they use.

http://www.google.com/search?q=javas...wser+detection
  #7 (permalink)  
Old Apr 21st, 2005, 23:18
New Member
Join Date: Apr 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
You can't actualy do that, you can however open a page that is centered on the middle of the screen and that opens fullscreen that takes the window focus....

this will however really piss off people who do not want to use your app such as for pupup window advirtising and you will get your site black listed if this is your intent.

I see no legitimate reason to try and force a user to stay at a screen so although it is possible Im not giving you any help until you can give me one.
Closed Thread

Tags
javascrip, alert, windows, help

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Alert Box acrikey JavaScript Forum 4 Mar 25th, 2008 23:23
alert Message messing up sdbdgwood JavaScript Forum 0 Feb 8th, 2008 16:15
javascript alert ycpc55 JavaScript Forum 1 Jan 7th, 2007 02:02
Newbie alert..... pagey Introduce Yourself 11 Sep 2nd, 2006 08:55
One-time, IP based alert? krazykikikatt JavaScript Forum 3 Apr 5th, 2006 01:50


All times are GMT. The time now is 19:19.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43