Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 12th Aug 2012, 05:48 PM   #1
Merchant of Truth
War Room Member
 
TheSalesBooster's Avatar
 
Join Date: 2011
Posts: 496
Thanks: 61
Thanked 259 Times in 139 Posts
Default
Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

Heres my current code:

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><script language="JavaScript">alert('click here to continue'); window.location.href =
'myurl.com';</script></head>

I am sending users to this page and a little window pops up and asks them if they wish to continue. If they hit ok they get redirected.

The problem is I need to resize the window when they click ok. The window that this message pops up is stuck at a certain size. Is there a way to resize the window with an onclick script or something?

For example lets say the size of the window this message pops up in is 400x400. If they hit ok I want them to be redirected and the window resized to fit their screen. If i cant resize on the redirect, Is there a way to resize when they land on this 400x400 page while hitting them with the popup message?

thanks
TheSalesBooster is offline  
Unread 12th Aug 2012, 08:01 PM   #2
Lookin for the $$
War Room Member
 
PRBandit's Avatar
 
Join Date: 2011
Location: USA
Posts: 148
Thanks: 0
Thanked 13 Times in 11 Posts
Default
Re: Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

You can make the 400x400 page do something like this. Except with the right code. (I dont know it right now exactly)

parent.window.location = "your uRL to continuite to.com"
this.window.close()

Something like that might work?
PRBandit is offline  
Unread 13th Aug 2012, 05:32 PM   #3
Merchant of Truth
War Room Member
 
TheSalesBooster's Avatar
 
Join Date: 2011
Posts: 496
Thanks: 61
Thanked 259 Times in 139 Posts
Default
Re: Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

nope that code above didn't work
TheSalesBooster is offline  
Unread 14th Aug 2012, 05:53 PM   #4
Scottish Warrior
War Room Member
 
Join Date: 2010
Location: UK
Posts: 120
Thanks: 12
Thanked 20 Times in 15 Posts
Default
Re: Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

Try this
w.resizeTo(900,900);
davidsbain is offline  
Unread 15th Aug 2012, 12:49 AM   #5
Active Warrior
 
sham2's Avatar
 
Join Date: 2012
Location: United States of America
Posts: 285
Thanks: 5
Thanked 25 Times in 25 Posts
Default
Re: Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

i hope above code will work. Check this and share your experience.
sham2 is offline  
Unread 15th Aug 2012, 01:11 AM   #6
HyperActive Warrior
 
Join Date: 2012
Posts: 418
Thanks: 0
Thanked 19 Times in 19 Posts
Default
Re: Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

it doesn't really work.
locke815 is offline  
Unread 15th Aug 2012, 10:45 AM   #7
VIP Warrior
War Room Member
 
Join Date: 2006
Location: , , USA.
Posts: 1,795
Thanks: 70
Thanked 287 Times in 259 Posts
Default
Re: Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

Are you saying the Alert dialog is too small?
No, you can't control its size.
You need to do something custom with a form.
KirkMcD is offline  
Unread 18th Aug 2012, 04:58 AM   #8
Warrior Member
War Room Member
 
Join Date: 2011
Posts: 11
Thanks: 1
Thanked 1 Time in 1 Post
Default
Re: Is it possible to resize a window in this situation?
Share on: 
fb share twitter share gplus share more share

What about trying something like this...

1. You're using a confirm dialogue instead of an alert dialogue because you want the yes or no buttons, otherwise with the alert dialogue you only have the ok button and it's not really giving the user much of a choice - because he/she can't do anything until they click on the OK button anyway, which makes the alert dialogue box pointless for your situation.

2. With a confirm dialogue box you are now able to run a different set of instructions when the user clicks on the NO button, which wasn't possible with the alert dialogue box.

3. window.moveTo and window.resizeTo will usually work on popup windows. and here what I am doing is positioning the window to the top left and resizing the window to it's maximum available size.

4. I have called the askToProceed() function on form load like this... onload="askToProceed();". However, you could delete that and enter the code below within your HTML body, where ever you like:

<script type="text/javascript">
askToProceed();
</script>

Let me know if you have any questions.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script language="JavaScript">

function askToProceed()
{
response = confirm('Do you wish to proceed?');

if(response)
{
//if user clicked yes
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeig ht);

window.location.href = 'http://myurl.com';
}
else
{
//if user clicked no - Do Something Here
}
}
</script>

</head>

<body onload="askToProceed();">



</body>
</html>
Liran Williams is offline  
Closed Thread


Bookmarks

Tags
resize, situation, window


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 Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 04:19 AM.